Skip to content

Commit 9a0fe78

Browse files
authoredNov 29, 2023
refact(rivet/token): use "Kind.KeywordBegin" instead of a constant for "keywordsTable"
1 parent ff070fb commit 9a0fe78

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎lib/rivet/src/token/Kind.ri

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ struct KindMap {
99
value: string;
1010
}
1111

12-
// NOTE: When adding modify this table, don't
13-
// forget to update keywordsTable to match
14-
// the modified values.
1512
static kindStrings := [
1613
KindMap(.Unknown, "unknown"),
1714
KindMap(.EndOfFile, "end of file"),
@@ -108,7 +105,7 @@ static kindStrings := [
108105
KindMap(.KwWhile, "while")
109106
];
110107

111-
static keywordsTable := kindStrings[51..];
108+
static keywordsTable := kindStrings[@as(uint, Kind.KeywordBegin)..];
112109

113110
public enum Kind < traits.Stringable {
114111
Unknown, // unknown

0 commit comments

Comments
 (0)
Please sign in to comment.