diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-05 13:05:45 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-05 13:05:45 +0200 |
commit | 6850df5cafb5766a0511cc9a194b05e59816ecde (patch) | |
tree | f007a6c2452abc240a950f4dac995ff100f01735 /lexer.c | |
parent | b1391241a116d794a091c97bbb63b485f6514fb7 (diff) |
lexer: properly handle reserved `if` word
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -75,7 +75,6 @@ static const struct token tokens[] = { { T_ASSUB, "-=", 2 }, { T_DEC, "--", 2 }, { T_INC, "++", 2 }, - { T_IF, "if", 2 }, { T_EQ, "==", 2 }, { T_NE, "!=", 2 }, { T_LE, "<=", 2 }, @@ -146,6 +145,7 @@ static const struct token reserved_words[] = { { T_NUMBER, "NaN", 3, parse_number }, { T_TRY, "try", 3 }, { T_FOR, "for", 3 }, + { T_IF, "if", 2 }, { T_IN, "in", 2 }, }; |