Skip to content

Commit

Permalink
Remove keywords from reserved names
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew committed Nov 2, 2022
1 parent 48b6787 commit d656e24
Showing 1 changed file with 1 addition and 63 deletions.
64 changes: 1 addition & 63 deletions packages/langium/src/grammar/langium-grammar-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,57 +723,6 @@ function isEmptyRule(rule: ast.AbstractRule): boolean {
}

const reservedNames = new Set([
// Keywords
'abstract',
'arguments',
'async',
'await',
'break',
'byte',
'case',
'catch',
'class',
'const',
'continue',
'debugger',
'default',
'delete',
'do',
'else',
'enum',
'export',
'extends',
'false',
'finally',
'for',
'function',
'if',
'implements',
'import',
'in',
'instanceof',
'interface',
'let',
'long',
'new',
'null',
'package',
'private',
'protected',
'public',
'return',
'static',
'super',
'switch',
'this',
'throw',
'try',
'typeof',
'var',
'void',
'while',
'with',
'yield',
// Built-in objects, properties and methods
// Collections
'Array',
Expand Down Expand Up @@ -845,16 +794,5 @@ const reservedNames = new Set([
'Date',
'Intl',
'eval',
'prototype',
'hasOwnProperty',
'isPrototypeOf',
'length',
'toString',
'undefined',
'valueOf',
'clearInterval',
'setInterval',
'clearTimeout',
'setTimeout',
'process',
'undefined'
]);

0 comments on commit d656e24

Please sign in to comment.