Package io.github.qishr.cascara.lang.json.ast
Class JsonNode
java.lang.Object
io.github.qishr.cascara.lang.json.ast.JsonNode
All Implemented Interfaces:
AstNode
Direct Known Subtypes:
JsonArray, JsonProperty, JsonObject, JsonComment, JsonScalar
public abstract class JsonNode
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
| protected JsonToken | token |
Constructor Summary
| Constructor | Description |
|---|---|
| JsonNode() | |
| JsonNode(int line, int column) | |
| JsonNode(JsonToken token) |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| public abstract List<? extends JsonNode> | getChildren() | |
| public int | getStartLine() | |
| public int | getStartColumn() | |
| public int | getEndLine() | |
| public int | getEndColumn() | |
| public List<CommentAstNode> | getComments() | |
| public JsonToken | getToken() | |
| public void | setToken(JsonLexemeBackedToken token) | |
| public void | addComment(CommentAstNode comment) | |
| public boolean | equals(Object o) | |
| public int | hashCode() |
Field Details
token
protected JsonToken token
Method Details
getChildren
public abstract List<? extends JsonNode> getChildren()
Specified By:
getStartLine
public int getStartLine()
Specified By:
getStartColumn
public int getStartColumn()
Specified By:
getEndLine
public int getEndLine()
Specified By:
getEndColumn
public int getEndColumn()
Specified By:
getComments
public List<CommentAstNode> getComments()
Specified By:
getToken
public JsonToken getToken()
Specified By:
setToken
public void setToken(JsonLexemeBackedToken token)
addComment
public void addComment(CommentAstNode comment)
equals
public boolean equals(Object o)
Overrides:
hashCode
public int hashCode()
Overrides: