Skip to content

Commit 0a696d9

Browse files
committed
update IR syntax
1 parent 01140b5 commit 0a696d9

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

syntax/goloir.vim

+17-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ endif
88
syn keyword goloIrNodeType Block Assignment Return LocalReference
99

1010
syn match goloIrNodeType "Function \([^:]\+\)\@="
11+
syn match goloIrNodeType "Local function \([^:]\+\)\@="
1112
syn match goloIrFunctionName "\%(Function \)\@<=<\=\h[a-zA-Z0-9$_]\+>\=\(\s\+\)\@="
13+
syn match goloIrFunctionName "\%(Local function \)\@<=<\=\h[a-zA-Z0-9$_]\+>\=\(\s\+\)\@="
1214
syn keyword goloIrNodeType Augmentation nextgroup=goloIrTarget
1315
syn match goloIrTarget "\%(Augmentation on \)\@<=\h[a-zA-Z0-9_.]\+"
1416

1517
syn match goloIrNodeType "Reference lookup"
1618
syn match goloIrNodeType "Binary operator"
1719
syn match goloIrNodeType "Method invocation"
1820
syn match goloIrNodeType "Function call\(:\)\@="
19-
syn match goloIrNodeType "Closure reference"
21+
syn match goloIrNodeType "Closure reference\(:\)\@="
22+
syn match goloIrNodeType "Closure\(:\)\@="
23+
syn match goloIrNodeType "ModuleImport"
24+
syn match goloIrNodeType "Match"
25+
syn match goloIrNodeType "When"
26+
syn match goloIrNodeType "Otherwise"
27+
syn match goloIrNodeType "Constant"
28+
syn match goloIrNodeType "Conditional"
2029

2130
syn match goloIrDelimiter "{"
2231
syn match goloIrDelimiter "}"
@@ -32,12 +41,15 @@ syn match goloIrNodeProperty "on module state?"
3241
syn match goloIrNodeProperty "anonymous?"
3342
syn match goloIrNodeProperty "named arguments?"
3443

35-
syn match goloIrNodeProperty "kind=" nextgroup=goloIrConstant
36-
syn match goloIrNodeProperty "name=" nextgroup=goloIrString
37-
syn match goloIrNodeProperty "index=" nextgroup=goloIrNumber
44+
syn match goloIrNodeProperty "kind\(=\)\@=" nextgroup=goloIrConstant
45+
syn match goloIrNodeProperty "name\(=\)\@=" nextgroup=goloIrString
46+
syn match goloIrNodeProperty "index\(=\)\@=" nextgroup=goloIrNumber
3847
syn match goloIrNodeProperty "regular arguments at index" nextgroup=goloIrNumber skipwhite
48+
syn match goloIrNodeProperty "packageAndClass"
49+
syn match goloIrNodeProperty "implicit"
50+
syn match goloIrNodeProperty "selfname\(:\)\@="
3951

40-
syn keyword goloIrConstant true false CONSTANT MODULE_CONSTANT
52+
syn keyword goloIrConstant true false CONSTANT MODULE_CONSTANT null
4153
syn match goloIrString "'[^']*'"
4254

4355

0 commit comments

Comments
 (0)