|
|
|
@ -6,48 +6,10 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import chocopy.common.analysis.AbstractNodeAnalyzer;
|
|
|
|
|
import chocopy.common.analysis.SymbolTable;
|
|
|
|
|
import chocopy.common.astnodes.AssignStmt;
|
|
|
|
|
import chocopy.common.astnodes.BinaryExpr;
|
|
|
|
|
import chocopy.common.astnodes.BooleanLiteral;
|
|
|
|
|
import chocopy.common.astnodes.CallExpr;
|
|
|
|
|
import chocopy.common.astnodes.ClassDef;
|
|
|
|
|
import chocopy.common.astnodes.ClassType;
|
|
|
|
|
import chocopy.common.astnodes.CompilerError;
|
|
|
|
|
import chocopy.common.astnodes.Errors;
|
|
|
|
|
import chocopy.common.astnodes.Expr;
|
|
|
|
|
import chocopy.common.astnodes.ExprStmt;
|
|
|
|
|
import chocopy.common.astnodes.ForStmt;
|
|
|
|
|
import chocopy.common.astnodes.FuncDef;
|
|
|
|
|
import chocopy.common.astnodes.GlobalDecl;
|
|
|
|
|
import chocopy.common.astnodes.Identifier;
|
|
|
|
|
import chocopy.common.astnodes.IfExpr;
|
|
|
|
|
import chocopy.common.astnodes.IfStmt;
|
|
|
|
|
import chocopy.common.astnodes.IndexExpr;
|
|
|
|
|
import chocopy.common.astnodes.IntegerLiteral;
|
|
|
|
|
import chocopy.common.astnodes.ListExpr;
|
|
|
|
|
import chocopy.common.astnodes.ListType;
|
|
|
|
|
import chocopy.common.astnodes.MemberExpr;
|
|
|
|
|
import chocopy.common.astnodes.MethodCallExpr;
|
|
|
|
|
import chocopy.common.astnodes.NonLocalDecl;
|
|
|
|
|
import chocopy.common.astnodes.NoneLiteral;
|
|
|
|
|
import chocopy.common.astnodes.Program;
|
|
|
|
|
import chocopy.common.astnodes.ReturnStmt;
|
|
|
|
|
import chocopy.common.astnodes.Stmt;
|
|
|
|
|
import chocopy.common.astnodes.StringLiteral;
|
|
|
|
|
import chocopy.common.astnodes.TypedVar;
|
|
|
|
|
import chocopy.common.astnodes.UnaryExpr;
|
|
|
|
|
import chocopy.common.astnodes.VarDef;
|
|
|
|
|
import chocopy.common.astnodes.WhileStmt;
|
|
|
|
|
import chocopy.common.astnodes.*;
|
|
|
|
|
import chocopy.common.analysis.types.*;
|
|
|
|
|
import chocopy.common.codegen.*;
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
|
|
import static chocopy.common.codegen.RiscVBackend.Register.*;
|
|
|
|
|
import chocopy.common.codegen.RiscVBackend.Register;
|
|
|
|
|
|
|
|
|
|