Skip to main content

Crate wegglix

Crate wegglix 

Source

Modules§

builder
capture
query
result

Structs§

RegexMap
Map from variable names to a positive/negative regex constraint see –regex

Enums§

WeggliError

Functions§

get_parser
parse
Helper function to parse an input string into a tree-sitter tree, using our own slightly modified C grammar. This function won’t fail but the returned Tree might be invalid and contain errors.
parse_search_pattern
Translate the search pattern in pattern into a weggli QueryTree. is_cpp enables C++ mode. force_query can be used to allow queries with syntax errors. We support some basic normalization (adding { } around queries) and store the normalized form in normalized_patterns to avoid lifetime issues.