com.squarespace.template.expr.VarToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of template-core Show documentation
Show all versions of template-core Show documentation
Squarespace template compiler
package com.squarespace.template.expr;
import java.util.Arrays;
/**
* Token representing a variable name. Could hold a reference or
* a definition.
*/
public class VarToken extends Token {
public final Object[] name;
public VarToken(Object[] name) {
super(ExprTokenType.VARIABLE);
this.name = name;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof VarToken) {
return Arrays.equals(name, ((VarToken)obj).name);
}
return false;
}
@Override
public String toString() {
return "VarToken[" + Arrays.toString(name) + "]";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy