Skip to content
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

ktn_dodger can't parse stringifyied macro arguments #41

Closed
elbrujohalcon opened this issue May 6, 2020 · 0 comments · Fixed by #46
Closed

ktn_dodger can't parse stringifyied macro arguments #41

elbrujohalcon opened this issue May 6, 2020 · 0 comments · Fixed by #46
Assignees
Labels
bug hacktoberfest Nice thing to work on for Hacktoberfest started

Comments

@elbrujohalcon
Copy link
Member

elbrujohalcon commented May 6, 2020

Stringifyied macro arguments are unparseable by either ktn_dodger or epp_dodger

-module macros.
-define(NASTY_MACRO(Code), {nasty, ??Code}).
2> rp(ktn_dodger:parse_file("/tmp/macros.erl", [{scan_opts, [text]}])).
{ok,[{tree,attribute,
           {attr,[{text,"module"},{location,1}],[],none},
           {attribute,{tree,atom,
                            {attr,[{text,"module"},{location,1}],[],none},
                            module},
                      [{tree,atom,
                             {attr,[{text,"module"},{location,1}],[],none},
                             macros}]}},
     {error,{2,erl_parse,["syntax error before: ","?"]}}]}
ok
3> epp_dodger:parse_file("/tmp/macros.erl").
{ok,[{tree,attribute,
           {attr,1,[],none},
           {attribute,{tree,atom,{attr,1,[],none},module},
                      [{tree,atom,{attr,1,[],none},macros}]}},
     {error,{2,erl_parse,["syntax error before: ","'?'"]}}]}
@elbrujohalcon elbrujohalcon added the hacktoberfest Nice thing to work on for Hacktoberfest label Aug 28, 2020
@elbrujohalcon elbrujohalcon added this to the For the formatter milestone Nov 11, 2020
@elbrujohalcon elbrujohalcon self-assigned this Nov 13, 2020
elbrujohalcon added a commit that referenced this issue Nov 14, 2020
…arse_stringi

[Fix #41] Parse stringyfied macros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hacktoberfest Nice thing to work on for Hacktoberfest started
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant