diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-11-10 12:53:17 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-11-10 12:53:17 +0100 |
commit | 0e1b863228ad05774a390493087b3901fa82b31b (patch) | |
tree | bb12330a31e1dbf0b98ffcb47de8c0f19c742af6 | |
parent | 41385a0381a89516fd99989aa3a7dd84c6c33d64 (diff) |
lexer: accept "let" as synonym for "local"
This brings the utpl script syntax closer to ES5/ES6 and allows to use
existing syntax highlightings in IDEs and editors.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | lexer.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -152,6 +152,7 @@ static const struct token reserved_words[] = { { T_DOUBLE, "NaN", 3, { .d = NAN } }, { T_TRY, "try", 3 }, { T_FOR, "for", 3 }, + { T_LOCAL, "let", 3 }, { T_IF, "if", 2 }, { T_IN, "in", 2 }, }; |