Skip to main content

import_tree_sitter_json

Function import_tree_sitter_json 

Source
pub fn import_tree_sitter_json(
    text: &str,
) -> Result<Grammar, GrammarImportError>
Expand description

Parses tree-sitter grammar.json text into the grammar IR.

ยงErrors

Returns GrammarImportError when the JSON cannot be parsed or validated, or when a node type cannot be represented in the grammar IR.