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,59 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `if can-do("data",output-content-type) then.`;
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": 9, "scopes": ["source.abl", "support.function.abl"] }, // 'can-do'
10
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
11
- { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
12
- { "startIndex": 11, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'data'
13
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
14
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
15
- { "startIndex": 17, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'output-content-type'
16
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
17
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl"] }, // ' '
18
- { "startIndex": 38, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
19
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
20
- ];
21
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
22
- })
23
-
24
- describe('', () => {
25
- let statement = `// b1-cust should be table scope
26
- find b1-cust exclusive-lock where rowid(b1-cust) = rowid(customer) no-wait no-error.`;
27
- let expectedTokens = [
28
- [
29
- { "startIndex": 0, "endIndex": 32, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// b1-cust should be table scope'
30
- ],
31
- [
32
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'find'
33
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
34
- { "startIndex": 5, "endIndex": 12, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'b1-cust'
35
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
36
- { "startIndex": 13, "endIndex": 27, "scopes": ["source.abl", "keyword.other.abl"] }, // 'exclusive-lock'
37
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl"] }, // ' '
38
- { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl", "keyword.other.abl"] }, // 'where'
39
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
40
- { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "support.function.abl"] }, // 'rowid'
41
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
42
- { "startIndex": 40, "endIndex": 47, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'b1-cust'
43
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
44
- { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl"] }, // ' '
45
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
46
- { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl"] }, // ' '
47
- { "startIndex": 51, "endIndex": 56, "scopes": ["source.abl", "support.function.abl"] }, // 'rowid'
48
- { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
49
- { "startIndex": 57, "endIndex": 65, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'customer'
50
- { "startIndex": 65, "endIndex": 66, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
51
- { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl"] }, // ' '
52
- { "startIndex": 67, "endIndex": 74, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-wait'
53
- { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl"] }, // ' '
54
- { "startIndex": 75, "endIndex": 83, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
55
- { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
56
- ]
57
- ];
58
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
59
- })
@@ -1,245 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement =
6
- `cassignvalues = cassignvalues
7
- + substitute(cFormattesdvalues,
8
- "characterValues":U,
9
- iCharMaxVal,
10
- substitute(cParamNameValue, cPrettyName),
11
- Consultingwerk.Const:CRLF).`;
12
-
13
- let expectedTokens = [
14
- [
15
- { "startIndex": 0, "endIndex": 13, "scopes": ["source.abl", "variable.other.abl"] }, // 'cassignvalues'
16
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
17
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
18
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
19
- { "startIndex": 16, "endIndex": 29, "scopes": ["source.abl", "variable.other.abl"] } // 'cassignvalues'
20
- ],
21
- [
22
- { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
23
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '+'
24
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
25
- { "startIndex": 6, "endIndex": 16, "scopes": ["source.abl", "support.function.abl"] }, // 'substitute'
26
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
27
- { "startIndex": 17, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cFormattesdvalues'
28
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
29
- ],
30
- [
31
- { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
32
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
33
- { "startIndex": 18, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'characterValues'
34
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
35
- { "startIndex": 34, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':U'
36
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
37
- ],
38
- [
39
- { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
40
- { "startIndex": 17, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'iCharMaxVal'
41
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
42
- ],
43
- [
44
- { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
45
- { "startIndex": 17, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'substitute'
46
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
47
- { "startIndex": 28, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParamNameValue'
48
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
49
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
50
- { "startIndex": 45, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cPrettyName'
51
- { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
52
- { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
53
- ],
54
- [
55
- { "startIndex": 0, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
56
- { "startIndex": 17, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.type.abl"] }, // 'Consultingwerk.Const'
57
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
58
- { "startIndex": 38, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'CRLF'
59
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
60
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
61
- ]
62
- ];
63
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
64
- })
65
-
66
- describe('', () => {
67
- let statement = `cDbQuery = QueryHelper:InsertExpressionForBuffer(cDbQuery,
68
- substitute("&1 = &2":U,
69
- b_eField.FieldSource,
70
- cParameterName),
71
- entry(1, b_eField.FieldSource, ".":u)).`;
72
-
73
- let expectedTokens = [
74
- [
75
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "variable.other.abl"] }, // 'cDbQuery'
76
- { "startIndex": 8, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
77
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
78
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
79
- { "startIndex": 20, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'QueryHelper'
80
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
81
- { "startIndex": 32, "endIndex": 57, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'InsertExpressionForBuffer'
82
- { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
83
- { "startIndex": 58, "endIndex": 66, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cDbQuery'
84
- { "startIndex": 66, "endIndex": 67, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
85
- ],
86
- [
87
- { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
88
- { "startIndex": 6, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'substitute'
89
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
90
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
91
- { "startIndex": 18, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '&1 = &2'
92
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
93
- { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':U'
94
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
95
- ],
96
- [
97
- { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
98
- { "startIndex": 16, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'b_eField.FieldSource'
99
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
100
- ],
101
- [
102
- { "startIndex": 0, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
103
- { "startIndex": 16, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterName'
104
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
105
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
106
- ],
107
- [
108
- { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
109
- { "startIndex": 6, "endIndex": 11, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'entry'
110
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
111
- { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
112
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
113
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
114
- { "startIndex": 15, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'b_eField.FieldSource'
115
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
116
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
117
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
118
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '.'
119
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
120
- { "startIndex": 40, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':u'
121
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
122
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
123
- { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
124
- ]
125
- ];
126
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
127
- })
128
-
129
- describe('', () => {
130
- let statement = `cParameterField = SUBST("&1&2", LOWER(SUBSTRING(ttUniqueIndex.FieldDataType, 1, 1)), CamelCase(ttUniqueIndex.IndexField)).
131
- /* don't add a field that is already there, that is bad. */
132
- IF LOOKUP(SUBST(" &1 AS &2", cParameterField, CAPS(ttUniqueIndex.FieldDataType)), cParameterDefForReplicate) = 0 THEN DO:
133
- cParameterDefForReplicate = SUBST("&1, &2 AS &3", cParameterDefForReplicate, cParameterField, CAPS(ttUniqueIndex.FieldDataType)).
134
- END.`;
135
-
136
- let expectedTokens = [
137
- [
138
- { "startIndex": 0, "endIndex": 15, "scopes": ["source.abl", "variable.other.abl"] }, // 'cParameterField'
139
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
140
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
141
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
142
- { "startIndex": 18, "endIndex": 23, "scopes": ["source.abl", "support.function.abl"] }, // 'SUBST'
143
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
144
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
145
- { "startIndex": 25, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '&1&2'
146
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
147
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
148
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
149
- { "startIndex": 32, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'LOWER'
150
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
151
- { "startIndex": 38, "endIndex": 47, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'SUBSTRING'
152
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
153
- { "startIndex": 48, "endIndex": 75, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
154
- { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
155
- { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
156
- { "startIndex": 77, "endIndex": 78, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
157
- { "startIndex": 78, "endIndex": 79, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
158
- { "startIndex": 79, "endIndex": 80, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
159
- { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '1'
160
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
161
- { "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
162
- { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
163
- { "startIndex": 84, "endIndex": 85, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
164
- { "startIndex": 85, "endIndex": 94, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'CamelCase'
165
- { "startIndex": 94, "endIndex": 95, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
166
- { "startIndex": 95, "endIndex": 119, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.IndexField'
167
- { "startIndex": 119, "endIndex": 120, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
168
- { "startIndex": 120, "endIndex": 121, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
169
- { "startIndex": 121, "endIndex": 122, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
170
- ],
171
- [
172
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
173
- { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
174
- { "startIndex": 4, "endIndex": 59, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' don't add a field that is already there, that is bad. '
175
- { "startIndex": 59, "endIndex": 61, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
176
- ],
177
- [
178
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
179
- { "startIndex": 2, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'IF'
180
- { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
181
- { "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "support.function.abl"] }, // 'LOOKUP'
182
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
183
- { "startIndex": 12, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'SUBST'
184
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
185
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
186
- { "startIndex": 19, "endIndex": 28, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // ' &1 AS &2'
187
- { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
188
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
189
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
190
- { "startIndex": 31, "endIndex": 46, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterField'
191
- { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
192
- { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl"] }, // ' '
193
- { "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'CAPS'
194
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
195
- { "startIndex": 53, "endIndex": 80, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
196
- { "startIndex": 80, "endIndex": 81, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
197
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
198
- { "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
199
- { "startIndex": 83, "endIndex": 84, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
200
- { "startIndex": 84, "endIndex": 109, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
201
- { "startIndex": 109, "endIndex": 110, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
202
- { "startIndex": 110, "endIndex": 111, "scopes": ["source.abl"] }, // ' '
203
- { "startIndex": 111, "endIndex": 112, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
204
- { "startIndex": 112, "endIndex": 113, "scopes": ["source.abl"] }, // ' '
205
- { "startIndex": 113, "endIndex": 114, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '0'
206
- { "startIndex": 114, "endIndex": 115, "scopes": ["source.abl"] }, // ' '
207
- { "startIndex": 115, "endIndex": 119, "scopes": ["source.abl", "keyword.other.abl"] }, // 'THEN'
208
- { "startIndex": 119, "endIndex": 120, "scopes": ["source.abl", "meta.block.abl"] }, // ' '
209
- { "startIndex": 120, "endIndex": 122, "scopes": ["source.abl", "meta.block.abl", "keyword.other.abl"] }, // 'DO'
210
- { "startIndex": 122, "endIndex": 123, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
211
- ],
212
- [
213
- { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl"] }, // ' '
214
- { "startIndex": 6, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
215
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
216
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
217
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
218
- { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl", "support.function.abl"] }, // 'SUBST'
219
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
220
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
221
- { "startIndex": 41, "endIndex": 53, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // '&1, &2 AS &3'
222
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
223
- { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
224
- { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
225
- { "startIndex": 56, "endIndex": 81, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterDefForReplicate'
226
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
227
- { "startIndex": 82, "endIndex": 83, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
228
- { "startIndex": 83, "endIndex": 98, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'cParameterField'
229
- { "startIndex": 98, "endIndex": 99, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
230
- { "startIndex": 99, "endIndex": 100, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
231
- { "startIndex": 100, "endIndex": 104, "scopes": ["source.abl", "meta.function.arguments.abl", "support.function.abl"] }, // 'CAPS'
232
- { "startIndex": 104, "endIndex": 105, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
233
- { "startIndex": 105, "endIndex": 132, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttUniqueIndex.FieldDataType'
234
- { "startIndex": 132, "endIndex": 133, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // ')'
235
- { "startIndex": 133, "endIndex": 134, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
236
- { "startIndex": 134, "endIndex": 135, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
237
- ],
238
- [
239
- { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
240
- { "startIndex": 2, "endIndex": 5, "scopes": ["source.abl", "keyword.other.abl"] }, // 'END'
241
- { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
242
- ]
243
- ];
244
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
245
- })
@@ -1,116 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `CopyTable(table copytable by-reference).`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 9, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'CopyTable'
8
- { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
9
- { "startIndex": 10, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'table'
10
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
11
- { "startIndex": 16, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'copytable'
12
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
13
- { "startIndex": 26, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'by-reference'
14
- { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
15
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
16
- ];
17
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
18
- })
19
-
20
- describe('', () => {
21
- let statement = `CopyDataset(dataset dsData by-reference).`;
22
- let expectedTokens = [
23
- { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'CopyDataset'
24
- { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
25
- { "startIndex": 12, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'dataset'
26
- { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
27
- { "startIndex": 20, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.dataset.abl"] }, // 'dsData'
28
- { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
29
- { "startIndex": 27, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'by-reference'
30
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
31
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
32
- ];
33
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
34
- })
35
-
36
- describe('', () => {
37
- let statement = `run Foo(input (dataset dsCustomer:handle)).`;
38
- let expectedTokens = [
39
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
40
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
41
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'Foo'
42
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
43
- { "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'input'
44
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
45
- { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
46
- { "startIndex": 15, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'dataset'
47
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
48
- { "startIndex": 23, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.dataset.abl"] }, // 'dsCustomer'
49
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
50
- { "startIndex": 34, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'handle'
51
- { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
52
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
53
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
54
- ];
55
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
56
- })
57
-
58
- describe('', () => {
59
- let statement = `buffer ttCustomer:buffer-copy(buffer Customer:handle).`;
60
- let expectedTokens = [
61
- { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'buffer'
62
- { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
63
- { "startIndex": 7, "endIndex": 17, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'ttCustomer'
64
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
65
- { "startIndex": 18, "endIndex": 29, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'buffer-copy'
66
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
67
- { "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'buffer'
68
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
69
- { "startIndex": 37, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'Customer'
70
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
71
- { "startIndex": 46, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'handle'
72
- { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
73
- { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
74
- ];
75
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
76
- })
77
-
78
- describe('', () => {
79
- let statement = `run Foo(input buffer Customer:handle).`;
80
- let expectedTokens = [
81
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
82
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
83
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'Foo'
84
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
85
- { "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'input'
86
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
87
- { "startIndex": 14, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'buffer'
88
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
89
- { "startIndex": 21, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'Customer'
90
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
91
- { "startIndex": 30, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'handle'
92
- { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
93
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
94
- ];
95
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
96
- })
97
-
98
- describe('', () => {
99
- let statement = `run Foo(input temp-table ttCustomer:handle).`;
100
- let expectedTokens = [
101
- { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'run'
102
- { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
103
- { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "entity.name.procedure.abl"] }, // 'Foo'
104
- { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
105
- { "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'input'
106
- { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
107
- { "startIndex": 14, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'temp-table'
108
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
109
- { "startIndex": 25, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'ttCustomer'
110
- { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.colon.abl"] }, // ':'
111
- { "startIndex": 36, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'handle'
112
- { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
113
- { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
114
- ];
115
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
116
- })
@@ -1,56 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `set-size(memPtr) = 27.`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
8
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
9
- { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'memPtr'
10
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
11
- { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
12
- { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
13
- { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
14
- { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
15
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
16
- ];
17
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
18
- })
19
-
20
- describe('', () => {
21
- let statement = `set-size(objref:Value) = 27.`;
22
- let expectedTokens = [
23
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
24
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
25
- { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'objref'
26
- { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
27
- { "startIndex": 16, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Value'
28
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
29
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
30
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
31
- { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl"] }, // ' '
32
- { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
33
- { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
34
- ];
35
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
36
- })
37
-
38
-
39
- describe('', () => {
40
- let statement = `set-size(package.sub.type:Value) = 27.`;
41
- let expectedTokens = [
42
- { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'set-size'
43
- { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
44
- { "startIndex": 9, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'package.sub.type'
45
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
46
- { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Value'
47
- { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
48
- { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl"] }, // ' '
49
- { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
50
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // ' '
51
- { "startIndex": 35, "endIndex": 37, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '27'
52
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
53
- ];
54
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
55
- })
56
-
@@ -1,50 +0,0 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement = `' <INPUT TYPE = "HIDDEN" name=DVWebKey value="' GET-VALUE("DVWebKey":U) '">~n'`;
6
- let expectedTokens = [
7
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
8
- { "startIndex": 1, "endIndex": 49, "scopes": ["source.abl", "string.quoted.single.abl"] }, // ' <INPUT TYPE = "HIDDEN" name=DVWebKey value="'
9
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
10
- { "startIndex": 50, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
11
- { "startIndex": 52, "endIndex": 61, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'GET-VALUE'
12
- { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
13
- { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
14
- { "startIndex": 63, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'DVWebKey'
15
- { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
16
- { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':U'
17
- { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
18
- { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl"] }, // ' '
19
- { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
20
- { "startIndex": 77, "endIndex": 79, "scopes": ["source.abl", "string.quoted.single.abl"] }, // '">'
21
- { "startIndex": 79, "endIndex": 81, "scopes": ["source.abl", "string.quoted.single.abl", "constant.character.escape.abl"] }, // '~n'
22
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] } // '''
23
- ];
24
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
25
- })
26
-
27
-
28
-
29
- describe('', () => {
30
- let statement = `' <INPUT TYPE = "HIDDEN" name=DVWebKey value="' SET-VALUE("DVWebKey":U) '">~n'`;
31
- let expectedTokens = [
32
- { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
33
- { "startIndex": 1, "endIndex": 49, "scopes": ["source.abl", "string.quoted.single.abl"] }, // ' <INPUT TYPE = "HIDDEN" name=DVWebKey value="'
34
- { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] }, // '''
35
- { "startIndex": 50, "endIndex": 52, "scopes": ["source.abl"] }, // ' '
36
- { "startIndex": 52, "endIndex": 61, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'SET-VALUE'
37
- { "startIndex": 61, "endIndex": 62, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
38
- { "startIndex": 62, "endIndex": 63, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
39
- { "startIndex": 63, "endIndex": 71, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'DVWebKey'
40
- { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
41
- { "startIndex": 72, "endIndex": 74, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "support.other.abl"] }, // ':U'
42
- { "startIndex": 74, "endIndex": 75, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
43
- { "startIndex": 75, "endIndex": 76, "scopes": ["source.abl"] }, // ' '
44
- { "startIndex": 76, "endIndex": 77, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.begin.abl"] }, // '''
45
- { "startIndex": 77, "endIndex": 79, "scopes": ["source.abl", "string.quoted.single.abl"] }, // '">'
46
- { "startIndex": 79, "endIndex": 81, "scopes": ["source.abl", "string.quoted.single.abl", "constant.character.escape.abl"] }, // '~n'
47
- { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "string.quoted.single.abl", "punctuation.definition.string.end.abl"] } // '''
48
- ];
49
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
50
- })