Exemplo n.º 1
0
 protected override ICode VisitInitObj(StmtInitObj s) {
     this.NewLine();
     this.code.AppendFormat("init-object<{0}>(", s.Type.Name);
     this.Visit(s.Destination);
     this.code.Append(")");
     return s;
 }
Exemplo n.º 2
0
 protected override ICode VisitInitObj(StmtInitObj s) {
     this.NewLine();
     this.Visit(s.Destination);
     this.js.Append(" = ");
     var defaultValue = DefaultValuer.Get(s.Type, this.resolver.FieldNames);
     this.js.Append(defaultValue);
     this.js.Append(";");
     return s;
 }
Exemplo n.º 3
0
 private Stmt InitObj(TypeReference type) {
     var expr = this.stack.Pop();
     var stmt = new StmtInitObj(this.ctx, expr, type);
     return stmt;
 }