diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-28 15:05:59 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-28 15:05:59 +0000 |
commit | c01b5c0f1318abe15bb034ada42924056bab4308 (patch) | |
tree | 4a3114deb3e7564cd7815a1808eab8f68eb72929 /basic/source/comp/dim.cxx | |
parent | 20a9cffb95c65be13698320c82ae9003b6acaed9 (diff) |
INTEGRATION: CWS ab13fixes (1.16.14); FILE MERGED
2005/01/20 16:19:41 ab 1.16.14.1: #111897# Parse ParamArray
Diffstat (limited to 'basic/source/comp/dim.cxx')
-rw-r--r-- | basic/source/comp/dim.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index f47b507749..090913deff 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dim.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: rt $ $Date: 2004-11-15 16:41:23 $ + * last change: $Author: rt $ $Date: 2005-01-28 16:05:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -814,12 +814,20 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) for(;;) { BOOL bByVal = FALSE; BOOL bOptional = FALSE; + BOOL bParamArray = FALSE; while( Peek() == BYVAL || Peek() == BYREF || Peek() == _OPTIONAL_ ) { if ( Peek() == BYVAL ) Next(), bByVal = TRUE; else if ( Peek() == BYREF ) Next(), bByVal = FALSE; else if ( Peek() == _OPTIONAL_ ) Next(), bOptional = TRUE; } + if( bCompatible && Peek() == PARAMARRAY ) + { + if( bByVal || bByVal || bOptional ) + Error( SbERR_UNEXPECTED, PARAMARRAY ); + Next(); + bParamArray = TRUE; + } SbiSymDef* pPar = VarDecl( NULL, FALSE, FALSE ); if( !pPar ) break; @@ -827,6 +835,8 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) pPar->SetByVal(); if( bOptional ) pPar->SetOptional(); + if( bParamArray ) + pPar->SetParamArray(); pDef->GetParams().Add( pPar ); SbiToken eTok = Next(); if( eTok != COMMA && eTok != RPAREN ) |