aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRegistry.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexRegistry.cxx')
-rw-r--r--lexers/LexRegistry.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/lexers/LexRegistry.cxx b/lexers/LexRegistry.cxx
index 22fdd111e..8fa99434f 100644
--- a/lexers/LexRegistry.cxx
+++ b/lexers/LexRegistry.cxx
@@ -65,8 +65,8 @@ class LexerRegistry : public ILexer {
return (state == SCE_REG_ADDEDKEY || state == SCE_REG_DELETEDKEY);
}
- static bool AtValueType(LexAccessor &styler, int start) {
- int i = 0;
+ static bool AtValueType(LexAccessor &styler, Sci_Position start) {
+ Sci_Position i = 0;
while (i < 10) {
i++;
char curr = styler.SafeGetCharAt(start+i, '\0');
@@ -79,8 +79,8 @@ class LexerRegistry : public ILexer {
return false;
}
- static bool IsNextNonWhitespace(LexAccessor &styler, int start, char ch) {
- int i = 0;
+ static bool IsNextNonWhitespace(LexAccessor &styler, Sci_Position start, char ch) {
+ Sci_Position i = 0;
while (i < 100) {
i++;
char curr = styler.SafeGetCharAt(start+i, '\0');
@@ -96,9 +96,9 @@ class LexerRegistry : public ILexer {
}
// Looks for the equal sign at the end of the string
- static bool AtValueName(LexAccessor &styler, int start) {
+ static bool AtValueName(LexAccessor &styler, Sci_Position start) {
bool atEOL = false;
- int i = 0;
+ Sci_Position i = 0;
bool escaped = false;
while (!atEOL) {
i++;
@@ -119,9 +119,9 @@ class LexerRegistry : public ILexer {
return false;
}
- static bool AtKeyPathEnd(LexAccessor &styler, int start) {
+ static bool AtKeyPathEnd(LexAccessor &styler, Sci_Position start) {
bool atEOL = false;
- int i = 0;
+ Sci_Position i = 0;
while (!atEOL) {
i++;
char curr = styler.SafeGetCharAt(start+i, '\0');
@@ -135,7 +135,7 @@ class LexerRegistry : public ILexer {
return true;
}
- static bool AtGUID(LexAccessor &styler, int start) {
+ static bool AtGUID(LexAccessor &styler, Sci_Position start) {
int count = 8;
int portion = 0;
int offset = 1;
@@ -220,7 +220,7 @@ void SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,
bool afterEqualSign = false;
while (context.More()) {
if (context.atLineStart) {
- int currPos = static_cast<int>(context.currentPos);
+ Sci_Position currPos = static_cast<Sci_Position>(context.currentPos);
bool continued = styler[currPos-3] == '\\';
highlight = continued ? true : false;
}
@@ -232,7 +232,7 @@ void SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,
break;
case SCE_REG_VALUENAME:
case SCE_REG_STRING: {
- int currPos = static_cast<int>(context.currentPos);
+ Sci_Position currPos = static_cast<Sci_Position>(context.currentPos);
if (context.ch == '"') {
context.ForwardSetState(SCE_REG_DEFAULT);
} else if (context.ch == '\\') {
@@ -270,7 +270,7 @@ void SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,
break;
case SCE_REG_DELETEDKEY:
case SCE_REG_ADDEDKEY: {
- int currPos = static_cast<int>(context.currentPos);
+ Sci_Position currPos = static_cast<Sci_Position>(context.currentPos);
if (context.ch == ']' && AtKeyPathEnd(styler, currPos)) {
context.ForwardSetState(SCE_REG_DEFAULT);
} else if (context.ch == '{') {
@@ -298,7 +298,7 @@ void SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,
context.ForwardSetState(beforeGUID);
beforeGUID = SCE_REG_DEFAULT;
}
- int currPos = static_cast<int>(context.currentPos);
+ Sci_Position currPos = static_cast<Sci_Position>(context.currentPos);
if (context.ch == '"' && IsStringState(context.state)) {
context.ForwardSetState(SCE_REG_DEFAULT);
} else if (context.ch == ']' &&
@@ -315,7 +315,7 @@ void SCI_METHOD LexerRegistry::Lex(Sci_PositionU startPos,
}
// Determine if a new state should be entered.
if (context.state == SCE_REG_DEFAULT) {
- int currPos = static_cast<int>(context.currentPos);
+ Sci_Position currPos = static_cast<Sci_Position>(context.currentPos);
if (context.ch == ';') {
context.SetState(SCE_REG_COMMENT);
} else if (context.ch == '"') {
@@ -360,11 +360,11 @@ void SCI_METHOD LexerRegistry::Fold(Sci_PositionU startPos,
return;
}
LexAccessor styler(pAccess);
- int currLine = styler.GetLine(startPos);
+ Sci_Position currLine = styler.GetLine(startPos);
int visibleChars = 0;
- unsigned endPos = startPos + length;
+ Sci_PositionU endPos = startPos + length;
bool atKeyPath = false;
- for (unsigned i = startPos; i < endPos; i++) {
+ for (Sci_PositionU i = startPos; i < endPos; i++) {
atKeyPath = IsKeyPathState(styler.StyleAt(i)) ? true : atKeyPath;
char curr = styler.SafeGetCharAt(i);
char next = styler.SafeGetCharAt(i+1);