Endabgabe #20

Merged
i22035 merged 137 commits from Endabgabe into main 2024-07-05 11:59:47 +00:00
4 changed files with 8 additions and 2 deletions
Showing only changes of commit e5dcbb8f99 - Show all commits

View File

@ -834,6 +834,12 @@ public class ASTBuilder extends SimpleJavaBaseVisitor<ASTNode> {
*
* @param ctx the dot subtraction expression context
* @return the AST node for the dot subtraction expression
*//**
* Creates an ITypeNode based on the type identifier.
* It handles basic types and reference types.
*
* @param identifier the type identifier
* @return the type node
*/
@Override
public ASTNode visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) {

View File

@ -633,7 +633,7 @@ class AstBuilderTest {
LocalVariableDeclarationNode forDeclaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
AssignableNode assignable = new AssignableNode("i");
IncrementNode increment = new IncrementNode(CrementType.SUFFIX, assignable);
IncrementNode increment = new IncrementNode(CrementType.PREFIX, assignable);
LocalVariableDeclarationNode declaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "a", null, null);

View File

@ -1,7 +1,7 @@
class For{
public For(){
for(int i = 0; i < 10; i++){
for(int i = 0; i < 10; ++i){
int a;
}
}