Skip to content

Commit 5298583

Browse files
committed
add match and contains token
1 parent d5ef4ff commit 5298583

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/main/grammars/datalog.bnf

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777
MAX="min"
7878
SUM="sum"
7979

80+
CONTAINS = "contains"
81+
MATCH = "match"
82+
8083
IDENTIFIER = 'regexp:[_?a-zA-Z][_?a-zA-Z0-9]+|[?a-zA-Z]'
8184

8285
LESS_COLON='<:'

src/main/grammars/datalog.flex

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ MACRO_CONTINUATION = \\[ \t\f]*{LINE_BREAK}
102102
"max" { return MAX; }
103103
"min" { return MIN; }
104104
"sum" { return SUM; }
105+
"match" { return MATCH; }
106+
"contains" { return CONTAINS; }
105107

106108
"lnot" { return LNOT; }
107109
"lor" { return LOR; }

src/main/kotlin/com/lfrobeen/datalog/lang/completion/DatalogKeywordCompletionContributor.kt

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class DatalogKeywordCompletionContributor : CompletionContributor() {
3333
"#endif",
3434
"#define",
3535
"#pragma",
36+
"match",
37+
"contains",
3638
)
3739
)
3840
}

0 commit comments

Comments
 (0)