moitie gragment 0
This commit is contained in:
@@ -42,6 +42,11 @@ public class Program{
|
||||
return v.visitReturn(this,h);
|
||||
}
|
||||
}
|
||||
public static record AssignImp(String t, Expression e) implements Instruction{
|
||||
public <H, S> S accept(InstrVisitor<H, S> v, H h) {
|
||||
return v.visitAssign(this, h);
|
||||
}
|
||||
}
|
||||
|
||||
public static record Type_voidImp() implements Type{
|
||||
public String prettyprinter() {
|
||||
@@ -88,6 +93,12 @@ public class Program{
|
||||
ExprEval exprEval = new ExprEval();
|
||||
return e.e().accept(exprEval, h);
|
||||
}
|
||||
@Override
|
||||
public Integer visitAssign(AssignImp e, Map<String, Integer> h) {
|
||||
//h.put(e.t(), e.e());
|
||||
//TODO
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExprEval implements ExprVisitor<Map<String,Integer>,Integer>{
|
||||
|
||||
Reference in New Issue
Block a user