fix parser reserved words

This commit is contained in:
Dmitry Vasilev
2023-12-07 00:44:15 +08:00
parent c6108e5002
commit de40cc9b8a
3 changed files with 13 additions and 10 deletions

View File

@@ -32,6 +32,12 @@ import {
export const tests = [
test('reserved words', () => {
const result = do_parse('let catch')
assert_equal(result.ok, false)
assert_equal(result.problems[0].index, 4)
}),
test('invalid token in the beginning', () => {
const result = do_parse('# import')
assert_equal(result, {