AST

class AST : ITree(source)

Constructors

Link copied to clipboard
constructor(root: ITreeNode<out Any>)
Builds a new AST given its root node.

Functions

Link copied to clipboard
open fun assignVarValue(matches: Map<HashString, ITreeNode<out Any>>): AST
This method substitutes variables present in matches map with their values.
Link copied to clipboard
open fun evaluation(matches: Map<HashString, ITreeNode<out Any>>): Double
This evaluates the expression.
Link copied to clipboard
open fun getRoot(): ITreeNode<out Any>
Return the root Node of the tree.
Link copied to clipboard
open fun toHashString(): HashString
Similar to toString(), but returns a HashString.
Link copied to clipboard
open fun toString(): String