All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.squarespace.template.expr.VarToken Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
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