Skip to content

Conversation

@rhendric
Copy link
Contributor

In any program where a } character occurred anywhere before a template
literal, the lexer was incorrectly tokenizing the } and all characters
up through the initial backquote as a template tail. By adding an
additional piece of state to the parser monad, the lexer now will only
recognize a TemplateMiddleToken or a TemplateTailToken if the parser is
expecting one.

Fixes #104.

In any program where a `}` character occurred anywhere before a template
literal, the lexer was incorrectly tokenizing the `}` and all characters
up through the initial backquote as a template tail. By adding an
additional piece of state to the parser monad, the lexer now will only
recognize a TemplateMiddleToken or a TemplateTailToken if the parser is
expecting one.
Copy link
Collaborator

@erikd erikd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@erikd erikd merged commit 54fecb9 into quintenkasteel:new-ast Sep 24, 2019
@rhendric rhendric deleted the fix/104 branch September 25, 2019 03:02
@rhendric rhendric mentioned this pull request Sep 29, 2019
9 tasks
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

Successfully merging this pull request may close these issues.

strings with backticks are misrecognized as template literals

2 participants