SeExpr

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SeExpr2::ExprNode Class Reference

`#include <ExprNode.h>`

Inheritance diagram for SeExpr2::ExprNode:

## Public Member Functions
| ExprNode (const Expression *expr)
| ExprNode (const Expression *expr, const ExprType &type)
virtual | ~ExprNode ()
virtual LLVM_VALUE | codegen (LLVM_BUILDER) LLVM_BODY
bool | isVec () const
| True if node has a vector result. More...
const Expression * | expr () const
| Access expression. More...
std::string | toString () const
| Access to original string representation of current expression. More...
const ExprType & | type () const
| The type of the node. More...
void | addError (const std::string &error) const
| Register error. This will allow users and sophisticated editors to highlight where in code problem was. More...
These constructors supply one or more children.
| ExprNode (const Expression *expr, ExprNode *a)
| ExprNode (const Expression *expr, ExprNode *a, const ExprType &type)
| ExprNode (const Expression *expr, ExprNode *a, ExprNode *b)
| ExprNode (const Expression *expr, ExprNode *a, ExprNode *b, const ExprType &type)
| ExprNode (const Expression *expr, ExprNode *a, ExprNode *b, ExprNode *c)
| ExprNode (const Expression *expr, ExprNode *a, ExprNode *b, ExprNode *c, const ExprType &type)
Interface to implement for subclasses
virtual ExprType | prep (bool dontNeedScalar, ExprVarEnvBuilder &envBuilder)
virtual int | buildInterpreter (Interpreter *interpreter) const
| builds an interpreter. Returns the location index for the evaluated data More...
Relationship Queries and Manipulation
const ExprNode * | parent () const
| Access parent node - root node has no parent. More...
int | numChildren () const
| Number of children. More...
const ExprNode * | child (size_t i) const
| Get 0 indexed child. More...
ExprNode * | child (size_t i)
| Get 0 indexed child. More...
void | swapChildren (size_t i, size_t j)
| Swap children, do not use unless you know what you are doing. More...
void | removeLastChild ()
| Remove last child and delete the entry. More...
void | addChild (ExprNode *child)
| Add a child to the child list (for parser use only) More...
void | addChildren (ExprNode *surrogate)
| Transfer children from surrogate parent (for parser use only) More...
Access position in the input buffer that created this node
void | setPosition (const short int startPos, const short int endPos)
| Remember the line and column position in the input string. More...
short int | startPos () const
| Access start position in input string. More...
short int | endPos () const
| Access end position in input string. More...
short int | length () const
| Access length of input string. More...
Error Checking Helpers for Type Checking
bool | checkCondition (bool check, const std::string &message, bool &error)
| Checks the boolean value and records an error string with node if it is false. More...
bool | checkIsValue (const ExprType &type, bool &error)
| Checks if the type is a value (i.e. string or float[d]) More...
bool | checkIsFP (const ExprType &type, bool &error)
| Checks if the type is a float[d] for any d. More...
bool | checkIsFP (int d, const ExprType &type, bool &error)
| Checks if the type is a float[d] for a specific d. More...
bool | checkTypesCompatible (const ExprType &first, const ExprType &second, bool &error)
| types match (true if they do) More...

## Protected Member Functions
void | setType (const ExprType &t)
| Set type of parameter. More...
void | setTypeWithChildLife (const ExprType &t)
| Set's the type to the argument but uses the children to determine lifetime. More...

## Protected Attributes
const Expression * | _expr
| Owning expression (node can't modify) More...
ExprNode * | _parent
| Parent node (null if this the the root) More...
std::vector< ExprNode * > | _children
| List of children. More...
bool | _isVec
| True if node has a vector result. More...
ExprType | _type
int | _maxChildDim
unsigned short int | _startPos
| Position line and collumn. More...
unsigned short int | _endPos

## Detailed Description

Expression node base class. Always constructed by parser in ExprParser.y Parse tree nodes - this is where the expression evaluation happens.

Some implementation notes:

1) Vector vs scalar - Any node can accept vector or scalar inputs and return a vector or scalar result. If a node returns a scalar, it is only required to set the [0] component and the other components must be assumed to be invalid.

2) ExprNode::prep - This is called for all nodes during parsing once the syntax has been checked. Anything can be done here, such as function binding, variable lookups, etc., but the only thing that must be done is to determine whether the result is going to be vector or scalar. This can in some cases depend on whether the children are vector or scalar so the parser calls prep on the root node and each node is expected to call prep on its children and then set its own _isVec variable. The wantVec param provides context from the parent (and ultimately the owning expression) as to whether a vector is desired, but nodes are not bound by this and may produce a scalar even when a vector is wanted.

