-
Notifications
You must be signed in to change notification settings - Fork 5
/
A2S.YAML-tmLanguage
63 lines (51 loc) · 1.75 KB
/
A2S.YAML-tmLanguage
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Audiality 2 Script
scopeName: source.audiality_2_script
fileTypes: [a2s]
uuid: f064a4ef-4149-4676-8762-c77e4c85fcab
patterns:
- comment: Compiler directives
name: storage.type
match: \b(import|export|as|def|struct|wire|tempo|wave)\b
- comment: Keywords and instructions
name: keyword.control
match: \b(end|return|run|wait|sleep|wake|force|jump|loop|jz|jnz|jg|jl|jge|jle|if|ifz|ifl|ifg|ifle|ifge|for|else|while|wz|wl|wg|wle|wge|kill|detach|d|td|quant|rand|p2d|neg|set|ramp|debug|sizeof|and|or|xor|not)\b
- comment: Fixed VM control registers
name: storage.type
match: \b(tick|tr)\b
- comment: Builtin waves
name: storage.type
match: \b(off|pulse1|pulse2|pulse3|pulse4|pulse5|pulse10|pulse15|pulse20|pulse25|pulse30|pulse35|pulse40|pulse45|pulse50|square|saw|triangle|sine|hsine|asine|qsine|noise)\b
- comment: Numeric literal
match: \b((([0-9]+\.?[0-9]*)|(\.[0-9]+))(n|f)?|([0-9]+(n|f)[0-9]*))?\b
name: constant.numeric
- comment: Operator
match: ([-*=+!;:@])
name: keyword.operator
- comment: Braces, brackets, parentheses...
match: ([\{\}\(\)])
name: punctuation.separator.parameters.c
- comment: String literal
begin: \"
beginCaptures:
'0': {name: punctuation.definition.string.begin}
end: \"
endCaptures:
'0': {name: punctuation.definition.string.end}
name: string.quoted.double
patterns:
- include: '#string_escaped_char'
string_escaped_char:
patterns:
- match: \\(\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8})
name: constant.character.escape
- comment: C style comment
begin: /\*
end: \*/
name: comment.block
- comment: C++ style one-line comment
begin: //
end: $\n?
name: comment.block
...