abl-tmlanguage 1.3.27 → 1.3.29

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 (139) hide show
  1. package/README.md +2 -1
  2. package/abl.tmLanguage.json +290 -111
  3. package/package.json +5 -2
  4. package/.github/workflows/ci.yml +0 -36
  5. package/CHANGELOG.md +0 -130
  6. package/abl-functions.txt +0 -548
  7. package/abl-keywords.txt +0 -416
  8. package/abl-methods.txt +0 -1053
  9. package/index.mjs +0 -410
  10. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +0 -17
  11. package/spec/annotations/annotation.spec.js +0 -366
  12. package/spec/array-extent/issue#5.spec.js +0 -26
  13. package/spec/blocks/block-labels.spec.js +0 -201
  14. package/spec/blocks/block-options.spec.js +0 -174
  15. package/spec/blocks/finally-blocks.spec.js +0 -90
  16. package/spec/blocks/on-quit.spec.js +0 -59
  17. package/spec/comments/comment-in-block-statement.spec.js +0 -153
  18. package/spec/comments/comment-in-for-each.spec.js +0 -105
  19. package/spec/comments/comment-in-function-args.spec.js +0 -88
  20. package/spec/comments/spacious-comment.spec.js +0 -73
  21. package/spec/comments/vscode-abl-issue#127.spec.js +0 -165
  22. package/spec/create-widgets/create-window.spec.js +0 -224
  23. package/spec/db-table-and-field/buffer-copy.spec.js +0 -246
  24. package/spec/db-table-and-field/create-alias.spec.js +0 -130
  25. package/spec/db-table-and-field/create-record.spec.js +0 -75
  26. package/spec/db-table-and-field/field-in-function.spec.js +0 -58
  27. package/spec/db-table-and-field/fields-except.spec.js +0 -69
  28. package/spec/db-table-and-field/find-record.spec.js +0 -158
  29. package/spec/db-table-and-field/foreach.spec.js +0 -588
  30. package/spec/db-table-and-field/issue#88.spec.js +0 -120
  31. package/spec/db-table-and-field/new-record.spec.js +0 -250
  32. package/spec/define/define-browse.spec.js +0 -454
  33. package/spec/define/define-button.spec.js +0 -233
  34. package/spec/define/define-query.spec.js +0 -144
  35. package/spec/define/define-rectangle.spec.js +0 -47
  36. package/spec/define-buffer/create-buffer.spec.js +0 -155
  37. package/spec/define-buffer/simple-single-line.spec.js +0 -155
  38. package/spec/define-enum/type-name.spec.js +0 -200
  39. package/spec/define-event/simple-single-line.spec.js +0 -61
  40. package/spec/define-frame/issue#173.spec.js +0 -580
  41. package/spec/define-parameter/simple-single-line.spec.js +0 -228
  42. package/spec/define-property/property-getter.spec.js +0 -165
  43. package/spec/define-stream/simple-single-line.spec.js +0 -42
  44. package/spec/define-temp-table/define-dataset.spec.js +0 -217
  45. package/spec/define-temp-table/define-temp-table.spec.js +0 -605
  46. package/spec/define-variable/define-like.spec.js +0 -78
  47. package/spec/define-variable/extent.spec.js +0 -778
  48. package/spec/define-variable/initial.spec.js +0 -126
  49. package/spec/define-variable/issue#6.spec.js +0 -280
  50. package/spec/define-variable/issue#9.spec.js +0 -45
  51. package/spec/define-variable/simple-single-line.spec.js +0 -181
  52. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +0 -62
  53. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +0 -65
  54. package/spec/define-variable/tm-issue#2.spec.js +0 -25
  55. package/spec/define-variable/var-statement.spec.js +0 -467
  56. package/spec/do/do-blocks.spec.js +0 -289
  57. package/spec/do/issue#3.spec.js +0 -83
  58. package/spec/do/stop-after.spec.js +0 -79
  59. package/spec/for-each/for-each.spec.js +0 -111
  60. package/spec/for-each/issue#321.spec.js +0 -116
  61. package/spec/for-each/vscode-abl.issue#166.spec.js +0 -83
  62. package/spec/function-call/can-find.spec.js +0 -239
  63. package/spec/function-call/misc-abl-functions.spec.js +0 -59
  64. package/spec/function-call/nested-functions.spec.js +0 -245
  65. package/spec/function-call/pass-table.spec.js +0 -116
  66. package/spec/function-call/set-size.spec.js +0 -56
  67. package/spec/function-call/udf-calls.spec.js +0 -50
  68. package/spec/function-call/vscode-abl-issue#19.spec.js +0 -129
  69. package/spec/function-definition/vscode-abl-issue#166.spec.js +0 -446
  70. package/spec/global-scoped-define/global-define.spec.js +0 -64
  71. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +0 -70
  72. package/spec/global-scoped-define/undefine.spec.js +0 -44
  73. package/spec/include/abl-tmlanguage-issues#5.spec.js +0 -40
  74. package/spec/include/include-file-name.spec.js +0 -267
  75. package/spec/include/unnamed-arguments.spec.js +0 -38
  76. package/spec/include/vscode-abl-issue#45.spec.js +0 -20
  77. package/spec/include/vscode-abl-issue#77.spec.js +0 -128
  78. package/spec/include/vscode-abl-issue#80.spec.js +0 -50
  79. package/spec/input-output/input-from.spec.js +0 -504
  80. package/spec/input-output/output-to.spec.js +0 -456
  81. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +0 -98
  82. package/spec/method-attribute-property-call/connected-method.spec.js +0 -29
  83. package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +0 -53
  84. package/spec/method-attribute-property-call/get-set-method-name.spec.js +0 -141
  85. package/spec/method-attribute-property-call/method-call.spec.js +0 -268
  86. package/spec/method-attribute-property-call/nested-property-call.spec.js +0 -35
  87. package/spec/method-attribute-property-call/unqualified-method-call.spec.js +0 -41
  88. package/spec/method-definition/constructor.spec.js +0 -174
  89. package/spec/method-definition/method.spec.js +0 -541
  90. package/spec/misc-statements/array-for.spec.js +0 -21
  91. package/spec/misc-statements/case-statement.spec.js +0 -96
  92. package/spec/misc-statements/class-in-var-name.spec.js +0 -204
  93. package/spec/misc-statements/copy-lob.spec.js +0 -137
  94. package/spec/misc-statements/def-in-name.spec.js +0 -20
  95. package/spec/misc-statements/delete-objects.spec.js +0 -65
  96. package/spec/misc-statements/do-in-name.spec.js +0 -259
  97. package/spec/misc-statements/event-subscribe.spec.js +0 -308
  98. package/spec/misc-statements/export-delimiter.spec.js +0 -37
  99. package/spec/misc-statements/guid.spec.js +0 -97
  100. package/spec/misc-statements/if-then.spec.js +0 -454
  101. package/spec/misc-statements/issue#173.spec.js +0 -99
  102. package/spec/misc-statements/message-statement.spec.js +0 -21
  103. package/spec/misc-statements/record-buffer-functions.spec.js +0 -73
  104. package/spec/misc-statements/release.spec.js +0 -41
  105. package/spec/misc-statements/return-statement.spec.js +0 -64
  106. package/spec/misc-statements/skip-statement-and-fuction.spec.js +0 -35
  107. package/spec/misc-statements/system-handles.spec.js +0 -108
  108. package/spec/numbers/scientific-notation.spec.js +0 -212
  109. package/spec/operators/operators.spec.js +0 -149
  110. package/spec/operators/safe-navigation-operator.spec.js +0 -246
  111. package/spec/preprocesors/issue166.spec.js +0 -91
  112. package/spec/preprocesors/preprocessor-functions.spec.js +0 -77
  113. package/spec/preprocesors/proparse-preprocessor.spec.js +0 -90
  114. package/spec/procedure-definition/empty-proc.spec.js +0 -134
  115. package/spec/procedure-definition/trigger-procedure.spec.js +0 -132
  116. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +0 -46
  117. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +0 -31
  118. package/spec/procedure-definition/vscode-abl-issue#325.spec.js +0 -88
  119. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +0 -39
  120. package/spec/run-statement/run-statement.spec.js +0 -971
  121. package/spec/shared.js +0 -104
  122. package/spec/strings/translation-attribute.spec.js +0 -52
  123. package/spec/strings/vscode-abl-issue#11.spec.js +0 -109
  124. package/spec/strings/vscode-abl-issue#28.spec.js +0 -31
  125. package/spec/type-name/argument.spec.js +0 -207
  126. package/spec/type-name/cast.spec.js +0 -163
  127. package/spec/type-name/define-class.spec.js +0 -555
  128. package/spec/type-name/define-enum.spec.js +0 -44
  129. package/spec/type-name/define-interface.spec.js +0 -159
  130. package/spec/type-name/define-property.spec.js +0 -301
  131. package/spec/type-name/define-temp-table.spec.js +0 -434
  132. package/spec/type-name/define-type-spec.js +0 -435
  133. package/spec/type-name/define-variable-property.spec.js +0 -264
  134. package/spec/type-name/define-variable.spec.js +0 -386
  135. package/spec/type-name/get-class.spec.js +0 -91
  136. package/spec/type-name/new.spec.js +0 -185
  137. package/spec/type-name/parameter-as.spec.js +0 -978
  138. package/spec/type-name/type-name.spec.js +0 -880
  139. package/spec/type-name/using.spec.js +0 -160
