Package codeanalysis.syntax
Class SyntaxNode
java.lang.Object
codeanalysis.syntax.SyntaxNode
- Direct Known Subclasses:
ExpressionSyntax,SyntaxToken
The base class for syntax nodes in a code analysis system.
- Version:
- 1.0
- Author:
- Siyabend Urun
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Iterator<SyntaxNode>Gets an iterator over the child nodes of the syntax node.getSpan()Gets the span of the syntax node.abstract SyntaxTypegetType()Gets the type of the syntax node.toString()Gets the value associated with the syntax node.voidWrites the syntax tree to the specified writer.
-
Field Details
-
_span
-
-
Constructor Details
-
SyntaxNode
public SyntaxNode()
-
-
Method Details
-
getType
Gets the type of the syntax node.- Returns:
- The syntax type of the node.
-
getChildren
Gets an iterator over the child nodes of the syntax node.- Returns:
- An iterator over the child nodes.
-
getSpan
Gets the span of the syntax node.- Returns:
- The span of the syntax node.
-
writeTo
Writes the syntax tree to the specified writer.- Parameters:
writer- The writer to write the tree to.- Throws:
IOException- If an I/O error occurs.
-
toString
Gets the value associated with the syntax node.
-