Package picasso.parser.tokens
Class IdentifierToken
- java.lang.Object
-
- picasso.parser.tokens.Token
-
- picasso.parser.tokens.IdentifierToken
-
public class IdentifierToken extends Token
Represents an identifier (a variable name)
-
-
Constructor Summary
Constructors Constructor Description IdentifierToken(String value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetName()Returns the identifier's nameintgetPrecedence()booleanisConstant()Returns true if this token represents a constant, false otherwisebooleanisFunction()Returns true if this token represents a function, false otherwiseStringtoString()Represents the token by its description
-
-
-
Constructor Detail
-
IdentifierToken
public IdentifierToken(String value)
-
-
Method Detail
-
getName
public String getName()
Returns the identifier's name- Returns:
- the identifier's name
-
toString
public String toString()
Description copied from class:TokenRepresents the token by its description
-
isConstant
public boolean isConstant()
Description copied from class:TokenReturns true if this token represents a constant, false otherwise- Specified by:
isConstantin classToken- Returns:
- true iff this Token represents a constant
-
isFunction
public boolean isFunction()
Description copied from class:TokenReturns true if this token represents a function, false otherwise- Specified by:
isFunctionin classToken- Returns:
- true iff this Token represents a function
-
getPrecedence
public int getPrecedence()
- Specified by:
getPrecedencein classToken
-
-