-
Notifications
You must be signed in to change notification settings - Fork 1
/
Omnis.YAML-tmLanguage
80 lines (69 loc) · 2.48 KB
/
Omnis.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Omnis
scopeName: source.omh
fileTypes: [omh,omnis]
uuid: c9bbc41d-d7e5-4afc-98ac-95b2b7e354bd
patterns:
- include: '#repository'
- include: '#keywords'
- include: '#comments'
- include: '#strings'
- include: '#constants'
- include: '#variables'
- include: '#methods'
- name: meta.method-call.omh
comment: Variables like $PARAM1, $TM_SELECTION
match: \$([A-Za-z][A-Za-z0-9_]+)
repository:
keywords:
patterns:
- match: ^[\s]*(Do code method|Do method|Do)\s
name: keyword.control.omh
- match: \sReturns\s|\sReturns\n
name: keyword.control.omh
- match: ^[\s]*(as|If|Begin statement|Begin text block|Break to end of Loop|Break to end of loop|Calculate|Case|Default|Else If|Else|End For|End If|end statement|End Switch|End text block|End While|For|from|Get statement|Get text block|JavaScript|Platform newline|Repeat|Send to trace log|Sta|step|Switch|Text|to|Until|While|Working message|Begin SQL script|Get SQL script|End SQL script|Execute SQL script|list lines|SQL|Fetch next row into|Build list|Sta|Quit method|End statement)\b|\bstep|\b(as)\b|from|On\s.*?\s|Set reference
name: keyword.control.omh
- match: ^[\s]*Open window instance
name: keyword.other.omh
comments:
patterns:
- name: comment.block.omh
begin: ^[\s]*\;
end: \n
captures:
'0': {name: punctuation.definition.comment.omh}
- name: comment.line.omh
begin: \;\;
end: \n
captures:
'0': {name: punctuation.definition.comment.omh}
- name: constant.language.omh
# Calculate myVar as
match: \#(NULL|SHIFT)|(\bk[A-Z]{1}[A-Za-z0-9_]+)
strings:
patterns:
- name: string.quoted.double.omh
begin: \"
end: \"
beginCaptures:
'0': { name: punctuation.definition.string.begin.omh }
endCaptures:
'0': { name: punctuation.definition.string.end.omh }
patterns:
- include: '#string_escaped_char'
- include: '#string_placeholder'
- name: string.quoted.single.omh
begin: \'
end: \'
beginCaptures:
'0': { name: punctuation.definition.string.begin.omh }
endCaptures:
'0': { name: punctuation.definition.string.end.omh }
patterns:
- include: '#string_escaped_char'
- include: '#string_placeholder'
variables:
patterns:
- name: variable.language.omh
match: \#[A-Z0-9]+|\$c.*?\.