Skip to main content

Module parse

Module parse 

Source
Expand description

CST -> AST lowering over the compiled tree-sitter grammar (parse.ts).

Structs§

ParseResult
what parsing a source text yields: the declarations and the syntax errors

Constants§

LANGUAGE
the tree-sitter grammar compiled into the crate (build.rs, from grammar/)

Functions§

json_unquote
JSON string literal -> its value (the lexer guarantees the form)
parse_expr_text
parse one expression’s text: the text is wrapped in a constant declaration; None when it does not parse
parse_int
An integer literal’s text (§2.6: decimal, 0x, 0o, 0b, _ separators) as an arbitrary-precision integer.
parse_source
Parse a module’s source text: the tree-sitter CST lowered to the AST of crate::ast, with source ranges (specification chapter 11).