'let' should support multiple comma-separated declarations
This commit is contained in:
parent
aa1c0c8e93
commit
d1d6a7a3fe
@ -592,7 +592,9 @@ static void declaration() {
|
||||
if (check(TOKEN_DEF)) {
|
||||
defDeclaration();
|
||||
} else if (match(TOKEN_LET)) {
|
||||
varDeclaration();
|
||||
do {
|
||||
varDeclaration();
|
||||
} while (match(TOKEN_COMMA));
|
||||
if (!match(TOKEN_EOL) && !match(TOKEN_EOF)) {
|
||||
error("Expected EOL after variable declaration.\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user