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
28f16e4c
Kaydet (Commit)
28f16e4c
authored
Ock 09, 2012
tarafından
August Sodora
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Only set bSpaces once here
üst
ed5b6ace
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
13 deletions
+26
-13
scanner.cxx
basic/source/comp/scanner.cxx
+26
-13
No files found.
basic/source/comp/scanner.cxx
Dosyayı görüntüle @
28f16e4c
...
@@ -234,8 +234,12 @@ bool SbiScanner::NextSym()
...
@@ -234,8 +234,12 @@ bool SbiScanner::NextSym()
nOldCol1
=
nOldCol2
=
0
;
nOldCol1
=
nOldCol2
=
0
;
}
}
while
(
nCol
<
aLine
.
getLength
()
&&
theBasicCharClass
::
get
().
isWhitespace
(
aLine
[
nCol
]))
if
(
nCol
<
aLine
.
getLength
()
&&
theBasicCharClass
::
get
().
isWhitespace
(
aLine
[
nCol
]))
++
pLine
,
++
nCol
,
bSpaces
=
true
;
{
bSpaces
=
true
;
while
(
nCol
<
aLine
.
getLength
()
&&
theBasicCharClass
::
get
().
isWhitespace
(
aLine
[
nCol
]))
++
pLine
,
++
nCol
;
}
nCol1
=
nCol
;
nCol1
=
nCol
;
...
@@ -257,20 +261,24 @@ bool SbiScanner::NextSym()
...
@@ -257,20 +261,24 @@ bool SbiScanner::NextSym()
if
(
nCol
<
aLine
.
getLength
()
&&
(
theBasicCharClass
::
get
().
isAlpha
(
aLine
[
nCol
],
bCompatible
)
||
aLine
[
nCol
]
==
'_'
))
if
(
nCol
<
aLine
.
getLength
()
&&
(
theBasicCharClass
::
get
().
isAlpha
(
aLine
[
nCol
],
bCompatible
)
||
aLine
[
nCol
]
==
'_'
))
{
{
// if there's nothing behind '_' , it's the end of a line!
// if there's nothing behind '_' , it's the end of a line!
if
(
*
pLine
==
'_'
&&
!*
(
pLine
+
1
)
)
if
(
nCol
+
1
==
aLine
.
getLength
()
&&
aLine
[
nCol
]
==
'_'
)
{
++
pLine
;
{
goto
eoln
;
}
// Note that nCol is not incremented here...
++
pLine
;
goto
eoln
;
}
bSymbol
=
true
;
bSymbol
=
true
;
scanAlphanumeric
();
scanAlphanumeric
();
// Special handling for "go to"
// Special handling for "go to"
if
(
bCompatible
&&
*
pLine
&&
aSym
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"go"
)
)
)
if
(
nCol
<
aLine
.
getLength
()
&&
bCompatible
&&
aSym
.
equalsIgnoreAsciiCaseAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"go"
))
)
scanGoto
();
scanGoto
();
// 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)
if
(
!*
pLine
&&
*
(
pLine
-
1
)
==
'_'
)
if
(
nCol
==
aLine
.
getLength
()
&&
aLine
[
nCol
-
1
]
==
'_'
)
{
{
// We are going to modify a potentially shared string, so force
// We are going to modify a potentially shared string, so force
// a copy, so that aSym is not modified by the following operation
// a copy, so that aSym is not modified by the following operation
...
@@ -280,17 +288,22 @@ bool SbiScanner::NextSym()
...
@@ -280,17 +288,22 @@ bool SbiScanner::NextSym()
// HACK: modifying a potentially shared string here!
// HACK: modifying a potentially shared string here!
*
((
sal_Unicode
*
)(
pLine
-
1
))
=
' '
;
*
((
sal_Unicode
*
)(
pLine
-
1
))
=
' '
;
}
}
// type recognition?
// type recognition?
// don't test the exclamation mark
// don't test the exclamation mark
// if there's a symbol behind it
// if there's a symbol behind it
else
if
(
*
pLine
!=
'!'
||
!
theBasicCharClass
::
get
().
isAlpha
(
pLine
[
1
],
bCompatible
)
)
else
if
((
nCol
>=
aLine
.
getLength
()
||
aLine
[
nCol
]
!=
'!'
)
||
(
nCol
+
1
>=
aLine
.
getLength
()
||
!
theBasicCharClass
::
get
().
isAlpha
(
aLine
[
nCol
+
1
],
bCompatible
)))
{
{
SbxDataType
t
=
GetSuffixType
(
*
pLine
);
if
(
nCol
<
aLine
.
getLength
())
if
(
t
!=
SbxVARIANT
)
{
{
eScanType
=
t
;
SbxDataType
t
=
GetSuffixType
(
*
pLine
);
++
pLine
;
if
(
t
!=
SbxVARIANT
)
++
nCol
;
{
eScanType
=
t
;
++
pLine
;
++
nCol
;
}
}
}
}
}
}
}
...
...
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