public virtual void Visit(ScriptList list) { if (list == null) { return; } var count = list.ChildrenCount; for (int i = 0; i < count; i++) { var child = list[i]; Visit(child); } }
protected ScriptList <TNode> VisitAll <TNode>(ScriptList <TNode> nodes) where TNode : ScriptNode { if (nodes == null) { return(null); } var newNodes = new ScriptList <TNode>(); foreach (var node in nodes) { var newNode = (TNode)Visit(node); newNodes.Add(newNode); } return(newNodes); }
public ScriptBlockStatement() { Statements = new ScriptList <ScriptStatement>(); }
public ScriptFunctionCall() { Arguments = new ScriptList <ScriptExpression>(); }
public ScriptWhenStatement() { WhenKeyword = ScriptKeyword.When(); Values = new ScriptList <ScriptExpression>(); }
public ScriptObjectInitializerExpression() { OpenBrace = ScriptToken.OpenBrace(); Members = new ScriptList <ScriptObjectMember>(); CloseBrace = ScriptToken.CloseBrace(); }
public ScriptListDebug(ScriptList list) { _children = list._children; }
public ScriptArrayInitializerExpression() { OpenBracketToken = ScriptToken.OpenBracket(); Values = new ScriptList <ScriptExpression>(); CloseBracketToken = ScriptToken.CloseBracket(); }