@@ -1,446 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `FUNCTION operationName logical:
6
- end function.`;
7
-
8
- let expectedTokens = [
9
- [
10
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
11
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
12
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
13
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
14
- { "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
15
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // ':'
16
- ],
17
- [
18
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
19
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
20
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'function'
21
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
22
- ]
23
- ];
24
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
25
- })
26
-
27
- describe('', () => {
28
- let statement = `FUNCTION operationName RETURNS logical ( p1 as char, output p4 as char extent 4 ) IN hPortType .
29
- end.`;
30
-
31
- let expectedTokens = [
32
- [
33
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
34
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
35
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
36
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
37
- { "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'RETURNS'
38
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
39
- { "startIndex": 31, "endIndex": 38, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
40
- { "startIndex": 38, "endIndex": 40, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
41
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
42
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
43
- { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "variable.parameter.abl"] }, // 'p1'
44
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
45
- { "startIndex": 45, "endIndex": 47, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'as'
46
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
47
- { "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "storage.type.abl"] }, // 'char'
48
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "punctuation.separator.comma.abl"] }, // ','
49
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
50
- { "startIndex": 54, "endIndex": 60, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'output'
51
- { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
52
- { "startIndex": 61, "endIndex": 63, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "variable.parameter.abl"] }, // 'p4'
53
- { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
54
- { "startIndex": 64, "endIndex": 66, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'as'
55
- { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
56
- { "startIndex": 67, "endIndex": 71, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "storage.type.abl"] }, // 'char'
57
- { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
58
- { "startIndex": 72, "endIndex": 78, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'extent'
59
- { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
60
- { "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "constant.numeric.source.abl"] }, // '4'
61
- { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
62
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
63
- { "startIndex": 82, "endIndex": 84, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
64
- { "startIndex": 84, "endIndex": 86, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
65
- { "startIndex": 86, "endIndex": 87, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
66
- { "startIndex": 87, "endIndex": 96, "scopes": ["source.abl", "meta.define.function.abl", "variable.other.abl"] }, // 'hPortType'
67
- { "startIndex": 96, "endIndex": 97, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
68
- { "startIndex": 97, "endIndex": 98, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
69
- ],
70
- [
71
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
72
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
73
- ]
74
- ];
75
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
76
- })
77
-
78
- describe('', () => {
79
- let statement = `FUNCTION operationName logical IN hPortType .
80
- end.`;
81
-
82
- let expectedTokens = [
83
- [
84
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
85
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
86
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
87
- { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
88
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
89
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
90
- { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
91
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
92
- { "startIndex": 35, "endIndex": 44, "scopes": ["source.abl", "meta.define.function.abl", "variable.other.abl"] }, // 'hPortType'
93
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
94
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
95
- ],
96
- [
97
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
98
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
99
- ]
100
- ];
101
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
102
- })
103
-
104
- describe('', () => {
105
- let statement = `// scope (function): variable.other.abl source.abl
106
- function DoTheThing returns character
107
- (
108
- ):
109
-
110
- end function.`;
111
-
112
- let expectedTokens = [
113
- [
114
- { "startIndex": 0, "endIndex": 50, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// scope (function): variable.other.abl source.abl'
115
- ],
116
- [
117
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'function'
118
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
119
- { "startIndex": 9, "endIndex": 19, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'DoTheThing'
120
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
121
- { "startIndex": 20, "endIndex": 27, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'returns'
122
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
123
- { "startIndex": 28, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] } // 'character'
124
- ],
125
- [
126
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
127
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] } // '('
128
- ],
129
- [
130
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
131
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
132
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // ':'
133
- ],
134
- [
135
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
136
- ],
137
- [
138
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
139
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
140
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'function'
141
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
142
- ]
143
- ];
144
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
145
- })
146
-
147
- describe('', () => {
148
- let statement = `function DoTheThing returns Progress.Lang.Object extent 3 ( ):
149
- end function.`;
150
-
151
- let expectedTokens = [
152
- [
153
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'function'
154
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
155
- { "startIndex": 9, "endIndex": 19, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'DoTheThing'
156
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
157
- { "startIndex": 20, "endIndex": 27, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'returns'
158
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
159
- { "startIndex": 28, "endIndex": 48, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.type.abl"] }, // 'Progress.Lang.Object'
160
- { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
161
- { "startIndex": 49, "endIndex": 55, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'extent'
162
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
163
- { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.type.abl"] }, // '3'
164
- { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
165
- { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
166
- { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
167
- { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
168
- { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] }, // ':'
169
- ],
170
- [
171
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
172
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
173
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'function'
174
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
175
- ]
176
- ];
177
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
178
- })
179
-
180
- describe('', () => {
181
- let statement = `function NoThing returns class String ( ):
182
- end function.`;
183
-
184
- let expectedTokens = [
185
- [
186
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'function'
187
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
188
- { "startIndex": 9, "endIndex": 16, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'NoThing'
189
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
190
- { "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'returns'
191
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
192
- { "startIndex": 25, "endIndex": 30, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'class'
193
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
194
- { "startIndex": 31, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.type.abl"] }, // 'String'
195
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
196
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
197
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
198
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
199
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // ':'
200
- ],
201
- [
202
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
203
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
204
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'function'
205
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
206
- ]
207
- ];
208
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
209
- })
210
-
211
- describe('', () => {
212
- let statement = `function NoThing returns String ( ):
213
- end function.`;
214
-
215
- let expectedTokens = [
216
- [
217
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'function'
218
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
219
- { "startIndex": 9, "endIndex": 16, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'NoThing'
220
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
221
- { "startIndex": 17, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'returns'
222
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
223
- { "startIndex": 25, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.type.abl"] }, // 'String'
224
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
225
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
226
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
227
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
228
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // ':'
229
- ],
230
- [
231
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
232
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
233
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'function'
234
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
235
- ]
236
- ];
237
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
238
- })
239
-
240
- describe('', () => {
241
- let statement = `FUNCTION 4gl-encode RETURNS CHARACTER (INPUT p_string AS CHAR) :
242
- RETURN
243
- p_string .
244
- END FUNCTION.`;
245
-
246
- let expectedTokens = [
247
- [
248
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
249
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
250
- { "startIndex": 9, "endIndex": 19, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // '4gl-encode'
251
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
252
- { "startIndex": 20, "endIndex": 27, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'RETURNS'
253
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
254
- { "startIndex": 28, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'CHARACTER'
255
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
256
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
257
- { "startIndex": 39, "endIndex": 44, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'INPUT'
258
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
259
- { "startIndex": 45, "endIndex": 53, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "variable.parameter.abl"] }, // 'p_string'
260
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
261
- { "startIndex": 54, "endIndex": 56, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'AS'
262
- { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
263
- { "startIndex": 57, "endIndex": 61, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "storage.type.abl"] }, // 'CHAR'
264
- { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
265
- { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
266
- { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // ':'
267
- ],
268
- [
269
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
270
- { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] } // 'RETURN'
271
- ],
272
- [
273
- { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
274
- { "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "variable.other.abl"] }, // 'p_string'
275
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
276
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
277
- ],
278
- [
279
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
280
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
281
- { "startIndex": 4, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FUNCTION'
282
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
283
- ]
284
- ];
285
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
286
- })
287
-
288
- describe('', () => {
289
- let statement = `FUNCTION getAppService RETURNS CHARACTER IN SUPER.`;
290
-
291
- let expectedTokens = [
292
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
293
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
294
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'getAppService'
295
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
296
- { "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'RETURNS'
297
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
298
- { "startIndex": 31, "endIndex": 40, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'CHARACTER'
299
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
300
- { "startIndex": 41, "endIndex": 43, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
301
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
302
- { "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'SUPER'
303
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
304
- ];
305
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
306
- })
307
-
308
- describe('', () => {
309
- let statement = `FUNCTION runServerProcedure RETURNS HANDLE
310
- (INPUT pcServerFileName AS CHARACTER,
311
- INPUT phAppService AS HANDLE) IN SUPER.`;
312
-
313
- let expectedTokens = [
314
- [
315
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
316
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
317
- { "startIndex": 9, "endIndex": 27, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'runServerProcedure'
318
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
319
- { "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'RETURNS'
320
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
321
- { "startIndex": 36, "endIndex": 42, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] } // 'HANDLE'
322
- ],
323
- [
324
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
325
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // '('
326
- { "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'INPUT'
327
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
328
- { "startIndex": 9, "endIndex": 25, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "variable.parameter.abl"] }, // 'pcServerFileName'
329
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
330
- { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'AS'
331
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
332
- { "startIndex": 29, "endIndex": 38, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "storage.type.abl"] }, // 'CHARACTER'
333
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "punctuation.separator.comma.abl"] } // ','
334
- ],
335
- [
336
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
337
- { "startIndex": 3, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'INPUT'
338
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
339
- { "startIndex": 9, "endIndex": 21, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "variable.parameter.abl"] }, // 'phAppService'
340
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
341
- { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "keyword.other.abl"] }, // 'AS'
342
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters"] }, // ' '
343
- { "startIndex": 25, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "storage.type.abl"] }, // 'HANDLE'
344
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.function.abl", "meta.function.parameters", "meta.brace.round.js"] }, // ')'
345
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
346
- { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
347
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
348
- { "startIndex": 36, "endIndex": 41, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'SUPER'
349
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
350
- ]
351
- ];
352
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
353
- })
354
-
355
- describe('', () => {
356
- let statement = `FUNCTION getAppService RETURNS CHARACTER IN SUPER.`;
357
-
358
- let expectedTokens = [
359
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
360
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
361
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'getAppService'
362
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
363
- { "startIndex": 23, "endIndex": 30, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'RETURNS'
364
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
365
- { "startIndex": 31, "endIndex": 40, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'CHARACTER'
366
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
367
- { "startIndex": 41, "endIndex": 43, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
368
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
369
- { "startIndex": 44, "endIndex": 49, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'SUPER'
370
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
371
- ];
372
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
373
- })
374
-
375
- describe('', () => {
376
- let statement = `FUNCTION operationName logical MAP TO actual-name IN proc-handle .`;
377
-
378
- let expectedTokens = [
379
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
380
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
381
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
382
- { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
383
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
384
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
385
- { "startIndex": 33, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'MAP'
386
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
387
- { "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'TO'
388
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
389
- { "startIndex": 40, "endIndex": 51, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'actual-name'
390
- { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
391
- { "startIndex": 52, "endIndex": 54, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
392
- { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
393
- { "startIndex": 55, "endIndex": 66, "scopes": ["source.abl", "meta.define.function.abl", "variable.other.abl"] }, // 'proc-handle'
394
- { "startIndex": 66, "endIndex": 68, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
395
- { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
396
- ];
397
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
398
- })
399
-
400
- describe('', () => {
401
- let statement = `FUNCTION operationName logical MAP actual-name IN proc-handle .`;
402
-
403
- let expectedTokens = [
404
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
405
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
406
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
407
- { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
408
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
409
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
410
- { "startIndex": 33, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'MAP'
411
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
412
- { "startIndex": 37, "endIndex": 48, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'actual-name'
413
- { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
414
- { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
415
- { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
416
- { "startIndex": 52, "endIndex": 63, "scopes": ["source.abl", "meta.define.function.abl", "variable.other.abl"] }, // 'proc-handle'
417
- { "startIndex": 63, "endIndex": 65, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
418
- { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
419
- ];
420
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
421
- })
422
-
423
- describe('', () => {
424
- let statement = `FUNCTION operationName logical MAP actual-name IN obJRef:Property .`;
425
-
426
- let expectedTokens = [
427
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'FUNCTION'
428
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
429
- { "startIndex": 9, "endIndex": 22, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'operationName'
430
- { "startIndex": 22, "endIndex": 24, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
431
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.function.abl", "storage.type.abl"] }, // 'logical'
432
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
433
- { "startIndex": 33, "endIndex": 36, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'MAP'
434
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
435
- { "startIndex": 37, "endIndex": 48, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'actual-name'
436
- { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
437
- { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.define.function.abl", "keyword.other.abl"] }, // 'IN'
438
- { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
439
- { "startIndex": 52, "endIndex": 58, "scopes": ["source.abl", "meta.define.function.abl", "variable.other.abl"] }, // 'obJRef'
440
- { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.separator.colon.abl"] }, // ':'
441
- { "startIndex": 59, "endIndex": 67, "scopes": ["source.abl", "meta.define.function.abl", "entity.name.function.abl"] }, // 'Property'
442
- { "startIndex": 67, "endIndex": 69, "scopes": ["source.abl", "meta.define.function.abl"] }, // ' '
443
- { "startIndex": 69, "endIndex": 70, "scopes": ["source.abl", "meta.define.function.abl", "punctuation.terminator.abl"] } // '.'
444
- ];
445
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
446
- })
@@ -1,64 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `&global-define PROCEDURE-TYPE Procedure`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
8
- { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.abl", "keyword.control.directive.define.abl"] }, // 'global-define'
9
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
10
- { "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'PROCEDURE-TYPE'
11
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
12
- { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] } // 'Procedure'
13
- ];
14
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
15
- })
16
-
17
- describe('', () => {
18
- let statement = `&global-define~
19
- SOMETHING value`;
20
- let expectedTokens = [
21
- [
22
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
23
- { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.abl", "keyword.control.directive.define.abl"] }, // 'global-define'
24
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.separator.continuation"] } // '~'
25
- ],
26
- [
27
- { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'SOMETHING'
28
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
29
- { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] } // 'value'
30
- ]
31
- ];
32
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
33
- })
34
-
35
-
36
- describe('test is for global-define, the preprocessor name and the endline continuations', () => {
37
- let statement = `&global-define~
38
- SOMETHING value~
39
- more value~
40
- done`;
41
- let expectedTokens = [
42
- [
43
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
44
- { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.preprocessor.abl", "keyword.control.directive.define.abl"] }, // 'global-define'
45
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.separator.continuation"] } // '~'
46
- ],
47
- [
48
- { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'SOMETHING'
49
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.preprocessor.abl"] }, // ' '
50
- { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'value'
51
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.continuation"] } // '~'
52
- ],
53
- [
54
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "variable.other.abl"] }, // 'more'
55
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
56
- { "startIndex": 5, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'value'
57
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "punctuation.separator.continuation"] } // '~'
58
- ],
59
- [
60
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "variable.other.abl"] } // 'done'
61
- ]
62
- ];
63
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
64
- })