Package picasso.parser.tokens
Class Token
- java.lang.Object
-
- picasso.parser.tokens.Token
-
- Direct Known Subclasses:
CharToken
,ColorToken
,EOFToken
,FunctionToken
,IdentifierToken
,NumberToken
,StringToken
public abstract class Token extends Object
Represents tokens in the Picasso programming language
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isConstant()
Returns true if this token represents a constant, false otherwiseabstract boolean
isFunction()
Returns true if this token represents a function, false otherwiseString
toString()
Represents the token by its description
-
-
-
Constructor Detail
-
Token
public Token(String description)
Creates a token with the given description- Parameters:
description
- the token's description
-
-
Method Detail
-
toString
public String toString()
Represents the token by its description
-
isConstant
public abstract boolean isConstant()
Returns true if this token represents a constant, false otherwise- Returns:
- true iff this Token represents a constant
-
isFunction
public abstract boolean isFunction()
Returns true if this token represents a function, false otherwise- Returns:
- true iff this Token represents a function
-
-