public static void AddVariableReference(this AstNode node, GeneroAst ast, bool bindNames, object reference) { if (bindNames) { ast.SetAttribute(node, VariableReference, reference); } }
protected void UpdateNodeAndTree(AstNode node, GeneroAst ast) { node.PropagateSyntaxTree(ast); if (_verbatim) { if (_lookahead.Token != null) { AddExtraVerbatimText(node, _lookaheadWhiteSpace + _lookahead.Token.VerbatimImage); } AddCodeRegions(node); AddNonCodeRegionComments(node); _codeRegions.Clear(); _nonCodeRegionComments.Clear(); } foreach (var keyValue in _attributes) { foreach (var nodeAttr in keyValue.Value) { ast.SetAttribute(keyValue.Key, nodeAttr.Key, nodeAttr.Value); } } }