diff options
Diffstat (limited to 'basic/source/comp/io.cxx')
-rw-r--r-- | basic/source/comp/io.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index 1ed551994c92..b211ea0b7b08 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -115,6 +115,30 @@ void SbiParser::Write() aGen.Gen( _CHAN0 ); } + +// #i92642 Handle LINE keyword outside ::Next() +void SbiParser::Line() +{ + // #i92642: Special handling to allow name as symbol + if( Peek() == INPUT ) + { + Next(); + LineInput(); + } + else + { + aGen.Statement(); + + KeywordSymbolInfo aInfo; + aInfo.m_aKeywordSymbol = String( RTL_CONSTASCII_USTRINGPARAM( "line" ) ); + aInfo.m_eSbxDataType = GetType(); + aInfo.m_eTok = SYMBOL; + + Symbol( &aInfo ); + } +} + + // LINE INPUT [prompt], var$ void SbiParser::LineInput() @@ -288,6 +312,19 @@ void SbiParser::Open() void SbiParser::Name() { + // #i92642: Special handling to allow name as symbol + if( Peek() == EQ ) + { + aGen.Statement(); + + KeywordSymbolInfo aInfo; + aInfo.m_aKeywordSymbol = String( RTL_CONSTASCII_USTRINGPARAM( "name" ) ); + aInfo.m_eSbxDataType = GetType(); + aInfo.m_eTok = SYMBOL; + + Symbol( &aInfo ); + return; + } SbiExpression aExpr1( this ); TestToken( AS ); SbiExpression aExpr2( this ); |