/* Generated By:JJTree: Do not edit this line. ASTIdentifier.java */

package FESI.AST;

import FESI.Parser.*;

public class ASTIdentifier extends SimpleNode {
    
  private String identifierName = null;
  private int hash = 0;
  
  public ASTIdentifier(int id) {
    super(id);
  }

  public ASTIdentifier(EcmaScript p, int id) {
    super(p, id);
  }

  public static Node jjtCreate(int id) {
      return new ASTIdentifier(id);
  }

  public static Node jjtCreate(EcmaScript p, int id) {
      return new ASTIdentifier(p, id);
  }

  /** Accept the visitor. **/
  public Object jjtAccept(EcmaScriptVisitor visitor, Object data) {
    return visitor.visit(this, data);
  }
  
  // JMCL
  public void setName(String identifierName) {
      this.identifierName = identifierName.intern(); // to lower number of strings
      this.hash = identifierName.hashCode();
  }
  
  public int hashCode() {
      return hash;
  }
  
  public String getName() {
      return identifierName;
  }
  
  public String toString() {
      return "<" + identifierName + ">";
  }
}