The base class method implements the default behavior which is to pass down the wantVec flag to all children and set isVec to true if any child is a vec.

If the prep method fails, an error string should be set and false should be returned.

Definition at line 72 of file ExprNode.h.

## Constructor & Destructor Documentation

## ◆ ExprNode() [1/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr | ) |

Definition at line 41 of file ExprNode.cpp.

## ◆ ExprNode() [2/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | const ExprType & | type
| ) |  |

Definition at line 43 of file ExprNode.cpp.

## ◆ ExprNode() [3/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a
| ) |  |

Definition at line 45 of file ExprNode.cpp.

References _children, a, and addChild().

## ◆ ExprNode() [4/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a,
|  | const ExprType & | type
| ) |  |

Definition at line 50 of file ExprNode.cpp.

References _children, a, and addChild().

## ◆ ExprNode() [5/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a,
|  | ExprNode * | b
| ) |  |

Definition at line 56 of file ExprNode.cpp.

References _children, a, addChild(), and b.

## ◆ ExprNode() [6/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a,
|  | ExprNode * | b,
|  | const ExprType & | type
| ) |  |

Definition at line 62 of file ExprNode.cpp.

References _children, a, addChild(), and b.

## ◆ ExprNode() [7/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a,
|  | ExprNode * | b,
|  | ExprNode * | c
| ) |  |

Definition at line 69 of file ExprNode.cpp.

References _children, a, addChild(), and b.

## ◆ ExprNode() [8/8]

SeExpr2::ExprNode::ExprNode | ( | const Expression * | expr,
|  | ExprNode * | a,
|  | ExprNode * | b,
|  | ExprNode * | c,
|  | const ExprType & | type
| ) |  |

Definition at line 76 of file ExprNode.cpp.

References _children, a, addChild(), and b.

## ◆ ~ExprNode()

SeExpr2::ExprNode::~ExprNode | ( |  | ) |
| virtual

Definition at line 84 of file ExprNode.cpp.

References _children.

## Member Function Documentation

## ◆ addChild()

void SeExpr2::ExprNode::addChild | ( | ExprNode * | child | ) |

Add a child to the child list (for parser use only)

Definition at line 90 of file ExprNode.cpp.

References _children, _parent, and child().

Referenced by addChildren(), ExprNode(), and SeExpr2::GetVar::prep().

## ◆ addChildren()

void SeExpr2::ExprNode::addChildren | ( | ExprNode * | surrogate | ) |

Transfer children from surrogate parent (for parser use only)

Definition at line 95 of file ExprNode.cpp.

References _children, and addChild().

Referenced by SeExpr2::ExprPrototypeNode::addArgs(), and SeExpr2::ExprPrototypeNode::addArgTypes().

## ◆ addError()

void SeExpr2::ExprNode::addError | ( | const std::string & | error | ) | const
| inline

Register error. This will allow users and sophisticated editors to highlight where in code problem was.

Definition at line 168 of file ExprNode.h.

References _endPos, _expr, _startPos, and SeExpr2::Expression::addError().

Referenced by SeExpr2::ExprFuncNode::checkArg(), checkCondition(), SeExpr2::Expression::prep(), SeExpr2::ExprVarNode::prep(), SeExpr2::CachedVoronoiFunc::prep(), SeExpr2::CurveFuncX::prep(), SeExpr2::CCurveFuncX::prep(), and SeExpr2::PrintFuncX::prep().

## ◆ buildInterpreter()

int SeExpr2::ExprNode::buildInterpreter | ( | Interpreter * | interpreter | ) | const
| virtual

builds an interpreter. Returns the location index for the evaluated data

Reimplemented in SeExpr2::ExprFuncNode, SeExpr2::ExprStrNode, SeExpr2::ExprNumNode, SeExpr2::ExprVarNode, SeExpr2::ExprBinaryOpNode, SeExpr2::ExprCompareNode, SeExpr2::ExprCompareEqNode, SeExpr2::ExprSubscriptNode, SeExpr2::ExprCondNode, SeExpr2::ExprUnaryOpNode, SeExpr2::ExprVecNode, SeExpr2::ExprAssignNode, SeExpr2::ExprIfThenElseNode, SeExpr2::ExprBlockNode, SeExpr2::ExprLocalFunctionNode, SeExpr2::ExprPrototypeNode, and SeExpr2::ExprModuleNode.

