aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
diff options
context:
space:
mode:
authorJaden2022-08-24 14:51:10 +0000
committerGitHub2022-08-24 14:51:10 +0000
commit2b16fd43f901753fcedd87b9687ce535c4108203 (patch)
treed1eb1e15aee588d75ffa8f335b06b943ad03be69 /runtime/queries
parentccae718a67f39542281125610764b733d90b26f8 (diff)
feat(lang): Add esdl grammar (#3526)
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/esdl/highlights.scm74
1 files changed, 74 insertions, 0 deletions
diff --git a/runtime/queries/esdl/highlights.scm b/runtime/queries/esdl/highlights.scm
new file mode 100644
index 00000000..7dfde022
--- /dev/null
+++ b/runtime/queries/esdl/highlights.scm
@@ -0,0 +1,74 @@
+; Keywords
+[
+ "module"
+ "using"
+ "single"
+ "multi"
+ "link"
+ "property"
+ "constraint"
+ "tuple"
+ "annotation"
+ "abstract"
+ "scalar"
+ "type"
+ "required"
+ "optional"
+ "extension"
+ "function"
+] @keyword
+
+(modifier) @keyword
+(extending) @keyword
+
+(module name: (identifier) @namespace)
+(object_type) @type
+
+(comment) @comment
+
+; Properties
+(property) @variable.other.member
+(link) @variable.other.member
+(annotation) @variable.other.member
+
+(identifier) @variable
+(string) @string
+(edgeql_fragment) @string
+; Builtins
+
+(type) @type
+[
+ "str"
+ "bool"
+ "int16"
+ "int32"
+ "int64"
+ "float32"
+ "float64"
+ "bigint"
+ "decimal"
+ "json"
+ "uuid"
+ "bytes"
+ "datetime"
+ "duration"
+ "sequence"
+ "anytype"
+] @type.builtin
+
+(true) @constant.builtin
+(false) @constant.builtin
+(null) @constant.builtin
+
+; Delimiters
+[
+ ";"
+ ","
+] @punctuation.delimiter
+
+; Operators
+[
+ "->"
+ ":="
+] @operator
+