Пример #1
0
 protected override ICode VisitStoreObj(StmtStoreObj s) {
     this.NewLine();
     switch (s.Destination.ExprType) {
     case Expr.NodeType.ElementAddress:
         this.Visit(s.Destination);
         break;
     case Expr.NodeType.VarLocal:
     case Expr.NodeType.VarParameter:
         this.Visit(s.Destination);
         this.js.Append("[0]");
         break;
     default:
         throw new NotImplementedException("Cannot handle expr-type: " + s.Destination.ExprType);
     }
     this.js.Append(" = ");
     this.Visit(s.Source);
     this.js.Append(";");
     return s;
 }
Пример #2
0
 protected override ICode VisitStoreObj(StmtStoreObj s) {
     this.NewLine();
     this.code.Append("*");
     this.Visit(s.Destination);
     this.code.Append(" = ");
     this.Visit(s.Source);
     return s;
 }