Definition at line 538 of file Interpreter.cpp.

References buildInterpreter(), child(), and numChildren().

Referenced by buildInterpreter(), SeExpr2::ExprFuncSimple::buildInterpreter(), SeExpr2::ExprFuncStandard::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreter(), SeExpr2::ExprIfThenElseNode::buildInterpreter(), SeExpr2::ExprAssignNode::buildInterpreter(), SeExpr2::ExprVecNode::buildInterpreter(), SeExpr2::ExprUnaryOpNode::buildInterpreter(), SeExpr2::ExprSubscriptNode::buildInterpreter(), SeExpr2::ExprCompareNode::buildInterpreter(), SeExpr2::ExprBinaryOpNode::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreterForCall(), and SeExpr2::Expression::prep().

## ◆ checkCondition()

bool SeExpr2::ExprNode::checkCondition | ( | bool | check,
|  | const std::string & | message,
|  | bool & | error
| ) |  |
| inline

Checks the boolean value and records an error string with node if it is false.

Definition at line 190 of file ExprNode.h.

References addError().

Referenced by checkIsFP(), checkIsValue(), checkTypesCompatible(), SeExpr2::ExprFuncStandard::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprVarNode::prep(), and SeExpr2::ExprFuncNode::prep().

## ◆ checkIsFP() [1/2]

bool SeExpr2::ExprNode::checkIsFP | ( | const ExprType & | type,
|  | bool & | error
| ) |  |
| inline

Checks if the type is a float[d] for any d.

Definition at line 202 of file ExprNode.h.

References checkCondition(), SeExpr2::ExprType::isFP(), and type().

Referenced by SeExpr2::ExprFuncStandard::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprUnaryOpNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprSubscriptNode::prep(), and SeExpr2::ExprCompareNode::prep().

## ◆ checkIsFP() [2/2]

bool SeExpr2::ExprNode::checkIsFP | ( | int | d,
|  | const ExprType & | type,
|  | bool & | error
| ) |  |
| inline

Checks if the type is a float[d] for a specific d.

Definition at line 206 of file ExprNode.h.

References checkCondition(), SeExpr2::ExprType::isFP(), and type().

## ◆ checkIsValue()

bool SeExpr2::ExprNode::checkIsValue | ( | const ExprType & | type,
|  | bool & | error
| ) |  |
| inline

Checks if the type is a value (i.e. string or float[d])

Definition at line 198 of file ExprNode.h.

References checkCondition(), SeExpr2::ExprType::isValue(), and type().

Referenced by SeExpr2::ExprCondNode::prep(), and SeExpr2::ExprCompareEqNode::prep().

## ◆ checkTypesCompatible()

bool SeExpr2::ExprNode::checkTypesCompatible | ( | const ExprType & | first,
|  | const ExprType & | second,
|  | bool & | error
| ) |  |
| inline

types match (true if they do)

Definition at line 215 of file ExprNode.h.

References checkCondition(), SeExpr2::ExprType::toString(), and SeExpr2::ExprType::valuesCompatible().

Referenced by SeExpr2::ExprCompareEqNode::prep(), SeExpr2::ExprCompareNode::prep(), and SeExpr2::ExprBinaryOpNode::prep().

## ◆ child() [1/2]

ExprNode* SeExpr2::ExprNode::child | ( | size_t | i | ) |
| inline

Get 0 indexed child.

Definition at line 120 of file ExprNode.h.

References _children.

## ◆ child() [2/2]

const ExprNode* SeExpr2::ExprNode::child | ( | size_t | i | ) | const
| inline

Get 0 indexed child.

Definition at line 117 of file ExprNode.h.

References _children.

