Skip to content

more ocaml less typescript #94

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

Merged
merged 1 commit into from
Feb 10, 2016
Merged

more ocaml less typescript #94

merged 1 commit into from
Feb 10, 2016

Conversation

bobzhang
Copy link
Member

No description provided.

bobzhang added a commit that referenced this pull request Feb 10, 2016
@bobzhang bobzhang merged commit 7000eca into master Feb 10, 2016
@bobzhang bobzhang deleted the more_ocaml_less_ts branch February 10, 2016 15:49
EduardoRFS pushed a commit to EduardoRFS/bucklescript that referenced this pull request Apr 5, 2021
kevinbarabash pushed a commit to kevinbarabash/rescript-compiler that referenced this pull request Dec 24, 2021
The previous approach put the scanner in "Template" mode when the parser
was going to parse template literals. This resulted in some very awkward
code; upon scanning a token there was logic checking whether we were
in "Template" mode. Every non-template literal token would pay for this
extra branch…

The new parsing strategy works differently: when the parser needs to
parse template literals, it just asks the scanner immediately for a
template literal token. This is both more performant an easier to reason
about. Template literals are a different language, it makes sense to
split this into a separate scanning function.
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.

1 participant