Ejemplo n.º 1
0
 public static void AddVariableReference(this AstNode node, GeneroAst ast, bool bindNames, object reference)
 {
     if (bindNames)
     {
         ast.SetAttribute(node, VariableReference, reference);
     }
 }
Ejemplo n.º 2
0
 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);
         }
     }
 }