abl-tmlanguage 1.1.3 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +54 -1
  3. package/abl.tmLanguage.json +3534 -230
  4. package/azure-pipelines.yml +3 -2
  5. package/package.json +7 -6
  6. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
  7. package/spec/annotations/annotation.spec.js +232 -0
  8. package/spec/array-extent/issue#5.spec.js +18 -18
  9. package/spec/blocks/finally-blocks.spec.js +90 -0
  10. package/spec/blocks/on-quit.spec.js +59 -0
  11. package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
  12. package/spec/db-table-and-field/fields-except.spec.js +69 -0
  13. package/spec/db-table-and-field/foreach.spec.js +588 -0
  14. package/spec/db-table-and-field/issue#88.spec.js +120 -0
  15. package/spec/define-buffer/create-buffer.spec.js +110 -0
  16. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  17. package/spec/define-parameter/simple-single-line.spec.js +140 -100
  18. package/spec/define-stream/simple-single-line.spec.js +32 -31
  19. package/spec/define-temp-table/define-index.spec.js +138 -0
  20. package/spec/define-variable/extent.spec.js +228 -0
  21. package/spec/define-variable/issue#6.spec.js +256 -198
  22. package/spec/define-variable/issue#9.spec.js +38 -32
  23. package/spec/define-variable/simple-single-line.spec.js +168 -87
  24. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  25. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  26. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  27. package/spec/do/do-blocks.spec.js +224 -0
  28. package/spec/do/issue#3.spec.js +69 -60
  29. package/spec/function-call/nested-functions.spec.js +128 -0
  30. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  31. package/spec/global-scoped-define/global-define.spec.js +11 -11
  32. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  33. package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
  34. package/spec/include/vscode-abl-issue#45.spec.js +15 -15
  35. package/spec/include/vscode-abl-issue#77.spec.js +129 -0
  36. package/spec/include/vscode-abl-issue#80.spec.js +40 -27
  37. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
  38. package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
  39. package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
  40. package/spec/method-attribute-property-call/method-call.spec.js +112 -0
  41. package/spec/method-definition/constructor.spec.js +174 -0
  42. package/spec/method-definition/method.spec.js +320 -0
  43. package/spec/misc-statements/case-statement.spec.js +96 -0
  44. package/spec/misc-statements/copy-lob.spec.js +137 -0
  45. package/spec/misc-statements/if-then.spec.js +170 -0
  46. package/spec/misc-statements/return-statement.spec.js +53 -0
  47. package/spec/operators/operators.spec.js +78 -0
  48. package/spec/procedure-definition/empty-proc.spec.js +101 -18
  49. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  50. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  51. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  52. package/spec/run-statement/run-statement.spec.js +162 -0
  53. package/spec/shared.js +84 -42
  54. package/spec/strings/translation-attribute.spec.js +52 -0
  55. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  56. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  57. package/spec/type-name/argument.spec.js +209 -0
  58. package/spec/type-name/cast.spec.js +165 -0
  59. package/spec/type-name/define-class.spec.js +468 -0
  60. package/spec/type-name/define-enum.spec.js +44 -0
  61. package/spec/type-name/define-interface.spec.js +159 -0
  62. package/spec/type-name/define-property.spec.js +301 -0
  63. package/spec/type-name/define-temp-table.spec.js +434 -0
  64. package/spec/type-name/define-type-spec.js +435 -0
  65. package/spec/type-name/define-variable-property.spec.js +264 -0
  66. package/spec/type-name/define-variable.spec.js +504 -0
  67. package/spec/type-name/get-class.spec.js +91 -0
  68. package/spec/type-name/new.spec.js +126 -0
  69. package/spec/type-name/parameter-as.spec.js +838 -0
  70. package/spec/type-name/type-name.spec.js +879 -0
  71. package/spec/type-name/using.spec.js +115 -0
@@ -1,57 +1,40 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement =
6
- `{assigned "mExtVar"} /* comment */`;
7
-
8
- let expectedTokens = [
9
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
10
- {"startIndex":1,"endIndex":9,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
11
- {"startIndex":9,"endIndex":10,"scopes":["source.abl","meta.include.abl"]},
12
- {"startIndex":10,"endIndex":11,"scopes":["source.abl","meta.include.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
13
- {"startIndex":11,"endIndex":18,"scopes":["source.abl","meta.include.abl","string.double.complex.abl"]},
14
- {"startIndex":18,"endIndex":19,"scopes":["source.abl","meta.include.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
15
- {"startIndex":19,"endIndex":20,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
16
- {"startIndex":20,"endIndex":26,"scopes":["source.abl"]},
17
- {"startIndex":26,"endIndex":28,"scopes":["source.abl","comment.block.source.abl"]},
18
- {"startIndex":28,"endIndex":37,"scopes":["source.abl","comment.block.source.abl","comment"]},
19
- {"startIndex":37,"endIndex":39,"scopes":["source.abl","comment.block.source.abl"]}
20
- ];
21
-
22
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
23
- })
24
- describe('', () => {
25
- let statement =
26
- `{assigned &ExtVar} /* comment */`;
27
-
28
- let expectedTokens = [
29
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
30
- {"startIndex":1,"endIndex":9,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
31
- {"startIndex":9,"endIndex":10,"scopes":["source.abl","meta.include.abl"]},
32
- {"startIndex":10,"endIndex":17,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
33
- {"startIndex":17,"endIndex":18,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
34
- {"startIndex":18,"endIndex":25,"scopes":["source.abl"]},
35
- {"startIndex":25,"endIndex":27,"scopes":["source.abl","comment.block.source.abl"]},
36
- {"startIndex":27,"endIndex":36,"scopes":["source.abl","comment.block.source.abl","comment"]},
37
- {"startIndex":36,"endIndex":38,"scopes":["source.abl","comment.block.source.abl"]}
38
- ];
39
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
40
- })
41
- describe('', () => {
42
- let statement =
43
- `{assigned mExtVar} /* comment */`;
44
-
45
- let expectedTokens = [
46
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
47
- {"startIndex":1,"endIndex":9,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
48
- {"startIndex":9,"endIndex":10,"scopes":["source.abl","meta.include.abl"]},
49
- {"startIndex":10,"endIndex":17,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
50
- {"startIndex":17,"endIndex":18,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
51
- {"startIndex":18,"endIndex":25,"scopes":["source.abl"]},
52
- {"startIndex":25,"endIndex":27,"scopes":["source.abl","comment.block.source.abl"]},
53
- {"startIndex":27,"endIndex":36,"scopes":["source.abl","comment.block.source.abl","comment"]},
54
- {"startIndex":36,"endIndex":38,"scopes":["source.abl","comment.block.source.abl"]}
55
- ];
56
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
57
- })
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement =
6
+ `{assigned "mExtVar"} /* comment */`;
7
+
8
+ let expectedTokens = [
9
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
10
+ { "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'assigned'
11
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
12
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
13
+ { "startIndex": 11, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'mExtVar'
14
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
15
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '}'
16
+ { "startIndex": 20, "endIndex": 26, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
17
+ { "startIndex": 26, "endIndex": 28, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
18
+ { "startIndex": 28, "endIndex": 37, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' comment '
19
+ { "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
20
+ ];
21
+
22
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
23
+ })
24
+ describe('', () => {
25
+ let statement =
26
+ `{assigned &ExtVar} /* comment */`;
27
+
28
+ let expectedTokens = [
29
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
30
+ { "startIndex": 1, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'assigned'
31
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
32
+ { "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&ExtVar'
33
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '}'
34
+ { "startIndex": 18, "endIndex": 25, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
35
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "comment.block.source.abl"] }, // '/*'
36
+ { "startIndex": 27, "endIndex": 36, "scopes": ["source.abl", "comment.block.source.abl", "comment"] }, // ' comment '
37
+ { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "comment.block.source.abl"] } // '*/'
38
+ ];
39
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
40
+ })
@@ -2,19 +2,19 @@ const { assert, expect } = require('chai');
2
2
  const shared = require('../shared.js');
3
3
 
4
4
  describe('', () => {
5
- let statement =
6
- `{ test.i "{&Test}" }`;
5
+ let statement =
6
+ `{ test.i "{&Test}" }`;
7
7
 
8
- let expectedTokens = [
9
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
10
- {"startIndex":1,"endIndex":2,"scopes":["source.abl","meta.include.abl"]},
11
- {"startIndex":2,"endIndex":8,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
12
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","meta.include.abl"]},
13
- {"startIndex":9,"endIndex":10,"scopes":["source.abl","meta.include.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
14
- {"startIndex":10,"endIndex":17,"scopes":["source.abl","meta.include.abl","string.double.complex.abl"]},
15
- {"startIndex":17,"endIndex":18,"scopes":["source.abl","meta.include.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
16
- {"startIndex":18,"endIndex":19,"scopes":["source.abl","meta.include.abl"]},
17
- {"startIndex":19,"endIndex":20,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]}
18
- ];
19
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
20
- })
8
+ let expectedTokens = [
9
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
10
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
11
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'test.i'
12
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
13
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
14
+ { "startIndex": 10, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // '{&Test}'
15
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
16
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
17
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
18
+ ];
19
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
20
+ })
@@ -0,0 +1,129 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement =
6
+ `{rec/zetin.ooi &where="zetin.act"}`;
7
+
8
+ let expectedTokens = [
9
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
10
+ { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'rec/zetin.ooi'
11
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
12
+ { "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&where'
13
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
14
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
15
+ { "startIndex": 23, "endIndex": 32, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'zetin.act'
16
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
17
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
18
+ ];
19
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
20
+ })
21
+
22
+ describe('', () => {
23
+ let statement =
24
+ `{rec/zetin.ooi
25
+ &where="zetin.act"
26
+ }`;
27
+
28
+ let expectedTokens = [
29
+ [
30
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
31
+ { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] } // 'rec/zetin.ooi'
32
+ ],
33
+ [
34
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
35
+ { "startIndex": 4, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&where'
36
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
37
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
38
+ { "startIndex": 12, "endIndex": 21, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'zetin.act'
39
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
40
+ ],
41
+ [
42
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
43
+ ]
44
+ ];
45
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
46
+ })
47
+
48
+ describe('', () => {
49
+ let statement =
50
+ `{rec/zetin.ooi &where="zetin.act
51
+ AND CAN-FIND(FIRST ztihu WHERE ztihu.zetin_iden = zetin.zetin_iden)"}
52
+ `;
53
+
54
+ let expectedTokens = [
55
+ [
56
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
57
+ { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'rec/zetin.ooi'
58
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
59
+ { "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&where'
60
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
61
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
62
+ { "startIndex": 23, "endIndex": 33, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] } // 'zetin.act'
63
+ ],
64
+ [
65
+ { "startIndex": 0, "endIndex": 71, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // ' AND CAN-FIND(FIRST ztihu WHERE ztihu.zetin_iden = zetin.zetin_iden)'
66
+ { "startIndex": 71, "endIndex": 72, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
67
+ { "startIndex": 72, "endIndex": 73, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
68
+ ],
69
+ [
70
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
71
+ ]
72
+ ];
73
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
74
+ })
75
+
76
+ describe('', () => {
77
+ let statement = `{rec/zetin.ooi &where="zetin.act" &MyArg &Thrid=43}`;
78
+
79
+ let expectedTokens = [
80
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
81
+ { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'rec/zetin.ooi'
82
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
83
+ { "startIndex": 15, "endIndex": 21, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&where'
84
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
85
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
86
+ { "startIndex": 23, "endIndex": 32, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'zetin.act'
87
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
88
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
89
+ { "startIndex": 34, "endIndex": 40, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&MyArg'
90
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl"] }, // ' '
91
+ { "startIndex": 41, "endIndex": 47, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&Thrid'
92
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
93
+ { "startIndex": 48, "endIndex": 50, "scopes": ["source.abl", "meta.include.abl"] }, // '43'
94
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
95
+ ];
96
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
97
+ })
98
+
99
+ describe('', () => {
100
+ let statement = `{rec/zetin.ooi
101
+ &where="zetin.act"
102
+ &MyArg &Thrid=43}`;
103
+
104
+ let expectedTokens = [
105
+ [
106
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
107
+ { "startIndex": 1, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] } // 'rec/zetin.ooi'
108
+ ],
109
+ [
110
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
111
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&where'
112
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
113
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
114
+ { "startIndex": 10, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'zetin.act'
115
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] } // '"'
116
+ ],
117
+ [
118
+ { "startIndex": 0, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
119
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&MyArg'
120
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl"] }, // ' '
121
+ { "startIndex": 9, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&Thrid'
122
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
123
+ { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl"] }, // '43'
124
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
125
+ ]
126
+ ];
127
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
128
+ })
129
+
@@ -1,33 +1,46 @@
1
1
  const shared = require('../shared.js');
2
2
 
3
3
  describe('', () => {
4
- let statement = `{ test.i {&Test} }`;
5
- let expectedTokens = [
6
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
7
- {"startIndex":1,"endIndex":2,"scopes":["source.abl","meta.include.abl"]},
8
- {"startIndex":2,"endIndex":8,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
9
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","meta.include.abl"]},
10
- {"startIndex":9,"endIndex":16,"scopes":["source.abl","meta.include.abl","keyword.other"]},
11
- {"startIndex":16,"endIndex":17,"scopes":["source.abl","meta.include.abl"]},
12
- {"startIndex":17,"endIndex":18,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]}
13
- ];
14
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
4
+ let statement = `{ test.i {&Test} }`;
5
+ let expectedTokens = [
6
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
7
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
8
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'test.i'
9
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
10
+ { "startIndex": 9, "endIndex": 16, "scopes": ["source.abl", "meta.include.abl", "support.other.argument.abl"] }, // '{&Test}'
11
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
12
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
13
+ ];
14
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
15
15
  })
16
16
 
17
17
  describe('', () => {
18
- let statement = `{ test.i &abc = ABC &def = 'D E F' &hij="H I J" }`;
19
- let expectedTokens = [
20
- {"startIndex":0,"endIndex":1,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]},
21
- {"startIndex":1,"endIndex":2,"scopes":["source.abl","meta.include.abl"]},
22
- {"startIndex":2,"endIndex":8,"scopes":["source.abl","meta.include.abl","string.unquoted.include-argument.abl"]},
23
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","meta.include.abl"]},
24
- {"startIndex":9,"endIndex":19,"scopes":["source.abl","meta.include.abl","meta.include-named-argument"]},
25
- {"startIndex":19,"endIndex":20,"scopes":["source.abl","meta.include.abl"]},
26
- {"startIndex":20,"endIndex":38,"scopes":["source.abl","meta.include.abl","meta.include-named-argument"]},
27
- {"startIndex":38,"endIndex":39,"scopes":["source.abl","meta.include.abl"]},
28
- {"startIndex":39,"endIndex":55,"scopes":["source.abl","meta.include.abl","meta.include-named-argument"]},
29
- {"startIndex":55,"endIndex":56,"scopes":["source.abl","meta.include.abl"]},
30
- {"startIndex":56,"endIndex":57,"scopes":["source.abl","meta.include.abl","punctuation.section.abl"]}
31
- ];
32
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
33
- })
18
+ let statement = `{ test.i &abc = ABC &def = 'D E F' &hij="H I J" }`;
19
+ let expectedTokens = [
20
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] }, // '{'
21
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
22
+ { "startIndex": 2, "endIndex": 8, "scopes": ["source.abl", "meta.include.abl", "meta.other.include.abl"] }, // 'test.i'
23
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
24
+ { "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&abc'
25
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl"] }, // ' '
26
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
27
+ { "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.include.abl"] }, // ' ABC '
28
+ { "startIndex": 20, "endIndex": 24, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&def'
29
+ { "startIndex": 24, "endIndex": 28, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl"] }, // ' '
30
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
31
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
32
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.include.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
33
+ { "startIndex": 31, "endIndex": 37, "scopes": ["source.abl", "meta.include.abl", "string.single.complex.abl"] }, // 'D E F'
34
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.include.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
35
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
36
+ { "startIndex": 39, "endIndex": 43, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "support.other.argument.abl"] }, // '&hij'
37
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.include.abl", "meta.include.argument.abl", "keyword.operator.source.abl"] }, // '='
38
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
39
+ { "startIndex": 45, "endIndex": 54, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl"] }, // 'H I J'
40
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.include.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
41
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.include.abl"] }, // ' '
42
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.include.abl", "punctuation.section.abl"] } // '}'
43
+
44
+ ];
45
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
46
+ })
@@ -0,0 +1,99 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `
6
+ SessionManager:ContextDataset:WRITE-XML ( "longchar":U,
7
+ lcDataset,
8
+ "EMPTY":U, ?, ?).`;
9
+ let expectedTokens = [
10
+ [
11
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
12
+ ],
13
+ [
14
+ { "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] }, // 'SessionManager'
15
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
16
+ { "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ContextDataset'
17
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
18
+ { "startIndex": 30, "endIndex": 39, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'WRITE-XML'
19
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl"] }, // ' '
20
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
21
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
22
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
23
+ { "startIndex": 43, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'longchar'
24
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
25
+ { "startIndex": 52, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
26
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
27
+ ],
28
+ [
29
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
30
+ { "startIndex": 42, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset'
31
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
32
+ ],
33
+ [
34
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
35
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
36
+ { "startIndex": 43, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'EMPTY'
37
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
38
+ { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
39
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
40
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
41
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
42
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
43
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
44
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
45
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
46
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
47
+ ]
48
+ ];
49
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
50
+ })
51
+
52
+ describe('', () => {
53
+ let statement = `
54
+ SessionManager:ContextDataset:READ-XML ( "longchar":U,
55
+ lcDataset,
56
+ "EMPTY":U, ?, ?).`;
57
+ let expectedTokens = [
58
+ [
59
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl"] } // ''
60
+ ],
61
+ [
62
+ { "startIndex": 0, "endIndex": 14, "scopes": ["source.abl", "variable.other.abl"] }, // 'SessionManager'
63
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
64
+ { "startIndex": 15, "endIndex": 29, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ContextDataset'
65
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
66
+ { "startIndex": 30, "endIndex": 38, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'READ-XML'
67
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
68
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
69
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
70
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
71
+ { "startIndex": 42, "endIndex": 50, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'longchar'
72
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
73
+ { "startIndex": 51, "endIndex": 53, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
74
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
75
+ ],
76
+ [
77
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
78
+ { "startIndex": 42, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'lcDataset'
79
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] } // ','
80
+ ],
81
+ [
82
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
83
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
84
+ { "startIndex": 43, "endIndex": 48, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'EMPTY'
85
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
86
+ { "startIndex": 49, "endIndex": 51, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':U'
87
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
88
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
89
+ { "startIndex": 53, "endIndex": 54, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
90
+ { "startIndex": 54, "endIndex": 55, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
91
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
92
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
93
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
94
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
95
+ ]
96
+ ];
97
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
98
+ })
99
+
@@ -0,0 +1,30 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `create server hSrv.
6
+ hSrv:connect('-URL http://localhost:1234/apsv').`;
7
+ let expectedTokens = [
8
+ [
9
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'create'
10
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
11
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'server'
12
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
13
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "variable.other.abl"] }, // 'hSrv'
14
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
15
+ ],
16
+ [
17
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "variable.other.abl"] }, // 'hSrv'
18
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
19
+ { "startIndex": 5, "endIndex": 12, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'connect'
20
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
21
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '''
22
+ { "startIndex": 14, "endIndex": 45, "scopes": ["source.abl", "meta.function.arguments.abl", "string.single.complex.abl"] }, // '-URL http://localhost:1234/apsv'
23
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.function.arguments.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '''
24
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
25
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
26
+ ]
27
+ ];
28
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
29
+ })
30
+