Skip to content

Commit 00f806e

Browse files
committed
Get the alpha order of lexer keywords right
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]
1 parent 0d7ea70 commit 00f806e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jerry-core/parser/js/js-lexer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ static const keyword_string_t keyword_length_7[6] =
359359
LEXER_KEYWORD ("default", LEXER_KEYW_DEFAULT),
360360
LEXER_KEYWORD ("extends", LEXER_KEYW_EXTENDS),
361361
LEXER_KEYWORD ("finally", LEXER_KEYW_FINALLY),
362-
LEXER_KEYWORD ("private", LEXER_KEYW_PRIVATE),
363362
LEXER_KEYWORD ("package", LEXER_KEYW_PACKAGE),
363+
LEXER_KEYWORD ("private", LEXER_KEYW_PRIVATE),
364364
LEXER_KEYWORD_END ()
365365
};
366366

@@ -390,8 +390,8 @@ static const keyword_string_t keyword_length_9[3] =
390390
*/
391391
static const keyword_string_t keyword_length_10[3] =
392392
{
393-
LEXER_KEYWORD ("instanceof", LEXER_KEYW_INSTANCEOF),
394393
LEXER_KEYWORD ("implements", LEXER_KEYW_IMPLEMENTS),
394+
LEXER_KEYWORD ("instanceof", LEXER_KEYW_INSTANCEOF),
395395
LEXER_KEYWORD_END ()
396396
};
397397

0 commit comments

Comments
 (0)