Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public ScriptBlockStatement()
 {
     Statements = new ScriptList <ScriptStatement>();
 }
Beispiel #4
0
 public ScriptFunctionCall()
 {
     Arguments = new ScriptList <ScriptExpression>();
 }
Beispiel #5
0
 public ScriptWhenStatement()
 {
     WhenKeyword = ScriptKeyword.When();
     Values      = new ScriptList <ScriptExpression>();
 }
 public ScriptObjectInitializerExpression()
 {
     OpenBrace  = ScriptToken.OpenBrace();
     Members    = new ScriptList <ScriptObjectMember>();
     CloseBrace = ScriptToken.CloseBrace();
 }
Beispiel #7
0
 public ScriptListDebug(ScriptList list)
 {
     _children = list._children;
 }
 public ScriptArrayInitializerExpression()
 {
     OpenBracketToken  = ScriptToken.OpenBracket();
     Values            = new ScriptList <ScriptExpression>();
     CloseBracketToken = ScriptToken.CloseBracket();
 }