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

Inline comment support #1

Open
baurse opened this issue Aug 31, 2021 · 2 comments
Open

Inline comment support #1

baurse opened this issue Aug 31, 2021 · 2 comments

Comments

@baurse
Copy link
Owner

baurse commented Aug 31, 2021

As can be seen in test_comment_in_table inline comments are technically supported, just not widely implemented.
For all non-inter-table statements, all comments after a statement are treated as belonging to the next statement, which is not correct.

For the table they are implemented in builder.parse_table_constructor and builder.parse_field_list. This should be generalizable to all other statements

@baurse
Copy link
Owner Author

baurse commented Sep 7, 2021

Inline comments are now associated to the correct comment, but not yet saved separately from normal line comments

@baurse
Copy link
Owner Author

baurse commented Oct 30, 2021

As such, the following

-- Comment before  
return -- Comment line  
-- Comment after

is turned into

-- Comment before
-- Comment line
return
-- Comment after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant