make default a modifer keyword for interface default method support

This commit is contained in:
Dave Holoway
2020-06-07 16:22:38 +01:00
parent 4750212484
commit 6ef64b1d9c
2 changed files with 9 additions and 2 deletions

View File

@@ -241,8 +241,8 @@ function tokenize(source) {
}
if (m[4]) {
// ident or keyword
const KEYWORDS = /^(assert|break|case|catch|class|const|continue|default|do|else|enum|extends|finally|for|goto|if|implements|import|interface|new|package|return|super|switch|throw|throws|try|while)$/;
const MODIFIER_KEYWORDS = /^(abstract|final|native|private|protected|public|static|strictfp|synchronized|transient|volatile)$/;
const KEYWORDS = /^(assert|break|case|catch|class|const|continue|do|else|enum|extends|finally|for|goto|if|implements|import|interface|new|package|return|super|switch|throw|throws|try|while)$/;
const MODIFIER_KEYWORDS = /^(abstract|final|native|private|protected|public|static|strictfp|synchronized|transient|volatile|default)$/;
const PRIMITIVE_TYPE_KEYWORDS = /^(int|boolean|byte|char|double|float|long|short|void)$/
const LITERAL_VALUE_KEYWORDS = /^(this|true|false|null)$/;
const OPERATOR_KEYWORDS = /^(instanceof)$/;