diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-03-11 14:05:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-06-22 09:27:15 +0200 |
commit | 3e53c6ba9313dae334c0b4db78c911fa960a9fe2 (patch) | |
tree | 6680afe56b8c5f0cf7a36049e176c2f1001b374f /idl/source/objects | |
parent | move the method param parsing code into SvParser (diff) | |
download | core-3e53c6ba9313dae334c0b4db78c911fa960a9fe2.tar.gz core-3e53c6ba9313dae334c0b4db78c911fa960a9fe2.zip |
move the attribute parsing code to SvParser
and simplify considerably
Change-Id: I2a4af15e77904b62abc81dad78a2990e2eab05f0
Diffstat (limited to 'idl/source/objects')
-rw-r--r-- | idl/source/objects/bastype.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 08c59f9a808c..adff4d5e726d 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -35,24 +35,17 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) if( rTok.Is( pName ) ) { - bool bOk = true; - bool bBracket = rInStm.ReadIf( '(' ); - if( bBracket || rInStm.ReadIf( '=' ) ) + if( rInStm.ReadIf( '=' ) ) { rTok = rInStm.GetToken(); - if( rTok.IsBool() ) - { - *this = rTok.GetBool(); - - rInStm.GetToken_Next(); - } - if( bOk && bBracket ) - bOk = rInStm.ReadIf( ')' ); + if( !rTok.IsBool() ) + throw SvParseException(rInStm, "xxx"); + *this = rTok.GetBool(); + rInStm.GetToken_Next(); } else *this = true; //default action set to TRUE - if( bOk ) - return true; + return true; } rInStm.Seek( nTokPos ); return false; |