public class Token extends Object implements Serializable, Comparable
| Modifier and Type | Field and Description |
|---|---|
int |
column
The column at which the token starts in the line (starting from 0)
|
int |
length
The length of the token (in characters)
|
int |
line
The line number at which the token starts (starting from 0)
|
int |
start
The offset (in characters) at which the token was identified in the source Shell code
|
TokenType |
type
The token type
|
| Constructor and Description |
|---|
Token(TokenType type,
int start,
int length,
int line,
int column)
Constructs a new token
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
int |
end()
return the end position of the token
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
public final TokenType type
public final int start
public final int length
public final int line
public final int column
public Token(TokenType type, int start, int length, int line, int column)
start - the offset (in characters) at which the token startstype - the token typecolumn - the column (in characters, starting from 0) where the token starts on the linelength - the token's lengthline - the line number (starting from 0) where the token was foundTokenTypepublic int compareTo(Object o)
compareTo in interface Comparablepublic int end()
Copyright © 2018–2019. All rights reserved.