abl-tmlanguage 1.3.28 → 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 (140) hide show
  1. package/package.json +5 -2
  2. package/.github/workflows/ci.yml +0 -36
  3. package/CHANGELOG.md +0 -139
  4. package/abl-functions.txt +0 -548
  5. package/abl-keywords.txt +0 -416
  6. package/abl-methods.txt +0 -1053
  7. package/index.mjs +0 -508
  8. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +0 -17
  9. package/spec/annotations/annotation.spec.js +0 -366
  10. package/spec/array-extent/issue#5.spec.js +0 -26
  11. package/spec/blocks/block-labels.spec.js +0 -201
  12. package/spec/blocks/block-options.spec.js +0 -174
  13. package/spec/blocks/finally-blocks.spec.js +0 -90
  14. package/spec/blocks/on-quit.spec.js +0 -59
  15. package/spec/comments/comment-in-block-statement.spec.js +0 -153
  16. package/spec/comments/comment-in-for-each.spec.js +0 -105
  17. package/spec/comments/comment-in-function-args.spec.js +0 -88
  18. package/spec/comments/spacious-comment.spec.js +0 -73
  19. package/spec/comments/vscode-abl-issue#127.spec.js +0 -165
  20. package/spec/create-widgets/create-window.spec.js +0 -224
  21. package/spec/db-table-and-field/buffer-copy.spec.js +0 -246
  22. package/spec/db-table-and-field/create-alias.spec.js +0 -131
  23. package/spec/db-table-and-field/create-record.spec.js +0 -75
  24. package/spec/db-table-and-field/double-colon-access.spec.js +0 -154
  25. package/spec/db-table-and-field/field-in-function.spec.js +0 -58
  26. package/spec/db-table-and-field/fields-except.spec.js +0 -68
  27. package/spec/db-table-and-field/find-record.spec.js +0 -158
  28. package/spec/db-table-and-field/foreach.spec.js +0 -588
  29. package/spec/db-table-and-field/issue#88.spec.js +0 -121
  30. package/spec/db-table-and-field/new-record.spec.js +0 -250
  31. package/spec/db-table-and-field/query-get.spec.js +0 -137
  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 -212
  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 -70
  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/include-in-argument.spec.js +0 -120
  64. package/spec/function-call/misc-abl-functions.spec.js +0 -59
  65. package/spec/function-call/nested-functions.spec.js +0 -245
  66. package/spec/function-call/pass-table.spec.js +0 -116
  67. package/spec/function-call/set-size.spec.js +0 -56
  68. package/spec/function-call/udf-calls.spec.js +0 -50
  69. package/spec/function-call/vscode-abl-issue#19.spec.js +0 -129
  70. package/spec/function-definition/vscode-abl-issue#166.spec.js +0 -446
  71. package/spec/global-scoped-define/global-define.spec.js +0 -64
  72. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +0 -70
  73. package/spec/global-scoped-define/undefine.spec.js +0 -44
  74. package/spec/include/abl-tmlanguage-issues#5.spec.js +0 -40
  75. package/spec/include/include-file-name.spec.js +0 -267
  76. package/spec/include/unnamed-arguments.spec.js +0 -38
  77. package/spec/include/vscode-abl-issue#45.spec.js +0 -20
  78. package/spec/include/vscode-abl-issue#77.spec.js +0 -128
  79. package/spec/include/vscode-abl-issue#80.spec.js +0 -50
  80. package/spec/input-output/input-from.spec.js +0 -504
  81. package/spec/input-output/output-to.spec.js +0 -456
  82. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +0 -98
  83. package/spec/method-attribute-property-call/connected-method.spec.js +0 -29
  84. package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +0 -53
  85. package/spec/method-attribute-property-call/get-set-method-name.spec.js +0 -140
  86. package/spec/method-attribute-property-call/method-call.spec.js +0 -268
  87. package/spec/method-attribute-property-call/nested-property-call.spec.js +0 -18
  88. package/spec/method-attribute-property-call/unqualified-method-call.spec.js +0 -41
  89. package/spec/method-definition/constructor.spec.js +0 -174
  90. package/spec/method-definition/method.spec.js +0 -541
  91. package/spec/misc-statements/array-for.spec.js +0 -21
  92. package/spec/misc-statements/case-statement.spec.js +0 -96
  93. package/spec/misc-statements/class-in-var-name.spec.js +0 -204
  94. package/spec/misc-statements/copy-lob.spec.js +0 -144
  95. package/spec/misc-statements/def-in-name.spec.js +0 -20
  96. package/spec/misc-statements/delete-objects.spec.js +0 -65
  97. package/spec/misc-statements/do-in-name.spec.js +0 -259
  98. package/spec/misc-statements/event-subscribe.spec.js +0 -308
  99. package/spec/misc-statements/export-delimiter.spec.js +0 -37
  100. package/spec/misc-statements/guid.spec.js +0 -97
  101. package/spec/misc-statements/if-then.spec.js +0 -454
  102. package/spec/misc-statements/issue#173.spec.js +0 -99
  103. package/spec/misc-statements/message-statement.spec.js +0 -21
  104. package/spec/misc-statements/record-buffer-functions.spec.js +0 -73
  105. package/spec/misc-statements/release.spec.js +0 -41
  106. package/spec/misc-statements/return-statement.spec.js +0 -64
  107. package/spec/misc-statements/skip-statement-and-fuction.spec.js +0 -35
  108. package/spec/misc-statements/system-handles.spec.js +0 -122
  109. package/spec/numbers/scientific-notation.spec.js +0 -212
  110. package/spec/operators/operators.spec.js +0 -149
  111. package/spec/operators/safe-navigation-operator.spec.js +0 -246
  112. package/spec/preprocesors/issue166.spec.js +0 -91
  113. package/spec/preprocesors/preprocessor-functions.spec.js +0 -77
  114. package/spec/preprocesors/proparse-preprocessor.spec.js +0 -90
  115. package/spec/procedure-definition/empty-proc.spec.js +0 -134
  116. package/spec/procedure-definition/trigger-procedure.spec.js +0 -132
  117. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +0 -46
  118. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +0 -31
  119. package/spec/procedure-definition/vscode-abl-issue#325.spec.js +0 -88
  120. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +0 -39
  121. package/spec/run-statement/run-statement.spec.js +0 -868
  122. package/spec/shared.js +0 -104
  123. package/spec/strings/translation-attribute.spec.js +0 -52
  124. package/spec/strings/vscode-abl-issue#11.spec.js +0 -56
  125. package/spec/strings/vscode-abl-issue#28.spec.js +0 -31
  126. package/spec/type-name/argument.spec.js +0 -206
  127. package/spec/type-name/cast.spec.js +0 -163
  128. package/spec/type-name/define-class.spec.js +0 -555
  129. package/spec/type-name/define-enum.spec.js +0 -44
  130. package/spec/type-name/define-interface.spec.js +0 -159
  131. package/spec/type-name/define-property.spec.js +0 -301
  132. package/spec/type-name/define-temp-table.spec.js +0 -434
  133. package/spec/type-name/define-type-spec.js +0 -435
  134. package/spec/type-name/define-variable-property.spec.js +0 -264
  135. package/spec/type-name/define-variable.spec.js +0 -386
  136. package/spec/type-name/get-class.spec.js +0 -91
  137. package/spec/type-name/new.spec.js +0 -185
  138. package/spec/type-name/parameter-as.spec.js +0 -978
  139. package/spec/type-name/type-name.spec.js +0 -880
  140. package/spec/type-name/using.spec.js +0 -160
