Package quickparse.semantics
Class SyntaxTreeFunction
java.lang.Object
quickparse.semantics.SyntaxTreeFunction
public abstract class SyntaxTreeFunction
extends java.lang.Object
Represents a function computable on a
The computation of each node, produces an object.
SyntaxTree.The computation of each node, produces an object.
-
Constructor Summary
Constructors Constructor Description SyntaxTreeFunction() -
Method Summary
Modifier and Type Method Description java.lang.Objectapply(SyntaxTree syntaxTree)protected abstract java.lang.Objectconstruct(ConstructNode node, java.util.List<java.lang.Object> childrenResults)Computes an object from the syntax node of a construct.protected abstract java.lang.Objecttoken(TokenNode node)Computes an object from the syntax node of a token.
-
Constructor Details
-
SyntaxTreeFunction
public SyntaxTreeFunction()
-
-
Method Details
-
apply
-
token
Computes an object from the syntax node of a token.- Parameters:
node- the syntax node of the token- Returns:
- the object produced by the function from the token
-
construct
protected abstract java.lang.Object construct(ConstructNode node, java.util.List<java.lang.Object> childrenResults)Computes an object from the syntax node of a construct.- Parameters:
node- the syntax node of the constructchildrenResults- list of the objects produced by computing this same function on the children nodes- Returns:
- the object produced by the function from the construct
-