abl-tmlanguage 1.3.25 → 1.3.27

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,13 @@
1
+ 1.3.27
2
+ ======
3
+
4
+ - 🐛 Fix scoping of parameter definition with 'class' in the type name (PR #75)
5
+
6
+ 1.3.26
7
+ ======
8
+
9
+ - 🐛 Fix scoping for DELETE PROCEDURE statements (PR #74, issue vscode-abl/vscode-abl#507)
10
+
1
11
  1.3.25
2
12
  ======
3
13
 
@@ -58,7 +58,7 @@
58
58
  "procedure-definition": {
59
59
  "name": "meta.procedure.abl",
60
60
  "comment": "Look ahead to the procedure name, quoted or not. It will be resolved in the patterns. 'Names must begin with a letter.' from https://docs.progress.com/bundle/openedge-abl-manage-applications/page/Name-limits.html",
61
- "begin": "(?i)\\s*(proce(?:dure|dur|du|d)?)\\s+(?=[a-zA-Z_])",
61
+ "begin": "(?i)^\\s*(proce(?:dure|dur|du|d)?)\\s+(?=[a-zA-Z_])",
62
62
  "beginCaptures": {
63
63
  "1": {
64
64
  "name": "keyword.other.abl"
@@ -1659,7 +1659,7 @@
1659
1659
  "end": "(?=\\s|\\)|\\.|,)",
1660
1660
  "patterns": [
1661
1661
  {
1662
- "match": "\\s*([Cc][Ll][Aa][Ss]{2})\\s*",
1662
+ "match": "\\b([Cc][Ll][Aa][Ss]{2})\\b",
1663
1663
  "captures": {
1664
1664
  "1": {
1665
1665
  "name": "keyword.other.abl"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abl-tmlanguage",
3
- "version": "1.3.25",
3
+ "version": "1.3.27",
4
4
  "description": "TextMate grammar for Progress OpenEdge ABL Language",
5
5
  "main": "",
6
6
  "type": "commonjs",
@@ -0,0 +1,65 @@
1
+ const { assert, expect } = require('chai');
2
+ const shared = require('../shared.js');
3
+
4
+ describe('', () => {
5
+ let statement = `// vProcedureHandle: entity.name.procedure.abl; meta.procedure.abl; source.abl
6
+ // no-error: entity.name.procedure.abl; meta.procedure.abl; source.abl
7
+ delete procedure vProcedureHandle no-error.`;
8
+ let expectedTokens = [
9
+ [
10
+ { "startIndex": 0, "endIndex": 78, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// vProcedureHandle: entity.name.procedure.abl; meta.procedure.abl; source.abl'
11
+ ],
12
+ [
13
+ { "startIndex": 0, "endIndex": 70, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no-error: entity.name.procedure.abl; meta.procedure.abl; source.abl'
14
+ ],
15
+ [
16
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
17
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
18
+ { "startIndex": 7, "endIndex": 16, "scopes": ["source.abl", "keyword.other.abl"] }, // 'procedure'
19
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl"] }, // ' '
20
+ { "startIndex": 17, "endIndex": 33, "scopes": ["source.abl", "variable.other.abl"] }, // 'vProcedureHandle'
21
+ { "startIndex": 33, "endIndex": 34, "scopes": ["source.abl"] }, // ' '
22
+ { "startIndex": 34, "endIndex": 42, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
23
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
24
+ ]
25
+ ];
26
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
27
+ })
28
+
29
+ describe('', () => {
30
+ let statement = `// vProcedureHandle: variable.other.abl; source.abl
31
+ // no-error: keyword.other.abl; source.abl
32
+ delete object vProcedureHandle no-error.`;
33
+ let expectedTokens = [
34
+ [
35
+ { "startIndex": 0, "endIndex": 51, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// vProcedureHandle: variable.other.abl; source.abl'
36
+ ],
37
+ [
38
+ { "startIndex": 0, "endIndex": 42, "scopes": ["source.abl", "comment.line.double-slash.abl"] } // '// no-error: keyword.other.abl; source.abl'
39
+ ],
40
+ [
41
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
42
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
43
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'object'
44
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
45
+ { "startIndex": 14, "endIndex": 30, "scopes": ["source.abl", "variable.other.abl"] }, // 'vProcedureHandle'
46
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl"] }, // ' '
47
+ { "startIndex": 31, "endIndex": 39, "scopes": ["source.abl", "keyword.other.abl"] }, // 'no-error'
48
+ { "startIndex": 39, "endIndex": 40, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
49
+ ]
50
+ ];
51
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
52
+ })
53
+
54
+ describe('', () => {
55
+ let statement = `delete WIDGET SELF.`;
56
+ let expectedTokens = [
57
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "keyword.other.abl"] }, // 'delete'
58
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl"] }, // ' '
59
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "keyword.other.abl"] }, // 'WIDGET'
60
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl"] }, // ' '
61
+ { "startIndex": 14, "endIndex": 18, "scopes": ["source.abl", "variable.language.abl"] }, // 'SELF'
62
+ { "startIndex": 18, "endIndex": 19, "scopes": ["source.abl", "punctuation.terminator.abl"] } // '.'
63
+ ];
64
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
65
+ })
@@ -926,4 +926,53 @@ describe('', () => {
926
926
  { "startIndex": 81, "endIndex": 82, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
927
927
  ];
928
928
  shared.itShouldMatchExpectedScopes(statement, expectedTokens);
929
- })
929
+ })
930
+
931
+ describe('', () => {
932
+ let statement = `method public character GetStaticQueryNames (pcTempTableName as character,
933
+ pcIndexName as character,
934
+ output poParameterType as ClassName ):`;
935
+
936
+ let expectedTokens = [
937
+ [
938
+ { "startIndex": 0, "endIndex": 6, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'method'
939
+ { "startIndex": 6, "endIndex": 7, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
940
+ { "startIndex": 7, "endIndex": 13, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'public'
941
+ { "startIndex": 13, "endIndex": 14, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
942
+ { "startIndex": 14, "endIndex": 23, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
943
+ { "startIndex": 23, "endIndex": 24, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
944
+ { "startIndex": 24, "endIndex": 43, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.function.abl"] }, // 'GetStaticQueryNames'
945
+ { "startIndex": 43, "endIndex": 44, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
946
+ { "startIndex": 44, "endIndex": 45, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // '('
947
+ { "startIndex": 45, "endIndex": 60, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pcTempTableName'
948
+ { "startIndex": 60, "endIndex": 61, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
949
+ { "startIndex": 61, "endIndex": 63, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
950
+ { "startIndex": 63, "endIndex": 64, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
951
+ { "startIndex": 64, "endIndex": 73, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
952
+ { "startIndex": 73, "endIndex": 74, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
953
+ ],
954
+ [
955
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
956
+ { "startIndex": 5, "endIndex": 16, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'pcIndexName'
957
+ { "startIndex": 16, "endIndex": 17, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
958
+ { "startIndex": 17, "endIndex": 19, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
959
+ { "startIndex": 19, "endIndex": 20, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
960
+ { "startIndex": 20, "endIndex": 29, "scopes": ["source.abl", "meta.define.method.abl", "storage.type.abl"] }, // 'character'
961
+ { "startIndex": 29, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl", "punctuation.separator.comma.abl"] } // ','
962
+ ],
963
+ [
964
+ { "startIndex": 0, "endIndex": 5, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
965
+ { "startIndex": 5, "endIndex": 11, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'output'
966
+ { "startIndex": 11, "endIndex": 12, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
967
+ { "startIndex": 12, "endIndex": 27, "scopes": ["source.abl", "meta.define.method.abl", "variable.parameter.abl"] }, // 'poParameterType'
968
+ { "startIndex": 27, "endIndex": 28, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
969
+ { "startIndex": 28, "endIndex": 30, "scopes": ["source.abl", "meta.define.method.abl", "keyword.other.abl"] }, // 'as'
970
+ { "startIndex": 30, "endIndex": 31, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
971
+ { "startIndex": 31, "endIndex": 40, "scopes": ["source.abl", "meta.define.method.abl", "entity.name.type.abl"] }, // 'ClassName'
972
+ { "startIndex": 40, "endIndex": 41, "scopes": ["source.abl", "meta.define.method.abl"] }, // ' '
973
+ { "startIndex": 41, "endIndex": 42, "scopes": ["source.abl", "meta.define.method.abl", "meta.brace.round.js"] }, // ')'
974
+ { "startIndex": 42, "endIndex": 43, "scopes": ["source.abl", "punctuation.terminator.abl"] } // ':'
975
+ ]
976
+ ];
977
+ shared.itShouldMatchExpectedScopes(statement, expectedTokens);
978
+ })