From d196d51e07f50f3510c43ad375c5559b58860023 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 29 Sep 2025 09:39:49 +0200 Subject: java: Add tokens support for Java 21 Some new keywords, I opted to modify java-8 grammar to use the new names, even if they are not going to match anything. Makes the tokenizer easier to write. --- src/java_tokens.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/java_tokens.hh') diff --git a/src/java_tokens.hh b/src/java_tokens.hh index 6fbefcb..c4e27c0 100644 --- a/src/java_tokens.hh +++ b/src/java_tokens.hh @@ -25,7 +25,10 @@ struct Token { kIdentifier, // str is keyword, int_value is Keyword index - kKeyword, + kReservedKeyword, + + // str is keyword, int_value is Keyword index + kContextualKeyword, // str is separator, int_value is Separator index kSeparator, -- cgit v1.3