From 0e1b863228ad05774a390493087b3901fa82b31b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 10 Nov 2020 12:53:17 +0100 Subject: 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 --- lexer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lexer.c b/lexer.c index 3555927..31a4daf 100644 --- a/lexer.c +++ b/lexer.c @@ -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 }, }; -- cgit v1.2.3