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

Adjacent broken entries shouldn't be merged into a single Junk #185

Closed
stasm opened this issue Oct 19, 2018 · 1 comment · Fixed by #211
Closed

Adjacent broken entries shouldn't be merged into a single Junk #185

stasm opened this issue Oct 19, 2018 · 1 comment · Fixed by #211
Labels

Comments

@stasm
Copy link
Contributor

stasm commented Oct 19, 2018

foo = {1foo}
bar = {2bar}

should produce two Junk entries in the AST. Right now they're are merged into a single one because junk is first parsed line-by-line (junk_line) and it's only combined in abstract.mjs. We'll likely need two grammar productions, junk_first_line and junk_follow_line, so that we can distinguish between them in abstract.mjs and only join the first line with its follow lines.

@stasm stasm changed the title Adjacent broken entries shouldn't be merged into a signle Junk Adjacent broken entries shouldn't be merged into a single Junk Oct 19, 2018
@stasm stasm added the syntax label Oct 19, 2018
@stasm
Copy link
Contributor Author

stasm commented Nov 7, 2018

In #211 I implemented an approach which is much closer to how our tooling parsers deal with error recovery: the junk is parsed until a new line which looks like it may be an Entry start is encountered.

@stasm stasm closed this as completed in #211 Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant