LibreOffice Module basic (master) 1
|
#include <expr.hxx>
Public Member Functions | |
SbiExprNode () | |
SbiExprNode (double, SbxDataType) | |
SbiExprNode (OUString) | |
SbiExprNode (const SbiSymDef &, SbxDataType, SbiExprListPtr=nullptr) | |
SbiExprNode (std::unique_ptr< SbiExprNode >, SbiToken, std::unique_ptr< SbiExprNode >) | |
SbiExprNode (std::unique_ptr< SbiExprNode >, sal_uInt16) | |
SbiExprNode (sal_uInt16) | |
~SbiExprNode () | |
bool | IsValid () const |
bool | IsConstant () const |
void | ConvertToIntConstIfPossible () |
bool | IsVariable () const |
void | SetWithParent (SbiExprNode *p) |
SbxDataType | GetType () const |
void | SetType (SbxDataType eTp) |
SbiNodeType | GetNodeType () const |
SbiSymDef * | GetVar () |
SbiSymDef * | GetRealVar () |
SbiExprNode * | GetRealNode () |
const OUString & | GetString () const |
short | GetNumber () const |
SbiExprList * | GetParameters () |
void | Optimize (SbiParser *) |
void | Gen (SbiCodeGen &rGen, RecursiveMode eRecMode=UNDEFINED) |
Private Member Functions | |
void | FoldConstants (SbiParser *) |
void | FoldConstantsBinaryNode (SbiParser *) |
void | FoldConstantsUnaryNode (SbiParser *) |
void | CollectBits () |
bool | IsOperand () const |
bool | IsNumber () const |
bool | IsLvalue () const |
void | GenElement (SbiCodeGen &, SbiOpcode) |
Private Attributes | |
union { | |
sal_uInt16 nTypeStrId | |
double nVal | |
SbVar aVar | |
}; | |
OUString | aStrVal |
std::unique_ptr< SbiExprNode > | pLeft |
std::unique_ptr< SbiExprNode > | pRight |
SbiExprNode * | pWithParent |
SbiNodeType | eNodeType |
SbxDataType | eType |
SbiToken | eTok |
bool | bError |
Friends | |
class | SbiExpression |
class | SbiConstExpression |
SbiExprNode::SbiExprNode | ( | ) |
Definition at line 100 of file exprnode.cxx.
References eType.
SbiExprNode::SbiExprNode | ( | double | n, |
SbxDataType | t | ||
) |
Definition at line 44 of file exprnode.cxx.
SbiExprNode::SbiExprNode | ( | OUString | aVal | ) |
Definition at line 54 of file exprnode.cxx.
References eType.
SbiExprNode::SbiExprNode | ( | const SbiSymDef & | r, |
SbxDataType | t, | ||
SbiExprListPtr | l = nullptr |
||
) |
Definition at line 64 of file exprnode.cxx.
References aVar, eType, SbiSymDef::GetType(), SbVar::pDef, SbVar::pNext, SbVar::pPar, SbVar::pvMorePar, SbxVARIANT, and t.
SbiExprNode::SbiExprNode | ( | std::unique_ptr< SbiExprNode > | l, |
SbiToken | t, | ||
std::unique_ptr< SbiExprNode > | r | ||
) |
Definition at line 33 of file exprnode.cxx.
SbiExprNode::SbiExprNode | ( | std::unique_ptr< SbiExprNode > | l, |
sal_uInt16 | nId | ||
) |
Definition at line 78 of file exprnode.cxx.
SbiExprNode::SbiExprNode | ( | sal_uInt16 | nId | ) |
Definition at line 90 of file exprnode.cxx.
SbiExprNode::~SbiExprNode | ( | ) |
Definition at line 109 of file exprnode.cxx.
References aVar, IsVariable(), SbVar::pNext, SbVar::pPar, and SbVar::pvMorePar.
|
private |
Definition at line 195 of file exprnode.cxx.
References bError, pLeft, and pRight.
Referenced by FoldConstantsBinaryNode(), and Optimize().
void SbiExprNode::ConvertToIntConstIfPossible | ( | ) |
Definition at line 152 of file exprnode.cxx.
References eNodeType, eType, nVal, SbxDOUBLE, SbxINTEGER, SbxMAXINT, SbxMININT, SbxNUMVAL, and o3tl::temporary().
|
private |
Definition at line 211 of file exprnode.cxx.
References eNodeType, eTok, eType, FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), IsOperand(), LIKE, nVal, pLeft, pRight, SbxDOUBLE, SbxINTEGER, SbxLONG, SbxMAXINT, SbxMAXLNG, SbxMININT, SbxMINLNG, SbxNUMVAL, SbxSINGLE, and o3tl::temporary().
Referenced by Optimize().
|
private |
Definition at line 234 of file exprnode.cxx.
References AND, aStrVal, bError, CAT, CollectBits(), DIV, eNodeType, EQ, EQV, ERRCODE_BASIC_CONVERSION, ERRCODE_BASIC_MATH_OVERFLOW, ERRCODE_BASIC_ZERODIV, SbiTokenizer::Error(), eTok, eType, EXPON, GE, GT, IDIV, IMP, LE, LT, MINUS, MOD, MUL, n, NE, nVal, OR, pLeft, PLUS, pRight, SbxDOUBLE, SbxFALSE, SbxINTEGER, SbxLONG, SbxMAXINT, SbxMAXLNG, SbxMININT, SbxMINLNG, SbxNUMVAL, SbxSINGLE, SbxSTRING, SbxSTRVAL, SbxTRUE, and XOR.
Referenced by FoldConstants().
|
private |
Definition at line 428 of file exprnode.cxx.
References bError, eNodeType, ERRCODE_BASIC_MATH_OVERFLOW, SbiTokenizer::Error(), eTok, eType, NEG, NOT, nVal, pLeft, SbxDOUBLE, SbxINTEGER, SbxLONG, SbxMAXINT, SbxMAXLNG, SbxMININT, SbxMINLNG, SbxNUMVAL, SbxSINGLE, and o3tl::temporary().
Referenced by FoldConstants().
void SbiExprNode::Gen | ( | SbiCodeGen & | rGen, |
RecursiveMode | eRecMode = UNDEFINED |
||
) |
Definition at line 64 of file exprgen.cxx.
References SbiStringPool::Add(), SbiParser::aGblStrings, aOpTable, aStrVal, aVar, SbiParser::bClassModule, CREATE_, ELEM_, EMPTY_, eNodeType, eTok, eType, FIND_, FIND_CM_, FIND_G_, FIND_STATIC_, FORCE_CALL, Gen(), SbiCodeGen::Gen(), SbiCodeGen::GetParser(), SbiSymDef::GetPos(), SbiSymDef::GetProcDef(), SbiSymDef::GetScope(), GetType(), SbiExprList::IsBracket(), IsConstant(), SbiSymDef::IsGlobal(), IsOperand(), SbiSymDef::IsStatic(), NIL, nTypeStrId, NUMBER_, nVal, p, PARAM_, SbVar::pDef, pLeft, SbVar::pPar, pRight, pWithParent, RTL_, SbPARAM, SbRTL, SbxEMPTY, SbxNEW, SbxSTRING, SbxTYPEOF, SCONST_, TESTCLASS_, and UNDEFINED.
Referenced by Gen().
|
private |
Definition at line 177 of file exprgen.cxx.
References ARRAYACCESS_, aVar, CALLC_, ERRCODE_BASIC_INTERNAL_ERROR, SbiTokenizer::Error(), FIND_CM_, FIND_G_, FIND_STATIC_, SbiExprList::Gen(), SbiCodeGen::Gen(), SbiSymDef::GetId(), SbiCodeGen::GetParser(), SbiSymDef::GetPos(), SbiExprList::GetSize(), GetType(), nId, PARAM_, SbVar::pDef, SbVar::pPar, and SbVar::pvMorePar.
|
inline |
|
inline |
|
inline |
Definition at line 159 of file expr.hxx.
References aVar, and SbVar::pPar.
Referenced by SbiParser::Symbol().
SbiExprNode * SbiExprNode::GetRealNode | ( | ) |
Definition at line 137 of file exprnode.cxx.
References eNodeType, p, and SbxVARVAL.
Referenced by GetRealVar(), and SbiParser::With().
SbiSymDef * SbiExprNode::GetRealVar | ( | ) |
Definition at line 127 of file exprnode.cxx.
References GetRealNode(), and p.
Referenced by SbiExpression::Term().
|
inline |
|
inline |
SbiSymDef * SbiExprNode::GetVar | ( | ) |
Definition at line 119 of file exprnode.cxx.
References aVar, eNodeType, SbVar::pDef, and SbxVARVAL.
Referenced by SbiParser::With().
|
inline |
|
private |
Definition at line 176 of file exprnode.cxx.
References IsVariable().
|
private |
Definition at line 166 of file exprnode.cxx.
|
inlineprivate |
|
inline |
bool SbiExprNode::IsVariable | ( | ) | const |
Definition at line 171 of file exprnode.cxx.
References eNodeType, and SbxVARVAL.
Referenced by IsLvalue(), and ~SbiExprNode().
void SbiExprNode::Optimize | ( | SbiParser * | pParser | ) |
Definition at line 187 of file exprnode.cxx.
References CollectBits(), and FoldConstants().
|
inline |
|
inline |
Definition at line 149 of file expr.hxx.
References p, and pWithParent.
|
friend |
|
friend |
union { ... } SbiExprNode::@1 |
|
private |
Definition at line 115 of file expr.hxx.
Referenced by FoldConstantsBinaryNode(), Gen(), and GetString().
SbVar SbiExprNode::aVar |
Definition at line 113 of file expr.hxx.
Referenced by Gen(), GenElement(), GetParameters(), GetVar(), SbiExprNode(), and ~SbiExprNode().
|
private |
Definition at line 122 of file expr.hxx.
Referenced by CollectBits(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), and IsValid().
|
private |
Definition at line 119 of file expr.hxx.
Referenced by ConvertToIntConstIfPossible(), FoldConstants(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), Gen(), GetNodeType(), GetRealNode(), GetVar(), IsConstant(), IsNumber(), IsOperand(), and IsVariable().
|
private |
Definition at line 121 of file expr.hxx.
Referenced by FoldConstants(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), and Gen().
|
private |
Definition at line 120 of file expr.hxx.
Referenced by ConvertToIntConstIfPossible(), FoldConstants(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), Gen(), GetType(), SbiExprNode(), and SetType().
double SbiExprNode::nVal |
Definition at line 112 of file expr.hxx.
Referenced by ConvertToIntConstIfPossible(), FoldConstants(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), Gen(), and GetNumber().
|
private |
Definition at line 116 of file expr.hxx.
Referenced by CollectBits(), FoldConstants(), FoldConstantsBinaryNode(), FoldConstantsUnaryNode(), and Gen().
|
private |
Definition at line 117 of file expr.hxx.
Referenced by CollectBits(), FoldConstants(), FoldConstantsBinaryNode(), and Gen().
|
private |
Definition at line 118 of file expr.hxx.
Referenced by Gen(), and SetWithParent().