abl-tmlanguage 1.3.15 → 1.3.18

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 (92) hide show
  1. package/.github/workflows/ci.yml +36 -0
  2. package/CHANGELOG.md +18 -0
  3. package/README.md +17 -12
  4. package/abl.tmLanguage.json +280 -69
  5. package/package.json +1 -1
  6. package/spec/annotations/annotation.spec.js +49 -50
  7. package/spec/blocks/block-labels.spec.js +3 -3
  8. package/spec/blocks/block-options.spec.js +157 -1
  9. package/spec/comments/comment-in-block-statement.spec.js +20 -14
  10. package/spec/comments/comment-in-for-each.spec.js +9 -6
  11. package/spec/comments/comment-in-function-args.spec.js +4 -5
  12. package/spec/comments/vscode-abl-issue#127.spec.js +4 -4
  13. package/spec/create-widgets/create-window.spec.js +11 -8
  14. package/spec/db-table-and-field/buffer-copy.spec.js +45 -39
  15. package/spec/db-table-and-field/create-alias.spec.js +3 -3
  16. package/spec/db-table-and-field/field-in-function.spec.js +6 -6
  17. package/spec/db-table-and-field/foreach.spec.js +3 -3
  18. package/spec/db-table-and-field/issue#88.spec.js +2 -2
  19. package/spec/db-table-and-field/new-record.spec.js +46 -25
  20. package/spec/define/define-browse.spec.js +54 -54
  21. package/spec/define/define-button.spec.js +3 -3
  22. package/spec/define/define-query.spec.js +43 -0
  23. package/spec/define-buffer/create-buffer.spec.js +3 -3
  24. package/spec/define-buffer/simple-single-line.spec.js +9 -9
  25. package/spec/define-frame/issue#173.spec.js +56 -50
  26. package/spec/define-parameter/simple-single-line.spec.js +3 -3
  27. package/spec/define-property/property-getter.spec.js +4 -4
  28. package/spec/define-temp-table/define-dataset.spec.js +23 -17
  29. package/spec/define-temp-table/define-temp-table.spec.js +68 -53
  30. package/spec/define-variable/extent.spec.js +6 -6
  31. package/spec/define-variable/initial.spec.js +15 -15
  32. package/spec/define-variable/issue#6.spec.js +39 -39
  33. package/spec/define-variable/issue#9.spec.js +3 -3
  34. package/spec/define-variable/var-statement.spec.js +7 -4
  35. package/spec/do/do-blocks.spec.js +25 -19
  36. package/spec/for-each/issue#321.spec.js +2 -2
  37. package/spec/function-call/can-find.spec.js +10 -11
  38. package/spec/function-call/misc-abl-functions.spec.js +3 -3
  39. package/spec/function-call/nested-functions.spec.js +21 -22
  40. package/spec/function-call/udf-calls.spec.js +22 -23
  41. package/spec/function-call/vscode-abl-issue#19.spec.js +12 -12
  42. package/spec/global-scoped-define/global-define.spec.js +54 -7
  43. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +49 -15
  44. package/spec/global-scoped-define/undefine.spec.js +44 -0
  45. package/spec/include/abl-tmlanguage-issues#5.spec.js +3 -3
  46. package/spec/include/include-file-name.spec.js +16 -4
  47. package/spec/include/unnamed-arguments.spec.js +4 -5
  48. package/spec/include/vscode-abl-issue#45.spec.js +3 -3
  49. package/spec/include/vscode-abl-issue#77.spec.js +16 -17
  50. package/spec/include/vscode-abl-issue#80.spec.js +10 -7
  51. package/spec/input-output/input-from.spec.js +19 -16
  52. package/spec/input-output/output-to.spec.js +15 -15
  53. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +16 -17
  54. package/spec/method-attribute-property-call/connected-method.spec.js +3 -4
  55. package/spec/method-attribute-property-call/datset-table-attribute-method-call.spec.js +53 -0
  56. package/spec/method-attribute-property-call/method-call.spec.js +16 -16
  57. package/spec/method-attribute-property-call/unqualified-method-call.spec.js +3 -4
  58. package/spec/method-definition/constructor.spec.js +6 -6
  59. package/spec/method-definition/method.spec.js +12 -12
  60. package/spec/misc-statements/case-statement.spec.js +9 -9
  61. package/spec/misc-statements/class-in-var-name.spec.js +9 -10
  62. package/spec/misc-statements/copy-lob.spec.js +3 -3
  63. package/spec/misc-statements/do-in-name.spec.js +21 -22
  64. package/spec/misc-statements/event-subscribe.spec.js +14 -15
  65. package/spec/misc-statements/export-delimiter.spec.js +6 -6
  66. package/spec/misc-statements/if-then.spec.js +9 -9
  67. package/spec/misc-statements/issue#173.spec.js +3 -4
  68. package/spec/misc-statements/message-statement.spec.js +3 -3
  69. package/spec/misc-statements/record-buffer-functions.spec.js +3 -3
  70. package/spec/misc-statements/release.spec.js +3 -4
  71. package/spec/misc-statements/skip-statement-and-fuction.spec.js +3 -4
  72. package/spec/numbers/scientific-notation.spec.js +212 -0
  73. package/spec/operators/operators.spec.js +10 -10
  74. package/spec/preprocesors/issue166.spec.js +27 -19
  75. package/spec/preprocesors/preprocessor-functions.spec.js +77 -0
  76. package/spec/preprocesors/proparse-preprocessor.spec.js +27 -3
  77. package/spec/procedure-definition/trigger-procedure.spec.js +8 -2
  78. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +3 -3
  79. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +4 -4
  80. package/spec/procedure-definition/vscode-abl-issue#325.spec.js +26 -2
  81. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +7 -4
  82. package/spec/run-statement/run-statement.spec.js +25 -13
  83. package/spec/shared.js +12 -11
  84. package/spec/strings/translation-attribute.spec.js +4 -4
  85. package/spec/strings/vscode-abl-issue#11.spec.js +24 -24
  86. package/spec/strings/vscode-abl-issue#28.spec.js +9 -9
  87. package/spec/type-name/argument.spec.js +11 -12
  88. package/spec/type-name/cast.spec.js +7 -7
  89. package/spec/type-name/define-temp-table.spec.js +6 -6
  90. package/spec/type-name/new.spec.js +3 -3
  91. package/spec/type-name/parameter-as.spec.js +6 -6
  92. package/spec/type-name/type-name.spec.js +22 -20
