diff options
Diffstat (limited to 'patches/vba/basic-allow-objectforerror-symbol.diff')
-rw-r--r-- | patches/vba/basic-allow-objectforerror-symbol.diff | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/patches/vba/basic-allow-objectforerror-symbol.diff b/patches/vba/basic-allow-objectforerror-symbol.diff deleted file mode 100644 index 5f6a4f3dc..000000000 --- a/patches/vba/basic-allow-objectforerror-symbol.diff +++ /dev/null @@ -1,42 +0,0 @@ -diff --git basic/source/comp/exprtree.cxx basic/source/comp/exprtree.cxx -index 88b51d1..8e78aba 100644 ---- basic/source/comp/exprtree.cxx -+++ basic/source/comp/exprtree.cxx -@@ -378,8 +378,12 @@ SbiExprNode* SbiExpression::Term( void ) - // Typ SbxOBJECT sein - if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT ) - { -- pParser->Error( SbERR_BAD_DECLARATION, aSym ); -- bError = TRUE; -+ // defer error until runtime if in vba mode -+ if ( !pParser->IsVBASupportOn() ) -+ { -+ pParser->Error( SbERR_BAD_DECLARATION, aSym ); -+ bError = TRUE; -+ } - } - if( !bError ) - pNd->aVar.pNext = ObjTerm( *pDef ); -diff --git basic/source/comp/parser.cxx basic/source/comp/parser.cxx -index 1a4dc06..dea8d79 100644 ---- basic/source/comp/parser.cxx -+++ basic/source/comp/parser.cxx -@@ -405,6 +405,18 @@ BOOL SbiParser::Parse() - Next(); return TRUE; - } - -+ // In vba it's possible to do Error.foobar ( even if it results in -+ // a runtime error -+ if ( eCurTok == _ERROR_ && IsVBASupportOn() ) // we probably need to define a subset of keywords where this madness applies e.g. if ( IsVBASupportOn() && SymbolCanBeRedined( eCurTok ) ) -+ { -+ SbiTokenizer tokens( *(SbiTokenizer*)this ); -+ tokens.Next(); -+ if ( tokens.Peek() == DOT ) -+ { -+ eCurTok = SYMBOL; -+ ePush = eCurTok; -+ } -+ } - // Kommt ein Symbol, ist es entweder eine Variable( LET ) - // oder eine SUB-Prozedur( CALL ohne Klammern ) - // DOT fuer Zuweisungen im WITH-Block: .A=5 |