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
@@ -7,12 +7,12 @@ trigger:
7
7
  - master
8
8
 
9
9
  pool:
10
- vmImage: 'Ubuntu-18.04'
10
+ vmImage: 'ubuntu-22.04'
11
11
 
12
12
  steps:
13
13
  - task: NodeTool@0
14
14
  inputs:
15
- versionSpec: '16.x'
15
+ versionSpec: '20.x'
16
16
  displayName: 'Install Node.js'
17
17
 
18
18
  - script: |
@@ -21,6 +21,7 @@ steps:
21
21
  displayName: 'running tests'
22
22
 
23
23
  - task: Npm@1
24
+ condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
24
25
  inputs:
25
26
  command: 'publish'
26
27
  customRegistry: 'useFeed'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "Textmate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "repository": {
@@ -15,14 +15,15 @@
15
15
  "homepage": "https://github.com/chriscamicas/openedge-abl-syntax#readme",
16
16
  "scripts": {
17
17
  "build": "node index.js",
18
- "test": "mocha spec/**/*.spec.js",
18
+ "test": "mocha spec/*/*.spec.js",
19
19
  "test:single": "mocha",
20
- "test:debug": "mocha 'spec/**/*.spec.js' -- --inspect-brk=5858"
20
+ "test:debug": "mocha 'spec/*/*.spec.js' -- --inspect-brk=5858"
21
21
  },
22
+ "maxDiffSize": 32768,
22
23
  "devDependencies": {
23
24
  "chai": "^4.2.0",
24
25
  "mocha": "^10.2.0",
25
- "vscode-textmate": "^7.0.1",
26
- "vscode-oniguruma": "^1.6.2"
26
+ "vscode-oniguruma": "^1.6.2",
27
+ "vscode-textmate": "^7.0.4"
27
28
  }
28
- }
29
+ }
@@ -2,16 +2,16 @@ const { assert, expect } = require('chai');
2
2
  const shared = require('../shared.js');
3
3
 
