tree-sitter-omega
aien-dev/tree-sitter-omega
Brought by drakestapleton
tree-sitter-omega / bindings / node / index.d.ts
| 1 | type BaseNode = { |
| 2 | type: string; |
| 3 | named: boolean; |
| 4 | }; |
| 5 | |
| 6 | type ChildNode = { |
| 7 | multiple: boolean; |
| 8 | required: boolean; |
| 9 | types: BaseNode[]; |
| 10 | }; |
| 11 | |
| 12 | type NodeInfo = |
| 13 | | (BaseNode & { |
| 14 | subtypes: BaseNode[]; |
| 15 | }) |
| 16 | | (BaseNode & { |
| 17 | fields: { [name: string]: ChildNode }; |
| 18 | children: ChildNode[]; |
| 19 | }); |
| 20 | |
| 21 | /** |
| 22 | * The tree-sitter language object for this grammar. |
| 23 | * |
| 24 | * @see {@linkcode https://tree-sitter.github.io/node-tree-sitter/interfaces/Language.html Parser.Language} |
| 25 | * |
| 26 | * @example |
| 27 | * import Parser from "tree-sitter"; |
| 28 | * import Omega from "tree-sitter-omega"; |
| 29 | * |
| 30 | * const parser = new Parser(); |
| 31 | * parser.setLanguage(Omega); |
| 32 | */ |
| 33 | declare const binding: { |
| 34 | /** |
| 35 | * The inner language object. |
| 36 | * @private |
| 37 | */ |
| 38 | language: unknown; |
| 39 | |
| 40 | /** |
| 41 | * The content of the `node-types.json` file for this grammar. |
| 42 | * |
| 43 | * @see {@linkplain https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types Static Node Types} |
| 44 | */ |
| 45 | nodeTypeInfo: NodeInfo[]; |
| 46 | |
| 47 | /** The syntax highlighting query for this grammar. */ |
| 48 | HIGHLIGHTS_QUERY?: string; |
| 49 | |
| 50 | /** The language injection query for this grammar. */ |
| 51 | INJECTIONS_QUERY?: string; |
| 52 | |
| 53 | /** The local variable query for this grammar. */ |
| 54 | LOCALS_QUERY?: string; |
| 55 | |
| 56 | /** The symbol tagging query for this grammar. */ |
| 57 | TAGS_QUERY?: string; |
| 58 | }; |
| 59 | |
| 60 | export default binding; |