Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
53a662f5
Kaydet (Commit)
53a662f5
authored
Kas 19, 2011
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refactoring in scanner
üst
ac4b051e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
20 deletions
+25
-20
scanner.cxx
basic/source/comp/scanner.cxx
+23
-20
scanner.hxx
basic/source/inc/scanner.hxx
+2
-0
No files found.
basic/source/comp/scanner.cxx
Dosyayı görüntüle @
53a662f5
...
@@ -161,6 +161,28 @@ inline bool lclIsWhitespace( sal_Unicode cChar )
...
@@ -161,6 +161,28 @@ inline bool lclIsWhitespace( sal_Unicode cChar )
}
// namespace
}
// namespace
void
SbiScanner
::
scanGoto
()
{
const
sal_Unicode
*
pTestLine
=
pLine
;
short
nTestCol
=
nCol
;
while
(
lclIsWhitespace
(
*
pTestLine
)
)
{
pTestLine
++
;
nTestCol
++
;
}
if
(
*
pTestLine
&&
*
(
pTestLine
+
1
)
)
{
String
aTestSym
=
aLine
.
copy
(
nTestCol
,
2
);
if
(
aTestSym
.
EqualsIgnoreCaseAscii
(
"to"
)
)
{
aSym
=
String
::
CreateFromAscii
(
"goto"
);
pLine
=
pTestLine
+
2
;
nCol
=
nTestCol
+
2
;
}
}
}
bool
SbiScanner
::
NextSym
()
bool
SbiScanner
::
NextSym
()
{
{
// memorize for the EOLN-case
// memorize for the EOLN-case
...
@@ -240,26 +262,7 @@ bool SbiScanner::NextSym()
...
@@ -240,26 +262,7 @@ bool SbiScanner::NextSym()
// Special handling for "go to"
// Special handling for "go to"
if
(
bCompatible
&&
*
pLine
&&
aSym
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"go"
)
)
)
if
(
bCompatible
&&
*
pLine
&&
aSym
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"go"
)
)
)
{
scanGoto
();
const
sal_Unicode
*
pTestLine
=
pLine
;
short
nTestCol
=
nCol
;
while
(
lclIsWhitespace
(
*
pTestLine
)
)
{
pTestLine
++
;
nTestCol
++
;
}
if
(
*
pTestLine
&&
*
(
pTestLine
+
1
)
)
{
String
aTestSym
=
aLine
.
copy
(
nTestCol
,
2
);
if
(
aTestSym
.
EqualsIgnoreCaseAscii
(
"to"
)
)
{
aSym
=
String
::
CreateFromAscii
(
"goto"
);
pLine
=
pTestLine
+
2
;
nCol
=
nTestCol
+
2
;
}
}
}
// replace closing '_' by space when end of line is following
// replace closing '_' by space when end of line is following
// (wrong line continuation otherwise)
// (wrong line continuation otherwise)
...
...
basic/source/inc/scanner.hxx
Dosyayı görüntüle @
53a662f5
...
@@ -45,6 +45,8 @@ class SbiScanner
...
@@ -45,6 +45,8 @@ class SbiScanner
::
rtl
::
OUString
aLine
;
::
rtl
::
OUString
aLine
;
const
sal_Unicode
*
pLine
;
const
sal_Unicode
*
pLine
;
const
sal_Unicode
*
pSaveLine
;
const
sal_Unicode
*
pSaveLine
;
void
scanGoto
();
protected
:
protected
:
::
rtl
::
OUString
aSym
;
::
rtl
::
OUString
aSym
;
String
aError
;
String
aError
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment