misc AST cleanups

This commit is contained in:
Jonathan Shook 2020-05-15 10:45:54 -05:00
parent 087c0b800c
commit 5f63092edc
10 changed files with 17 additions and 4 deletions

View File

@ -1,7 +1,8 @@
package io.nosqlbench.virtdata.lang.ast;
public class Assignment {
private String variableName;
private final String variableName;
public Assignment(String variableName) {
this.variableName = variableName;

View File

@ -1,6 +1,7 @@
package io.nosqlbench.virtdata.lang.ast;
public class BooleanArg implements ArgType {
private final boolean boolValue;
public BooleanArg(boolean boolValue) {

View File

@ -5,7 +5,7 @@ import java.util.List;
public class FunctionCall implements ArgType {
private String funcName;
private List<ArgType> args = new ArrayList<>();
private final List<ArgType> args = new ArrayList<>();
private String inputType;
private String outputType;
private String inputClass;

View File

@ -1,6 +1,7 @@
package io.nosqlbench.virtdata.lang.ast;
public class IntegerArg implements ArgType {
private final int intValue;
public IntegerArg(Integer integer) {

View File

@ -1,6 +1,7 @@
package io.nosqlbench.virtdata.lang.ast;
public class LongArg implements ArgType {
private final long longValue;
public LongArg(Long longValue) {

View File

@ -1,6 +1,7 @@
package io.nosqlbench.virtdata.lang.ast;
public class RefArg implements ArgType {
private final String refName;
public RefArg(String refName) {

View File

@ -1,6 +1,7 @@
package io.nosqlbench.virtdata.lang.ast;
public class StringArg implements ArgType {
private final String rawEscapedText;
private final String unEscapedText;

View File

@ -1,9 +1,14 @@
package io.nosqlbench.virtdata.lang.ast;
public class VariableRef {
private final String refName;
public VariableRef(String refName) {
this.refName = refName;
}
public String getRefName() {
return this.refName;
}
}

View File

@ -4,7 +4,8 @@ import java.util.ArrayList;
import java.util.List;
public class VirtDataAST {
private List<VirtDataFlow> flows = new ArrayList<>();
private final List<VirtDataFlow> flows = new ArrayList<>();
public void addFlow(VirtDataFlow flow) {
this.flows.add(flow);

View File

@ -4,7 +4,8 @@ import java.util.ArrayList;
import java.util.List;
public class VirtDataFlow {
private List<Expression> expressions = new ArrayList<>();
private final List<Expression> expressions = new ArrayList<>();
public List<Expression> getExpressions() {
return expressions;