Esempio n. 1
0
 public void AddToContainerIfEmittable(SymTokenContainer aContainer)
 {
     if (Emit)
     {
         aContainer.Append(Token);
     }
 }
Esempio n. 2
0
 public void ExtractTokens(IEnumerable aEnumerable, bool aIgnoreWhiteSpace, bool aRecurse, SymTokenContainer aContainer)
 {
     foreach (SymNode node in aEnumerable)
     {
         if (node.HasChildren)
         {
             if (aRecurse)
             {
                 ExtractTokens(node, aIgnoreWhiteSpace, aRecurse, aContainer);
             }
             else
             {
                 // Ignore - its just a placeholder for child nodes
             }
         }
         else if (node is SymNodeToken)
         {
             SymNodeToken tokenNode = (SymNodeToken)node;
             if (!(aIgnoreWhiteSpace && tokenNode.Token.Class == SymToken.TClass.EClassWhiteSpace) || aIgnoreWhiteSpace == false)
             {
                 aContainer.Append(tokenNode.Token);
             }
         }
         else if (NodeIsExtractable(node))
         {
             ExtractToContainer(node, aContainer);
         }
     }
 }