aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexCaml.cxx
diff options
context:
space:
mode:
authorJoe Mueller <devnull@localhost>2015-07-30 14:35:17 +1000
committerJoe Mueller <devnull@localhost>2015-07-30 14:35:17 +1000
commit96229bb5f01e86efe382523e1ee79ff23bdcc8e0 (patch)
tree5aa3c8becad92a397b02445001383e188070f287 /lexers/LexCaml.cxx
parent7604a6b2a98fc2250408368eb51f8f6827d888c8 (diff)
downloadscintilla-mirror-96229bb5f01e86efe382523e1ee79ff23bdcc8e0.tar.gz
Use Sci_Position / Sci_PositionU for variables in lexers that represent
positions and line numbers and may be widened to 64-bits in a future release.
Diffstat (limited to 'lexers/LexCaml.cxx')
-rw-r--r--lexers/LexCaml.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/lexers/LexCaml.cxx b/lexers/LexCaml.cxx
index 4cc0bd7df..df8781541 100644
--- a/lexers/LexCaml.cxx
+++ b/lexers/LexCaml.cxx
@@ -188,7 +188,8 @@ void ColouriseCamlDoc(
// initialize styler
StyleContext sc(startPos, length, initStyle, styler);
- int chBase = 0, chToken = 0, chLit = 0;
+ Sci_PositionU chToken = 0;
+ int chBase = 0, chLit = 0;
WordList& keywords = *keywordlists[0];
WordList& keywords2 = *keywordlists[1];
WordList& keywords3 = *keywordlists[2];
@@ -206,7 +207,7 @@ void ColouriseCamlDoc(
while (sc.More()) {
// set up [per-char] state info
int state2 = -1; // (ASSUME no state change)
- int chColor = sc.currentPos - 1;// (ASSUME standard coloring range)
+ Sci_Position chColor = sc.currentPos - 1;// (ASSUME standard coloring range)
bool advance = true; // (ASSUME scanner "eats" 1 char)
// step state machine
@@ -254,11 +255,11 @@ void ColouriseCamlDoc(
case SCE_CAML_IDENTIFIER:
// [try to] interpret as [additional] identifier char
if (!(iscaml(sc.ch) || sc.Match('\''))) {
- const int n = sc.currentPos - chToken;
+ const Sci_Position n = sc.currentPos - chToken;
if (n < 24) {
// length is believable as keyword, [re-]construct token
char t[24];
- for (int i = -n; i < 0; i++)
+ for (Sci_Position i = -n; i < 0; i++)
t[n + i] = static_cast<char>(sc.GetRelative(i));
t[n] = '\0';
// special-case "_" token as KEYWORD
@@ -390,7 +391,7 @@ void ColouriseCamlDoc(
state2 = SCE_CAML_STRING, sc.ch = ' ' /* (...\") */, chColor++,
styler.ColourTo(chColor, SCE_CAML_WHITE), styler.Flush();
// ... then backtrack to determine original SML literal type
- int p = chColor - 2;
+ Sci_Position p = chColor - 2;
for (; p >= 0 && styler.StyleAt(p) == SCE_CAML_WHITE; p--) ;
if (p >= 0)
state2 = static_cast<int>(styler.StyleAt(p));
@@ -437,7 +438,7 @@ void ColouriseCamlDoc(
static
#endif /* BUILD_AS_EXTERNAL_LEXER */
void FoldCamlDoc(
- unsigned int, int,
+ Sci_PositionU, Sci_Position,
int,
WordList *[],
Accessor &)