File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ file_extensions:
5
5
- um
6
6
scope : source.umka
7
7
variables :
8
+ keyword : (break|case|const|continue|default|else|enum|for|fn|import|interface|if|in|map|return|str|struct|switch|type|var|weak)
8
9
builtin : (abs|append|atan|atan2|cap|ceil|copy|cos|delete|exit|exp|fabs|floor|fprintf|fscanf|insert|keys|len|log|make|memusage|new|printf|resume|round|scanf|selfhasptr|selftypeeq|sin|sizeof|sizeofself|slice|sort|sprintf|sqrt|sscanf|trunc|typeptr|valid|validkey)
9
10
ident : ' [A-Za-z_][A-Za-z_0-9]*'
10
11
typeident : ' _*[A-Z][A-Za-z_0-9]*'
@@ -164,6 +165,9 @@ contexts:
164
165
scope : punctuation.definition.parameters.begin.umka
165
166
push : function_param_trap
166
167
168
+ - match : ' \bfn\b'
169
+ scope : keyword.control.umka
170
+
167
171
# Definition
168
172
- match : ' \b({{ident}}){{space}}(\*?){{space}}(?=\()'
169
173
captures :
@@ -361,7 +365,7 @@ contexts:
361
365
3 : constant.enum.umka
362
366
363
367
# Keywords
364
- - match : ' \b(break|case|const|continue|default|else|enum|for|fn|import|interface|if|in|map|return|str|struct|switch|type|var|weak) \b'
368
+ - match : ' \b{{keyword}} \b'
365
369
scope : keyword.control.umka
366
370
367
371
# Ternary scoped
@@ -391,6 +395,12 @@ contexts:
391
395
3 : punctuation.separator.umka
392
396
4 : storage.type.umka
393
397
398
+ # Variadic type keyword capture
399
+ - match : ' (\.\.){{space}}\b{{keyword}}\b'
400
+ captures :
401
+ 1 : punctuation.separator.um
402
+ 2 : keyword.control.umka
403
+
394
404
# Variadic type
395
405
- match : ' (\.\.){{space}}({{ident}})'
396
406
captures :
You can’t perform that action at this time.
0 commit comments