mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 16:48:03 +00:00
refactor conversion
This commit is contained in:
parent
0aa5976bc1
commit
4646a4d8d1
@ -6,6 +6,5 @@ import java.util.Map;
|
||||
|
||||
public interface Node {
|
||||
Type typeCheck(Map<String, Type> localVar, Map<String, Class> classes);
|
||||
Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes);
|
||||
|
||||
Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes, de.maishai.ast.records.Node c);
|
||||
}
|
||||
|
@ -27,12 +27,17 @@ public class Class implements Node {
|
||||
Map<String, Type> local = new HashMap<>();
|
||||
Map<String, Class> classMap = new HashMap<>();
|
||||
|
||||
return convertToTypedAST(local, classMap);
|
||||
return convertToTypedAST(local, classMap, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes) {
|
||||
return null;
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes, de.maishai.ast.records.Node untyped) {
|
||||
Class typedClass = new Class();
|
||||
|
||||
for (Field field: fields) {
|
||||
|
||||
}
|
||||
return typedClass;
|
||||
}
|
||||
|
||||
public void codeGen() {
|
||||
|
@ -17,7 +17,9 @@ public class Field implements Node {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes) {
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes, de.maishai.ast.records.Node c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,9 @@ public class Method implements Node {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes) {
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes, de.maishai.ast.records.Node c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,9 @@ public class Parameter implements Node {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes) {
|
||||
public Node convertToTypedAST(Map<String, Type> localVar, Map<String, Class> classes, de.maishai.ast.records.Node c) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user