Compare commits
No commits in common. "91f7db24f6d604f5b2bb93ff648d4a7d08b2212e" and "6250ee781c4b67562f98e00f91d998d6f4b529a1" have entirely different histories.
91f7db24f6
...
6250ee781c
@ -1,10 +1,8 @@
|
|||||||
package ast;
|
package ast;
|
||||||
|
|
||||||
import ast.expression.ExpressionNode;
|
import ast.expression.ExpressionNode;
|
||||||
import semantic.SemanticVisitor;
|
|
||||||
import typechecker.TypeCheckResult;
|
|
||||||
|
|
||||||
public class LiteralNode implements ExpressionNode {
|
public class LiteralNode extends ExpressionNode {
|
||||||
|
|
||||||
int value;
|
int value;
|
||||||
private String type;
|
private String type;
|
||||||
@ -22,8 +20,4 @@ public class LiteralNode implements ExpressionNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TypeCheckResult accept(SemanticVisitor visitor) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
package ast.expression;
|
package ast.expression;
|
||||||
|
|
||||||
import semantic.SemanticVisitor;
|
public class BinaryExpressionNode extends ExpressionNode {
|
||||||
import typechecker.TypeCheckResult;
|
|
||||||
|
|
||||||
public class BinaryExpressionNode implements ExpressionNode {
|
|
||||||
public ExpressionNode left;
|
public ExpressionNode left;
|
||||||
public ExpressionNode right;
|
public ExpressionNode right;
|
||||||
public String operator; // Stores the operator as a string (e.g., "+", "-", "&&")
|
public String operator; // Stores the operator as a string (e.g., "+", "-", "&&")
|
||||||
@ -13,9 +10,4 @@ public class BinaryExpressionNode implements ExpressionNode {
|
|||||||
this.right = right;
|
this.right = right;
|
||||||
this.operator = operator;
|
this.operator = operator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TypeCheckResult accept(SemanticVisitor visitor) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,18 +1,9 @@
|
|||||||
package ast.expression;
|
package ast.expression;
|
||||||
|
|
||||||
import semantic.SemanticVisitor;
|
public class IdentifierExpressionNode extends ExpressionNode {
|
||||||
import typechecker.TypeCheckResult;
|
|
||||||
import typechecker.Visitable;
|
|
||||||
|
|
||||||
public class IdentifierExpressionNode implements ExpressionNode {
|
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
public IdentifierExpressionNode(String name) {
|
public IdentifierExpressionNode(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TypeCheckResult accept(SemanticVisitor visitor) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
package ast.expression;
|
package ast.expression;
|
||||||
|
|
||||||
import semantic.SemanticVisitor;
|
public class UnaryExpressionNode extends ExpressionNode {
|
||||||
import typechecker.TypeCheckResult;
|
|
||||||
|
|
||||||
public class UnaryExpressionNode implements ExpressionNode {
|
|
||||||
public ExpressionNode expression;
|
public ExpressionNode expression;
|
||||||
public String operator; // Stores the operator (e.g., "-", "!")
|
public String operator; // Stores the operator (e.g., "-", "!")
|
||||||
|
|
||||||
@ -11,9 +8,4 @@ public class UnaryExpressionNode implements ExpressionNode {
|
|||||||
this.expression = expression;
|
this.expression = expression;
|
||||||
this.operator = operator;
|
this.operator = operator;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public TypeCheckResult accept(SemanticVisitor visitor) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user