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

Get the alpha order of lexer keywords right #891

Merged

Conversation

akosthekiss
Copy link
Member

Two keywords violate the ordering. Should someone depend on the
alpha order in the future (because the keyword_length_* arrays
seem to be ordered) then this issue will be a nightmare to debug.
Better get this right now.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]

@akosthekiss akosthekiss added bug Undesired behaviour minor parser Related to the JavaScript parser labels Feb 17, 2016
@zherczeg
Copy link
Member

LGTM.

The list is scanned lineraly, so ordering is not relevant, but we might use a binary search later, so this is a good catch.

Two keywords violate the ordering. Should someone depend on the
alpha order in the future (because the `keyword_length_*` arrays
seem to be ordered)` then this issue will be a nightmare to debug.
Better get this right now.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
@akosthekiss akosthekiss merged commit b2f3ec2 into jerryscript-project:master Feb 17, 2016
@akosthekiss akosthekiss deleted the lexer-keyword-order branch February 17, 2016 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Undesired behaviour minor parser Related to the JavaScript parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants