Expression

class Expression : IExpression

Constructors

Link copied to clipboard
open fun Expression(tree: ITree)
This constructor does not do any parsing, and thus is much faster than the other one.
Link copied to clipboard
open fun Expression(n: ITreeNode<out Any>)
Link copied to clipboard
open fun Expression(s: String)
This constructor parses the String into an Expression.

Functions

Link copied to clipboard
open fun calculate(map: Map<HashString, ITreeNode<out Any>>): ITreeNode<out Any>
Link copied to clipboard
open fun getLeftChildren(): ITreeNode<out Any>
Link copied to clipboard
open fun getRightChildren(): ITreeNode<out Any>
Link copied to clipboard
open fun getRootNodeData(): Any
Link copied to clipboard
open fun getRootNodeType(): Type
Link copied to clipboard
open fun matches(expr: IExpression, matches: Map<HashString, ITreeNode<out Any>>): Boolean
Tries to match this expression with expr.
Link copied to clipboard
open fun mayMatch(expr: IExpression): Boolean
This match method test whether or not two expressions might match.
Link copied to clipboard
open fun syntacticMatch(e: IExpression): Boolean
Runs a syntactic match against the e.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun updateMatchedVar(matches: Map<HashString, ITreeNode<out Any>>): ITree

Properties

Link copied to clipboard
private val ast: ITree
Link copied to clipboard
private val rootNode: ITreeNode<out Any>