abl-tmlanguage 1.3.19 → 1.3.21

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ 1.3.21
2
+ ======
3
+ - ✨ Safe navigation operator
4
+
5
+ 1.3.20
6
+ ======
7
+
8
+ - 🐛 Fix lookbehinds
9
+ - ✨ Add operator scopes to function arguments
10
+
11
+ 1.3.19
12
+ ======
13
+
14
+ - ✨ Support comments in USING statements; improve class definition
15
+ - ✨ Improve scoping for CREATE BUFFER statement
16
+
1
17
  1.3.18
2
18
  ======
3
19
 
package/README.md CHANGED
@@ -87,7 +87,7 @@ The ABL-specific scopes produced by the ABL grammar listed in the table below. T
87
87
  |entity.other.attribute-name.abl | Annotation attribute names |
88
88
  |keyword.control.directive.conditional.abl | `&if` , `&else`, `&elsif` `&end` |
89
89
  |keyword.control.directive.define.abl | `&scoped-define`, `&global-define`, `&undefine` |
90
- |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*`, `+=`, `-=`, `/=`, `*=` |
90
+ |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*`, `+=`, `-=`, `/=`, `*=`, `?:` |
91
91
  |keyword.other.abl | Any ABL keyword (incl those covered by other scopes like `support.function.abl` and `entity.name.function.abl`) |
92
92
  |punctuation.definition.bracket.square.begin.abl | `[` used for array arguments |
93
93
  |punctuation.definition.bracket.square.end.abl | `]` used for array arguments |
@@ -1337,7 +1337,7 @@
1337
1337
  ]
1338
1338
  },
