mirror of
https://github.com/gorules/zen.git
synced 2026-10-07 08:02:21 +00:00
feat: custom node (#138)
* feat: custom node * add zen template, expose $nodes and $root * add custom handler to go and nodejs * add support for python, improve bindings, add error to zen template * fix: correct binding exports for nodejs and python * fix benchmark * improve rust api, trim template in zen templates * update cargo action * update expression version * compile action * fix action format
This commit is contained in:
@@ -280,7 +280,11 @@ impl<'arena, 'token_ref, Flavor> Parser<'arena, 'token_ref, Flavor> {
|
||||
self.next()?;
|
||||
let current_token = self.current();
|
||||
if current_token.kind != TokenKind::Bracket(Bracket::LeftParenthesis) {
|
||||
let identifier_node = self.node(Node::Identifier(identifier_token.value));
|
||||
let identifier_node = match identifier_token.kind {
|
||||
TokenKind::Identifier(Identifier::RootReference) => self.node(Node::Root),
|
||||
_ => self.node(Node::Identifier(identifier_token.value)),
|
||||
};
|
||||
|
||||
return self
|
||||
.with_postfix(identifier_node, expression_parser)
|
||||
.map(Some);
|
||||
|
||||
Reference in New Issue
Block a user