@willbooster/web-tree-sitter 4.0.4 → 5.0.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/dsl.d.ts CHANGED
@@ -27,6 +27,7 @@ export type AliasRule = { type: 'ALIAS'; named: boolean; content: Rule; value: s
27
27
  export type BlankRule = { type: 'BLANK' };
28
28
  export type ChoiceRule = { type: 'CHOICE'; members: Rule[] };
29
29
  export type FieldRule = { type: 'FIELD'; name: string; content: Rule };
30
+ export type NonkeywordTokenRule = { type: 'NONKEYWORD_TOKEN'; content: Rule };
30
31
  export type ImmediateTokenRule = { type: 'IMMEDIATE_TOKEN'; content: Rule };
31
32
  export type PatternRule = { type: 'PATTERN'; value: string; flags?: string };
32
33
  export type PrecedenceValue = string | number;
@@ -50,6 +51,7 @@ export type Rule =
50
51
  | ChoiceRule
51
52
  | FieldRule
52
53
  | ImmediateTokenRule
54
+ | NonkeywordTokenRule
53
55
  | PatternRule
54
56
  | PrecDynamicRule
55
57
  | PrecLeftRule
@@ -408,6 +410,9 @@ export interface DSL {
408
410
  * @param rule rule to represent as an immediate token
409
411
  */
410
412
  immediate(this: void, rule: RuleOrLiteral): ImmediateTokenRule;
413
+
414
+ /** Matches a token directly, without extracting it as a keyword of the grammar's word token. */
415
+ nonkeyword(this: void, rule: RuleOrLiteral): NonkeywordTokenRule;
411
416
  };
412
417
 
413
418
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/web-tree-sitter",
3
- "version": "4.0.4",
3
+ "version": "5.0.0",
4
4
  "description": "Tree-sitter bindings for the web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -646,7 +646,7 @@ var require_web_tree_sitter = __commonJS({
646
646
  }, "convertJsFunctionToWasm");
647
647
  var wasmTableMirror = [];
648
648
  var wasmTable = new WebAssembly.Table({
649
- "initial": 33,
649
+ "initial": 35,
650
650
  "element": "anyfunc"
651
651
  });
652
652
  var getWasmTableEntry = /* @__PURE__ */ __name((funcPtr) => {