fixed missing empty constructor in Testfiles

This commit is contained in:
JonathanFleischmann 2024-05-14 09:50:08 +02:00
parent fb7a7d8230
commit 71560cf163
3 changed files with 35 additions and 6 deletions

View File

@ -2,10 +2,8 @@
// int x;
//}
import de.maishai.ast.records.*;
import de.maishai.ast.records.Class;
import de.maishai.ast.records.Constructor;
import de.maishai.ast.records.Declaration;
import de.maishai.ast.records.Method;
import de.maishai.typedast.Type;
import java.util.List;
@ -19,7 +17,17 @@ public class AbstractSyntax_ClassWithField {
)
);
List<Method> methods = List.of();
List<Constructor> constructors = List.of();
List<Constructor> constructors =
List.of(
new Constructor(
"ClassWithField",
List.of(),
new Block(
List.of(),
List.of()
)
)
);
return new Class(
"ClassWithField",
declarations,

View File

@ -17,7 +17,16 @@ public class AbstractSyntax_ClassWithMethod {
"ClassWithMethod",
List.of(),
methods,
List.of()
List.of(
new Constructor(
"ClassWithMethod",
List.of(),
new Block(
List.of(),
List.of()
)
)
)
);
}

View File

@ -1,7 +1,9 @@
//public class PublicClass {
//}
import de.maishai.ast.records.Block;
import de.maishai.ast.records.Class;
import de.maishai.ast.records.Constructor;
import java.util.List;
@ -11,7 +13,17 @@ public class AbstractSyntax_PublicClass {
"PublicClass",
List.of(),
List.of(),
List.of()
List.of(
new Constructor(
"PublicClass",
List.of(),
new Block(
List.of(),
List.of()
)
)
)
);
}
}