@willbooster/web-tree-sitter 26.0.6 → 26.2.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 +1 -1
- package/debug/web-tree-sitter.wasm +0 -0
- package/debug/web-tree-sitter.wasm.map +5 -5
- package/dsl.d.ts +27 -0
- package/package.json +1 -1
- package/web-tree-sitter.wasm +0 -0
- package/web-tree-sitter.wasm.map +4 -4
package/dsl.d.ts
CHANGED
|
@@ -92,6 +92,9 @@ export interface Grammar<
|
|
|
92
92
|
*/
|
|
93
93
|
name: string;
|
|
94
94
|
|
|
95
|
+
/** Match string literals of the form [A-Z][A-Z0-9_]* in either ASCII case. */
|
|
96
|
+
caseInsensitiveKeywords?: boolean;
|
|
97
|
+
|
|
95
98
|
/** Mapping of grammar rule names to rule builder functions. */
|
|
96
99
|
rules: Rules;
|
|
97
100
|
|
|
@@ -229,6 +232,7 @@ export type GrammarSchema<RuleName extends string> = {
|
|
|
229
232
|
inline: string[];
|
|
230
233
|
supertypes: string[];
|
|
231
234
|
mergeable_externals?: string[];
|
|
235
|
+
case_insensitive_keywords?: boolean;
|
|
232
236
|
word: string | undefined;
|
|
233
237
|
reserved: Record<string, Rule[]>;
|
|
234
238
|
};
|
|
@@ -236,6 +240,29 @@ export type GrammarSchema<RuleName extends string> = {
|
|
|
236
240
|
|
|
237
241
|
/** Globals injected into grammar modules by the Tree-sitter CLI. */
|
|
238
242
|
export interface DSL {
|
|
243
|
+
/**
|
|
244
|
+
* Spread into rules to define a separated list with nested conditional arms.
|
|
245
|
+
* Items and separators must form a legal list in every branch. allowEmpty
|
|
246
|
+
* permits arms to project to an empty list. Wrap the list reference in
|
|
247
|
+
* optional() to also accept physically empty input.
|
|
248
|
+
* The opener and elif rules include their conditions and line terminators.
|
|
249
|
+
*/
|
|
250
|
+
conditionalList<Name extends string>(this: void, name: Name, options: {
|
|
251
|
+
item: RuleOrLiteral;
|
|
252
|
+
/** An item that must end the list in every arm where it appears. */
|
|
253
|
+
finalItem?: RuleOrLiteral;
|
|
254
|
+
separator: RuleOrLiteral;
|
|
255
|
+
open: RuleOrLiteral;
|
|
256
|
+
elif?: RuleOrLiteral;
|
|
257
|
+
else: RuleOrLiteral;
|
|
258
|
+
close: RuleOrLiteral;
|
|
259
|
+
allowEmpty?: boolean;
|
|
260
|
+
trailingSeparator?: boolean;
|
|
261
|
+
branchName?: string;
|
|
262
|
+
/** Rule used for conflict declarations and rule-based precedence. Defaults to the list name. */
|
|
263
|
+
conflictOwner?: string;
|
|
264
|
+
}): Record<Name, ($: GrammarSymbols<string>) => Rule>;
|
|
265
|
+
|
|
239
266
|
RustRegex: new (pattern: string) => RustRegex;
|
|
240
267
|
|
|
241
268
|
/**
|
package/package.json
CHANGED
package/web-tree-sitter.wasm
CHANGED
|
Binary file
|