Referenced by SeExpr2::ExprPrototypeNode::addArgs(), SeExpr2::ExprPrototypeNode::addArgTypes(), addChild(), SeExpr2::ExprPrototypeNode::arg(), buildInterpreter(), SeExpr2::ExprFuncSimple::buildInterpreter(), SeExpr2::ExprFuncStandard::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreter(), SeExpr2::ExprIfThenElseNode::buildInterpreter(), SeExpr2::ExprAssignNode::buildInterpreter(), SeExpr2::ExprVecNode::buildInterpreter(), SeExpr2::ExprUnaryOpNode::buildInterpreter(), SeExpr2::ExprSubscriptNode::buildInterpreter(), SeExpr2::ExprCompareNode::buildInterpreter(), SeExpr2::ExprBinaryOpNode::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreterForCall(), SeExpr2::ExprFuncNode::checkArg(), SeExpr2::ExprCurveAssignSpec< T >::ExprCurveAssignSpec(), SeExpr2::ExprFuncNode::getStrArg(), SeExpr2::ExprFuncNode::isStrArg(), SeExpr2::isStrFunc(), prep(), SeExpr2::ExprFuncStandard::prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprBlockNode::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprUnaryOpNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprSubscriptNode::prep(), SeExpr2::ExprCompareEqNode::prep(), SeExpr2::ExprCompareNode::prep(), SeExpr2::ExprBinaryOpNode::prep(), SeExpr2::GetVar::prep(), SeExpr2::ExprLocalFunctionNode::prototype(), setTypeWithChildLife(), SeExpr2::ExprVecNode::value(), and SeExpr2::Walker< constnode >::walkChildren().

## ◆ codegen()

virtual LLVM_VALUE SeExpr2::ExprNode::codegen | ( | LLVM_BUILDER |  | ) |
| virtual

Reimplemented in SeExpr2::ExprFuncNode, SeExpr2::ExprStrNode, SeExpr2::ExprNumNode, SeExpr2::ExprVarNode, SeExpr2::ExprBinaryOpNode, SeExpr2::ExprCompareNode, SeExpr2::ExprCompareEqNode, SeExpr2::ExprSubscriptNode, SeExpr2::ExprCondNode, SeExpr2::ExprUnaryOpNode, SeExpr2::ExprVecNode, SeExpr2::ExprAssignNode, SeExpr2::ExprIfThenElseNode, SeExpr2::ExprBlockNode, SeExpr2::ExprLocalFunctionNode, SeExpr2::ExprPrototypeNode, and SeExpr2::ExprModuleNode.

## ◆ endPos()

short int SeExpr2::ExprNode::endPos | ( |  | ) | const
| inline

Access end position in input string.

Definition at line 159 of file ExprNode.h.

References _endPos.

Referenced by SeExpr2::findComment(), length(), and setPosition().

## ◆ expr()

const Expression* SeExpr2::ExprNode::expr | ( |  | ) | const
| inline

Access expression.

Definition at line 102 of file ExprNode.h.

References _expr.

Referenced by SeExpr2::ExprFuncNode::ExprFuncNode(), SeExpr2::findComment(), SeExpr2::GetVar::prep(), and toString().

## ◆ isVec()

bool SeExpr2::ExprNode::isVec | ( |  | ) | const
| inline

True if node has a vector result.

Definition at line 99 of file ExprNode.h.

References _isVec.

Referenced by SeExpr2::Expression::isVec().

## ◆ length()

short int SeExpr2::ExprNode::length | ( |  | ) | const
| inline

Access length of input string.

Definition at line 161 of file ExprNode.h.

References endPos(), and startPos().

Referenced by toString().

## ◆ numChildren()

int SeExpr2::ExprNode::numChildren | ( |  | ) | const
| inline

Number of children.

Definition at line 114 of file ExprNode.h.

References _children.

Referenced by SeExpr2::ExprPrototypeNode::addArgs(), SeExpr2::ExprPrototypeNode::addArgTypes(), buildInterpreter(), SeExpr2::ExprFuncSimple::buildInterpreter(), SeExpr2::ExprFuncStandard::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreter(), SeExpr2::ExprVecNode::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreterForCall(), SeExpr2::ExprCurveAssignSpec< T >::ExprCurveAssignSpec(), SeExpr2::ExprFuncNode::getStrArg(), SeExpr2::hasCurveNumArgs(), SeExpr2::isCcurveFunc(), SeExpr2::isCurveFunc(), SeExpr2::isStrFunc(), SeExpr2::RandFuncX::prep(), BasicExpression::DummyFuncX::prep(), SeExpr2::MapFuncX::prep(), prep(), SeExpr2::TriplanarFuncX::prep(), SeExpr2::ExprFuncStandard::prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprFuncNode::prep(), SeExpr2::CachedVoronoiFunc::prep(), SeExpr2::CurveFuncX::prep(), SeExpr2::CCurveFuncX::prep(), SeExpr2::PrintFuncX::prep(), setTypeWithChildLife(), and SeExpr2::Walker< constnode >::walkChildren().

## ◆ parent()

const ExprNode* SeExpr2::ExprNode::parent | ( |  | ) | const
| inline

Access parent node - root node has no parent.

Definition at line 112 of file ExprNode.h.

References _parent.

