mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00

This was never fully hooked up in platforms, and the plan is to replace the need for this with doing purity-inference on normal `expect` statements. On the other hand, fuzzing is finding some bugs caused by having a hyphenated keyword, so this is a great time to go ahead and remove it!
26 lines
765 B
Rust
26 lines
765 B
Rust
// These keywords are valid in expressions
|
|
pub const IF: &str = "if";
|
|
pub const THEN: &str = "then";
|
|
pub const ELSE: &str = "else";
|
|
pub const WHEN: &str = "when";
|
|
pub const AS: &str = "as";
|
|
pub const IS: &str = "is";
|
|
pub const DBG: &str = "dbg";
|
|
pub const IMPORT: &str = "import";
|
|
pub const EXPECT: &str = "expect";
|
|
pub const RETURN: &str = "return";
|
|
pub const CRASH: &str = "crash";
|
|
|
|
// These keywords are valid in imports
|
|
pub const EXPOSING: &str = "exposing";
|
|
|
|
// These keywords are valid in types
|
|
pub const IMPLEMENTS: &str = "implements";
|
|
pub const WHERE: &str = "where";
|
|
|
|
// These keywords are valid in headers
|
|
pub const PLATFORM: &str = "platform";
|
|
|
|
pub const KEYWORDS: [&str; 11] = [
|
|
IF, THEN, ELSE, WHEN, AS, IS, DBG, IMPORT, EXPECT, RETURN, CRASH,
|
|
];
|