summaryrefslogtreecommitdiff
path: root/src/java_tokens.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-09-29 09:39:49 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-09-29 09:50:47 +0200
commitd196d51e07f50f3510c43ad375c5559b58860023 (patch)
tree3432b8e99e306d0ece9f29ddad1e2945f88a1481 /src/java_tokens.hh
parent1e9e51dae1c01bab7562911b958c47528b8011c8 (diff)
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.
Diffstat (limited to 'src/java_tokens.hh')
-rw-r--r--src/java_tokens.hh5
1 files changed, 4 insertions, 1 deletions
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,