@@ -1,121 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `disp tbl1.cono tbl2.vendorno tbl3.custno tbl3.vendorno cono vendorno.`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'disp'
8
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
9
- { "startIndex": 5, "endIndex": 14, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl1.cono'
10
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
11
- { "startIndex": 15, "endIndex": 28, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2.vendorno'
12
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
13
- { "startIndex": 29, "endIndex": 40, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl3.custno'
14
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
15
- { "startIndex": 41, "endIndex": 54, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl3.vendorno'
16
- { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl"] }, // ' '
17
- { "startIndex": 55, "endIndex": 59, "scopes": ["source.abl", "variable.other.abl"] }, // 'cono'
18
- { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl"] }, // ' '
19
- { "startIndex": 60, "endIndex": 68, "scopes": ["source.abl", "variable.other.abl"] }, // 'vendorno'
20
- { "startIndex": 68, "endIndex": 69, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
21
- ];
22
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
23
- })
24
-
25
- describe('', () => {
26
- let statement = `find fitaaaqfasf`;
27
- let expectedTokens = [
28
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'find'
29
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
30
- { "startIndex": 5, "endIndex": 16, "scopes": ["source.abl", "storage.data.table.abl"] } // 'fitaaaqfasf'
31
- ];
32
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
33
- })
34
-
35
- describe('', () => {
36
- let statement = `if first-of(tbl.accountno) then do:
37
- for each tbl2 where tbl2.cono = 123
38
- and tbl2.vendorno = tbl.vendorno
39
- and tbl2.accountno = tbl.accountno
40
- and tbl2.descriptioncd = "" no-lock:`;
41
- let expectedTokens = [
42
- [
43
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
44
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
45
- { "startIndex": 3, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'first-of'
46
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
47
- { "startIndex": 12, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'tbl.accountno'
48
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
49
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
50
- { "startIndex": 27, "endIndex": 31, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
51
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
52
- { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
53
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
54
- ],
55
- [
56
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
57
- { "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'for'
58
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
59
- { "startIndex": 6, "endIndex": 10, "scopes": ["source.abl", "keyword.other.abl"] }, // 'each'
60
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl"] }, // ' '
61
- { "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2'
62
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
63
- { "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'where'
64
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
65
- { "startIndex": 22, "endIndex": 31, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2.cono'
66
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
67
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
68
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
69
- { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "constant.numeric.source.abl"] } // '123'
70
- ],
71
- [
72
- { "startIndex": 0, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
73
- { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'and'
74
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
75
- { "startIndex": 22, "endIndex": 35, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2.vendorno'
76
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
77
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
78
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
79
- { "startIndex": 38, "endIndex": 50, "scopes": ["source.abl", "storage.data.table.abl"] } // 'tbl.vendorno'
80
- ],
81
- [
82
- { "startIndex": 0, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
83
- { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'and'
84
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
85
- { "startIndex": 22, "endIndex": 36, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2.accountno'
86
- { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
87
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
88
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
89
- { "startIndex": 40, "endIndex": 53, "scopes": ["source.abl", "storage.data.table.abl"] } // 'tbl.accountno'
90
- ],
91
- [
92
- { "startIndex": 0, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
93
- { "startIndex": 18, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'and'
94
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
95
- { "startIndex": 22, "endIndex": 40, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tbl2.descriptioncd'
96
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl"] }, // ' '
97
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
98
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl"] }, // ' '
99
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
100
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
101
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
102
- { "startIndex": 46, "endIndex": 53, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
103
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
104
- ]
105
- ];
106
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
107
- })
108
-
109
- describe('', () => {
110
- let statement = `//exclusive-lock:
111
- //no-lock:`;
112
- let expectedTokens = [
113
- [
114
- { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '//exclusive-lock:'
115
- ],
116
- [
117
- { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '//no-lock:'
118
- ]
119
- ];
120
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
121
- })
@@ -1,250 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `if new ( customer) then message 'new'.`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
8
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
9
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
10
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
11
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
12
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
13
- { "startIndex": 9, "endIndex": 17, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'customer'
14
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
15
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
16
- { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
17
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
18
- { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
19
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
20
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
21
- { "startIndex": 33, "endIndex": 36, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
22
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
23
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
24
- ];
25
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
26
- })
27
-
28
- describe('', () => {
29
- let statement = `if new customer then message 'new'.`;
30
- let expectedTokens = [
31
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
32
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
33
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
34
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
35
- { "startIndex": 7, "endIndex": 15, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'customer'
36
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
37
- { "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
38
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
39
- { "startIndex": 21, "endIndex": 28, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
40
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl"] }, // ' '
41
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
42
- { "startIndex": 30, "endIndex": 33, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
43
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
44
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
45
- ];
46
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
47
- })
48
-
49
- describe('', () => {
50
- let statement = `if new ( s2k.customer) then message 'new'.`;
51
- let expectedTokens = [
52
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
53
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
54
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
55
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
56
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
57
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
58
- { "startIndex": 9, "endIndex": 21, "scopes": ["source.abl", "storage.data.table.abl"] }, // 's2k.customer'
59
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
60
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
61
- { "startIndex": 23, "endIndex": 27, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
62
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
63
- { "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
64
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
65
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
66
- { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
67
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
68
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
69
- ];
70
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
71
- })
72
-
73
- describe('', () => {
74
- let statement = `if new s2k.customer then message 'new'.`;
75
- let expectedTokens = [
76
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
77
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
78
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
79
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
80
- { "startIndex": 7, "endIndex": 19, "scopes": ["source.abl", "storage.data.table.abl"] }, // 's2k.customer'
81
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
82
- { "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
83
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
84
- { "startIndex": 25, "endIndex": 32, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
85
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
86
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
87
- { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
88
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
89
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
90
- ];
91
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
92
- })
93
-
94
- describe('', () => {
95
- let statement = `if new ( _index-field) then message 'new'.`;
96
- let expectedTokens = [
97
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
98
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
99
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
100
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
101
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
102
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
103
- { "startIndex": 9, "endIndex": 21, "scopes": ["source.abl", "storage.data.table.abl"] }, // '_index-field'
104
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
105
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
106
- { "startIndex": 23, "endIndex": 27, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
107
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
108
- { "startIndex": 28, "endIndex": 35, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
109
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl"] }, // ' '
110
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
111
- { "startIndex": 37, "endIndex": 40, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
112
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
113
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
114
- ];
115
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
116
- })
117
-
118
- describe('', () => {
119
- let statement = `if new _field then message 'new'.`;
120
- let expectedTokens = [
121
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
122
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
123
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
124
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
125
- { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "storage.data.table.abl"] }, // '_field'
126
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
127
- { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
128
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
129
- { "startIndex": 19, "endIndex": 26, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
130
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl"] }, // ' '
131
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
132
- { "startIndex": 28, "endIndex": 31, "scopes": ["source.abl", "string.quoted.single.abl"] }, // 'new'
133
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
134
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
135
- ];
136
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
137
- })
138
-
139
- describe('', () => {
140
- let statement = `if new ({&file}) or {&file}.name <> old-{&file}.name then.`;
141
- let expectedTokens = [
142
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
143
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
144
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
145
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
146
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
147
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
148
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
149
- { "startIndex": 10, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
150
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
151
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
152
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
153
- { "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
154
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
155
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
156
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
157
- { "startIndex": 22, "endIndex": 26, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
158
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
159
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
160
- { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl"] }, // 'name '
161
- { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
162
- { "startIndex": 35, "endIndex": 40, "scopes": ["source.abl"] }, // ' old-'
163
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
164
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
165
- { "startIndex": 42, "endIndex": 46, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
166
- { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
167
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
168
- { "startIndex": 48, "endIndex": 53, "scopes": ["source.abl"] }, // 'name '
169
- { "startIndex": 53, "endIndex": 57, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
170
- { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
171
- ];
172
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
173
- })
174
-
175
- describe('', () => {
176
- let statement = `if new {&file} or {&file}.name <> old-{&file}.name then.`;
177
- let expectedTokens = [
178
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
179
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
180
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
181
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
182
- { "startIndex": 7, "endIndex": 14, "scopes": ["source.abl", "storage.data.table.abl"] }, // '{&file}'
183
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl"] }, // ' '
184
- { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
185
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
186
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
187
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
188
- { "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
189
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
190
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
191
- { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl"] }, // 'name '
192
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
193
- { "startIndex": 33, "endIndex": 38, "scopes": ["source.abl"] }, // ' old-'
194
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
195
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
196
- { "startIndex": 40, "endIndex": 44, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
197
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
198
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
199
- { "startIndex": 46, "endIndex": 51, "scopes": ["source.abl"] }, // 'name '
200
- { "startIndex": 51, "endIndex": 55, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
201
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
202
- ];
203
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
204
- })
205
-
206
- describe('', () => {
207
- let statement = `if new buf-{&file} or buf-{&file}.name <> old-{&file}.name then.`;
208
- let expectedTokens = [
209
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
210
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
211
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
212
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
213
- { "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'buf-{&file}'
214
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
215
- { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
216
- { "startIndex": 21, "endIndex": 26, "scopes": ["source.abl"] }, // ' buf-'
217
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
218
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
219
- { "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
220
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
221
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
222
- { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl"] }, // 'name '
223
- { "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
224
- { "startIndex": 41, "endIndex": 46, "scopes": ["source.abl"] }, // ' old-'
225
- { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
226
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
227
- { "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
228
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
229
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
230
- { "startIndex": 54, "endIndex": 59, "scopes": ["source.abl"] }, // 'name '
231
- { "startIndex": 59, "endIndex": 63, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
232
- { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
233
- ];
234
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
235
- })
236
-
237
- describe('', () => {
238
- let statement = `if new buf-{&file}-update then.`;
239
- let expectedTokens = [
240
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
241
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
242
- { "startIndex": 3, "endIndex": 6, "scopes": ["source.abl", "support.function.abl"] }, // 'new'
243
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
244
- { "startIndex": 7, "endIndex": 25, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'buf-{&file}-update'
245
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
246
- { "startIndex": 26, "endIndex": 30, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
247
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
248
- ];
249
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
250
- })
@@ -1,137 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `get first qttFoo
6
- no-lock.`;
7
- let expectedTokens = [
8
- [
9
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
10
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
11
- { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
12
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
13
- { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] } // 'qttFoo'
14
- ],
15
- [
16
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
17
- { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
18
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
19
- ]
20
- ];
21
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
22
- })
23
-
24
- describe('', () => {
25
- let statement = `get first qttFoo.
26
-
27
- if available(ttFoo) then
28
- do:
29
- end.`;
30
- let expectedTokens = [
31
- [
32
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
33
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
34
- { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
35
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
36
- { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
37
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
38
- ],
39
- [
40
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
41
- ],
42
- [
43
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
44
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl"] }, // ' '
45
- { "startIndex": 3, "endIndex": 12, "scopes": ["source.abl", "support.function.abl"] }, // 'available'
46
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
47
- { "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'ttFoo'
48
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
49
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
50
- { "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "keyword.other.abl"] } // 'then'
51
- ],
52
- [
53
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'do'
54
- { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
55
- ],
56
- [
57
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'end'
58
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
59
- ]
60
- ];
61
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
62
- })
63
-
64
- describe('', () => {
65
- let statement = `get first qttFoo /* all foos by bar squared */
66
- no-lock.`;
67
- let expectedTokens = [
68
- [
69
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
70
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
71
- { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
72
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
73
- { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
74
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
75
- { "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
76
- { "startIndex": 19, "endIndex": 44, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' all foos by bar squared '
77
- { "startIndex": 44, "endIndex": 46, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
78
- ],
79
- [
80
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
81
- { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-lock'
82
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
83
- ]
84
- ];
85
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
86
- })
87
-
88
- describe('', () => {
89
- let statement = `get first qttFoo // excludes single bars
90
- exclusive-lock.`;
91
- let expectedTokens = [
92
- [
93
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
94
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
95
- { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
96
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
97
- { "startIndex": 10, "endIndex": 16, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
98
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
99
- { "startIndex": 17, "endIndex": 40, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// excludes single bars'
100
- ],
101
- [
102
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
103
- { "startIndex": 2, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'exclusive-lock'
104
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
105
- ]
106
- ];
107
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
108
- })
109
-
110
- describe('', () => {
111
- let statement = `get first {&BROWSE-NAME}.`;
112
- let expectedTokens = [
113
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
114
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
115
- { "startIndex": 4, "endIndex": 9, "scopes": ["source.abl", "keyword.other.abl"] }, // 'first'
116
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
117
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
118
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
119
- { "startIndex": 12, "endIndex": 23, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'BROWSE-NAME'
120
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
121
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
122
- ];
123
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
124
- })
125
-
126
- describe('', () => {
127
- let statement = `get last qttFoo.`;
128
- let expectedTokens = [
129
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'get'
130
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
131
- { "startIndex": 4, "endIndex": 8, "scopes": ["source.abl", "keyword.other.abl"] }, // 'last'
132
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl"] }, // ' '
133
- { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'qttFoo'
134
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
135
- ];
136
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
137
- })