Package nz.org.riskscape.dsl
Class Token
java.lang.Object
nz.org.riskscape.dsl.Token
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
UNKNOWN_LOCATION
-
type
-
source
-
begin
public final int begin -
end
public final int end -
value
-
lineno
public int lineno
-
-
Constructor Details
-
Token
-
-
Method Details
-
eof
-
token
Handy constructor for testing situations
-
getStartOfLine
-
getIndents
- Returns:
- a List of Token objects that are the whitespace tokens that preceede any non-whitespace tokens.
-
countIndents
public int countIndents()- Returns:
- The number of whitespace tokens that preceede any non-whitespace tokens.
-
isWhitespace
public boolean isWhitespace()- Returns:
- true if this token is of a whitespace token type
-
toString
-
getLocation
-
getPosition
-
rawValue
-
moreIndented
- Returns:
- true if this token has more indent tokens than the previous one
-
isSourceSingleLine
public boolean isSourceSingleLine()- Returns:
- true if the source code's non-whitespace tokens occur on a single line
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getValue
-