public WhileAction(ParseInfo parseInfo, Scope scope, DeltinScriptParser.WhileContext whileContext)
        {
            if (whileContext.expr() == null)
            {
                parseInfo.Script.Diagnostics.Error("Expected expression.", DocRange.GetRange(whileContext.LEFT_PAREN()));
            }
            else
            {
                Condition = DeltinScript.GetExpression(parseInfo, scope, whileContext.expr());
            }

            Block = new BlockAction(parseInfo, scope, whileContext.block());
            Path  = new PathInfo(Block, DocRange.GetRange(whileContext.WHILE()), false);
        }
 public WhileNode(DeltinScriptParser.WhileContext context, BuildAstVisitor visitor) : base(new Location(visitor.file, DocRange.GetRange(context)))
 {
     Expression = visitor.VisitExpr(context.expr());
     Block      = (BlockNode)visitor.VisitBlock(context.block());
     errorRange = new Location(visitor.file, DocRange.GetRange(context.WHILE()));
 }