abl-tmlanguage 1.1.3 → 1.3.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 (71) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +54 -1
  3. package/abl.tmLanguage.json +3534 -230
  4. package/azure-pipelines.yml +3 -2
  5. package/package.json +7 -6
  6. package/spec/analyze-suspend-resume/analyze-suspend-resume.spec.js +10 -10
  7. package/spec/annotations/annotation.spec.js +232 -0
  8. package/spec/array-extent/issue#5.spec.js +18 -18
  9. package/spec/blocks/finally-blocks.spec.js +90 -0
  10. package/spec/blocks/on-quit.spec.js +59 -0
  11. package/spec/comments/vscode-abl-issue#127.spec.js +165 -0
  12. package/spec/db-table-and-field/fields-except.spec.js +69 -0
  13. package/spec/db-table-and-field/foreach.spec.js +588 -0
  14. package/spec/db-table-and-field/issue#88.spec.js +120 -0
  15. package/spec/define-buffer/create-buffer.spec.js +110 -0
  16. package/spec/define-buffer/simple-single-line.spec.js +138 -0
  17. package/spec/define-parameter/simple-single-line.spec.js +140 -100
  18. package/spec/define-stream/simple-single-line.spec.js +32 -31
  19. package/spec/define-temp-table/define-index.spec.js +138 -0
  20. package/spec/define-variable/extent.spec.js +228 -0
  21. package/spec/define-variable/issue#6.spec.js +256 -198
  22. package/spec/define-variable/issue#9.spec.js +38 -32
  23. package/spec/define-variable/simple-single-line.spec.js +168 -87
  24. package/spec/define-variable/single-line-with-a-comment-at-the-end.spec.js +62 -62
  25. package/spec/define-variable/single-line-with-a-space-and-a-comment-at-the-end.spec.js +56 -56
  26. package/spec/define-variable/tm-issue#2.spec.js +20 -20
  27. package/spec/do/do-blocks.spec.js +224 -0
  28. package/spec/do/issue#3.spec.js +69 -60
  29. package/spec/function-call/nested-functions.spec.js +128 -0
  30. package/spec/function-call/vscode-abl-issue#19.spec.js +110 -107
  31. package/spec/global-scoped-define/global-define.spec.js +11 -11
  32. package/spec/global-scoped-define/scoped-define-with-procedure-keyword.spec.js +26 -26
  33. package/spec/include/abl-tmlanguage-issues#5.spec.js +40 -57
  34. package/spec/include/vscode-abl-issue#45.spec.js +15 -15
  35. package/spec/include/vscode-abl-issue#77.spec.js +129 -0
  36. package/spec/include/vscode-abl-issue#80.spec.js +40 -27
  37. package/spec/method-attribute-property-call/abl-method-attribute-call.spec.js +99 -0
  38. package/spec/method-attribute-property-call/connected-method.spec.js +30 -0
  39. package/spec/method-attribute-property-call/get-set-method-name.spec.js +96 -0
  40. package/spec/method-attribute-property-call/method-call.spec.js +112 -0
  41. package/spec/method-definition/constructor.spec.js +174 -0
  42. package/spec/method-definition/method.spec.js +320 -0
  43. package/spec/misc-statements/case-statement.spec.js +96 -0
  44. package/spec/misc-statements/copy-lob.spec.js +137 -0
  45. package/spec/misc-statements/if-then.spec.js +170 -0
  46. package/spec/misc-statements/return-statement.spec.js +53 -0
  47. package/spec/operators/operators.spec.js +78 -0
  48. package/spec/procedure-definition/empty-proc.spec.js +101 -18
  49. package/spec/procedure-definition/vscode-abl-issue#22.spec.js +46 -42
  50. package/spec/procedure-definition/vscode-abl-issue#26.spec.js +23 -16
  51. package/spec/procedure-definition/vscode-abl-issue#62.spec.js +36 -0
  52. package/spec/run-statement/run-statement.spec.js +162 -0
  53. package/spec/shared.js +84 -42
  54. package/spec/strings/translation-attribute.spec.js +52 -0
  55. package/spec/strings/vscode-abl-issue#11.spec.js +110 -114
  56. package/spec/strings/vscode-abl-issue#28.spec.js +27 -27
  57. package/spec/type-name/argument.spec.js +209 -0
  58. package/spec/type-name/cast.spec.js +165 -0
  59. package/spec/type-name/define-class.spec.js +468 -0
  60. package/spec/type-name/define-enum.spec.js +44 -0
  61. package/spec/type-name/define-interface.spec.js +159 -0
  62. package/spec/type-name/define-property.spec.js +301 -0
  63. package/spec/type-name/define-temp-table.spec.js +434 -0
  64. package/spec/type-name/define-type-spec.js +435 -0
  65. package/spec/type-name/define-variable-property.spec.js +264 -0
  66. package/spec/type-name/define-variable.spec.js +504 -0
  67. package/spec/type-name/get-class.spec.js +91 -0
  68. package/spec/type-name/new.spec.js +126 -0
  69. package/spec/type-name/parameter-as.spec.js +838 -0
  70. package/spec/type-name/type-name.spec.js +879 -0
  71. package/spec/type-name/using.spec.js +115 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 1.2.0
