Class IdentifierToken

java.lang.Object
com.google.javascript.jscomp.parsing.parser.Token
com.google.javascript.jscomp.parsing.parser.IdentifierToken

public class IdentifierToken extends Token
A token representing an identifier.
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Token
    • isKeyword

      public boolean isKeyword()
    • valueEquals

      public boolean valueEquals(String str)
    • getValue

      public String getValue()
      Gets the value of the identifier assuring that it is not a private identifier.

      You must verify privateIdentifier is false (and presumably error if it is true) before calling this method.

      Prefer calling isKeyword() or valueEquals(String) if those methods meet your needs.

    • getMaybePrivateValue

      public String getMaybePrivateValue()
      Gets the value of the identifier, allowing it to be a private identifier.
    • isPrivateIdentifier

      public boolean isPrivateIdentifier()
      Whether the value starts with a #.