aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexSQL.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexSQL.cxx')
-rw-r--r--lexers/LexSQL.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/lexers/LexSQL.cxx b/lexers/LexSQL.cxx
index 82236e55f..34b601fba 100644
--- a/lexers/LexSQL.cxx
+++ b/lexers/LexSQL.cxx
@@ -66,7 +66,7 @@ typedef unsigned int sql_state_t;
class SQLStates {
public :
- void Set(int lineNumber, unsigned short int sqlStatesLine) {
+ void Set(Sci_Position lineNumber, unsigned short int sqlStatesLine) {
sqlStatement.Set(lineNumber, sqlStatesLine);
}
@@ -214,7 +214,7 @@ public :
return (sqlStatesLine & MASK_INTO_CREATE_VIEW_AS_STATEMENT) != 0;
}
- sql_state_t ForLine(int lineNumber) {
+ sql_state_t ForLine(Sci_Position lineNumber) {
return sqlStatement.ValueAt(lineNumber);
}
@@ -372,10 +372,10 @@ private:
}
}
- bool IsCommentLine (int line, LexAccessor &styler) {
- int pos = styler.LineStart(line);
- int eol_pos = styler.LineStart(line + 1) - 1;
- for (int i = pos; i + 1 < eol_pos; i++) {
+ bool IsCommentLine (Sci_Position line, LexAccessor &styler) {
+ Sci_Position pos = styler.LineStart(line);
+ Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
+ for (Sci_Position i = pos; i + 1 < eol_pos; i++) {
int style = styler.StyleAt(i);
// MySQL needs -- comments to be followed by space or control char
if (style == SCE_SQL_COMMENTLINE && styler.Match(i, "--"))
@@ -427,7 +427,7 @@ Sci_Position SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) {
case 7:
wordListN = &kw_user4;
}
- int firstModification = -1;
+ Sci_Position firstModification = -1;
if (wordListN) {
WordList wlNew;
wlNew.Set(wl);
@@ -443,7 +443,7 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i
LexAccessor styler(pAccess);
StyleContext sc(startPos, length, initStyle, styler);
int styleBeforeDCKeyword = SCE_SQL_DEFAULT;
- int offset = 0;
+ Sci_Position offset = 0;
for (; sc.More(); sc.Forward(), offset++) {
// Determine if the current state should terminate.
@@ -561,7 +561,7 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i
// Locate the unique Q operator character
sc.Complete();
char qOperator = 0x00;
- for (int styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) {
+ for (Sci_Position styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) {
if (styler.StyleAt(styleStartPos - 1) != SCE_SQL_QOPERATOR) {
qOperator = styler.SafeGetCharAt(styleStartPos + 2);
break;
@@ -632,14 +632,14 @@ void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int
if (!options.fold)
return;
LexAccessor styler(pAccess);
- unsigned int endPos = startPos + length;
+ Sci_PositionU endPos = startPos + length;
int visibleChars = 0;
- int lineCurrent = styler.GetLine(startPos);
+ Sci_Position lineCurrent = styler.GetLine(startPos);
int levelCurrent = SC_FOLDLEVELBASE;
if (lineCurrent > 0) {
// Backtrack to previous line in case need to fix its fold status for folding block of single-line comments (i.e. '--').
- int lastNLPos = -1;
+ Sci_Position lastNLPos = -1;
// And keep going back until we find an operator ';' followed
// by white-space and/or comments. This will improve folding.
while (--startPos > 0) {
@@ -649,7 +649,7 @@ void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int
} else if (ch == ';' &&
styler.StyleAt(startPos) == SCE_SQL_OPERATOR) {
bool isAllClear = true;
- for (int tempPos = startPos + 1;
+ for (Sci_Position tempPos = startPos + 1;
tempPos < lastNLPos;
++tempPos) {
int tempStyle = styler.StyleAt(tempPos);
@@ -672,7 +672,7 @@ void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int
// And because folding ends at ';', keep going until we find one
// Otherwise if create ... view ... as is split over multiple
// lines the folding won't always update immediately.
- unsigned int docLength = styler.Length();
+ Sci_PositionU docLength = styler.Length();
for (; endPos < docLength; ++endPos) {
if (styler.SafeGetCharAt(endPos) == ';') {
break;
@@ -692,7 +692,7 @@ void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int
if (!options.foldOnlyBegin) {
sqlStatesCurrentLine = sqlStates.ForLine(lineCurrent);
}
- for (unsigned int i = startPos; i < endPos; i++) {
+ for (Sci_PositionU i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
int stylePrev = style;