4
4
  describe('', () => {
5
- let statement =
6
- `&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12
5
+ let statement =
6
+ `&ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12
7
7
  &ANALYZE-RESUME`;
8
8
 
9
- let expectedTokens = [
10
- [
11
- {"startIndex":0,"endIndex":17,"scopes":["source.abl","comment.preprocessor.analyze-suspend.abl"]},
12
- {"startIndex":17,"endIndex":42,"scopes":["source.abl","comment.preprocessor.analyze-suspend.abl"]}
13
- ],[
14
- {"startIndex":0,"endIndex":16,"scopes":["source.abl","comment.preprocessor.analyze-suspend.abl"]}
15
- ]];
16
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
9
+ let expectedTokens = [
10
+ [
11
+ { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "comment.preprocessor.analyze-suspend.abl"] },
12
+ { "startIndex": 17, "endIndex": 42, "scopes": ["source.abl", "comment.preprocessor.analyze-suspend.abl"] }
13
+ ], [
14
+ { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "comment.preprocessor.analyze-suspend.abl"] }
15
+ ]];
16
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
17
17
  })
@@ -0,0 +1,232 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `@annotation (name="value"). `;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
8
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
9
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
10
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
11
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
12
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
13
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'value'
14
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
15
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
16
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
17
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl"] } // ' '
18
+ ];
19
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
20
+ })
21
+
22
+ describe('', () => {
23
+ let statement = ` @annotation.
24
+ define variable i as int.`;
25
+ let expectedTokens = [
26
+ [
27
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
28
+ { "startIndex": 2, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
29
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
30
+ ],
31
+ [
32
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
33
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
34
+ { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'variable'
35
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
36
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'i'
37
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
38
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
39
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
40
+ { "startIndex": 21, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'int'
41
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
42
+ ]
43
+ ];
44
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
45
+ })
46
+
47
+ describe('', () => {
48
+ let statement = `@annotation (name="value", two="2", three='3'). `;
49
+ let expectedTokens = [
50
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
51
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
52
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
53
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'name'
54
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
55
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
56
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'value'
57
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
58
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
59
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
60
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'two'
61
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
62
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
63
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '2'
64
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
65
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
66
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
67
+ { "startIndex": 36, "endIndex": 47, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'three='3').'
68
+ { "startIndex": 47, "endIndex": 50, "scopes": ["source.abl", "meta.declaration.annotation.abl"] } // ' '
69
+ ];
70
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
71
+ })
72
+
73
+ describe('', () => {
74
+ let statement = `@annotation (two
75
+ = "2"
76
+ , three
77
+ =
78
+ '3'
79
+ ).
80
+ define temp-table tt like Customer.`;
81
+ let expectedTokens = [
82
+ [
83
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@annotation'
84
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
85
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
86
+ { "startIndex": 13, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] } // 'two'
87
+ ],
88
+ [
89
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
90
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
91
+ { "startIndex": 5, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
92
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
93
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '2'
94
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
95
+ ],
96
+ [
97
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
98
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
99
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
100
+ { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] } // 'three'
101
+ ],
102
+ [
103
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
104
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] } // '='
105
+ ],
106
+ [
107
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
108
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
109
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl"] }, // '3'
110
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] } // '''
111
+ ],
112
+ [
113
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
114
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
115
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
116
+ ],
117
+ [
118
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'define'
119
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
120
+ { "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'temp-table'
121
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
122
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'tt'
123
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
124
+ { "startIndex": 21, "endIndex": 25, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'like'
125
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
126
+ { "startIndex": 26, "endIndex": 34, "scopes": ["source.abl", "meta.define.abl", "storage.data.table.abl"] }, // 'Customer'
127
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
128
+ ]];
129
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
130
+ })
131
+
132
+
133
+ describe('', () => {
134
+ let statement = `@RestAddress (type="collection", address="/Customers", tables="eCustomer", id="CustNum",
135
+ fields="Name,City,Country", canCreate="true",
136
+ links="orders:/Customers/~{CustNum}/Orders,salesrep:/Salesreps/~{SalesRep}").`;
137
+ let expectedTokens = [
138
+ [
139
+ { "startIndex": 0, "endIndex": 12, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@RestAddress'
140
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
141
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
142
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'type'
143
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
144
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
145
+ { "startIndex": 20, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'collection'
146
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
147
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
148
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
149
+ { "startIndex": 33, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'address'
150
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
151
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
152
+ { "startIndex": 42, "endIndex": 52, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // '/Customers'
153
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
154
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
155
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
156
+ { "startIndex": 55, "endIndex": 61, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'tables'
157
+ { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
158
+ { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
159
+ { "startIndex": 63, "endIndex": 72, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'eCustomer'
160
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
161
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
162
+ { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
163
+ { "startIndex": 75, "endIndex": 77, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'id'
164
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
165
+ { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
166
+ { "startIndex": 79, "endIndex": 86, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'CustNum'
167
+ { "startIndex": 86, "endIndex": 87, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
168
+ { "startIndex": 87, "endIndex": 88, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
169
+ ],
170
+ [
171
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
172
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'fields'
173
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
174
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
175
+ { "startIndex": 10, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'Name,City,Country'
176
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
177
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] }, // ','
178
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
179
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'canCreate'
180
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
181
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
182
+ { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'true'
183
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
184
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
185
+ ],
186
+ [
187
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
188
+ { "startIndex": 2, "endIndex": 7, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'links'
189
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
190
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
191
+ { "startIndex": 9, "endIndex": 27, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'orders:/Customers/'
192
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~{'
193
+ { "startIndex": 29, "endIndex": 65, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'CustNum}/Orders,salesrep:/Salesreps/'
194
+ { "startIndex": 65, "endIndex": 67, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "constant.character.escape.abl"] }, // '~{'
195
+ { "startIndex": 67, "endIndex": 76, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'SalesRep}'
196
+ { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
197
+ { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.declaration.annotation.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
+
205
+ describe('', () => {
206
+ let statement = `@AnnotationName(attrib1="class-tag,store",
207
+ attrib2="bob").`;
208
+ let expectedTokens = [
209
+ [
210
+ { "startIndex": 0, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.name.tag.abl"] }, // '@AnnotationName'
211
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // '('
212
+ { "startIndex": 16, "endIndex": 23, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'attrib1'
213
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
214
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
215
+ { "startIndex": 25, "endIndex": 40, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'class-tag,store'
216
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
217
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.declaration.annotation.abl", "punctuation.separator.comma.abl"] } // ','
218
+ ],
219
+ [
220
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.declaration.annotation.abl"] }, // ' '
221
+ { "startIndex": 2, "endIndex": 9, "scopes": ["source.abl", "meta.declaration.annotation.abl", "entity.other.attribute-name.abl"] }, // 'attrib2'
222
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.declaration.annotation.abl", "keyword.operator.source.abl"] }, // '='
223
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
224
+ { "startIndex": 11, "endIndex": 14, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl"] }, // 'bob'
225
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.declaration.annotation.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
226
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.declaration.annotation.abl", "meta.brace.round.js"] }, // ')'
227
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
228
+ ]
229
+ ];
230
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
231
+ })
232
+
@@ -2,25 +2,25 @@ const { assert, expect } = require('chai');
2
2
  const shared = require('../shared.js');
3
3
 
4
4
  describe('', () => {
5
- //label-with-a-dot-inside.spec
6
- let statement = `mExtVar[mI]`;
7
- let expectedTokens = [
8
- {"startIndex":0,"endIndex":7,"scopes":["source.abl","variable.other.abl"]},
9
- {"startIndex":7,"endIndex":8,"scopes":["source.abl","meta.array.literal.abl","meta.brace.square.abl"]},
10
- {"startIndex":8,"endIndex":10,"scopes":["source.abl","meta.array.literal.abl","variable.other.abl"]},
11
- {"startIndex":10,"endIndex":11,"scopes":["source.abl","meta.array.literal.abl","meta.brace.square.abl"]}
12
- ];
13
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
5
+ //label-with-a-dot-inside.spec
6
+ let statement = `mExtVar[mI]`;
7
+ let expectedTokens = [
8
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] },
9
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] },
10
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] },
11
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] }
12
+ ];
13
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
14
14
  })
15
15
 
16
16
  describe('', () => {
17
- let statement = `mExtVar[ mI]`;
18
- let expectedTokens = [
19
- {"startIndex":0,"endIndex":7,"scopes":["source.abl","variable.other.abl"]},
20
- {"startIndex":7,"endIndex":8,"scopes":["source.abl","meta.array.literal.abl","meta.brace.square.abl"]},
21
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","meta.array.literal.abl"]},
22
- {"startIndex":9,"endIndex":11,"scopes":["source.abl","meta.array.literal.abl","variable.other.abl"]},
23
- {"startIndex":11,"endIndex":12,"scopes":["source.abl","meta.array.literal.abl","meta.brace.square.abl"]}
24
- ];
25
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
17
+ let statement = `mExtVar[ mI]`;
18
+ let expectedTokens = [
19
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] },
20
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] },
21
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.array.literal.abl"] },
22
+ { "startIndex": 9, "endIndex": 11, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] },
23
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.array.literal.abl", "meta.brace.square.abl"] }
24
+ ];
25
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
26
26
  })
@@ -0,0 +1,90 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `FINALLY:
6
+ ASSIGN oBusinessEntityDescriptor = ?.
7
+ END FINALLY.`;
8
+ let expectedTokens = [
9
+ [
10
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
11
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
12
+ ],
13
+ [
14
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
15
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'ASSIGN'
16
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
17
+ { "startIndex": 11, "endIndex": 36, "scopes": ["source.abl", "variable.other.abl"] }, // 'oBusinessEntityDescriptor'
18
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
19
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
20
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
21
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "constant.language.abl"] }, // '?'
22
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
23
+ ],
24
+ [
25
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
26
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
27
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FINALLY'
28
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
29
+ ]
30
+ ];
31
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
32
+ })
33
+
34
+ describe('', () => {
35
+ let statement = `FINALLY:
36
+ END. // no finally on END`;
37
+ let expectedTokens = [
38
+ [
39
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'FINALLY'
40
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
41
+ ],
42
+ [
43
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
44
+ { "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
45
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
46
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
47
+ { "startIndex": 7, "endIndex": 27, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no finally on END'
48
+ ]
49
+ ];
50
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
51
+ })
52
+
53
+ describe('', () => {
54
+ let statement = `finally.
55
+ if valid-object(oMenu) then delete object oMenu no-error.
56
+ end finally.`;
57
+ let expectedTokens = [
58
+ [
59
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'finally'
60
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
61
+ ],
62
+ [
63
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
64
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
65
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
66
+ { "startIndex": 5, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'valid-object'
67
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
68
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oMenu'
69
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
70
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
71
+ { "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
72
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
73
+ { "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
74
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl"] }, // ' '
75
+ { "startIndex": 37, "endIndex": 43, "scopes": ["source.abl", "keyword.other.abl"] }, // 'object'
76
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl"] }, // ' '
77
+ { "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "variable.other.abl"] }, // 'oMenu'
78
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
79
+ { "startIndex": 50, "endIndex": 58, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
80
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
81
+ ],
82
+ [
83
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
84
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
85
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'finally'
86
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
87
+ ]
88
+ ];
89
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
90
+ })
@@ -0,0 +1,59 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `do on error undo, leave
6
+ on endkey undo, leave
7
+ on stop undo, leave
8
+ on quit undo, leave:`;
9
+ let expectedTokens = [
10
+ [
11
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
12
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
13
+ { "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
14
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
15
+ { "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'error'
16
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
17
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
18
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
19
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
20
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
21
+ ],
22
+ [
23
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
24
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
25
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
26
+ { "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'endkey'
27
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
28
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
29
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
30
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
31
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
32
+ ],
33
+ [
34
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
35
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
36
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
37
+ { "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'stop'
38
+ { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
39
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
40
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
41
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
42
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] } // 'leave'
43
+ ],
44
+ [
45
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
46
+ { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'on'
47
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
48
+ { "startIndex": 5, "endIndex": 9, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'quit'
49
+ { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
50
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'undo'
51
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.block.abl", "punctuation.separator.comma.abl"] }, // ','
52
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl"] }, // ' '
53
+ { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "meta.block.abl", "meta.block.branch.abl", "keyword.other.abl"] }, // 'leave'
54
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
55
+ ]
56
+ ]
57
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
58
+ })
59
+