re-add throws as a keyword

This commit is contained in:
Dave Holoway
2020-06-08 12:40:39 +01:00
parent 04c0e97c81
commit 6fd6376dea

View File

@@ -115,7 +115,7 @@ function tokenize(source, offset = 0, length = source.length) {
* \w+ word * \w+ word
* ``` * ```
*/ */
const word_re = /^(?:(true|false)|(this|super|null)|(int|long|short|byte|float|double|char|boolean|void)|(new)|(instanceof)|(public|private|protected|static|final|abstract|native|volatile|transient)|(if|else|while|for|do|try|catch|finally|switch|case|default|return|break|continue|throw|synchronized|assert)|(class|enum|interface)|(extends|implements)|(package|import)|(.+))$/; const word_re = /^(?:(true|false)|(this|super|null)|(int|long|short|byte|float|double|char|boolean|void)|(new)|(instanceof)|(public|private|protected|static|final|abstract|native|volatile|transient)|(if|else|while|for|do|try|catch|finally|switch|case|default|return|break|continue|throw|synchronized|assert)|(class|enum|interface)|(extends|implements|throws)|(package|import)|(.+))$/;
const word_token_types = [ const word_token_types = [
'boolean-literal', 'boolean-literal',
'object-literal', 'object-literal',
@@ -126,7 +126,7 @@ function tokenize(source, offset = 0, length = source.length) {
'statement-kw', 'statement-kw',
'type-kw', 'type-kw',
'package-kw', 'package-kw',
'extimp-kw', 'eit-kw',
'ident' 'ident'
] ]
/** /**