@willbooster/tree-sitter-zig 5.0.1 → 5.1.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.
- package/README.md +2 -0
- package/grammar.js +4 -1
- package/package.json +1 -1
- package/queries/highlights.scm +2 -0
- package/src/node-types.json +15 -1
- package/tree-sitter-zig.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,8 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
|
|
|
26
26
|
`~x`) or only continue one (`+`, `orelse`), and so do ranges outside `for` loops.
|
|
27
27
|
- A NUL character inside a token such as a string or a comment is part of that token, where upstream's lexer reports
|
|
28
28
|
an error.
|
|
29
|
+
- Multiline strings expose each `\\` line delimiter and nonempty `string_content` children. The delimiters receive
|
|
30
|
+
the `@string.special.symbol` highlight capture. Line endings are outside the content nodes.
|
|
29
31
|
|
|
30
32
|
- Error sets are accepted directly as container field types, and pointer and slice element types may be conditional.
|
|
31
33
|
- `async` and `await` are ordinary identifiers. Assembly clobbers use an expression, including an anonymous struct
|
package/grammar.js
CHANGED
|
@@ -798,7 +798,10 @@ module.exports = grammar({
|
|
|
798
798
|
'"',
|
|
799
799
|
),
|
|
800
800
|
|
|
801
|
-
multiline_string:
|
|
801
|
+
multiline_string: $ => prec.right(repeat1(seq(
|
|
802
|
+
'\\\\',
|
|
803
|
+
optional(alias(token.immediate(prec(1, /[^\r\n]+/)), $.string_content)),
|
|
804
|
+
))),
|
|
802
805
|
|
|
803
806
|
escape_sequence: _ => token(prec(1, seq(
|
|
804
807
|
'\\',
|
package/package.json
CHANGED
package/queries/highlights.scm
CHANGED
package/src/node-types.json
CHANGED
|
@@ -1827,7 +1827,17 @@
|
|
|
1827
1827
|
{
|
|
1828
1828
|
"type": "multiline_string",
|
|
1829
1829
|
"named": true,
|
|
1830
|
-
"fields": {}
|
|
1830
|
+
"fields": {},
|
|
1831
|
+
"children": {
|
|
1832
|
+
"multiple": true,
|
|
1833
|
+
"required": false,
|
|
1834
|
+
"types": [
|
|
1835
|
+
{
|
|
1836
|
+
"type": "string_content",
|
|
1837
|
+
"named": true
|
|
1838
|
+
}
|
|
1839
|
+
]
|
|
1840
|
+
}
|
|
1831
1841
|
},
|
|
1832
1842
|
{
|
|
1833
1843
|
"type": "nosuspend_expression",
|
|
@@ -2828,6 +2838,10 @@
|
|
|
2828
2838
|
"type": "[",
|
|
2829
2839
|
"named": false
|
|
2830
2840
|
},
|
|
2841
|
+
{
|
|
2842
|
+
"type": "\\\\",
|
|
2843
|
+
"named": false
|
|
2844
|
+
},
|
|
2831
2845
|
{
|
|
2832
2846
|
"type": "]",
|
|
2833
2847
|
"named": false
|
package/tree-sitter-zig.wasm
CHANGED
|
Binary file
|