Endabgabe #20
@ -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) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
class For{
|
||||
|
||||
public For(){
|
||||
for(int i = 0; i < 10; i++){
|
||||
for(int i = 0; i < 10; ++i){
|
||||
int a;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user