Endabgabe #20

Merged
i22035 merged 137 commits from Endabgabe into main 2024-07-05 11:59:47 +00:00
Showing only changes of commit d925a3258c - Show all commits

View File

@ -253,6 +253,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (toCheck.memberAccess != null) {
var result = toCheck.memberAccess.accept(this);
toCheck.identifier = toCheck.memberAccess.identifiers.getLast();
toCheck.setTypeNode(result.getType());
return result;
} else {
@ -608,11 +609,15 @@ public class SemanticAnalyzer implements SemanticVisitor {
ITypeNode currentType = null;
int start = 0;
if(!memberAccessNode.identifiers.isEmpty()){
if(currentFields.get(memberAccessNode.identifiers.get(0)) != null){
memberAccessNode.identifiers.add(0, currentClass.identifier);
start = 1;
if(currentFields.get(memberAccessNode.identifiers.getFirst()) != null){
memberAccessNode.identifiers.addFirst(currentClass.identifier);
start++;
}
}
if(context.getClasses().get(memberAccessNode.identifiers.getFirst()) != null){
memberAccessNode.identifiers.addFirst(currentClass.identifier);
start++;
}
for (int i = start; i < memberAccessNode.identifiers.size(); i++) {
String s = memberAccessNode.identifiers.get(i);