Added Public to Attributes
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
978b5a2b4a
commit
d3e9fa9b43
@ -1,4 +0,0 @@
|
||||
package ast;
|
||||
|
||||
public class IdentifierNode {
|
||||
}
|
@ -3,9 +3,9 @@ package ast.expression.binaryexpression;
|
||||
import ast.ASTNode;
|
||||
|
||||
public class CalculationExpressionNode implements ASTNode {
|
||||
CalculationExpressionNode calculationExpression;
|
||||
String operator;
|
||||
DotExpressionNode dotExpression;
|
||||
public CalculationExpressionNode calculationExpression;
|
||||
public String operator;
|
||||
public DotExpressionNode dotExpression;
|
||||
|
||||
public CalculationExpressionNode(CalculationExpressionNode calculationExpression, String operator, DotExpressionNode dotExpression) {
|
||||
this.calculationExpression = calculationExpression;
|
||||
|
@ -3,9 +3,9 @@ package ast.expression.binaryexpression;
|
||||
import ast.ASTNode;
|
||||
|
||||
public class DotExpressionNode implements ASTNode {
|
||||
DotExpressionNode dotExpression;
|
||||
String operator;
|
||||
DotSubstractionExpressionNode dotSubstractionExpression;
|
||||
public DotExpressionNode dotExpression;
|
||||
public String operator;
|
||||
public DotSubstractionExpressionNode dotSubstractionExpression;
|
||||
|
||||
public DotExpressionNode(DotExpressionNode dotExpression, String operator, DotSubstractionExpressionNode dotSubstractionExpression) {
|
||||
this.dotExpression = dotExpression;
|
||||
|
@ -6,11 +6,11 @@ import ast.statement.statementexpression.methodcallstatementnexpression.MethodCa
|
||||
import ast.type.ValueNode;
|
||||
|
||||
public class DotSubstractionExpressionNode implements ASTNode {
|
||||
ValueNode value;
|
||||
String identifier;
|
||||
MemberAccessNode memberAccess;
|
||||
MethodCallStatementExpressionNode methodCall;
|
||||
CalculationExpressionNode calculationExpression;
|
||||
public ValueNode value;
|
||||
public String identifier;
|
||||
public MemberAccessNode memberAccess;
|
||||
public MethodCallStatementExpressionNode methodCall;
|
||||
public CalculationExpressionNode calculationExpression;
|
||||
|
||||
public DotSubstractionExpressionNode(ValueNode value) {
|
||||
this.value = value;
|
||||
|
@ -5,9 +5,9 @@ import ast.expression.ExpressionNode;
|
||||
import ast.expression.unaryexpression.UnaryExpressionNode;
|
||||
|
||||
public class NonCalculationExpressionNode implements ASTNode {
|
||||
UnaryExpressionNode unaryExpression;
|
||||
String operator;
|
||||
ExpressionNode expression;
|
||||
public UnaryExpressionNode unaryExpression;
|
||||
public String operator;
|
||||
public ExpressionNode expression;
|
||||
|
||||
public NonCalculationExpressionNode(UnaryExpressionNode unaryExpression, String operator, ExpressionNode expression) {
|
||||
this.unaryExpression = unaryExpression;
|
||||
|
@ -6,8 +6,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MemberAccessNode implements ASTNode {
|
||||
Boolean thisExpr;
|
||||
List<String> identifiers = new ArrayList<>();
|
||||
public Boolean thisExpr;
|
||||
public List<String> identifiers = new ArrayList<>();
|
||||
|
||||
public MemberAccessNode(Boolean thisExpr) {
|
||||
this.thisExpr = thisExpr;
|
||||
|
@ -4,7 +4,7 @@ import ast.ASTNode;
|
||||
import ast.expression.ExpressionNode;
|
||||
|
||||
public class NotExpressionNode implements ASTNode {
|
||||
ExpressionNode expression;
|
||||
public ExpressionNode expression;
|
||||
|
||||
public NotExpressionNode(ExpressionNode expression) {
|
||||
this.expression = expression;
|
||||
|
@ -8,13 +8,13 @@ import ast.type.ValueNode;
|
||||
import java.util.Objects;
|
||||
|
||||
public class UnaryExpressionNode implements ASTNode {
|
||||
String thisExp;
|
||||
String identifier;
|
||||
MemberAccessNode memberAccess;
|
||||
ValueNode value;
|
||||
NotExpressionNode notExpression;
|
||||
StatementNode statement;
|
||||
ExpressionNode expression;
|
||||
public String thisExp;
|
||||
public String identifier;
|
||||
public MemberAccessNode memberAccess;
|
||||
public ValueNode value;
|
||||
public NotExpressionNode notExpression;
|
||||
public StatementNode statement;
|
||||
public ExpressionNode expression;
|
||||
|
||||
public UnaryExpressionNode(String value) {
|
||||
if(Objects.equals(value, "this")) {
|
||||
|
@ -13,12 +13,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MethodNode implements MemberNode {
|
||||
AccessModifierNode accesModifier;
|
||||
TypeNode type;
|
||||
Boolean voidType;
|
||||
String identifier;
|
||||
List<ParameterNode> parameters;
|
||||
BlockNode block;
|
||||
public AccessModifierNode accesModifier;
|
||||
public TypeNode type;
|
||||
public Boolean voidType;
|
||||
public String identifier;
|
||||
public List<ParameterNode> parameters;
|
||||
public BlockNode block;
|
||||
|
||||
public MethodNode() {}
|
||||
|
||||
|
@ -4,8 +4,8 @@ import ast.ASTNode;
|
||||
import ast.type.TypeNode;
|
||||
|
||||
public class ParameterNode implements ASTNode {
|
||||
TypeNode type;
|
||||
String identifier;
|
||||
public TypeNode type;
|
||||
public String identifier;
|
||||
|
||||
public ParameterNode(TypeNode type, String identifier) {
|
||||
this.type = type;
|
||||
|
@ -4,10 +4,10 @@ import ast.ASTNode;
|
||||
import ast.expression.ExpressionNode;
|
||||
|
||||
public class ForStatementNode implements ASTNode {
|
||||
ExpressionNode statementExpressionInit;
|
||||
StatementNode localVariableDeclarationInit;
|
||||
ExpressionNode expression;
|
||||
ExpressionNode statementExpression;
|
||||
public ExpressionNode statementExpressionInit;
|
||||
public StatementNode localVariableDeclarationInit;
|
||||
public ExpressionNode expression;
|
||||
public ExpressionNode statementExpression;
|
||||
|
||||
public ForStatementNode(ExpressionNode statementExpressionInit, ExpressionNode expression, ExpressionNode statementExpression) {
|
||||
this.statementExpressionInit = statementExpressionInit;
|
||||
|
@ -5,10 +5,10 @@ import ast.expression.ExpressionNode;
|
||||
import ast.type.TypeNode;
|
||||
|
||||
public class LocalVariableDeclarationNode implements ASTNode {
|
||||
TypeNode type;
|
||||
String identifier;
|
||||
String assign;
|
||||
ExpressionNode expression;
|
||||
public TypeNode type;
|
||||
public String identifier;
|
||||
public String assign;
|
||||
public ExpressionNode expression;
|
||||
|
||||
public LocalVariableDeclarationNode(TypeNode type, String identifier, String assign, ExpressionNode expression) {
|
||||
this.type = type;
|
||||
|
@ -1,2 +1,4 @@
|
||||
package ast.statement;public class StatementNode {
|
||||
package ast.statement;
|
||||
|
||||
public class StatementNode {
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ import ast.block.BlockNode;
|
||||
import ast.expression.ExpressionNode;
|
||||
|
||||
public class WhileStatementNode implements ASTNode {
|
||||
ExpressionNode expression;
|
||||
BlockNode block;
|
||||
public ExpressionNode expression;
|
||||
public BlockNode block;
|
||||
|
||||
public WhileStatementNode(ExpressionNode expression, BlockNode block) {
|
||||
this.expression = expression;
|
||||
|
@ -4,7 +4,7 @@ import ast.ASTNode;
|
||||
import ast.block.BlockNode;
|
||||
|
||||
public class ElseStatementNode implements ASTNode {
|
||||
BlockNode block;
|
||||
public BlockNode block;
|
||||
|
||||
public ElseStatementNode(BlockNode block) {
|
||||
this.block = block;
|
||||
|
@ -6,8 +6,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class IfElseStatementNode implements ASTNode {
|
||||
IfStatementNode ifStatement;
|
||||
List<ElseStatementNode> elseStatements = new ArrayList<>();
|
||||
public IfStatementNode ifStatement;
|
||||
public List<ElseStatementNode> elseStatements = new ArrayList<>();
|
||||
|
||||
public IfElseStatementNode(IfStatementNode ifStatement) {
|
||||
this.ifStatement = ifStatement;
|
||||
|
@ -5,8 +5,8 @@ import ast.block.BlockNode;
|
||||
import ast.expression.ExpressionNode;
|
||||
|
||||
public class IfStatementNode implements ASTNode {
|
||||
ExpressionNode expression;
|
||||
BlockNode block;
|
||||
public ExpressionNode expression;
|
||||
public BlockNode block;
|
||||
|
||||
public IfStatementNode(ExpressionNode expression, BlockNode block) {
|
||||
this.expression = expression;
|
||||
|
@ -4,8 +4,8 @@ import ast.ASTNode;
|
||||
import ast.expression.ExpressionNode;
|
||||
|
||||
public class AssignStatementExpressionNode implements ASTNode {
|
||||
AssignableExpressionNode assignable;
|
||||
ExpressionNode expression;
|
||||
public AssignableExpressionNode assignable;
|
||||
public ExpressionNode expression;
|
||||
|
||||
public AssignStatementExpressionNode(AssignableExpressionNode assignable, ExpressionNode expression) {
|
||||
this.assignable = assignable;
|
||||
|
@ -4,8 +4,8 @@ import ast.ASTNode;
|
||||
import ast.expression.unaryexpression.MemberAccessNode;
|
||||
|
||||
public class AssignableExpressionNode implements ASTNode {
|
||||
String identifier;
|
||||
MemberAccessNode memberAccess;
|
||||
public String identifier;
|
||||
public MemberAccessNode memberAccess;
|
||||
|
||||
public AssignableExpressionNode(String identifier) {
|
||||
this.identifier = identifier;
|
||||
|
@ -1,5 +0,0 @@
|
||||
package ast.statement.statementexpression;
|
||||
|
||||
public class IncrementExpression {
|
||||
|
||||
}
|
@ -7,8 +7,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NewDeclarationStatementExpressionNode implements ASTNode {
|
||||
String identifier;
|
||||
List<ExpressionNode> expressions = new ArrayList<>();
|
||||
public String identifier;
|
||||
public List<ExpressionNode> expressions = new ArrayList<>();
|
||||
|
||||
public NewDeclarationStatementExpressionNode(String identifier) {
|
||||
this.identifier = identifier;
|
||||
|
@ -4,8 +4,8 @@ import ast.ASTNode;
|
||||
import ast.statement.statementexpression.AssignableExpressionNode;
|
||||
|
||||
public class DecrementExpressionNode implements ASTNode {
|
||||
CrementType crementType;
|
||||
AssignableExpressionNode assignableExpression;
|
||||
public CrementType crementType;
|
||||
public AssignableExpressionNode assignableExpression;
|
||||
|
||||
public DecrementExpressionNode(CrementType crementType, AssignableExpressionNode assignableExpression) {
|
||||
this.assignableExpression = assignableExpression;
|
||||
|
@ -4,8 +4,8 @@ import ast.ASTNode;
|
||||
import ast.statement.statementexpression.AssignableExpressionNode;
|
||||
|
||||
public class IncrementExpressionNode implements ASTNode {
|
||||
CrementType crementType;
|
||||
AssignableExpressionNode assignableExpression;
|
||||
public CrementType crementType;
|
||||
public AssignableExpressionNode assignableExpression;
|
||||
|
||||
public IncrementExpressionNode(CrementType crementType, AssignableExpressionNode assignableExpression) {
|
||||
this.assignableExpression = assignableExpression;
|
||||
|
@ -7,8 +7,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ChainedMethodNode implements ASTNode {
|
||||
String identifier;
|
||||
List<ExpressionNode> expressions = new ArrayList<>();
|
||||
public String identifier;
|
||||
public List<ExpressionNode> expressions = new ArrayList<>();
|
||||
|
||||
public ChainedMethodNode(String identifier) {
|
||||
this.identifier = identifier;
|
||||
|
@ -7,10 +7,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MethodCallStatementExpressionNode implements ASTNode {
|
||||
TargetNode target;
|
||||
List<ChainedMethodNode> chainedMethods = new ArrayList<>();
|
||||
String identifier;
|
||||
List<ExpressionNode> expressions = new ArrayList<>();
|
||||
public TargetNode target;
|
||||
public List<ChainedMethodNode> chainedMethods = new ArrayList<>();
|
||||
public String identifier;
|
||||
public List<ExpressionNode> expressions = new ArrayList<>();
|
||||
|
||||
public MethodCallStatementExpressionNode(TargetNode target, String identifier) {
|
||||
this.target = target;
|
||||
|
@ -5,10 +5,10 @@ import ast.expression.unaryexpression.MemberAccessNode;
|
||||
import ast.statement.statementexpression.NewDeclarationStatementExpressionNode;
|
||||
|
||||
public class TargetNode implements ASTNode {
|
||||
Boolean thisTar;
|
||||
MemberAccessNode memberAccess;
|
||||
NewDeclarationStatementExpressionNode newDeclaration;
|
||||
String identifier;
|
||||
public Boolean thisTar;
|
||||
public MemberAccessNode memberAccess;
|
||||
public NewDeclarationStatementExpressionNode newDeclaration;
|
||||
public String identifier;
|
||||
|
||||
public TargetNode(Boolean thisTar) {
|
||||
this.thisTar = thisTar;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package ast.type;
|
||||
|
||||
public class AccessModifierNode {
|
||||
EnumAccessModifierNode accessType;
|
||||
public EnumAccessModifierNode accessType;
|
||||
|
||||
public AccessModifierNode(String accessModifier) {
|
||||
setModifier(accessModifier);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package ast.type;
|
||||
|
||||
public class TypeNode {
|
||||
EnumTypeNode type;
|
||||
public EnumTypeNode type;
|
||||
|
||||
public TypeNode(String type) {
|
||||
setType(type);
|
||||
|
@ -3,8 +3,8 @@ package ast.type;
|
||||
import ast.ASTNode;
|
||||
|
||||
public class ValueNode implements ASTNode {
|
||||
EnumValueNode valueType;
|
||||
String value;
|
||||
public EnumValueNode valueType;
|
||||
public String value;
|
||||
|
||||
public ValueNode(EnumValueNode valueType, String value) {
|
||||
this.valueType = valueType;
|
||||
|
Loading…
Reference in New Issue
Block a user