26#include <com/sun/star/script/ModuleType.hpp>
27#include <rtl/character.hxx>
115{
NIL,
nullptr,
N,
N }
126 bSingleLineIf(false),
127 bCodeCompleting(false),
128 aGlobals( aGblStrings,
SbGLOBAL, this ),
129 aPublics( aGblStrings,
SbPUBLIC, this ),
130 aRtlSyms( aGblStrings,
SbRTL, this ),
166 if (pMethod->IsRuntimeFunction())
168 pProc_->
SetType( pMethod->GetRuntimeFunctionReturnType() );
219 if(
p->eExitTok ==
FOR )
236 if( eTok == eExitTok ||
283 else if( eTok !=
COMMA )
324 if(
bAbort )
return false;
416 const SbiStatement*
p;
424 else if(
pProc && !
p->bSubr )
440 (this->*( p->Func ) )();
496 bool bEQ = (
Peek() ==
EQ );
501 bool bSpecialMidHandling =
false;
505 OUString aRtlName = pDef->
GetName();
506 if( aRtlName.equalsIgnoreAsciiCase(
"Mid") )
512 short nParCount = pPar ? pPar->
GetSize() : 0;
513 if( nParCount == 2 || nParCount == 3 )
519 pPar->
addExpression( std::make_unique<SbiExpression>(
this ) );
521 bSpecialMidHandling =
true;
526 aVar.
Gen( eRecMode );
527 if( bSpecialMidHandling )
598 auto pTypeDef = std::make_unique<SbiSymDef>( OUString() );
680 ch1 = rtl::toAsciiUpperCase(
aSym[0]);
688 ch2 = rtl::toAsciiUpperCase(
aSym[0]);
697 ch1 -=
'A'; ch2 -=
'A';
698 for (; ch1 <= ch2; ch1++)
eDefTypes[ ch1 ] =
t;
728 OUString aImplementedIface =
aSym;
732 OUString aDotStr(
'.' );
735 aImplementedIface += aDotStr;
741 aImplementedIface +=
aSym;
780 if( !aString.equalsIgnoreAsciiCase(
"Module") )
sal_Int32 GetModuleType() const
void SetModuleType(sal_Int32 nType)
SAL_DLLPRIVATE void SetVBASupport(bool bSupport)
bool IsVBASupport() const
sal_uInt32 Gen(SbiOpcode)
void BackChain(sal_uInt32 off)
void Set(double, SbxDataType)
void addExpression(std::unique_ptr< SbiExpression > &&pExpr)
SbiNodeType GetNodeType() const
SbiExprList * GetParameters()
void Gen(RecursiveMode eRecMode=UNDEFINED)
SbiExprNode * GetExprNode()
SbxDataType GetType() const
void StmntBlock(SbiToken)
SbiExprNode * GetWithVar()
SbxDataType eDefTypes[N_DEF_TYPES]
void OpenBlock(SbiToken, SbiExprNode *=nullptr)
std::vector< OUString > aIfaceVector
void TypeDecl(SbiSymDef &, bool bAsNewAlreadyParsed=false)
SbiSymDef * CheckRTLForSym(const OUString &rSym, SbxDataType eType)
void Symbol(const KeywordSymbolInfo *pKeywordSymbolInfo)
SbiParser(StarBASIC *, SbModule *)
void EnableCompatibility()
void SetCodeCompleting(bool b)
virtual void SetType(SbxDataType) override
bool IsVBASupportOn() const
const OUString & GetSym() const
SbiSymScope GetScope() const
virtual SbiConstDef * GetConstDef()
sal_uInt16 GetTypeId() const
SbxDataType GetType() const
const OUString & GetName()
virtual void SetType(SbxDataType)
SbiProcDef * AddProc(const OUString &)
sal_uInt32 Define(const OUString &)
void SetParent(SbiSymPool *p)
SbiSymDef * AddSym(const OUString &)
static bool IsKwd(SbiToken t)
bool MayBeLabel(bool=false)
static bool IsEoln(SbiToken t)
const OUString & Symbol(SbiToken)
static ErrCode const & GetError()
virtual SbxVariable * Find(const OUString &, SbxClassType)
virtual SbxDataType GetType() const override
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
const SbiStatement StmntTable[]
static void addStringConst(SbiSymPool &rPool, const OUString &pSym, const OUString &rStr)
static void addNumericConst(SbiSymPool &rPool, const OUString &pSym, double nVal)
#define ERRCODE_BASIC_EXPECTED
#define ERRCODE_BASIC_NOT_IN_MAIN
#define ERRCODE_BASIC_INVALID_OBJECT
#define ERRCODE_BASIC_NOT_IN_SUBR
#define ERRCODE_BASIC_UNEXPECTED
#define ERRCODE_BASIC_LVALUE_EXPECTED
#define ERRCODE_BASIC_SYMBOL_EXPECTED
#define ERRCODE_BASIC_SYNTAX
#define ERRCODE_BASIC_DUPLICATE_DEF
#define ERRCODE_BASIC_BAD_BLOCK
#define ERRCODE_BASIC_BAD_EXIT
#define ERRCODE_BASIC_BAD_OPTION