internal static VarDecl Bound(LocalSymbol loc, Expr initializer, BindOptions opt)
 {
     return(new VarDecl(null, null, null, null, AssignExpr.Bound(IdExpr.Bound(loc), initializer, opt))
     {
         Symbol = loc
     });
 }
 internal override Node Bind(Binder b)
 {
     b.CreatesAutoVars = true;
     Symbol            = b.AddMemvar(Name);
     if (Initializer != null)
     {
         b.Bind(ref Initializer);
         Initializer.RequireGetAccess();
         b.Convert(ref Initializer, Var.Type);
         Initializer = AssignExpr.Bound(IdExpr.Bound(Var), Initializer, b.Options.Binding);
     }
     return(null);
 }
Exemple #3
0
 internal ForStmt(Token t, AssignExpr a, Token dir, Expr final, Expr step, Stmt s) : this(t, dir, final, step, s)
 {
     AssignExpr = a;
 }
Exemple #4
0
 private ForStmt(Token t, Token dir, Expr final, Expr step, Stmt s) : base(t)
 {
     ForDecl = null; AssignExpr = null;  Dir = dir; Final = final; Step = step; Stmt = s;
 }