abl-tmlanguage 1.3.19 → 1.3.20

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,15 @@
1
+ 1.3.20
2
+ ======
3
+
4
+ - 🐛 Fix lookbehinds
5
+ - ✨ Add operator scopes to function arguments
6
+
7
+ 1.3.19
8
+ ======
9
+
10
+ - ✨ Support comments in USING statements; improve class definition
11
+ - ✨ Improve scoping for CREATE BUFFER statement
12
+
1
13
  1.3.18
2
14
  ======
3
15
 
@@ -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"
@@ -3673,6 +3673,9 @@
3673
3673
  {
3674
3674
  "include": "#comment"
3675
3675
  },
3676
+ {
3677
+ "include": "#operator"
3678
+ },
3676
3679
  {
3677
3680
  "include": "#array-literal"
3678
3681
  },
@@ -4101,7 +4104,7 @@
4101
4104
  }
4102
4105
  },
4103
4106
  "timestamp-constant": {
4104
- "match": "(?i)(?<=^|\\s*)(today|now)(?!a-zA-Z0-9_\\-#$%|-)",
4107
+ "match": "(?i)(?<=^|\\s|\\b)(today|now)(?!a-zA-Z0-9_\\-#$%|-)",
4105
4108
  "comment": "These are constants that can be used in initial values. This excludes MTIME and ETIME",
4106
4109
  "name": "constant.language.abl"
4107
4110
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.19",
3
+ "version": "1.3.20",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "type": "commonjs",
@@ -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
+ })
@@ -402,3 +402,36 @@ describe('', () => {
402
402
  ]
403
403
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
404
404
  })
405
+
406
+ describe('', () => {
407
+ let statement = `var datetime[] dtz1 = [now, today, ?, today, now].`
408
+ let expectedTokens = [
409
+ { "startIndex": 0, "endIndex": 3, "scopes": ["source.abl", "meta.define.abl", "keyword.other.abl"] }, // 'var'
410
+ { "startIndex": 3, "endIndex": 5, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
411
+ { "startIndex": 5, "endIndex": 13, "scopes": ["source.abl", "meta.define.abl", "storage.type.abl"] }, // 'datetime'
412
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
413
+ { "startIndex": 14, "endIndex": 15, "scopes": ["source.abl", "meta.define.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
414
+ { "startIndex": 15, "endIndex": 16, "scopes": ["source.abl", "meta.define.abl"] }, // ' '
415
+ { "startIndex": 16, "endIndex": 20, "scopes": ["source.abl", "meta.define.abl", "variable.other.abl"] }, // 'dtz1'
416
+ { "startIndex": 20, "endIndex": 21, "scopes": ["source.abl"] }, // ' '
417
+ { "startIndex": 21, "endIndex": 22, "scopes": ["source.abl", "keyword.operator.source.abl"] }, // '='
418
+ { "startIndex": 22, "endIndex": 23, "scopes": ["source.abl"] }, // ' '
419
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.begin.abl"] }, // '['
420
+ { "startIndex": 24, "endIndex": 27, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'now'
421
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
422
+ { "startIndex": 28, "endIndex": 29, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
423
+ { "startIndex": 29, "endIndex": 34, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'today'
424
+ { "startIndex": 34, "endIndex": 35, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
425
+ { "startIndex": 35, "endIndex": 36, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
426
+ { "startIndex": 36, "endIndex": 37, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // '?'
427
+ { "startIndex": 37, "endIndex": 38, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
428
+ { "startIndex": 38, "endIndex": 39, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
429
+ { "startIndex": 39, "endIndex": 44, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'today'
430
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.separator.comma.abl"] }, // ','
431
+ { "startIndex": 45, "endIndex": 46, "scopes": ["source.abl", "meta.array.literal.abl"] }, // ' '
432
+ { "startIndex": 46, "endIndex": 49, "scopes": ["source.abl", "meta.array.literal.abl", "constant.language.abl"] }, // 'now'
433
+ { "startIndex": 49, "endIndex": 50, "scopes": ["source.abl", "meta.array.literal.abl", "punctuation.definition.bracket.square.end.abl"] }, // ']'
434
+ { "startIndex": 50, "endIndex": 51, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
435
+ ]
436
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
437
+ })
@@ -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"] }, // '('
@@ -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'