Referenced by SeExpr2::TypePrintExaminer::examine().

## ◆ prep()

ExprType SeExpr2::ExprNode::prep | ( | bool | dontNeedScalar,
|  | ExprVarEnvBuilder & | envBuilder
| ) |  |
| virtual

Prepare the node (for parser use only). See the discussion at the start of SeExprNode.cpp for more info.

Default is to call prep on children (giving AnyType as desired type). If all children return valid types, returns NoneType. Otherwise, returns ErrorType. Note: Ignores wanted type.

Reimplemented in SeExpr2::ExprFuncNode, SeExpr2::ExprStrNode, SeExpr2::ExprNumNode, SeExpr2::ExprVarNode, SeExpr2::ExprBinaryOpNode, SeExpr2::ExprCompareNode, SeExpr2::ExprCompareEqNode, SeExpr2::ExprSubscriptNode, SeExpr2::ExprCondNode, SeExpr2::ExprUnaryOpNode, SeExpr2::ExprVecNode, SeExpr2::ExprAssignNode, SeExpr2::ExprIfThenElseNode, SeExpr2::ExprBlockNode, SeExpr2::ExprLocalFunctionNode, SeExpr2::ExprPrototypeNode, and SeExpr2::ExprModuleNode.

Definition at line 104 of file ExprNode.cpp.

References _maxChildDim, _type, child(), SeExpr2::ExprType::dim(), SeExpr2::ExprType::isFP(), SeExpr2::ExprType::isValid(), numChildren(), prep(), setType(), setTypeWithChildLife(), and type().

Referenced by SeExpr2::ExprFuncNode::checkArg(), prep(), SeExpr2::ExprFuncStandard::prep(), SeExpr2::Expression::prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprBlockNode::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprUnaryOpNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprSubscriptNode::prep(), SeExpr2::ExprCompareEqNode::prep(), SeExpr2::ExprCompareNode::prep(), SeExpr2::ExprBinaryOpNode::prep(), SeExpr2::ExprFuncNode::prep(), and SeExpr2::GetVar::prep().

## ◆ removeLastChild()

void SeExpr2::ExprNode::removeLastChild | ( |  | ) |
| inline

Remove last child and delete the entry.

Definition at line 129 of file ExprNode.h.

References _children.

Referenced by SeExpr2::GetVar::prep().

## ◆ setPosition()

void SeExpr2::ExprNode::setPosition | ( | const short int | startPos,
|  | const short int | endPos
| ) |  |
| inline

Remember the line and column position in the input string.

Definition at line 152 of file ExprNode.h.

References _endPos, _startPos, endPos(), and startPos().

## ◆ setType()

void SeExpr2::ExprNode::setType | ( | const ExprType & | t | ) |
| inline protected

Set type of parameter.

Definition at line 172 of file ExprNode.h.

References _type.

Referenced by prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprBlockNode::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprUnaryOpNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprSubscriptNode::prep(), SeExpr2::ExprCompareEqNode::prep(), SeExpr2::ExprCompareNode::prep(), SeExpr2::ExprBinaryOpNode::prep(), SeExpr2::ExprVarNode::prep(), and setTypeWithChildLife().

## ◆ setTypeWithChildLife()

void SeExpr2::ExprNode::setTypeWithChildLife | ( | const ExprType & | t | ) |
| inline protected

Set's the type to the argument but uses the children to determine lifetime.

Definition at line 176 of file ExprNode.h.

References _type, child(), SeExpr2::ExprType::Constant(), numChildren(), SeExpr2::ExprType::setLifetime(), setType(), and type().

Referenced by prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVecNode::prep(), and SeExpr2::ExprFuncNode::prep().

## ◆ startPos()

short int SeExpr2::ExprNode::startPos | ( |  | ) | const
| inline

Access start position in input string.

Definition at line 157 of file ExprNode.h.

References _startPos.

Referenced by length(), setPosition(), and toString().

## ◆ swapChildren()

void SeExpr2::ExprNode::swapChildren | ( | size_t | i,
|  | size_t | j
| ) |  |
| inline

Swap children, do not use unless you know what you are doing.

Definition at line 123 of file ExprNode.h.

References _children.

Referenced by SeExpr2::GetVar::prep().

## ◆ toString()

std::string SeExpr2::ExprNode::toString | ( |  | ) | const
| inline

Access to original string representation of current expression.

Definition at line 105 of file ExprNode.h.

References expr(), SeExpr2::Expression::getExpr(), length(), and startPos().

