summaryrefslogtreecommitdiff
path: root/basic/source/comp/io.cxx
diff options
context:
space:
mode:
authorsj <sj@openoffice.org>2010-08-13 15:02:26 +0200
committersj <sj@openoffice.org>2010-08-13 15:02:26 +0200
commite91eb75f9e7f7788e648a0d270f2166222ed54ab (patch)
tree1d3724109b0dd67b4f0a7930fd4f6bc03b6cd353 /basic/source/comp/io.cxx
parente316ce7a8f784231ff39bb069ec6eac0aefca9ce (diff)
parent0e6f37318dd855bd04e3281435d1af751398c98f (diff)
impress186: merge with DEV300m86
Diffstat (limited to 'basic/source/comp/io.cxx')
-rw-r--r--basic/source/comp/io.cxx37
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 );