We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Preprocessor statements, at least #define, must have a trailing newline to be recognized.
#define
No trailing newline means it gets expanded into separate tokens:
> s = "#define ASDF" > for t, v in lexer.cpp(s) do print(t .. " -> " .. tostring(v)) end # -> # iden -> define iden -> ASDF
With a newline, it's recognized as a preprocessor statement.
> s = "#define ASDF\n" > for t, v in lexer.cpp(s) do print(t .. " -> " .. tostring(v)) end prepro -> #define ASDF
Ideally the behavior would be consistent for both cases. I need to be able to process third-party headers that may or may not end in a newline.
The text was updated successfully, but these errors were encountered:
This is still happening on Penlight 1.14.0:
Sorry, something went wrong.
Contributions welcome. ;-)
No branches or pull requests
Preprocessor statements, at least
#define
, must have a trailing newline to be recognized.No trailing newline means it gets expanded into separate tokens:
With a newline, it's recognized as a preprocessor statement.
Ideally the behavior would be consistent for both cases. I need to be able to process third-party headers that may or may not end in a newline.
Environment:
The text was updated successfully, but these errors were encountered: