Skip to main content

Crate tree_sitter_ktav

Crate tree_sitter_ktav 

Source
Expand description

Tree-sitter grammar for Ktav (כְּתָב) — the Written Configuration Format.

Spec: https://github.com/ktav-lang/spec/blob/main/versions/0.6/spec.md

§Example

let mut parser = tree_sitter::Parser::new();
parser
    .set_language(&tree_sitter_ktav::LANGUAGE.into())
    .expect("loading Ktav grammar");
let tree = parser.parse("name: Russia\n", None).unwrap();
println!("{}", tree.root_node().to_sexp());

Constants§

HIGHLIGHTS_QUERY
The syntax-highlight query (queries/highlights.scm).
INJECTIONS_QUERY
The injection query (queries/injections.scm).
LANGUAGE
The tree-sitter [Language][tree_sitter::Language] for the Ktav grammar.
LOCALS_QUERY
The local-variable / scope query (queries/locals.scm).
NODE_TYPES
The node-types.json describing every node kind in this grammar.