Class CommandToken
java.lang.Object
net.apartium.cocoabeans.commands.lexer.CommandToken
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArgumentParserToken,KeywordToken
Command token for parsing commands
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommandToken(int from, int to, String text) Create a new command token -
Method Summary
Modifier and TypeMethodDescriptionintfrom()Gets the starting indexabstract CommandTokenTypegetType()Get the type of the tokenintto()Gets the ending index
-
Field Details
-
from
protected final int from -
to
protected final int to -
text
-
-
Constructor Details
-
CommandToken
Create a new command token- Parameters:
from- starting indexto- ending indextext- the entire text of command
-
-
Method Details
-
from
public int from()Gets the starting index- Returns:
- the starting index
-
to
public int to()Gets the ending index- Returns:
- the ending index
-
getType
Get the type of the token- Returns:
- the type
-