Function rubble_templates_evaluators::parser::parse_ast [−][src]
pub fn parse_ast(source: &str, code_start: &str, code_end: &str) -> SyntaxNode
Used for parsing AST for further evaluation.
This function tries to parse AST assuming it is Lisp-like syntax, which is practically
function arg0 arg1 arg2, where function is the function name, and arg0... are the arguments.
It also allows to use parenthesis to evaluate a nested function.
Reserved characters (cannot be used in names):
- space(- left parenthesis)- right parenthesis
Examples:
(function 1 2 3)- interpreted asfunctioncall with parameters1,2and3plus 1 2 (times 3 4)- interpreted as1 + 2 + (3 * 4), givenplusis an addition function andtimesis a multiplication function