Package io.github.qishr.cascara.lang.json.token
Class JsonLexemeBackedToken
java.lang.Object
io.github.qishr.cascara.lang.json.token.JsonLexemeBackedToken
All Implemented Interfaces:
JsonToken
public class JsonLexemeBackedToken
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| protected final int | startColumn | |
| protected final int | startLine | |
| protected final int | startOffset | |
| protected final JsonTokenType | type |
Constructor Summary
| Constructor | Description |
|---|---|
| JsonLexemeBackedToken(int line, int column, int startOffset, JsonTokenType type) | Structural Token |
| JsonLexemeBackedToken(int line, int column, int startOffset, JsonTokenType type, JsonLiteral literal) | Literals Token |
| JsonLexemeBackedToken(int line, int column, int startOffset, JsonTokenType type, String lexeme) | Number & Identifier Tokens |
| JsonLexemeBackedToken(int line, int column, int startOffset, JsonTokenType type, String lexeme, String content, QuoteStyle quoteStyle) | String Token |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public int | getStartLine() | |
| public int | getStartColumn() | |
| public int | getOffset() | |
| public JsonTokenType | getType() | |
| public JsonLiteral | getLiteral() | |
| public String | getLexeme() | |
| public String | getContent() | |
| public QuoteStyle | getQuoteStyle() | |
| public List<JsonComment> | getComments() | |
| public void | attachComments(List<JsonComment> list) | |
| public String | toString() |
Field Details
startColumn
protected final int startColumn
startLine
protected final int startLine
startOffset
protected final int startOffset
type
protected final JsonTokenType type
Method Details
getStartLine
public int getStartLine()
getStartColumn
public int getStartColumn()
getOffset
public int getOffset()
getType
public JsonTokenType getType()
Specified By:
getLiteral
public JsonLiteral getLiteral()
Specified By:
getLexeme
public String getLexeme()
getContent
public String getContent()
getQuoteStyle
public QuoteStyle getQuoteStyle()
Specified By:
getComments
public List<JsonComment> getComments()
Specified By:
attachComments
public void attachComments(List<JsonComment> list)
Specified By:
toString
public String toString()
Overrides: