Esempio n. 1
0
 public ScriptForEachStatement(AstNodeArgs args)
     : base(args)
 {
     _name      = (TokenAst)ChildNodes[1];
     _expr      = (ScriptExpr)ChildNodes[3];
     _statement = (ScriptStatement)ChildNodes[4];
 }
Esempio n. 2
0
 public ScriptTryCatchFinallyStatement(AstNodeArgs args)
     : base(args)
 {
     _tryBlock     = ChildNodes[1] as ScriptStatement;
     _expName      = ((TokenAst)ChildNodes[3]).Text;
     _catchBlock   = ChildNodes[4] as ScriptStatement;
     _finallyBlock = ChildNodes[6] as ScriptStatement;
 }
Esempio n. 3
0
 public ScriptIfStatement(AstNodeArgs args)
     : base(args)
 {
     _condition = (ScriptCondition)ChildNodes[1];
     _statement = (ScriptStatement)ChildNodes[2];
     //Else exists
     if (ChildNodes.Count == 4 && ChildNodes[3].ChildNodes.Count == 2 && ChildNodes[3].ChildNodes[1] is ScriptStatement)
     {
         _elseStatement = (ScriptStatement)ChildNodes[3].ChildNodes[1];
     }
 }
Esempio n. 4
0
        public ScriptForStatement(AstNodeArgs args)
            : base(args)
        {
            _init      = (ScriptExpr)args.ChildNodes[1];
            _cond      = (ScriptExpr)args.ChildNodes[2];
            _next      = (ScriptExpr)args.ChildNodes[3];
            _statement = (ScriptStatement)args.ChildNodes[4];

            var body = _statement as ScriptCompoundStatement;

            if (body != null)
            {
                body.ShouldCreateScope = false;
            }
        }
Esempio n. 5
0
 public ScriptSwitchDefaultStatement(AstNodeArgs args)
     : base(args)
 {
     Statement = ChildNodes[2] as ScriptStatement;
 }
Esempio n. 6
0
 public ScriptWhileStatement(AstNodeArgs args)
     : base(args)
 {
     Condition = args.ChildNodes[1] as ScriptCondition;
     Statement = args.ChildNodes[2] as ScriptStatement;
 }
Esempio n. 7
0
 public ScriptSwitchCaseStatement(AstNodeArgs args)
     : base(args)
 {
     _cond      = ChildNodes[1] as ScriptExpr;
     _statement = ChildNodes[3] as ScriptStatement;
 }