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

Reduce backtracking in Lua “for” statement parsing. #66

Merged
merged 2 commits into from
Aug 4, 2017

Conversation

samhocevar
Copy link
Contributor

When parsing “for a in …” the parser will currently first try to match a
rule of the form “for a = …” and then backtrack, causing the name “a” to
be parsed twice. This refactoring delays the choice and avoids backtracking.

This partly addresses the discussion in #32.

When parsing “for a in …” the parser will currently first try to match a
rule of the form “for a = …” and then backtrack, causing the name “a” to
be parsed twice. This refactoring delays the choice and avoids backtracking.

This partly addresses the discussion in taocpp#32.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.904% when pulling d705dab on lolengine:fix-lua-backtracking into ddc257b on taocpp:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.904% when pulling 5e63cff on lolengine:fix-lua-backtracking into ddc257b on taocpp:master.

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

Successfully merging this pull request may close these issues.

4 participants