tree-sitter-dataweave 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,121 @@
1
+ ; DataWeave Highlights
2
+
3
+ ; Comments
4
+ (line_comment) @comment
5
+ (block_comment) @comment
6
+
7
+ ; Directives
8
+ [
9
+ "%dw"
10
+ "dw"
11
+ "%output"
12
+ "output"
13
+ "%input"
14
+ "input"
15
+ "%var"
16
+ "var"
17
+ "%fun"
18
+ "%function"
19
+ "fun"
20
+ "%type"
21
+ "type"
22
+ "%ns"
23
+ "%namespace"
24
+ "ns"
25
+ "namespace"
26
+ "%import"
27
+ "import"
28
+ ] @keyword.directive
29
+
30
+ ; Keywords
31
+ [
32
+ "if"
33
+ "else"
34
+ "match"
35
+ "case"
36
+ "matches"
37
+ "do"
38
+ "default"
39
+ "as"
40
+ "is"
41
+ "and"
42
+ "or"
43
+ "not"
44
+ "to"
45
+ "from"
46
+ ] @keyword
47
+
48
+ ; Constants & Literals
49
+ (boolean) @boolean
50
+ (null) @constant.builtin
51
+ (number) @number
52
+ (date_time) @string.special
53
+ (regex) @string.regex
54
+
55
+ ; Strings
56
+ (string) @string
57
+ (escape_sequence) @string.escape
58
+ (interpolation ["$(" ")"] @punctuation.special)
59
+
60
+ ; Types
61
+ (type_name) @type.builtin
62
+ (type_directive name: (identifier) @type)
63
+ (namespace_uri) @string.special
64
+ (qualified_name namespace: (identifier) @module)
65
+ (qualified_name name: (identifier) @property)
66
+
67
+ ; Functions & Calls
68
+ (fun_directive name: (identifier) @function)
69
+ (call_expression function: (identifier) @function.call)
70
+ (call_expression function: (module_path (identifier) @function.call))
71
+
72
+ ; Properties & Keys
73
+ (pair key: (identifier) @property)
74
+ (member_expression property: (identifier) @property)
75
+ (descendant_expression property: (identifier) @property)
76
+ (multi_value_expression property: (identifier) @property)
77
+
78
+ ; Parameters & Variables
79
+ (parameter name: (identifier) @variable.parameter)
80
+ (anonymous_parameter) @variable.builtin
81
+ (var_directive name: (identifier) @variable)
82
+
83
+ ; Operators
84
+ [
85
+ "+"
86
+ "-"
87
+ "*"
88
+ "/"
89
+ "++"
90
+ "--"
91
+ "<<"
92
+ ">>"
93
+ "#"
94
+ "=="
95
+ "!="
96
+ "~="
97
+ "<"
98
+ "<="
99
+ ">"
100
+ ">="
101
+ "->"
102
+ "?:"
103
+ "::"
104
+ "---"
105
+ ] @operator
106
+
107
+ ; Punctuation
108
+ [
109
+ "("
110
+ ")"
111
+ "["
112
+ "]"
113
+ "{"
114
+ "}"
115
+ ] @punctuation.bracket
116
+
117
+ [
118
+ ","
119
+ ":"
120
+ "."
121
+ ] @punctuation.delimiter