-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document epp:scan_erl_form/1 and add epp:scan_file/2 #2658
Conversation
|
||
scan_file(Epp) -> | ||
case scan_erl_form(Epp) of | ||
{ok,Toks} -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dialyzer
is still unhappy :(
epp.erl:265: The pattern
{'ok', Toks} can never match the type
{'eof',
non_neg_integer() | {non_neg_integer(), pos_integer()}} |
{'error',
{non_neg_integer() | {non_neg_integer(), pos_integer()},
atom(),
_},
non_neg_integer() | {non_neg_integer(), pos_integer()}} |
{'ok',
[{atom(), erl_anno:anno()} |
{atom(), erl_anno:anno(), atom() | string() | number()}],
non_neg_integer() | {non_neg_integer(), pos_integer()}}
epp.erl:267: The pattern
{'error', E} can never match the type
{'eof',
non_neg_integer() | {non_neg_integer(), pos_integer()}} |
{'error',
{non_neg_integer() | {non_neg_integer(), pos_integer()},
atom(),
_},
non_neg_integer() | {non_neg_integer(), pos_integer()}} |
{'ok',
[{atom(), erl_anno:anno()} |
{atom(), erl_anno:anno(), atom() | string() | number()}],
non_neg_integer() | {non_neg_integer(), pos_integer()}}
c5d914e
to
a6e6fd3
Compare
Fixed type spec, rebased and squashed. But I can't see why it's failing now: |
You need to either put the |
a6e6fd3
to
1821791
Compare
1821791
to
81bce85
Compare
Fixed doc and rebased. |
Merged, thanks for the PR! |
epp:scan_erl_form/1 was undocumented, but in use by edoc and there were tests for it.
epp:scan_file/2 can be used to implement e.g. a standalone token level preprocessor pass, like gcc -E.