-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Sourceror.parse_expression fails if the code only contains comments #63
Comments
I have fixed a similar issue here https://github.com/doorgan/sourceror/pull/58/files . Maybe that fix needs some additions. |
@zachdaniel I have tested it and for me it looks fine. iex(1)> Sourceror.parse_string!("# hello_world()")
{:__block__,
[
__sourceror__: %{trailing_block: true},
trailing_comments: [
%{
column: 1,
line: 1,
next_eol_count: 0,
previous_eol_count: 1,
text: "# hello_world()"
}
],
leading_comments: [],
line: 1
], [{:__block__, [trailing_comments: [], leading_comments: []], []}]} |
Yep, looks like its been fixed in github but not in the latest published hex version :) |
Thanks! |
Would be good to cut a release at some point if possible, as this can cause some pain points for Ash users that are using our provided formatter plugin, which fails on files that are only comments :) |
@zachdaniel I was meaning to cut a patch release after fixing a remaining issue with #53 but then life got in the way :) |
Thanks so much! |
For example:
Sourceror.parse("# hello_world()")
.I'm not sure what the path to contributing a fix would be, but happy to fix it with some guidance.
The text was updated successfully, but these errors were encountered: