abl-tmlanguage 1.1.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +54 -1
  3. package/abl.tmLanguage.json +3534 -230
  4. package/azure-pipelines.yml +3 -2
  5. package/package.json +7 -6
  6. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
  7. package/spec/annotations/annotation.spec.js +232 -0
  8. package/spec/array-extent/issue#5.spec.js +18 -18
  9. package/spec/blocks/finally-blocks.spec.js +90 -0
  10. package/spec/blocks/on-quit.spec.js +59 -0
  11. package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
  12. package/spec/db-table-and-field/fields-except.spec.js +69 -0
  13. package/spec/db-table-and-field/foreach.spec.js +588 -0
  14. package/spec/db-table-and-field/issue#88.spec.js +120 -0
  15. package/spec/define-buffer/create-buffer.spec.js +110 -0
  16. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  17. package/spec/define-parameter/simple-single-line.spec.js +140 -100
  18. package/spec/define-stream/simple-single-line.spec.js +32 -31
  19. package/spec/define-temp-table/define-index.spec.js +138 -0
  20. package/spec/define-variable/extent.spec.js +228 -0
  21. package/spec/define-variable/issue#6.spec.js +256 -198
  22. package/spec/define-variable/issue#9.spec.js +38 -32
  23. package/spec/define-variable/simple-single-line.spec.js +168 -87
  24. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  25. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  26. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  27. package/spec/do/do-blocks.spec.js +224 -0
  28. package/spec/do/issue#3.spec.js +69 -60
  29. package/spec/function-call/nested-functions.spec.js +128 -0
  30. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  31. package/spec/global-scoped-define/global-define.spec.js +11 -11
  32. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  33. package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
  34. package/spec/include/vscode-abl-issue#45.spec.js +15 -15
  35. package/spec/include/vscode-abl-issue#77.spec.js +129 -0
  36. package/spec/include/vscode-abl-issue#80.spec.js +40 -27
  37. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
  38. package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
  39. package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
  40. package/spec/method-attribute-property-call/method-call.spec.js +112 -0
  41. package/spec/method-definition/constructor.spec.js +174 -0
  42. package/spec/method-definition/method.spec.js +320 -0
  43. package/spec/misc-statements/case-statement.spec.js +96 -0
  44. package/spec/misc-statements/copy-lob.spec.js +137 -0
  45. package/spec/misc-statements/if-then.spec.js +170 -0
  46. package/spec/misc-statements/return-statement.spec.js +53 -0
  47. package/spec/operators/operators.spec.js +78 -0
  48. package/spec/procedure-definition/empty-proc.spec.js +101 -18
  49. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  50. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  51. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  52. package/spec/run-statement/run-statement.spec.js +162 -0
  53. package/spec/shared.js +84 -42
  54. package/spec/strings/translation-attribute.spec.js +52 -0
  55. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  56. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  57. package/spec/type-name/argument.spec.js +209 -0
  58. package/spec/type-name/cast.spec.js +165 -0
  59. package/spec/type-name/define-class.spec.js +468 -0
  60. package/spec/type-name/define-enum.spec.js +44 -0
  61. package/spec/type-name/define-interface.spec.js +159 -0
  62. package/spec/type-name/define-property.spec.js +301 -0
  63. package/spec/type-name/define-temp-table.spec.js +434 -0
  64. package/spec/type-name/define-type-spec.js +435 -0
  65. package/spec/type-name/define-variable-property.spec.js +264 -0
  66. package/spec/type-name/define-variable.spec.js +504 -0
  67. package/spec/type-name/get-class.spec.js +91 -0
  68. package/spec/type-name/new.spec.js +126 -0
  69. package/spec/type-name/parameter-as.spec.js +838 -0
  70. package/spec/type-name/type-name.spec.js +879 -0
  71. package/spec/type-name/using.spec.js +115 -0
