Skip to content

Commit

Permalink
refact(rivet/token): use "Kind.KeywordBegin" instead of a constant fo…
Browse files Browse the repository at this point in the history
…r "keywordsTable"
  • Loading branch information
StunxFS authored Nov 29, 2023
1 parent ff070fb commit 9a0fe78
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/rivet/src/token/Kind.ri
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ struct KindMap {
value: string;
}

// NOTE: When adding modify this table, don't
// forget to update keywordsTable to match
// the modified values.
static kindStrings := [
KindMap(.Unknown, "unknown"),
KindMap(.EndOfFile, "end of file"),
Expand Down Expand Up @@ -108,7 +105,7 @@ static kindStrings := [
KindMap(.KwWhile, "while")
];

static keywordsTable := kindStrings[51..];
static keywordsTable := kindStrings[@as(uint, Kind.KeywordBegin)..];

public enum Kind < traits.Stringable {
Unknown, // unknown
Expand Down

0 comments on commit 9a0fe78

Please sign in to comment.