Example #1
0
 public override void Load(LocalVariable variable)
 {
     Append(variable.Name());
 }
Example #2
0
 public override void TryCatchBlock <T>(System.Action <T> body, System.Action <T> handler, LocalVariable exception, T block)
 {
     Indent().Append("try\n");
     Indent().Append("{\n");
     _levels.push(_level);
     body(block);
     _levels.pop();
     Indent().Append("}\n");
     Indent().Append("catch ( ").Append(exception.Type().fullName()).Append(" ").Append(exception.Name()).Append(" )\n");
     Indent().Append("{\n");
     _levels.push(_level);
     handler(block);
     _levels.pop();
     Indent().Append("}\n");
 }
Example #3
0
 public override void AssignVariableInScope(LocalVariable local, Expression value)
 {
     Indent().Append(local.Name()).Append(" = ");
     value.Accept(this);
     Append(";\n");
 }
Example #4
0
 public override void Assign(LocalVariable variable, Expression value)
 {
     Indent().Append(variable.Type().fullName()).Append(' ').Append(variable.Name()).Append(" = ");
     value.Accept(this);
     Append(";\n");
 }
Example #5
0
 public override void Declare(LocalVariable local)
 {
     Indent().Append(local.Type().fullName()).Append(' ').Append(local.Name()).Append(";\n");
 }