Skip to content

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:

AstNode


getStartLine

public int getStartLine()

Specified By:

AstNode


getStartColumn

public int getStartColumn()

Specified By:

AstNode


getEndLine

public int getEndLine()

Specified By:

AstNode


getEndColumn

public int getEndColumn()

Specified By:

AstNode


getComments

public List<CommentAstNode> getComments()

Specified By:

AstNode


getToken

public JsonToken getToken()

Specified By:

AstNode


setToken

public void setToken(JsonLexemeBackedToken token)


addComment

public void addComment(CommentAstNode comment)


equals

public boolean equals(Object o)

Overrides:

Object


hashCode

public int hashCode()

Overrides:

Object