abl-tmlanguage 1.1.2 → 1.2.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 (49) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +12 -0
  3. package/abl.tmLanguage.json +2734 -229
  4. package/azure-pipelines.yml +3 -2
  5. package/package.json +9 -9
  6. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
  7. package/spec/array-extent/issue#5.spec.js +18 -18
  8. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  9. package/spec/define-parameter/simple-single-line.spec.js +103 -75
  10. package/spec/define-stream/simple-single-line.spec.js +32 -31
  11. package/spec/define-variable/extent.spec.js +228 -0
  12. package/spec/define-variable/issue#6.spec.js +256 -198
  13. package/spec/define-variable/issue#9.spec.js +38 -32
  14. package/spec/define-variable/simple-single-line.spec.js +87 -87
  15. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  16. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  17. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  18. package/spec/do/do-blocks.spec.js +89 -0
  19. package/spec/do/issue#3.spec.js +67 -60
  20. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  21. package/spec/global-scoped-define/global-define.spec.js +11 -11
  22. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  23. package/spec/include/abl-tmlanguage-issues#5.spec.js +44 -44
  24. package/spec/include/vscode-abl-issue#45.spec.js +14 -14
  25. package/spec/include/vscode-abl-issue#80.spec.js +26 -26
  26. package/spec/method-definition/constructor.spec.js +174 -0
  27. package/spec/method-definition/method.spec.js +185 -0
  28. package/spec/procedure-definition/empty-proc.spec.js +20 -18
  29. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  30. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  31. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  32. package/spec/shared.js +84 -42
  33. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  34. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  35. package/spec/type-name/argument.spec.js +209 -0
  36. package/spec/type-name/cast.spec.js +165 -0
  37. package/spec/type-name/define-class.spec.js +471 -0
  38. package/spec/type-name/define-enum.spec.js +44 -0
  39. package/spec/type-name/define-interface.spec.js +159 -0
  40. package/spec/type-name/define-property.spec.js +301 -0
  41. package/spec/type-name/define-temp-table.spec.js +434 -0
  42. package/spec/type-name/define-type-spec.js +435 -0
  43. package/spec/type-name/define-variable-property.spec.js +264 -0
  44. package/spec/type-name/define-variable.spec.js +504 -0
  45. package/spec/type-name/get-class.spec.js +91 -0
  46. package/spec/type-name/new.spec.js +126 -0
  47. package/spec/type-name/parameter-as.spec.js +838 -0
  48. package/spec/type-name/type-name-spec.js +587 -0
  49. package/spec/type-name/using.spec.js +115 -0
@@ -1,114 +1,110 @@
1
- const { assert, expect } = require('chai');
2
- const shared = require('../shared.js');
3
-
4
- describe('', () => {
5
- let statement =
6
- `def var DirChar as char no-undo.
7
- DirChar = if opsys begins 'win':u then '\\':u else '/':u.`;
8
- let expectedTokens = [
9
- [
10
- {"startIndex":0,"endIndex":3,"scopes":["source.abl","meta.define.abl","keyword.other.abl"]},
11
- {"startIndex":3,"endIndex":4,"scopes":["source.abl","meta.define.abl"]},
12
- {"startIndex":4,"endIndex":7,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
13
- {"startIndex":7,"endIndex":8,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
14
- {"startIndex":8,"endIndex":15,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","variable.other.abl"]},
15
- {"startIndex":15,"endIndex":16,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
16
- {"startIndex":16,"endIndex":18,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
17
- {"startIndex":18,"endIndex":19,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
18
- {"startIndex":19,"endIndex":23,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","storage.type.abl"]},
19
- {"startIndex":23,"endIndex":24,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
20
- {"startIndex":24,"endIndex":31,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
21
- {"startIndex":31,"endIndex":32,"scopes":["source.abl","punctuation.terminator.abl"]}
22
- ],[
23
- {"startIndex":0,"endIndex":7,"scopes":["source.abl","variable.other.abl"]},
24
- {"startIndex":7,"endIndex":8,"scopes":["source.abl"]},
25
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","keyword.operator.source.abl"]},
26
- {"startIndex":9,"endIndex":10,"scopes":["source.abl"]},
27
- {"startIndex":10,"endIndex":12,"scopes":["source.abl","keyword.other.abl"]},
28
- {"startIndex":12,"endIndex":13,"scopes":["source.abl"]},
29
- {"startIndex":13,"endIndex":18,"scopes":["source.abl","keyword.other.abl"]},
30
- {"startIndex":18,"endIndex":19,"scopes":["source.abl"]},
31
- {"startIndex":19,"endIndex":25,"scopes":["source.abl","keyword.other.abl"]},
32
- {"startIndex":25,"endIndex":26,"scopes":["source.abl"]},
33
- {"startIndex":26,"endIndex":27,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.begin.abl"]},
34
- {"startIndex":27,"endIndex":30,"scopes":["source.abl","string.single.complex.abl"]},
35
- {"startIndex":30,"endIndex":31,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.end.abl"]},
36
- {"startIndex":31,"endIndex":32,"scopes":["source.abl"]},
37
- {"startIndex":32,"endIndex":33,"scopes":["source.abl","support.function.abl"]},
38
- {"startIndex":33,"endIndex":34,"scopes":["source.abl"]},
39
- {"startIndex":34,"endIndex":38,"scopes":["source.abl","keyword.other.abl"]},
40
- {"startIndex":38,"endIndex":39,"scopes":["source.abl"]},
41
- {"startIndex":39,"endIndex":40,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.begin.abl"]},
42
- {"startIndex":40,"endIndex":41,"scopes":["source.abl","string.single.complex.abl"]},
43
- {"startIndex":41,"endIndex":42,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.end.abl"]},
44
- {"startIndex":42,"endIndex":43,"scopes":["source.abl"]},
45
- {"startIndex":43,"endIndex":44,"scopes":["source.abl","support.function.abl"]},
46
- {"startIndex":44,"endIndex":45,"scopes":["source.abl"]},
47
- {"startIndex":45,"endIndex":49,"scopes":["source.abl","keyword.other.abl"]},
48
- {"startIndex":49,"endIndex":50,"scopes":["source.abl"]},
49
- {"startIndex":50,"endIndex":51,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.begin.abl"]},
50
- {"startIndex":51,"endIndex":52,"scopes":["source.abl","string.single.complex.abl"]},
51
- {"startIndex":52,"endIndex":53,"scopes":["source.abl","string.single.complex.abl","punctuation.definition.string.end.abl"]},
52
- {"startIndex":53,"endIndex":54,"scopes":["source.abl"]},
53
- {"startIndex":54,"endIndex":55,"scopes":["source.abl","support.function.abl"]},
54
- {"startIndex":55,"endIndex":56,"scopes":["source.abl","punctuation.terminator.abl"]}
55
- ]
56
- ];
57
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
58
- })
59
- describe('', () => {
60
- let statement =
61
- `def var DirChar as char no-undo.
62
- DirChar = if opsys begins "win":u then "\\":u else "/":u.`;
63
- console.log(statement);
64
- let expectedTokens = [
65
- [
66
- {"startIndex":0,"endIndex":3,"scopes":["source.abl","meta.define.abl","keyword.other.abl"]},
67
- {"startIndex":3,"endIndex":4,"scopes":["source.abl","meta.define.abl"]},
68
- {"startIndex":4,"endIndex":7,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
69
- {"startIndex":7,"endIndex":8,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
70
- {"startIndex":8,"endIndex":15,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","variable.other.abl"]},
71
- {"startIndex":15,"endIndex":16,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
72
- {"startIndex":16,"endIndex":18,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
73
- {"startIndex":18,"endIndex":19,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
74
- {"startIndex":19,"endIndex":23,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","storage.type.abl"]},
75
- {"startIndex":23,"endIndex":24,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl"]},
76
- {"startIndex":24,"endIndex":31,"scopes":["source.abl","meta.define.abl","meta.define.variable.abl","keyword.other.abl"]},
77
- {"startIndex":31,"endIndex":32,"scopes":["source.abl","punctuation.terminator.abl"]}
78
- ],[
79
- {"startIndex":0,"endIndex":7,"scopes":["source.abl","variable.other.abl"]},
80
- {"startIndex":7,"endIndex":8,"scopes":["source.abl"]},
81
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","keyword.operator.source.abl"]},
82
- {"startIndex":9,"endIndex":10,"scopes":["source.abl"]},
83
- {"startIndex":10,"endIndex":12,"scopes":["source.abl","keyword.other.abl"]},
84
- {"startIndex":12,"endIndex":13,"scopes":["source.abl"]},
85
- {"startIndex":13,"endIndex":18,"scopes":["source.abl","keyword.other.abl"]},
86
- {"startIndex":18,"endIndex":19,"scopes":["source.abl"]},
87
- {"startIndex":19,"endIndex":25,"scopes":["source.abl","keyword.other.abl"]},
88
- {"startIndex":25,"endIndex":26,"scopes":["source.abl"]},
89
- {"startIndex":26,"endIndex":27,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
90
- {"startIndex":27,"endIndex":30,"scopes":["source.abl","string.double.complex.abl"]},
91
- {"startIndex":30,"endIndex":31,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
92
- {"startIndex":31,"endIndex":32,"scopes":["source.abl"]},
93
- {"startIndex":32,"endIndex":33,"scopes":["source.abl","support.function.abl"]},
94
- {"startIndex":33,"endIndex":34,"scopes":["source.abl"]},
95
- {"startIndex":34,"endIndex":38,"scopes":["source.abl","keyword.other.abl"]},
96
- {"startIndex":38,"endIndex":39,"scopes":["source.abl"]},
97
- {"startIndex":39,"endIndex":40,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
98
- {"startIndex":40,"endIndex":41,"scopes":["source.abl","string.double.complex.abl"]},
99
- {"startIndex":41,"endIndex":42,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
100
- {"startIndex":42,"endIndex":43,"scopes":["source.abl"]},
101
- {"startIndex":43,"endIndex":44,"scopes":["source.abl","support.function.abl"]},
102
- {"startIndex":44,"endIndex":45,"scopes":["source.abl"]},
103
- {"startIndex":45,"endIndex":49,"scopes":["source.abl","keyword.other.abl"]},
104
- {"startIndex":49,"endIndex":50,"scopes":["source.abl"]},
105
- {"startIndex":50,"endIndex":51,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
106
- {"startIndex":51,"endIndex":52,"scopes":["source.abl","string.double.complex.abl"]},
107
- {"startIndex":52,"endIndex":53,"scopes":["source.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
108
- {"startIndex":53,"endIndex":54,"scopes":["source.abl"]},
109
- {"startIndex":54,"endIndex":55,"scopes":["source.abl","support.function.abl"]},
110
- {"startIndex":55,"endIndex":56,"scopes":["source.abl","punctuation.terminator.abl"]}
111
- ]
112
- ];
113
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
114
- })
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement =
6
+ `def var DirChar as char no-undo.
7
+ DirChar = if opsys begins 'win':u then '\\':u else '/':u.`;
8
+ let expectedTokens = [
9
+ [
10
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'def'
11
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
12
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
13
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
14
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'DirChar'
15
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
16
+ { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
17
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
18
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'char'
19
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
20
+ { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
21
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
22
+ ],
23
+ [
24
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'DirChar'
25
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
26
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
27
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
28
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
29
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
30
+ { "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "support.function.abl"] }, // 'opsys'
31
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
32
+ { "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'begins'
33
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
34
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
35
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "string.single.complex.abl"] }, // 'win'
36
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
37
+ { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
38
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
39
+ { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
40
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
41
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
42
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.single.complex.abl"] }, // '\'
43
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
44
+ { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
45
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
46
+ { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
47
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
48
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
49
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.single.complex.abl"] }, // '/'
50
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.single.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
51
+ { "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
52
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
53
+ ]
54
+ ];
55
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
56
+ })
57
+ describe('', () => {
58
+ let statement =
59
+ `def var DirChar as char no-undo.
60
+ DirChar = if opsys begins "win":u then "\\":u else "/":u.`;
61
+ //console.log(statement);
62
+ let expectedTokens = [
63
+ [
64
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'def'
65
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
66
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
67
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
68
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'DirChar'
69
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
70
+ { "startIndex": 16, "endIndex": 18, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'as'
71
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
72
+ { "startIndex": 19, "endIndex": 23, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'char'
73
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
74
+ { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'no-undo'
75
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.define.abl", "punctuation.terminator.abl"] } // '.'
76
+ ],
77
+ [
78
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "variable.other.abl"] }, // 'DirChar'
79
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
80
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
81
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
82
+ { "startIndex": 10, "endIndex": 12, "scopes": ["source.abl", "keyword.other.abl"] }, // 'if'
83
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl"] }, // ' '
84
+ { "startIndex": 13, "endIndex": 18, "scopes": ["source.abl", "support.function.abl"] }, // 'opsys'
85
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
86
+ { "startIndex": 19, "endIndex": 25, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // 'begins'
87
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
88
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
89
+ { "startIndex": 27, "endIndex": 30, "scopes": ["source.abl", "string.double.complex.abl"] }, // 'win'
90
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
91
+ { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
92
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
93
+ { "startIndex": 34, "endIndex": 38, "scopes": ["source.abl", "keyword.other.abl"] }, // 'then'
94
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl"] }, // ' '
95
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
96
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "string.double.complex.abl"] }, // '\'
97
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
98
+ { "startIndex": 42, "endIndex": 44, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
99
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
100
+ { "startIndex": 45, "endIndex": 49, "scopes": ["source.abl", "keyword.other.abl"] }, // 'else'
101
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl"] }, // ' '
102
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
103
+ { "startIndex": 51, "endIndex": 52, "scopes": ["source.abl", "string.double.complex.abl"] }, // '/'
104
+ { "startIndex": 52, "endIndex": 53, "scopes": ["source.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
105
+ { "startIndex": 53, "endIndex": 55, "scopes": ["source.abl", "support.other.abl"] }, // ':u'
106
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
107
+ ]
108
+ ];
109
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
110
+ })
@@ -2,30 +2,30 @@ const { assert, expect } = require('chai');
2
2
  const shared = require('../shared.js');
3
3
 
4
4
  describe('', () => {
5
- let statement = `replace("123", "1", ")"). message 1.`;
6
- let expectedTokens = [
7
- {"startIndex":0,"endIndex":7,"scopes":["source.abl","meta.function-call.abl","entity.name.function.abl"]},
8
- {"startIndex":7,"endIndex":8,"scopes":["source.abl","meta.function-call.abl","meta.brace.round.js"]},
9
- {"startIndex":8,"endIndex":9,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
10
- {"startIndex":9,"endIndex":12,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl"]},
11
- {"startIndex":12,"endIndex":13,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
12
- {"startIndex":13,"endIndex":14,"scopes":["source.abl","meta.function-call.abl","punctuation.separator.comma.abl"]},
13
- {"startIndex":14,"endIndex":15,"scopes":["source.abl","meta.function-call.abl"]},
14
- {"startIndex":15,"endIndex":16,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
15
- {"startIndex":16,"endIndex":17,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl"]},
16
- {"startIndex":17,"endIndex":18,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
17
- {"startIndex":18,"endIndex":19,"scopes":["source.abl","meta.function-call.abl","punctuation.separator.comma.abl"]},
18
- {"startIndex":19,"endIndex":20,"scopes":["source.abl","meta.function-call.abl"]},
19
- {"startIndex":20,"endIndex":21,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.begin.abl"]},
20
- {"startIndex":21,"endIndex":22,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl"]},
21
- {"startIndex":22,"endIndex":23,"scopes":["source.abl","meta.function-call.abl","string.double.complex.abl","punctuation.definition.string.end.abl"]},
22
- {"startIndex":23,"endIndex":24,"scopes":["source.abl","meta.function-call.abl","meta.brace.round.js"]},
23
- {"startIndex":24,"endIndex":25,"scopes":["source.abl","punctuation.terminator.abl"]},
24
- {"startIndex":25,"endIndex":26,"scopes":["source.abl"]},
25
- {"startIndex":26,"endIndex":33,"scopes":["source.abl","keyword.other.abl"]},
26
- {"startIndex":33,"endIndex":34,"scopes":["source.abl"]},
27
- {"startIndex":34,"endIndex":35,"scopes":["source.abl","constant.numeric.source.abl"]},
28
- {"startIndex":35,"endIndex":36,"scopes":["source.abl","punctuation.terminator.abl"]}
29
- ];
30
- shared.itShouldMatchExpectedScopes(statement, expectedTokens);
31
- })
5
+ let statement = `replace("123", "1", ")"). message 1.`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'replace'
8
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
9
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
10
+ { "startIndex": 9, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '123'
11
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
12
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
13
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
14
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
15
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // '1'
16
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
17
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
18
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl"] }, // ' '
19
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
20
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // ')'
21
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
22
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
23
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
24
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
25
+ { "startIndex": 26, "endIndex": 33, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
26
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
27
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '1'
28
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
29
+ ];
30
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
31
+ })
@@ -0,0 +1,209 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+
5
+ describe('', () => {
6
+ let statement = `new foo.bar(y, foo.bar.baz:Property) `;
7
+
8
+ let expectedTokens = [
9
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
10
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
11
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar'
12
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
13
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'y'
14
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
15
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
16
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
17
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ':'
18
+ { "startIndex": 27, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.function.abl"] }, // 'Property'
19
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
20
+ { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl"] } // ' '
21
+ ];
22
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
23
+ })
24
+
25
+ describe('', () => {
26
+ let statement = `new foo.bar("y":L9, new foo.bar.baz()) `;
27
+ let expectedTokens = [
28
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
29
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
30
+ { "startIndex": 4, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'foo.bar'
31
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
32
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
33
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl"] }, // 'y'
34
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
35
+ { "startIndex": 15, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "support.other.abl"] }, // ':L9'
36
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
37
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
38
+ { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'new'
39
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
40
+ { "startIndex": 24, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
41
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
42
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
43
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
44
+ { "startIndex": 38, "endIndex": 40, "scopes": ["source.abl"] } // ' '
45
+ ];
46
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
47
+ })
48
+
49
+ describe('', () => {
50
+ let statement = `x = new baz (true, today, now, ?, -12).`;
51
+
52
+ let expectedTokens = [
53
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'x'
54
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl"] }, // ' '
55
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
56
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl"] }, // ' '
57
+ { "startIndex": 4, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'new'
58
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
59
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "entity.name.type.abl"] }, // 'baz'
60
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl"] }, // ' '
61
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
62
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'true'
63
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
64
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
65
+ { "startIndex": 19, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'today'
66
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
67
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
68
+ { "startIndex": 26, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // 'now'
69
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
70
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
71
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.language.abl"] }, // '?'
72
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
73
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
74
+ { "startIndex": 34, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "constant.numeric.source.abl"] }, // '-12'
75
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
76
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
77
+
78
+ ];
79
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
80
+ })
81
+
82
+ describe('', () => {
83
+ let statement = `cast ( q:Prop, foo.bar.baz ) `;
84
+
85
+ let expectedTokens = [
86
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
87
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
88
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
89
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
90
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
91
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl"] }, // ':'
92
+ { "startIndex": 9, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'Prop'
93
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
94
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
95
+ { "startIndex": 15, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
96
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
97
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
98
+ { "startIndex": 28, "endIndex": 30, "scopes": ["source.abl"] } // ' '
99
+ ];
100
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
101
+ })
102
+
103
+ describe('', () => {
104
+ let statement = `cast ( ttable.field, foo.bar.baz ) `;
105
+
106
+ let expectedTokens = [
107
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
108
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
109
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
110
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
111
+ { "startIndex": 7, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "storage.data.table.abl"] }, // 'ttable.field'
112
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
113
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
114
+ { "startIndex": 21, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
115
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
116
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
117
+ { "startIndex": 34, "endIndex": 36, "scopes": ["source.abl"] } // ' '
118
+ ];
119
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
120
+ })
121
+
122
+ describe('', () => {
123
+ let statement = `cast ( q, foo.bar.baz ) `;
124
+
125
+ let expectedTokens = [
126
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
127
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
128
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
129
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
130
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
131
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
132
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
133
+ { "startIndex": 10, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'foo.bar.baz'
134
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
135
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
136
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl"] } // ' '
137
+ ];
138
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
139
+ })
140
+
141
+ describe('', () => {
142
+ let statement = `cast ( q, "foo.bar.baz" ) `;
143
+
144
+ let expectedTokens = [
145
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
146
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
147
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
148
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
149
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
150
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
151
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
152
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
153
+ { "startIndex": 11, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl"] }, // 'foo.bar.baz'
154
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
155
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
156
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
157
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl"] } // ' '
158
+ ];
159
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
160
+ })
161
+
162
+ describe('', () => {
163
+ let statement = `cast ( q, "foo.bar.baz":u ) `;
164
+
165
+ let expectedTokens = [
166
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
167
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
168
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
169
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
170
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
171
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
172
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
173
+ { "startIndex": 10, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.begin.abl"] }, // '"'
174
+ { "startIndex": 11, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl"] }, // 'foo.bar.baz'
175
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "string.double.complex.abl", "punctuation.definition.string.end.abl"] }, // '"'
176
+ { "startIndex": 23, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "support.other.abl"] }, // ':u'
177
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
178
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
179
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl"] } // ' '
180
+ ];
181
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
182
+ })
183
+
184
+ describe('', () => {
185
+ let statement = `cast ( q, Map<foo.bar, baz> ) `;
186
+
187
+ let expectedTokens = [
188
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'cast'
189
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
190
+ { "startIndex": 5, "endIndex": 6, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
191
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
192
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'q'
193
+ { "startIndex": 8, "endIndex": 9, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
194
+ { "startIndex": 9, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl"] }, // ' '
195
+ { "startIndex": 10, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'Map'
196
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl"] }, // '<'
197
+ { "startIndex": 14, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'foo.bar'
198
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl", "punctuation.separator.comma.abl"] }, // ','
199
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl"] }, // ' '
200
+ { "startIndex": 23, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl", "entity.name.type.abl"] }, // 'baz'
201
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.generic.abl"] }, // '>'
202
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
203
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
204
+ { "startIndex": 29, "endIndex": 31, "scopes": ["source.abl"] } // ' '
205
+
206
+ ];
207
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
208
+ })
209
+