2
+ =====
3
+ - Added support for classes
4
+
1
5
  1.1.2
2
6
  =====
3
7
  - 12.2 keywords
package/README.md CHANGED
@@ -15,6 +15,18 @@ npm test
15
15
 
16
16
  If you noticed a syntax highlight issue in the VSCode extension, please try to create a failing test case first, and then modify the grammar accordingly.
17
17
 
18
+ ## Debugging
19
+ Clone the https://github.com/microsoft/vscode-textmate repo locally (represented by /path/to/vscode-textmate).
20
+
21
+ Debug ABL statement(s) using the command below.
22
+
23
+ ```
24
+ cd path/to/vscode-textmate
25
+ node out/tests/inspect.js /path/to/abl-tmlanguage/abl.tmLanguage.json /path/to/abl-tmlanguage/debug-in.txt > /path/to/abl-tmlanguage/debug-out.txt
26
+ ```
27
+
28
+ The `/path/to/abl-tmlanguage/debug-out.txt` file contains the line-by-line resolution of the code using rules defined in the abl-tmlanguage.json file.
29
+
18
30
  # Notes
19
31
  ## VSCode extension
20
32
  You can test this grammar locally with the associated VSCode extension:
@@ -41,11 +53,52 @@ If you prefer the plist format, or the YAML one, there is an extension for VSCod
41
53
  Note: I plan on using the YAML syntax (even more compact and readable) but it needs a build step as VSCode does not handle YAML natively.
42
54
 
43
55
  ## Tokenize
44
- This project use the [vscode-textmate](https://www.npmjs.com/package/vscode-textmate) package to tokenize and test the grammar.
56
+ This project uses the [vscode-textmate](https://www.npmjs.com/package/vscode-textmate) package to tokenize and test the grammar.
45
57
 
46
58
  ## Keywords
47
59
  Part of this grammar is generated from a keyword list file.
48
60
  See [index.js].
49
61
 
62
+ # Scopes
63
+
64
+ 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 .
65
+
66
+ | Scope Name | Used for/by |
67
+ | ------------- | ------------- |
68
+ |comment.block.source.abl | Everything between `/*` and `*/` |
69
+ |comment.line.double-slash.abl | Everything in a `//` comment, incl slashes |
70
+ |comment.preprocessor.analyze-suspend.abl | `&analyze-suspend`, `&analyze-resume` |
71
+ |constant.character.escape.abl | `~` and the next char |
72
+ |constant.language.abl | `today`, `now`, `true`, `false`, `yes`, `no`, `?` (unknown value) |
73
+ |constant.language.source.abl | `99/99/9999` (or similar) when used as a format clause |
74
+ |constant.numeric.source.abl | 0x00-0xFF, 0-9 |
75
+ |entity.name.function.abl | Method call, property call, procedure name, method name, property name, handle attributes, handle methods |
76
+ |entity.name.function.preprocessor.abl | `&scoped-define`, `&global-define` |
77
+ |entity.name.package.abl | Package names for `USING` |
78
+ |entity.name.tag.abl | Annotation names |
79
+ |entity.name.type.abl | Class/interface/enum names |
80
+ |entity.name.type.generic.abl | Generic type names |
81
+ |entity.other.attribute-name.abl | Annotation attribute names |
82
+ |keyword.operator.source.abl | `contains`, `begins`, `matches`, `eq`, `le`, `lt`, `ge`, `gt`, `ne`, `<=`, `<>`, `>=`, `=`, `+`, `-`, `/`, `<`, `>`, `*` |
83
+ |keyword.other.abl | Any ABL keyword (incl those covered by other scopes) |
84
+ |punctuation.definition.string.begin.abl | Start of a quoted string |
85
+ |punctuation.definition.string.end.abl | End of a quoted string |
86
+ |punctuation.section.abl | `{` and `}` |
87
+ |punctuation.separator.comma.abl | `,` |
88
+ |punctuation.separator.period.abl | `.` |
89
+ |punctuation.separator.colon.abl | `:` |
90
+ |punctuation.terminator.abl | `.` and `:` |
91
+ |storage.data.table.abl | (Temp-)Table names, field names, index names |
92
+ |storage.type.abl | Primitive datatypes |
93
+ |storage.type.function.abl | ABL preprocessors, `defined` keyword |
94
+ |string.double.complex.abl | String in `"` quotes |
95
+ |string.single.complex.abl | String in `'` quotes |
96
+ |support.function.abl | `opsys`, `proversion`, ABL functions (eg `BASE64-ENCODE`) |
97
+ |support.other.abl | `:L`, `:R`, `:T`, `:C`, `:U` |
98
+ |support.other.argument.abl | `&<name\|number>` arguments in includes, preprocessor values |
99
+ |variable.language.abl | ABL system handles (eg `session` or `this-object`) |
100
+ |variable.other.abl | Variable names |
101
+ |variable.parameter.abl | Parameter names in method, function, procedure definition |
102
+
50
103
  # License
51
104
  MIT