Skip to main content

get_syntax_graph

Function get_syntax_graph 

Source
pub fn get_syntax_graph(
    ast_graph: &AstGraph,
    content: &Content,
    with_cfg: Option<bool>,
    with_metadata: Option<bool>,
) -> Option<SyntaxGraph>
Expand description

Builds ast_graph’s syntax graph and applies the CFG overlay.

with_cfg defaults to on, with_metadata to off. Returns None when the language has no syntax dispatcher yet, the AST graph is malformed, or the CFG overlay hits a syntax shape its builder cannot handle.