Referenced by SeExpr2::TypePrintExaminer::examine(), and SeExpr2::ExprCurveAssignSpec< T >::ExprCurveAssignSpec().

## ◆ type()

const ExprType& SeExpr2::ExprNode::type | ( |  | ) | const
| inline

The type of the node.

Definition at line 145 of file ExprNode.h.

References _type.

Referenced by SeExpr2::ExprPrototypeNode::addArgs(), SeExpr2::ExprPrototypeNode::addArgTypes(), SeExpr2::ExprFuncSimple::buildInterpreter(), SeExpr2::ExprFuncStandard::buildInterpreter(), SeExpr2::ExprAssignNode::buildInterpreter(), SeExpr2::ExprUnaryOpNode::buildInterpreter(), SeExpr2::ExprSubscriptNode::buildInterpreter(), SeExpr2::ExprCompareNode::buildInterpreter(), SeExpr2::ExprBinaryOpNode::buildInterpreter(), SeExpr2::ExprVarNode::buildInterpreter(), SeExpr2::ExprLocalFunctionNode::buildInterpreterForCall(), SeExpr2::ExprFuncNode::checkArg(), checkIsFP(), checkIsValue(), SeExpr2::Expression::debugPrintParseTree(), SeExpr2::GetVar::evalConstant(), SeExpr2::TypePrintExaminer::examine(), prep(), SeExpr2::Expression::prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprFuncNode::prep(), SeExpr2::ExprPrototypeNode::setReturnType(), and setTypeWithChildLife().

## Member Data Documentation

## ◆ _children

std::vector<ExprNode*> SeExpr2::ExprNode::_children
| protected

List of children.

Definition at line 231 of file ExprNode.h.

Referenced by addChild(), addChildren(), child(), ExprNode(), numChildren(), removeLastChild(), swapChildren(), and ~ExprNode().

## ◆ _endPos

unsigned short int SeExpr2::ExprNode::_endPos
| protected

Definition at line 241 of file ExprNode.h.

Referenced by addError(), endPos(), and setPosition().

## ◆ _expr

const Expression* SeExpr2::ExprNode::_expr
| protected

Owning expression (node can't modify)

Definition at line 225 of file ExprNode.h.

Referenced by addError(), expr(), SeExpr2::ExprVarNode::prep(), and SeExpr2::ExprFuncNode::prep().

## ◆ _isVec

bool SeExpr2::ExprNode::_isVec
| protected

True if node has a vector result.

Definition at line 234 of file ExprNode.h.

Referenced by isVec().

## ◆ _maxChildDim

int SeExpr2::ExprNode::_maxChildDim
| protected

Definition at line 238 of file ExprNode.h.

Referenced by prep().

## ◆ _parent

ExprNode* SeExpr2::ExprNode::_parent
| protected

Parent node (null if this the the root)

Definition at line 228 of file ExprNode.h.

Referenced by addChild(), and parent().

## ◆ _startPos

unsigned short int SeExpr2::ExprNode::_startPos
| protected

Position line and collumn.

Definition at line 241 of file ExprNode.h.

Referenced by addError(), setPosition(), and startPos().

## ◆ _type

ExprType SeExpr2::ExprNode::_type
| protected

Definition at line 237 of file ExprNode.h.

Referenced by prep(), SeExpr2::ExprModuleNode::prep(), SeExpr2::ExprPrototypeNode::prep(), SeExpr2::ExprLocalFunctionNode::prep(), SeExpr2::ExprBlockNode::prep(), SeExpr2::ExprIfThenElseNode::prep(), SeExpr2::ExprAssignNode::prep(), SeExpr2::ExprVecNode::prep(), SeExpr2::ExprUnaryOpNode::prep(), SeExpr2::ExprCondNode::prep(), SeExpr2::ExprSubscriptNode::prep(), SeExpr2::ExprCompareEqNode::prep(), SeExpr2::ExprCompareNode::prep(), SeExpr2::ExprBinaryOpNode::prep(), SeExpr2::ExprVarNode::prep(), SeExpr2::ExprNumNode::prep(), SeExpr2::ExprStrNode::prep(), SeExpr2::ExprFuncNode::prep(), setType(), setTypeWithChildLife(), and type().

The documentation for this class was generated from the following files:

- /build/seexpr/src/SeExpr/src/SeExpr2/ExprNode.h
- /build/seexpr/src/SeExpr/src/SeExpr2/ExprNode.cpp
- /build/seexpr/src/SeExpr/src/SeExpr2/Interpreter.cpp