Skip to main content

conjure_cp_essence_parser/parser/
keyword_checks.rs

1const KEYWORDS: [&str; 25] = [
2    "forall",
3    "exists",
4    "such",
5    "that",
6    "letting",
7    "find",
8    "findAux",
9    "minimise",
10    "maximise",
11    "subject",
12    "to",
13    "where",
14    "and",
15    "or",
16    "not",
17    "if",
18    "then",
19    "else",
20    "in",
21    "sum",
22    "product",
23    "bool",
24    "pareto",
25    "minimising",
26    "maximising",
27];
28
29pub fn is_keyword_identifier(identifier: &str) -> bool {
30    KEYWORDS.contains(&identifier)
31}