Skip to content

Commit 40ddc0d

Browse files
committed
fix: allow object as a reserved identifier
1 parent 90ebdcd commit 40ddc0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/define-grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ module.exports = function defineGrammar(dialect) {
971971

972972
_type_identifier: $ => alias($.identifier, $.type_identifier),
973973

974-
_reserved_identifier: ($, previous) => choice(
974+
_reserved_identifier: (_, previous) => choice(
975975
'declare',
976976
'namespace',
977977
'type',
@@ -987,6 +987,7 @@ module.exports = function defineGrammar(dialect) {
987987
'string',
988988
'symbol',
989989
'export',
990+
'object',
990991
previous
991992
),
992993
},

0 commit comments

Comments
 (0)