@@ -0,0 +1,838 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+
5
+ describe('', () => {
6
+ let statement = `method public void foo( po as foo.bar.baz):`;
7
+
8
+ let expectedTokens = [
9
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
10
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
11
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
12
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
13
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
14
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
15
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
16
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
17
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
18
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
19
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
20
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
21
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
22
+ { "startIndex": 30, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
23
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
24
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
25
+ ];
26
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
27
+ })
28
+
29
+ describe('', () => {
30
+ let statement = `method public Progress.Lang.Object foo( po as foo.bar.baz):`;
31
+
32
+ let expectedTokens = [
33
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
34
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
35
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
36
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
37
+ { "startIndex": 14, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
38
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
39
+ { "startIndex": 35, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
40
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
41
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
42
+ { "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
43
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
44
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
45
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
46
+ { "startIndex": 46, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
47
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
48
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
49
+ ];
50
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
51
+ })
52
+
53
+ describe('', () => {
54
+ let statement = `method public Progress.Collections.List<String> Get_List( po as foo.bar.baz):`;
55
+
56
+ let expectedTokens = [
57
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
58
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
59
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
60
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
61
+ { "startIndex": 14, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Progress.Collections.List'
62
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
63
+ { "startIndex": 40, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'String'
64
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
65
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
66
+ { "startIndex": 48, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'Get_List'
67
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
68
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
69
+ { "startIndex": 58, "endIndex": 60, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
70
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
71
+ { "startIndex": 61, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
72
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
73
+ { "startIndex": 64, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
74
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
75
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
76
+ ];
77
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
78
+ })
79
+
80
+ describe('', () => {
81
+ let statement = `method public Progress.Collections.List<String> Get_List( po as List<foo.bar.baz>):`;
82
+
83
+ let expectedTokens = [
84
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
85
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
86
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
87
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
88
+ { "startIndex": 14, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Progress.Collections.List'
89
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
90
+ { "startIndex": 40, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'String'
91
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
92
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
93
+ { "startIndex": 48, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'Get_List'
94
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
95
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
96
+ { "startIndex": 58, "endIndex": 60, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
97
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
98
+ { "startIndex": 61, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
99
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
100
+ { "startIndex": 64, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'List'
101
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '<'
102
+ { "startIndex": 69, "endIndex": 80, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
103
+ { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.generic.abl"] }, // '>'
104
+ { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
105
+ { "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
106
+ ];
107
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
108
+ })
109
+
110
+
111
+ describe('', () => {
112
+ let statement = `method public Progress.Lang.Object foo( po as foo.bar.baz
113
+ po2 as JsonObject,
114
+ po3 as logical):`;
115
+
116
+ let expectedTokens = [
117
+ [
118
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
119
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
120
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
121
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
122
+ { "startIndex": 14, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
123
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
124
+ { "startIndex": 35, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
125
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
126
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
127
+ { "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
128
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
129
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
130
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
131
+ { "startIndex": 46, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
132
+ ],
133
+ [
134
+ { "startIndex": 0, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
135
+ { "startIndex": 61, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po2'
136
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
137
+ { "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
138
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
139
+ { "startIndex": 68, "endIndex": 78, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'JsonObject'
140
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
141
+ ],
142
+ [
143
+ { "startIndex": 0, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
144
+ { "startIndex": 61, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po3'
145
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
146
+ { "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
147
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
148
+ { "startIndex": 68, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'logical'
149
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
150
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
151
+ ]
152
+ ];
153
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
154
+ })
155
+
156
+ describe('', () => {
157
+ let statement = `method public Progress.Lang.Object foo( po as foo.bar.baz
158
+ , po2 as JsonObject
159
+ , po3 as logical):`;
160
+
161
+ let expectedTokens = [
162
+ [
163
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
164
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
165
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
166
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
167
+ { "startIndex": 14, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
168
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
169
+ { "startIndex": 35, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
170
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
171
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
172
+ { "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
173
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
174
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
175
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
176
+ { "startIndex": 46, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] } // 'foo.bar.baz'
177
+ ],
178
+ [
179
+ { "startIndex": 0, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
180
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
181
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
182
+ { "startIndex": 63, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po2'
183
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
184
+ { "startIndex": 67, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
185
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
186
+ { "startIndex": 70, "endIndex": 80, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] } // 'JsonObject'
187
+ ],
188
+ [
189
+ { "startIndex": 0, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
190
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
191
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
192
+ { "startIndex": 63, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po3'
193
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
194
+ { "startIndex": 67, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
195
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
196
+ { "startIndex": 70, "endIndex": 77, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'logical'
197
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
198
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
199
+ ]
200
+ ];
201
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
202
+ })
203
+
204
+ describe('', () => {
205
+ let statement = `method package-protected Progress.Lang.Object foo( po as foo.bar.baz):`;
206
+
207
+ let expectedTokens = [
208
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
209
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
210
+ { "startIndex": 7, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'package-protected'
211
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
212
+ { "startIndex": 25, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
213
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
214
+ { "startIndex": 46, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
215
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
216
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
217
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
218
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
219
+ { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
220
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
221
+ { "startIndex": 57, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
222
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
223
+ { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
224
+ ];
225
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
226
+ })
227
+
228
+ describe('', () => {
229
+ let statement = `method protected Progress.Lang.Object foo( po as foo.bar.baz):`;
230
+
231
+ let expectedTokens = [
232
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
233
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
234
+ { "startIndex": 7, "endIndex": 16, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'protected'
235
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
236
+ { "startIndex": 17, "endIndex": 37, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
237
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
238
+ { "startIndex": 38, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
239
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
240
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
241
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
242
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
243
+ { "startIndex": 46, "endIndex": 48, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
244
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
245
+ { "startIndex": 49, "endIndex": 60, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
246
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
247
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
248
+ ];
249
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
250
+ })
251
+
252
+ describe('', () => {
253
+ let statement = `method private static Progress.Lang.Object foo( po as foo.bar.baz):`;
254
+
255
+ let expectedTokens = [
256
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
257
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
258
+ { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'private'
259
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
260
+ { "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'static'
261
+ { "startIndex": 21, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
262
+ { "startIndex": 23, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
263
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
264
+ { "startIndex": 44, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
265
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
266
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
267
+ { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
268
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
269
+ { "startIndex": 52, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
270
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
271
+ { "startIndex": 55, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
272
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
273
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
274
+ ];
275
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
276
+ })
277
+
278
+ describe('', () => {
279
+ let statement = `method public void foo( pc as character, po as foo.bar.baz):`;
280
+
281
+ let expectedTokens = [
282
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
283
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
284
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
285
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
286
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
287
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
288
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
289
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
290
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
291
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
292
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
293
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
294
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
295
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
296
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
297
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
298
+ { "startIndex": 41, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
299
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
300
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
301
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
302
+ { "startIndex": 47, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
303
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
304
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
305
+ ];
306
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
307
+ })
308
+
309
+ describe('', () => {
310
+ let statement = `method abstract public datetime-tz foo( pc as character, po as foo.bar.baz).`;
311
+
312
+ let expectedTokens = [
313
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
314
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
315
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'abstract'
316
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
317
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
318
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
319
+ { "startIndex": 23, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'datetime-tz'
320
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
321
+ { "startIndex": 35, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
322
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
323
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
324
+ { "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
325
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
326
+ { "startIndex": 43, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
327
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
328
+ { "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
329
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] }, // ','
330
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
331
+ { "startIndex": 57, "endIndex": 59, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
332
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
333
+ { "startIndex": 60, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
334
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
335
+ { "startIndex": 63, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
336
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
337
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
338
+ ];
339
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
340
+ })
341
+
342
+ describe('', () => {
343
+ let statement = `method public void foo( pc as character,
344
+ po as foo.bar.baz):`;
345
+
346
+ let expectedTokens = [
347
+ [
348
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
349
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
350
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
351
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
352
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
353
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
354
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
355
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
356
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
357
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
358
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
359
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
360
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
361
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
362
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
363
+ ],
364
+ [
365
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
366
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
367
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
368
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
369
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
370
+ { "startIndex": 50, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
371
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
372
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
373
+ ]
374
+ ];
375
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
376
+ })
377
+
378
+
379
+ describe('', () => {
380
+ let statement = `METHOD PUBLIC VOID foo( pc as character,
381
+ po as class foo.bar.baz):`;
382
+
383
+ let expectedTokens = [
384
+ [
385
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'METHOD'
386
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
387
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'PUBLIC'
388
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
389
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'VOID'
390
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
391
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
392
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
393
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
394
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
395
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
396
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
397
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
398
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
399
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
400
+ ],
401
+ [
402
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
403
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
404
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
405
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
406
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
407
+ { "startIndex": 50, "endIndex": 55, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'class'
408
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
409
+ { "startIndex": 56, "endIndex": 67, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
410
+ { "startIndex": 67, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
411
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
412
+ ]
413
+ ];
414
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
415
+ })
416
+
417
+ describe('', () => {
418
+ let statement = `METHOD PUBLIC 'System.Byte[]' foo( pc as character,
419
+ po as "System.Byte[]"):`;
420
+
421
+
422
+ let expectedTokens = [
423
+ [
424
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'METHOD'
425
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
426
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'PUBLIC'
427
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
428
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
429
+ { "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "string.single.complex.abl"] }, // 'System.Byte[]'
430
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
431
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
432
+ { "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
433
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
434
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
435
+ { "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
436
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
437
+ { "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
438
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
439
+ { "startIndex": 41, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
440
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
441
+ ],
442
+ [
443
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
444
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
445
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
446
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
447
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
448
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
449
+ { "startIndex": 51, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "string.double.complex.abl"] }, // 'System.Byte[]'
450
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
451
+ { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
452
+ { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
453
+ ]
454
+ ];
455
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
456
+ })
457
+
458
+ describe('', () => {
459
+ let statement = `method public void foo( pc as character,
460
+ po as baz):`;
461
+
462
+ let expectedTokens = [
463
+ [
464
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
465
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
466
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
467
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
468
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
469
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
470
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
471
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
472
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
473
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
474
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
475
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
476
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
477
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
478
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
479
+ ],
480
+ [
481
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
482
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
483
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
484
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
485
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
486
+ { "startIndex": 50, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'baz'
487
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
488
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
489
+ ]
490
+ ];
491
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
492
+ })
493
+
494
+ describe('', () => {
495
+ let statement = `method public void foo( pc as character,
496
+ po as baz)
497
+ /* comment */
498
+ :
499
+ var int i.
500
+ end method. `;
501
+
502
+ let expectedTokens = [
503
+ [
504
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
505
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
506
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
507
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
508
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
509
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
510
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
511
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
512
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
513
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
514
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
515
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
516
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
517
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
518
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
519
+ ],
520
+ [
521
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
522
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
523
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
524
+ { "startIndex": 47, "endIndex": 49, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
525
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
526
+ { "startIndex": 50, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'baz'
527
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] } // ')'
528
+ ],
529
+ [
530
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
531
+ { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl"] }, // '/*'
532
+ { "startIndex": 46, "endIndex": 55, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl", "comment"] }, // ' comment '
533
+ { "startIndex": 55, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl"] } // '*/'
534
+ ],
535
+ [
536
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
537
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
538
+ ],
539
+ [
540
+ { "startIndex": 0, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
541
+ { "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "keyword.other.abl"] }, // 'var'
542
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
543
+ { "startIndex": 28, "endIndex": 31, "scopes": ["source.abl", "storage.type.abl"] }, // 'int'
544
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
545
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "storage.type.abl"] }, // 'i'
546
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
547
+ ],
548
+ [
549
+ { "startIndex": 0, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
550
+ { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
551
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
552
+ { "startIndex": 24, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'method'
553
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
554
+ { "startIndex": 31, "endIndex": 36, "scopes": ["source.abl"] } // ' '
555
+ ]
556
+ ];
557
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
558
+ })
559
+
560
+ describe('', () => {
561
+ let statement = `method /*public*/ void foo (
562
+ pc as character,
563
+ po as baz
564
+ )
565
+ // comment
566
+ :`;
567
+
568
+ let expectedTokens = [
569
+ [
570
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
571
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
572
+ { "startIndex": 7, "endIndex": 9, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl"] }, // '/*'
573
+ { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl", "comment"] }, // 'public'
574
+ { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.define.method.abl", "comment.block.source.abl"] }, // '*/'
575
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
576
+ { "startIndex": 18, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
577
+ { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
578
+ { "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
579
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
580
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] } // '('
581
+ ],
582
+ [
583
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
584
+ { "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
585
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
586
+ { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
587
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
588
+ { "startIndex": 18, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
589
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
590
+ ],
591
+ [
592
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
593
+ { "startIndex": 12, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
594
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
595
+ { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
596
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
597
+ { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] } // 'baz'
598
+ ],
599
+ [
600
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
601
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] } // ')'
602
+ ],
603
+ [
604
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
605
+ { "startIndex": 12, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "comment.line.double-slash.abl"] } // '// comment '
606
+ ],
607
+ [
608
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
609
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"]} // ':'
610
+ ]
611
+ ];
612
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
613
+ })
614
+
615
+ describe('', () => {
616
+ let statement = `method public void foo(input pc as character,
617
+ output po as foo.bar.baz,
618
+ buffer pb for Table,
619
+ input-output dataset-handle hh):`;
620
+
621
+ let expectedTokens = [
622
+ [
623
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
624
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
625
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
626
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
627
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
628
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
629
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
630
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
631
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input'
632
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
633
+ { "startIndex": 29, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
634
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
635
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
636
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
637
+ { "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
638
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
639
+ ],
640
+ [
641
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
642
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'output'
643
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
644
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
645
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
646
+ { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
647
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
648
+ { "startIndex": 57, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
649
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
650
+ ],
651
+ [
652
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
653
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'buffer'
654
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
655
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'pb'
656
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
657
+ { "startIndex": 54, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'for'
658
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
659
+ { "startIndex": 58, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'Table'
660
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
661
+ ],
662
+ [
663
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
664
+ { "startIndex": 44, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input-output'
665
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
666
+ { "startIndex": 57, "endIndex": 71, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'dataset-handle'
667
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
668
+ { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'hh'
669
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
670
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
671
+ ]
672
+ ];
673
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
674
+ })
675
+
676
+ describe('', () => {
677
+ let statement = `method public void foo(input pc as character,
678
+ output po as foo.bar.baz,
679
+ buffer pb for Table preselect,
680
+ input-output dataset-handle hh):`;
681
+
682
+ let expectedTokens = [
683
+ [
684
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
685
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
686
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
687
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
688
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
689
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
690
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
691
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
692
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input'
693
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
694
+ { "startIndex": 29, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
695
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
696
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
697
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
698
+ { "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
699
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
700
+ ],
701
+ [
702
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
703
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'output'
704
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
705
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
706
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
707
+ { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
708
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
709
+ { "startIndex": 57, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
710
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
711
+ ],
712
+ [
713
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
714
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'buffer'
715
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
716
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'pb'
717
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
718
+ { "startIndex": 54, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'for'
719
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
720
+ { "startIndex": 58, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'Table'
721
+ { "startIndex": 63, "endIndex": 66, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
722
+ { "startIndex": 66, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'preselect'
723
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
724
+ ],
725
+ [
726
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
727
+ { "startIndex": 44, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input-output'
728
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
729
+ { "startIndex": 57, "endIndex": 71, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'dataset-handle'
730
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
731
+ { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'hh'
732
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
733
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
734
+ ]
735
+ ];
736
+
737
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
738
+ })
739
+
740
+ describe('', () => {
741
+ let statement = `method public void foo(input pc as character extent 99,
742
+ output po as foo.bar.baz extent,
743
+ buffer pb for Table,
744
+ input-output dataset-handle hh):`;
745
+
746
+ let expectedTokens = [
747
+ [
748
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
749
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
750
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
751
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
752
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
753
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
754
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
755
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
756
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input'
757
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
758
+ { "startIndex": 29, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pc'
759
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
760
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
761
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
762
+ { "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
763
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
764
+ { "startIndex": 45, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'extent'
765
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
766
+ { "startIndex": 52, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl", "constant.numeric.source.abl"] }, // '99'
767
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
768
+ ],
769
+ [
770
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
771
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'output'
772
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
773
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'po'
774
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
775
+ { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
776
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
777
+ { "startIndex": 57, "endIndex": 68, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
778
+ { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
779
+ { "startIndex": 69, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'extent'
780
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
781
+ ],
782
+ [
783
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
784
+ { "startIndex": 44, "endIndex": 50, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'buffer'
785
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
786
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'pb'
787
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
788
+ { "startIndex": 54, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'for'
789
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
790
+ { "startIndex": 58, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'Table'
791
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
792
+ ],
793
+ [
794
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
795
+ { "startIndex": 44, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input-output'
796
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
797
+ { "startIndex": 57, "endIndex": 71, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'dataset-handle'
798
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
799
+ { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'hh'
800
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
801
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
802
+ ]
803
+ ];
804
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
805
+ })
806
+
807
+ describe('', () => {
808
+ let statement = `method public void foo(table ttItem,
809
+ input-output dataset dsCustomer):`;
810
+
811
+ let expectedTokens = [
812
+ [
813
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
814
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
815
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
816
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
817
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'void'
818
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
819
+ { "startIndex": 19, "endIndex": 22, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'foo'
820
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
821
+ { "startIndex": 23, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'table'
822
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
823
+ { "startIndex": 29, "endIndex": 35, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'ttItem'
824
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
825
+ ],
826
+ [
827
+ { "startIndex": 0, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
828
+ { "startIndex": 44, "endIndex": 56, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'input-output'
829
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
830
+ { "startIndex": 57, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'dataset'
831
+ { "startIndex": 64, "endIndex": 65, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
832
+ { "startIndex": 65, "endIndex": 75, "scopes": ["source.abl", "meta.define.method.abl", "storage.data.table.abl"] }, // 'dsCustomer'
833
+ { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
834
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
835
+ ]
836
+ ];
837
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
838
+ })