1339
1339
  "for-each-table": {
1340
- "begin": "(?i)(?<=\\s+|^)(for|(presel(?:ect|ec|e)?))[\\s+|$]",
1340
+ "begin": "(?i)(?<=\\s|\\b|^)(for|(presel(?:ect|ec|e)?))[\\s+|$]",
1341
1341
  "beginCaptures": {
1342
1342
  "1": {
1343
1343
  "name": "keyword.other.abl"
@@ -1439,7 +1439,7 @@
1439
1439
  },
1440
1440
  "type-argument-function": {
1441
1441
  "name": "meta.function-call.abl",
1442
- "begin": "(?i)\\s*(cast|type-of)\\s*(?=\\()",
1442
+ "begin": "\\s*([Cc][Aa][Ss][Tt]|[Tt][Yy][Pp][Ee]-[Oo][Ff])\\s*(?=\\()",
1443
1443
  "beginCaptures": {
1444
1444
  "1": {
1445
1445
  "name": "support.function.abl"
@@ -3002,15 +3002,18 @@
3002
3002
  ]
3003
3003
  },
3004
3004
  "event-un-subscribe": {
3005
- "begin": "(?i)(:)(unsubscribe|subscribe)\\s*(\\()",
3005
+ "begin": "(?i)((\\?:)|(:))(unsubscribe|subscribe)\\s*(\\()",
3006
3006
  "beginCaptures": {
3007
- "1": {
3007
+ "2": {
3008
+ "name": "keyword.operator.source.abl"
3009
+ },
3010
+ "3": {
3008
3011
  "name": "punctuation.separator.colon.abl"
3009
3012
  },
3010
- "2": {
3013
+ "4": {
3011
3014
  "name": "entity.name.function.abl"
3012
3015
  },
3013
- "3": {
3016
+ "5": {
3014
3017
  "name": "meta.brace.round.js"
3015
3018
  }
3016
3019
  },
@@ -3631,6 +3634,15 @@
3631
3634
  {
3632
3635
  "include": "#function-arguments"
3633
3636
  },
3637
+ {
3638
+ "include": "#comment"
3639
+ },
3640
+ {
3641
+ "include": "#operator"
3642
+ },
3643
+ {
3644
+ "include": "#array-literal"
3645
+ },
3634
3646
  {
3635
3647
  "include": "#constant"
3636
3648
  },
@@ -3670,12 +3682,6 @@
3670
3682
  {
3671
3683
  "include": "#expression"
3672
3684
  },
3673
- {
3674
- "include": "#comment"
3675
- },
3676
- {
3677
- "include": "#array-literal"
3678
- },
3679
3685
  {
3680
3686
  "include": "#punctuation-comma"
3681
3687
  },
@@ -3686,7 +3692,7 @@
3686
3692
  },
3687
3693
  "static-object-property-call": {
3688
3694
  "comment": "This rule only captures dotted type name and not single class names. Type names are files, so support unicode.",
3689
- "match": "(?i)\\s*(([\\w#$%\\-]+|progress)(\\.[\\w#$%\\-]+)+)\\s*(:)([\\w\\-]+)\\s*",
3695
+ "match": "(?i)\\s*(([\\w#$%\\-]+|progress)(\\.[\\w#$%\\-]+)+)\\s*((\\?:)|(:))([\\w\\-]+)\\s*",
3690
3696
  "captures": {
3691
3697
  "1": {
3692
3698
  "name": "entity.name.type.abl"
@@ -3694,7 +3700,7 @@
3694
3700
  "4": {
3695
3701
  "name": "punctuation.separator.colon.abl"
3696
3702
  },
3697
- "5": {
3703
+ "7": {
3698
3704
  "name": "entity.name.function.abl"
3699
3705
  }
3700
3706
  }
@@ -3708,12 +3714,15 @@
3708
3714
  }
3709
3715
  },
3710
3716
  "property-call": {
3711
- "match": "(:)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b",
3717
+ "match": "((\\?:)|(:))([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)\\b",
3712
3718
  "captures": {
3713
- "1": {
3719
+ "2": {
3720
+ "name": "keyword.operator.source.abl"
3721
+ },
3722
+ "3": {
3714
3723
  "name": "punctuation.separator.colon.abl"
3715
3724
  },
3716
- "2": {
3725
+ "4": {
3717
3726
  "name": "entity.name.function.abl"
3718
3727
  }
3719
3728
  }
@@ -3733,7 +3742,7 @@
3733
3742
  },
3734
3743
  "variable-name": {
3735
3744
  "comment": "1 to 128 characters; can consist of any combination of letters (a-z or A-Z), numbers (0-9), and these special characters: #$-_%& Names must begin with a letter (from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html)",
3736
- "match": "(?<=^|\\s|\\[|\\(|,)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)(?=\\.\\s|\\.$|,|:|\\s|\\)|\\]|\\[|$)",
3745
+ "match": "(?<=^|\\s|\\[|\\(|,)([a-zA-Z_][a-zA-Z0-9_#$\\-%&]*)(?=\\.\\s|\\.$|,|:|\\?:|\\s|\\)|\\]|\\[|$)",
3737
3746
  "name": "variable.other.abl"
3738
3747
  },
3739
3748
  "extent": {
@@ -4101,12 +4110,12 @@
4101
4110
  }
4102
4111
  },
4103
4112
  "timestamp-constant": {
4104
- "match": "(?i)(?<=^|\\s*)(today|now)(?!a-zA-Z0-9_\\-#$%|-)",
4113
+ "match": "(?i)(?<=^|\\s|\\b)(today|now)(?!a-zA-Z0-9_\\-#$%|-)",
4105
4114
  "comment": "These are constants that can be used in initial values. This excludes MTIME and ETIME",
4106
4115
  "name": "constant.language.abl"
4107
4116
  },
4108
4117
  "constant": {
4109
- "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%])",
4118
+ "match": "(?i)(?<=^|\\b|\\s|\\()(true|false|yes|no|\\?)(?![a-zA-Z0-9_\\-#$%:])",
4110
4119
  "name": "constant.language.abl"
4111
4120
  },
4112
4121
  "punctuation-colon": {
@@ -4175,7 +4184,7 @@
4175
4184
  ]
4176
4185
  },
4177
4186
  "operator-no-space": {
4178
- "match": "(\\+=|-=|\\\\=|\\*=|<=|<>|>=|=|\\+|-|/|<|>|\\*)",
4187
+ "match": "(\\+=|-=|\\\\=|\\*=|<=|<>|>=|=|<|>)",
4179
4188
  "captures": {
4180
4189
  "1": {
4181
4190
  "name": "keyword.operator.source.abl"
@@ -4183,7 +4192,7 @@
4183
4192
  }
4184
4193
  },
4185
4194
  "operator-with-space": {
4186
- "match": "(?i)(?<=\\s)(contains|begins|matches|eq|le|lt|ge|gt|ne)(?=\\s|\\()",
4195
+ "match": "(?i)(?<=\\s)(contains|begins|matches|eq|le|lt|ge|gt|ne|\\+|-|\\*|/)(?=\\s|\\()",
4187
4196
  "comment": "Lookahead and -behind for the spaces",
4188
4197
  "captures": {
4189
4198
  "1": {
@@ -4332,31 +4341,14 @@
4332
4341
  ]
4333
4342
  },
4334
4343
  "buffer-copy": {
4335
- "begin": "(?i)\\b(buffer-copy)\\s+([a-zA-Z_][a-zA-Z0-9_\\-#$%]+(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)",
4344
+ "begin": "(?i)\\s*(buffer-copy)\\s*(?!\\()",
4336
4345
  "beginCaptures": {
4337
4346
  "1": {
4338
4347
  "name": "keyword.other.abl"
4339
- },
4340
- "2": {
4341
- "name": "storage.data.table.abl"
4342
4348
  }
4343
4349
  },
4344
- "end": "(?=\\.)",
4350
+ "end": "(?=\\s*[Aa][Ss][Ss][Ii][Gg][Nn]|\\.)",
4345
4351
  "patterns": [
4346
- {
4347
- "match": "\\b([Tt][Oo])\\s+([a-zA-Z_][a-zA-Z0-9_\\-#$%]+(\\.[a-zA-Z][a-zA-Z0-9_\\-#$%]*)?)",
4348
- "captures": {
4349
- "1": {
4350
- "name": "keyword.other.abl"
4351
- },
4352
- "2": {
4353
- "name": "storage.data.table.abl"
4354
- }
4355
- }
4356
- },
4357
- {
4358
- "include": "#using-except"
4359
- },
4360
4352
  {
4361
4353
  "include": "#comment"
4362
4354
  },
@@ -4364,7 +4356,7 @@
4364
4356
  "include": "#preprocessors"
4365
4357
  },
4366
4358
  {
4367
- "match": "(?i)\\b(assign|no-lobs|no-error)\\b",
4359
+ "match": "(?i)\\s*(using|except|to|no-lobs|no-error)\\s*",
4368
4360
  "captures": {
4369
4361
  "1": {
4370
4362
  "name": "keyword.other.abl"
@@ -4375,13 +4367,10 @@
4375
4367
  "include": "#db-dot-table-dot-field"
4376
4368
  },
4377
4369
  {
4378
- "include": "#assign-statment"
4379
- },
4380
- {
4381
- "include": "#keywords"
4370
+ "include": "#db-dot-table"
4382
4371
  },
4383
4372
  {
4384
- "include": "#expression"
4373
+ "include": "#field-name"
4385
4374
  }
4386
4375
  ]
4387
4376
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.19",
3
+ "version": "1.3.21",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "type": "commonjs",
@@ -150,8 +150,9 @@ describe('', () => {
150
150
  { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
151
151
  { "startIndex": 29, "endIndex": 33, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
152
152
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '}'
153
- { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
154
- { "startIndex": 35, "endIndex": 45, "scopes": ["source.abl"] }, // 'archive '
153
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl"] }, // '-'
154
+ { "startIndex": 35, "endIndex": 42, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'archive'
155
+ { "startIndex": 42, "endIndex": 45, "scopes": ["source.abl"] }, // ' '
155
156
  { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
156
157
  ];
157
158
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
@@ -89,3 +89,70 @@ describe('', () => {
89
89
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
90
90
  })
91
91
 
92
+ describe('', () => {
93
+ let statement = `FIND tt WHERE tt.f1 = "a"
94
+ AND (tt.f2 = "b" OR tt.f2 = "c")
95
+ AND tt.f3 = "d"
96
+ NO-LOCK NO-ERROR.`;
97
+ let expectedTokens = [
98
+ [
99
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "keyword.other.abl"] }, // 'FIND'
100
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl"] }, // ' '
101
+ { "startIndex": 5, "endIndex": 7, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tt'
102
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
103
+ { "startIndex": 8, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WHERE'
104
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
105
+ { "startIndex": 14, "endIndex": 19, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tt.f1'
106
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
107
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
108
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
109
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
110
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'a'
111
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
112
+ ],
113
+ [
114
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
115
+ { "startIndex": 10, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
116
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
117
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
118
+ { "startIndex": 15, "endIndex": 20, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'tt.f2'
119
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
120
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.operator.source.abl"] }, // '='
121
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
122
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
123
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'b'
124
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
125
+ { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
126
+ { "startIndex": 27, "endIndex": 29, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.other.abl"] }, // 'OR'
127
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
128
+ { "startIndex": 30, "endIndex": 35, "scopes": ["source.abl", "meta.function.arguments.abl", "storage.data.table.abl"] }, // 'tt.f2'
129
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
130
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.operator.source.abl"] }, // '='
131
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
132
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
133
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl"] }, // 'c'
134
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
135
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
136
+ ],
137
+ [
138
+ { "startIndex": 0, "endIndex": 10, "scopes": ["source.abl"] }, // ' '
139
+ { "startIndex": 10, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'AND'
140
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
141
+ { "startIndex": 14, "endIndex": 19, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'tt.f3'
142
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl"] }, // ' '
143
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
144
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl"] }, // ' '
145
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
146
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'd'
147
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] } // '"'
148
+ ],
149
+ [
150
+ { "startIndex": 0, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
151
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-LOCK'
152
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl"] }, // ' '
153
+ { "startIndex": 16, "endIndex": 24, "scopes": ["source.abl", "keyword.other.abl"] }, // 'NO-ERROR'
154
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
155
+ ]
156
+ ];
157
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
158
+ })
@@ -159,8 +159,7 @@ describe('', () => {
159
159
  { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
160
160
  { "startIndex": 28, "endIndex": 33, "scopes": ["source.abl"] }, // 'name '
161
161
  { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
162
- { "startIndex": 35, "endIndex": 39, "scopes": ["source.abl"] }, // ' old'
163
- { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
162
+ { "startIndex": 35, "endIndex": 40, "scopes": ["source.abl"] }, // ' old-'
164
163
  { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
165
164
  { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
166
165
  { "startIndex": 42, "endIndex": 46, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -191,8 +190,7 @@ describe('', () => {
191
190
  { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
192
191
  { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl"] }, // 'name '
193
192
  { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
194
- { "startIndex": 33, "endIndex": 37, "scopes": ["source.abl"] }, // ' old'
195
- { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
193
+ { "startIndex": 33, "endIndex": 38, "scopes": ["source.abl"] }, // ' old-'
196
194
  { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
197
195
  { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
198
196
  { "startIndex": 40, "endIndex": 44, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -215,8 +213,7 @@ describe('', () => {
215
213
  { "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "storage.data.table.abl"] }, // 'buf-{&file}'
216
214
  { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl"] }, // ' '
217
215
  { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.other.abl"] }, // 'or'
218
- { "startIndex": 21, "endIndex": 25, "scopes": ["source.abl"] }, // ' buf'
219
- { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
216
+ { "startIndex": 21, "endIndex": 26, "scopes": ["source.abl"] }, // ' buf-'
220
217
  { "startIndex": 26, "endIndex": 27, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
221
218
  { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
222
219
  { "startIndex": 28, "endIndex": 32, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -224,8 +221,7 @@ describe('', () => {
224
221
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "punctuation.terminator.abl"] }, // '.'
225
222
  { "startIndex": 34, "endIndex": 39, "scopes": ["source.abl"] }, // 'name '
226
223
  { "startIndex": 39, "endIndex": 41, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '<>'
227
- { "startIndex": 41, "endIndex": 45, "scopes": ["source.abl"] }, // ' old'
228
- { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '-'
224
+ { "startIndex": 41, "endIndex": 46, "scopes": ["source.abl"] }, // ' old-'
229
225
  { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.section.abl"] }, // '{'
230
226
  { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "meta.preprocessor.abl", "punctuation.definition.preprocessor.abl"] }, // '&'
231
227
  { "startIndex": 48, "endIndex": 52, "scopes": ["source.abl", "meta.preprocessor.abl", "entity.name.function.preprocessor.abl"] }, // 'file'
@@ -378,7 +378,7 @@ describe('', () => {
378
378
  })
379
379
 
380
380
  describe('', () => {
381
- let statement = `var decimal pie = 22/3, piIsh = 3.1415927.`;
381
+ let statement = `var decimal pie = 22 / 3, piIsh = 3.1415927.`;
382
382
  let expectedTokens = [
383
383
  { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
384
384
  { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
@@ -389,16 +389,51 @@ describe('', () => {
389
389
  { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
390
390
  { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl"] }, // ' '
391
391
  { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '22'
392
- { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '/'
393
- { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3'
394
- { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
395
- { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl"] }, // ' '
396
- { "startIndex": 24, "endIndex": 29, "scopes": ["source.abl", "variable.other.abl"] }, // 'piIsh'
397
- { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl"] }, // ' '
398
- { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
392
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
393
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '/'
394
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
395
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3'
396
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "punctuation.separator.comma.abl"] }, // ','
397
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl"] }, // ' '
398
+ { "startIndex": 26, "endIndex": 31, "scopes": ["source.abl", "variable.other.abl"] }, // 'piIsh'
399
399
  { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl"] }, // ' '
400
- { "startIndex": 32, "endIndex": 41, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3.1415927'
401
- { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
400
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
401
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
402
+ { "startIndex": 34, "endIndex": 43, "scopes": ["source.abl", "constant.numeric.source.abl"] }, // '3.1415927'
403
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
404
+ ]
405
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
406
+ })
407
+
408
+ describe('', () => {
409
+ let statement = `var datetime[] dtz1 = [now, today, ?, today, now].`
410
+ let expectedTokens = [
411
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
412
+ { "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
413
+ { "startIndex": 5, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'datetime'
414
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
415
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
416
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
417
+ { "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'dtz1'
418
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
419
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
420
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
421
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
422
+ { "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'now'
423
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
424
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
425
+ { "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'today'
426
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
427
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
428
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // '?'
429
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
430
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
431
+ { "startIndex": 39, "endIndex": 44, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'today'
432
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
433
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
434
+ { "startIndex": 46, "endIndex": 49, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'now'
435
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
436
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
402
437
  ]
403
438
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
404
439
  })
@@ -229,7 +229,8 @@ END CASE. `;
229
229
  { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl", "meta.function.arguments.abl", "punctuation.separator.comma.abl"] }, // ','
230
230
  { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
231
231
  { "startIndex": 24, "endIndex": 31, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'produit'
232
- { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' +'
232
+ { "startIndex": 31, "endIndex": 32, "scopes": ["source.abl", "meta.function.arguments.abl"] }, // ' '
233
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "keyword.operator.source.abl"] }, // '+'
233
234
  { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl"] }, // ' '
234
235
  { "startIndex": 34, "endIndex": 40, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "support.function.abl"] }, // 'string'
235
236
  { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
@@ -0,0 +1,246 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `oController?:NewEventName:Subscribe(NewEventNameHandler).`;
6
+ let expectedTokens = [
7
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
8
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
9
+ { "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
10
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
11
+ { "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
12
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
13
+ { "startIndex": 36, "endIndex": 55, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
14
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
15
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
16
+ ];
17
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
18
+ })
19
+
20
+ describe('', () => {
21
+ let statement = `oController?:NewEventName?:Subscribe(NewEventNameHandler).`;
22
+ let expectedTokens = [
23
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
24
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
25
+ { "startIndex": 13, "endIndex": 25, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
26
+ { "startIndex": 25, "endIndex": 27, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
27
+ { "startIndex": 27, "endIndex": 36, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
28
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
29
+ { "startIndex": 37, "endIndex": 56, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
30
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
31
+ { "startIndex": 57, "endIndex": 58, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
32
+
33
+ ];
34
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
35
+ })
36
+
37
+ describe('', () => {
38
+ let statement = `oController:NewEventName?:Subscribe(NewEventNameHandler).`;
39
+ let expectedTokens = [
40
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
41
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
42
+ { "startIndex": 12, "endIndex": 24, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
43
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
44
+ { "startIndex": 26, "endIndex": 35, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'Subscribe'
45
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.brace.round.js"] }, // '('
46
+ { "startIndex": 36, "endIndex": 55, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventNameHandler'
47
+ { "startIndex": 55, "endIndex": 56, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
48
+ { "startIndex": 56, "endIndex": 57, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
49
+ ];
50
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
51
+ })
52
+
53
+ describe('', () => {
54
+ let statement = `oController:NewEventName?:AThing(oVariable).`;
55
+ let expectedTokens = [
56
+ { "startIndex": 0, "endIndex": 11, "scopes": ["source.abl", "variable.other.abl"] }, // 'oController'
57
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
58
+ { "startIndex": 12, "endIndex": 24, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
59
+ { "startIndex": 24, "endIndex": 26, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
60
+ { "startIndex": 26, "endIndex": 32, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AThing'
61
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
62
+ { "startIndex": 33, "endIndex": 42, "scopes": ["source.abl", "meta.function.arguments.abl", "variable.other.abl"] }, // 'oVariable'
63
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
64
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
65
+ ];
66
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
67
+ })
68
+
69
+ describe('', () => {
70
+ let statement = `message this-object:NewEventName?:PropertySays.`;
71
+ let expectedTokens = [
72
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
73
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
74
+ { "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
75
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
76
+ { "startIndex": 20, "endIndex": 32, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
77
+ { "startIndex": 32, "endIndex": 34, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
78
+ { "startIndex": 34, "endIndex": 46, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
79
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
80
+ ];
81
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
82
+ })
83
+
84
+ describe('', () => {
85
+ let statement = `assign this-object:NewEventName?:PropertySays = "Some value".`;
86
+ let expectedTokens = [
87
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'assign'
88
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
89
+ { "startIndex": 7, "endIndex": 18, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
90
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
91
+ { "startIndex": 19, "endIndex": 31, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
92
+ { "startIndex": 31, "endIndex": 33, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
93
+ { "startIndex": 33, "endIndex": 45, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
94
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl"] }, // ' '
95
+ { "startIndex": 46, "endIndex": 47, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
96
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl"] }, // ' '
97
+ { "startIndex": 48, "endIndex": 49, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.begin.abl"] }, // '"'
98
+ { "startIndex": 49, "endIndex": 59, "scopes": ["source.abl", "string.quoted.double.abl"] }, // 'Some value'
99
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "string.quoted.double.abl", "punctuation.definition.string.end.abl"] }, // '"'
100
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
101
+ ];
102
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
103
+ })
104
+
105
+ describe('technically impossible but will pass the compiler', () => {
106
+ let statement = `message this-object?:NewEventName?:PropertySays.`;
107
+ let expectedTokens = [
108
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
109
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
110
+ { "startIndex": 8, "endIndex": 19, "scopes": ["source.abl", "variable.language.abl"] }, // 'this-object'
111
+ { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
112
+ { "startIndex": 21, "endIndex": 33, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'NewEventName'
113
+ { "startIndex": 33, "endIndex": 35, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
114
+ { "startIndex": 35, "endIndex": 47, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'PropertySays'
115
+ { "startIndex": 47, "endIndex": 48, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
116
+ ];
117
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
118
+ })
119
+
120
+ describe('', () => {
121
+ let statement = `message session:current-request-info?:AdapterType:ToString()`;
122
+ let expectedTokens = [
123
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
124
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
125
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "variable.language.abl"] }, // 'session'
126
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
127
+ { "startIndex": 16, "endIndex": 36, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'current-request-info'
128
+ { "startIndex": 36, "endIndex": 38, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
129
+ { "startIndex": 38, "endIndex": 49, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AdapterType'
130
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
131
+ { "startIndex": 50, "endIndex": 58, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ToString'
132
+ { "startIndex": 58, "endIndex": 59, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
133
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
134
+ ];
135
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
136
+ })
137
+
138
+ describe('', () => {
139
+ let statement = `message session?:current-request-info?:AdapterType:ToString()`;
140
+ let expectedTokens = [
141
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "keyword.other.abl"] }, // 'message'
142
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl"] }, // ' '
143
+ { "startIndex": 8, "endIndex": 15, "scopes": ["source.abl", "variable.language.abl"] }, // 'session'
144
+ { "startIndex": 15, "endIndex": 17, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
145
+ { "startIndex": 17, "endIndex": 37, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'current-request-info'
146
+ { "startIndex": 37, "endIndex": 39, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
147
+ { "startIndex": 39, "endIndex": 50, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'AdapterType'
148
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
149
+ { "startIndex": 51, "endIndex": 59, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'ToString'
150
+ { "startIndex": 59, "endIndex": 60, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
151
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.brace.round.js"] } // ')'
152
+ ];
153
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
154
+ })
155
+
156
+ describe('', () => {
157
+ let statement = `a[x]?:aMethod():aField // Evaluates to null if a[x] == null`;
158
+ let expectedTokens = [
159
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'a'
160
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
161
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] }, // 'x'
162
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
163
+ { "startIndex": 4, "endIndex": 6, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
164
+ { "startIndex": 6, "endIndex": 13, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aMethod'
165
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
166
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
167
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
168
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aField'
169
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
170
+ { "startIndex": 23, "endIndex": 59, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// Evaluates to null if a[x] == null'
171
+ ];
172
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
173
+ })
174
+
175
+ describe('', () => {
176
+ let statement = `a[x]:aMethod()?:aField`;
177
+ let expectedTokens = [
178
+ { "startIndex": 0, "endIndex": 1, "scopes": ["source.abl", "variable.other.abl"] }, // 'a'
179
+ { "startIndex": 1, "endIndex": 2, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
180
+ { "startIndex": 2, "endIndex": 3, "scopes": ["source.abl", "meta.array.literal.abl", "variable.other.abl"] }, // 'x'
181
+ { "startIndex": 3, "endIndex": 4, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
182
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "punctuation.separator.colon.abl"] }, // ':'
183
+ { "startIndex": 5, "endIndex": 12, "scopes": ["source.abl", "entity.name.function.abl"] }, // 'aMethod'
184
+ { "startIndex": 12, "endIndex": 13, "scopes": ["source.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
185
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.brace.round.js"] }, // ')'
186
+ { "startIndex": 14, "endIndex": 16, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '?:'
187
+ { "startIndex": 16, "endIndex": 22, "scopes": ["source.abl", "entity.name.function.abl"] } // 'aField'
188
+ ];
189
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
190
+ })
191
+
192
+ describe('', () => {
193
+ let statement = `CAST(obj?:prop, My.Type)`;
194
+ let expectedTokens = [
195
+ { "startIndex": 0, "endIndex": 4, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'CAST'
196
+ { "startIndex": 4, "endIndex": 5, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
197
+ { "startIndex": 5, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
198
+ { "startIndex": 8, "endIndex": 10, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
199
+ { "startIndex": 10, "endIndex": 14, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'prop'
200
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
201
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
202
+ { "startIndex": 16, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
203
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
204
+ ];
205
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
206
+ })
207
+
208
+ describe('', () => {
209
+ let statement = `type-OF(obj?:meth()?:val, My.Type)`;
210
+ let expectedTokens = [
211
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'type-OF'
212
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
213
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
214
+ { "startIndex": 11, "endIndex": 13, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
215
+ { "startIndex": 13, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'meth'
216
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
217
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
218
+ { "startIndex": 19, "endIndex": 21, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
219
+ { "startIndex": 21, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'val'
220
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
221
+ { "startIndex": 25, "endIndex": 26, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
222
+ { "startIndex": 26, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
223
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
224
+ ];
225
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
226
+ })
227
+
228
+ describe('', () => {
229
+ let statement = `type-OF(obj:meth()?:val, My.Type)`;
230
+ let expectedTokens = [
231
+ { "startIndex": 0, "endIndex": 7, "scopes": ["source.abl", "meta.function-call.abl", "support.function.abl"] }, // 'type-OF'
232
+ { "startIndex": 7, "endIndex": 8, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // '('
233
+ { "startIndex": 8, "endIndex": 11, "scopes": ["source.abl", "meta.function-call.abl", "variable.other.abl"] }, // 'obj'
234
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.colon.abl"] }, // ':'
235
+ { "startIndex": 12, "endIndex": 16, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'meth'
236
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.function-call.abl", "meta.function.arguments.abl", "meta.brace.round.js"] }, // '('
237
+ { "startIndex": 17, "endIndex": 18, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] }, // ')'
238
+ { "startIndex": 18, "endIndex": 20, "scopes": ["source.abl", "meta.function-call.abl", "keyword.operator.source.abl"] }, // '?:'
239
+ { "startIndex": 20, "endIndex": 23, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.function.abl"] }, // 'val'
240
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.function-call.abl", "punctuation.separator.comma.abl"] }, // ','
241
+ { "startIndex": 24, "endIndex": 25, "scopes": ["source.abl", "meta.function-call.abl"] }, // ' '
242
+ { "startIndex": 25, "endIndex": 32, "scopes": ["source.abl", "meta.function-call.abl", "entity.name.type.abl"] }, // 'My.Type'
243
+ { "startIndex": 32, "endIndex": 33, "scopes": ["source.abl", "meta.function-call.abl", "meta.brace.round.js"] } // ')'
244
+ ];
245
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
246
+ })
@@ -1,28 +0,0 @@
1
- # Node.js
2
- # Build a general Node.js project with npm.
3
- # Add steps that analyze code, save build artifacts, deploy, and more:
4
- # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
5
-
6
- trigger:
7
- - main
8
-
9
- pool:
10
- vmImage: 'ubuntu-22.04'
11
-
12
- steps:
13
- - task: NodeTool@0
14
- inputs:
15
- versionSpec: '20.x'
16
- displayName: 'Install Node.js'
17
-
18
- - script: |
19
- npm install
20
- npm run test
21
- displayName: 'running tests'
22
-
23
- - task: Npm@1
24
- condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
25
- inputs:
26
- command: 'publish'
27
- customRegistry: 'useFeed'
28
- publishEndpoint: 'npmjs'