@@ -0,0 +1,36 @@
1
+ name: CI/CD Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ permissions:
12
+ id-token: write # Required for OIDC
13
+ contents: read
14
+
15
+ jobs:
16
+ build-and-test:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - name: Checkout code
21
+ uses: actions/checkout@v6
22
+
23
+ - name: Install Node.js
24
+ uses: actions/setup-node@v6
25
+ with:
26
+ node-version: '24.x'
27
+ registry-url: 'https://registry.npmjs.org'
28
+
29
+ - name: Running tests
30
+ run: |
31
+ npm install
32
+ npm run test
33
+
34
+ - name: Publish to npm
35
+ if: github.ref == 'refs/heads/main' && github.event_name == 'push'
36
+ run: npm publish
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ 1.3.18
2
+ ======
3
+
4
+ - ✨ Refactoring of preprocessor and string scopes (#65)
5
+
6
+ 1.3.17
7
+ ======
8
+
9
+ - ✨ Scientific notation (#64)
10
+
11
+ 1.3.16
12
+ ======
13
+
14
+ - 🐛 Addresses syntax highlighting - DO..WHILE loops with long conditions (vscode-abl/vscode-abl#401)
15
+ - ✨ Improve closing scope on DEFINE QUERY statement
16
+ - ✨ Improve termination of UNDO statement
17
+ - ✨ Dataset scoping improvements
18
+
1
19
  1.3.15
2
20
  ======
3
21
 
package/README.md CHANGED
@@ -58,25 +58,25 @@ This project uses the [vscode-textmate](https://www.npmjs.com/package/vscode-tex
58
58
  ## Keywords
59
59
  Part of this grammar is generated from a keyword list file. See [index.js] for information on how to generate that file, as well as the others required for the generation.
60
60
 
61
- When `npm run build` is executed, a file called grammer.json is created, which contains properties for `keywords` (all the keywords), `abl-functions` and `handle-attributes` (attributes and method calls on ABL handles). The contents of this file should be copied into the `abl.tmLanguage.json` file, replacing the existing contents.
61
+ When `npm run build` is executed, a file called grammar.json is created, which contains properties for `keywords` (all the keywords), `abl-functions` and `handle-attributes` (attributes and method calls on ABL handles). The contents of this file should be copied into the `abl.tmLanguage.json` file, replacing the existing contents.
62
62
 
63
63
 
64
64
 
65
65
  # Scopes
66
66
 
67
- The ABL-specific scopes produced by the ABL grammer listed in the table below. The scope names are largely based on the naming conventions at https://macromates.com/manual/en/language_grammars#language_rules and https://www.sublimetext.com/docs/scope_naming.html .
67
+ The ABL-specific scopes produced by the ABL grammar listed in the table below. The scope names are largely based on the naming conventions at https://macromates.com/manual/en/language_grammars#language_rules and https://www.sublimetext.com/docs/scope_naming.html .
68
68
 
69
69
  | Scope Name | Used for/by |
70
70
  | ------------- | ------------- |
71
71
  |comment.block.source.abl | Everything between `/*` and `*/` |
72
- |comment.line.double-slash.abl | Everything in a `//` comment, incl slashes |
72
+ |comment.line.double-slash.abl | Everything in a `//` comment, incl. slashes |
73
73
  |comment.preprocessor.analyze-suspend.abl | `&analyze-suspend`, `&analyze-resume` |
74
74
  |constant.character.escape.abl | `~` and the next char |
75
75
  |constant.language.abl | `today`, `now`, `true`, `false`, `yes`, `no`, `?` (unknown value) |
76
76
  |constant.language.source.abl | `99/99/9999` (or similar) when used as a format clause |
77
- |constant.numeric.source.abl | 0x00-0xFF, 0-9 |
77
+ |constant.numeric.source.abl | 0x00-0xFF, 0-9, scientific notation |
78
78
  |entity.name.function.abl | Method call, property call, method name, property name, handle attributes, handle methods, event names |
79
- |entity.name.function.preprocessor.abl | `&scoped-define`, `&global-define` |
79
+ |entity.name.function.preprocessor.abl | Preprocessor names, including built-ins like `opsys` and `process-architecture` |
80
80
  |entity.name.include.abl | Include file names |
81
81
  |entity.name.label.abl | Block label names |
82
82
  |entity.name.package.abl | Package names for `using` |
@@ -85,16 +85,20 @@ The ABL-specific scopes produced by the ABL grammer listed in the table below. T
85
85
  |entity.name.type.abl | Class/interface/enum names |
86
86
  |entity.name.type.generic.abl | Generic type names |
87
87
  |entity.other.attribute-name.abl | Annotation attribute names |
88
+ |keyword.control.directive.conditional.abl | `&if` , `&else`, `&elsif` `&end` |
89
+ |keyword.control.directive.define.abl | `&scoped-define`, `&global-define`, `&undefine` |
88
90
  |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*`, `+=`, `-=`, `/=`, `*=` |
89
91
  |keyword.other.abl | Any ABL keyword (incl those covered by other scopes like `support.function.abl` and `entity.name.function.abl`) |
90
92
  |punctuation.definition.bracket.square.begin.abl | `[` used for array arguments |
91
93
  |punctuation.definition.bracket.square.end.abl | `]` used for array arguments |
92
94
  |punctuation.definition.generic.begin.abl | `<` used for generic type arguments |
93
95
  |punctuation.definition.generic.end.abl | `>` used for generic type arguments |
96
+ |punctuation.definition.preprocessor.abl | Leading `&` of referenced preprocessor and directives |
94
97
  |punctuation.definition.string.begin.abl | Start of a quoted string |
95
98
  |punctuation.definition.string.end.abl | End of a quoted string |
96
99
  |punctuation.section.abl | `{` and `}` |
97
100
  |punctuation.separator.comma.abl | `,` |
101
+ |punctuation.separator.continuation | `~` at the end of a line (preprocessor) |
98
102
  |punctuation.separator.period.abl | `.` |
99
103
  |punctuation.separator.colon.abl | `:` |
100
104
  |punctuation.terminator.abl | `.` and `:` |
@@ -103,12 +107,12 @@ The ABL-specific scopes produced by the ABL grammer listed in the table below. T
103
107
  |storage.data.table.abl | (Temp-)Table names, field names, index names |
104
108
  |storage.other.opsys-device.abl | Files and other operating system devices |
105
109
  |storage.type.abl | Primitive datatypes |
106
- |storage.type.function.abl | ABL preprocessors, `defined` keyword |
107
- |string.double.complex.abl | String in `"` quotes |
108
- |string.single.complex.abl | String in `'` quotes |
110
+ |storage.type.function.abl | `defined` keyword and preprocessor directives like `&message` |
111
+ |string.quoted.double.abl | String in `"` quotes |
112
+ |string.quoted.single.abl | String in `'` quotes |
109
113
  |support.function.abl | `opsys`, `proversion`, ABL functions (eg `base64-encode`) |
110
114
  |support.other.abl | Translation attributes `:L`, `:R`, `:T`, `:C`, `:U` |
111
- |support.other.argument.abl | `&<name\|number>` arguments in includes, preprocessor values |
115
+ |support.other.argument.abl | `&<name\|number>` arguments in includes |
112
116
  |variable.language.abl | ABL system handles (eg `session` or `this-object`) |
113
117
  |variable.other.abl | Variable names |
114
118
  |variable.parameter.abl | Parameter names in method, function, procedure definition |
@@ -116,6 +120,7 @@ The ABL-specific scopes produced by the ABL grammer listed in the table below. T
116
120
  There are also a number of 'meta' scopes that usually cover multiple other scopes.
117
121
  | Scope Name | Used for/by |
118
122
  | ------------- | ------------- |
123
+ |meta.argument.abl | Unnamed arguments like `{1}` |
119
124
  |meta.array.literal.abl | Literal values in an array |
120
125
  |meta.block.abl | A block statement like `do`, `repeat` and ` finally |
121
126
  |meta.brace.round.js | `(` and `)` |
@@ -125,7 +130,7 @@ There are also a number of 'meta' scopes that usually cover multiple other scope
125
130
  |meta.define.enum.abl | An enum definition, from the `enum` keyword to its closing `:` |
126
131
  |meta.define.function.abl | A user-defined function definition, from the `function` keyword to its closing `:` |
127
132
  |meta.define.interface.abl | An interface definition, from the `interface` keyword to its closing `:` |
128
- |meta.define.method.abl | A method, constructor or destructor definition, from the `method`keyword to the ending `:` or `.` Includes parameter definions, if any. |
133
+ |meta.define.method.abl | A method, constructor or destructor definition, from the `method`keyword to the ending `:` or `.` Includes parameter definitions, if any. |
129
134
  |meta.define.parameter.abl | An individual parameter definition |
130
135
  |meta.define.stream.abl | A stream definition |
131
136
  |meta.define-type.implements.abl | The type names that a type implements and/or inherits |
@@ -135,9 +140,9 @@ There are also a number of 'meta' scopes that usually cover multiple other scope
135
140
  |meta.generic.abl | Generic type names |
136
141
  |meta.include.abl | Include file references, from `{` to `}` |
137
142
  |meta.include.argument.abl | Include argument references like `&arg` and `&arg=` |
138
- |meta.preprocessor.define.abl | Preprocessor definitions for `&global-define` and `&scoped-define` |
143
+ |meta.preprocessor.abl | Preprocessor definitions, functions and usage |
139
144
  |meta.procedure.abl | An internal procedure definition, from the `procedure` keyword to its closing `:` or `.` |
140
- |meta.statements.abl | All ABL statmements |
145
+ |meta.statements.abl | All ABL statements |
141
146
  |meta.using.abl | A `using` definition |
142
147
 
143
148
  ## Checking scopes