Define and use IMPLEMENTS const in roc_parse::keyword

This commit is contained in:
Bryce Miller 2023-05-29 07:21:27 -04:00
parent 9640fcb6d4
commit e514d0cb83
No known key found for this signature in database
GPG key ID: F1E97BF8DF152350
12 changed files with 37 additions and 26 deletions

View file

@ -1,3 +1,4 @@
// These keywords are valid in expressions
pub const IF: &str = "if";
pub const THEN: &str = "then";
pub const ELSE: &str = "else";
@ -9,4 +10,8 @@ pub const EXPECT: &str = "expect";
pub const EXPECT_FX: &str = "expect-fx";
pub const CRASH: &str = "crash";
// These keywords are valid in types
pub const IMPLEMENTS: &str = "implements";
pub const WHERE: &str = "where";
pub const KEYWORDS: [&str; 10] = [IF, THEN, ELSE, WHEN, AS, IS, DBG, EXPECT, EXPECT_FX, CRASH];