-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInputMaster.sublime-syntax
42 lines (42 loc) · 1.04 KB
/
InputMaster.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%YAML 1.2
---
name: InputMaster
file_extensions:
- im
scope: source.im
variables:
ident: '[A-Z][A-Za-z_0-9]*'
comment: '√#'
contexts:
prototype:
- match: ' *{{comment}}!.*$'
scope: string.comment.im
- match: ' *{{comment}}.*$'
scope: comment.line.im
- match: ' *√\((?={{ident}}\))'
push: preprocessor
scope: keyword.operator.preprocessor.im
preprocessor:
- match: '\)'
scope: keyword.operator.preprocessor.im
pop: true
main:
- match: '^ *√> +(Process|Window|Flag|InputMode|ComposeMode) '
scope: keyword.other.section.im
push: arguments
- match: '^ *√(:|\+) +'
scope: keyword.operator.other.im
push: command_prefix
- match: '^ *([^ ](?!{{comment}}))+ +'
push: command_prefix
arguments:
- match: '√,'
scope: keyword.operator.argument-delimiter.im
- match: '$'
pop: true
command_prefix:
- match: '{{ident}}(?= |$|{{comment}})'
scope: entity.name.function.im
set: arguments
- match: '(?=)'
pop: true