forked from kevinmcdaniel/Sublime-Text-2-OpenEdge-ABL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathABL.YAML-tmLanguage
86 lines (66 loc) · 2.96 KB
/
ABL.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
81
82
83
84
85
86
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: OpenEdge ABL
scopeName: source.abl
fileTypes: ["w", "p", "i"]
uuid: 075bb86e-03ea-4fea-bac0-e11b9dc73e03
patterns:
- name: comment.block.source.abl
begin: /\*
end: \*/(?![^/]*?\*/)
- match: ('(?:'|.)*?')
name: string.single.source.abl
- name: string.double.source.abl
match: \"\"[a-zA-Z0-9_\.\-]+\"\"
- name: string.double.complex.abl
begin: (\"(?!\"[a-zA-Z]+)|\"\"[a-zA-Z]+)
end: \"(?!\")
patterns:
- name: constant.character.escape.abl
match: (~(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)|\"\")
- name: constant.numeric.source.abl
match: (?<!\w)((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))
- name: constant.language.source.abl
match: (?i)\b(true|false|yes|no(?!-))\b
- name: keyword.operator.source.abl
match: (?i)(\b(or|and|not|is)\b|(=|\+| - |/|<|>|,|\.))
- name: keyword.option.source.abl
match: (?i)(\b(return|function|return(s)?|forward|input|output|like|new|no-undo|no-box|no-labels|(share|no|exclusive)-lock|no-error|format|colon|label|init(ial)?|side-labels|width|primary|use-index)\b|@)
- name: keyword.statement.source.abl
match: (?i)\b(disp(lay)?|for|do|repeat|delete|create|update|empty|assign|import( unformatted)?|input\s+(from|close)|with|skip)\b
- name: keyword.type.source.abl
match: (?i)\b(as|for(?!\s+(each|first|last)))\b
- match: (?i)\b(like)\s+([a-zA-Z0-9_\.-]+),
captures:
'1': { name: keyword.type.source.abl }
'2': { name: storage.type.source.abl }
- name: keyword.control.source.abl
match: (?i)(\b(if|avail(able)?|down|where|else( if)?|each|first|last|while|find( first|last)?|then( do( transaction)?)?|next|page|quit)\b|(?<!-)(\bend\b(?!\s+procedure)))
- name: storage.type.define.abl
match: (?i)\b(def(ine)?\s+(((new\s+)?shared\s+)?(var(iable)?|stream|buffer)|((input|input-output|output)\s+param(eter)?)|temp-table|query)|form)\b
- name: storage.type.source.abl
match: (?i)\b(?<!&)(char(acter)?|(?<!-)handle|dataset(-handle)?|field|(?<!-)index|log(ical)?|int(eger|64)?|dec(imal)?|stream|temp-table|frame [a-z]+)(?!\s*\()\b
- name: storage.type.function.abl
match: (?i)(end (procedure|function))
- name: support.function.abl
match: (?i)(\b[a-z][a-z0-9_-]*?\b\s*)(?=\s*\(.*?\))
captures:
'1': { name: support.function.source.abl }
- name: support.function.abl
match: (?i)\b(run) ([a-z][a-z0-9_-]*)\b(\s*\(.*?\))?
captures:
'1': { name: keyword.statement.source.abl }
'2': { name: support.function.source.abl }
- name: meta.function.source.abl
match: (?i)(procedure)\s+([a-z0-9_-]+)
captures:
'1': { name: storage.type.function.abl }
'2': { name: entity.name.function.abl }
- name: meta.function.bracket.abl
match: (?i)(\{[a-z0-9_\./-]+)
captures:
'1': { name: support.function.source.abl }
- name: meta.function.bracket.abl
match: \}
captures:
'0': { name: support.function.source.abl }