diff options
Diffstat (limited to 'scintilla/lexers/LexTAL.cxx')
-rw-r--r-- | scintilla/lexers/LexTAL.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/scintilla/lexers/LexTAL.cxx b/scintilla/lexers/LexTAL.cxx index 465e7c4..b543dcf 100644 --- a/scintilla/lexers/LexTAL.cxx +++ b/scintilla/lexers/LexTAL.cxx @@ -45,12 +45,12 @@ inline bool isTALwordstart(char ch) return ch == '$' || ch == '^' || iswordstart(ch);
}
-static void getRange(unsigned int start,
- unsigned int end,
+static void getRange(Sci_PositionU start,
+ Sci_PositionU end,
Accessor &styler,
char *s,
- unsigned int len) {
- unsigned int i = 0;
+ Sci_PositionU len) {
+ Sci_PositionU i = 0;
while ((i < end - start + 1) && (i < len-1)) {
s[i] = static_cast<char>(tolower(styler[start + i]));
i++;
@@ -65,7 +65,7 @@ static bool IsStreamCommentStyle(int style) { style == SCE_C_COMMENTDOCKEYWORDERROR;
}
-static void ColourTo(Accessor &styler, unsigned int end, unsigned int attr, bool bInAsm) {
+static void ColourTo(Accessor &styler, Sci_PositionU end, unsigned int attr, bool bInAsm) {
if ((bInAsm) && (attr == SCE_C_OPERATOR || attr == SCE_C_NUMBER || attr == SCE_C_DEFAULT || attr == SCE_C_WORD || attr == SCE_C_IDENTIFIER)) {
styler.ColourTo(end, SCE_C_REGEX);
} else
@@ -73,7 +73,7 @@ static void ColourTo(Accessor &styler, unsigned int end, unsigned int attr, bool }
// returns 1 if the item starts a class definition, and -1 if the word is "end", and 2 if the word is "asm"
-static int classifyWordTAL(unsigned int start, unsigned int end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInAsm) {
+static int classifyWordTAL(Sci_PositionU start, Sci_PositionU end, /*WordList &keywords*/WordList *keywordlists[], Accessor &styler, bool bInAsm) {
int ret = 0;
WordList& keywords = *keywordlists[0];
@@ -122,7 +122,7 @@ static int classifyFoldPointTAL(const char* s) { return lev;
}
-static void ColouriseTALDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
+static void ColouriseTALDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[],
Accessor &styler) {
styler.StartAt(startPos);
@@ -132,11 +132,11 @@ static void ColouriseTALDoc(unsigned int startPos, int length, int initStyle, Wo state = SCE_C_DEFAULT;
char chPrev = ' ';
char chNext = styler[startPos];
- unsigned int lengthDoc = startPos + length;
+ Sci_PositionU lengthDoc = startPos + length;
bool bInClassDefinition;
- int currentLine = styler.GetLine(startPos);
+ Sci_Position currentLine = styler.GetLine(startPos);
if (currentLine > 0) {
styler.SetLineState(currentLine, styler.GetLineState(currentLine-1));
bInClassDefinition = (styler.GetLineState(currentLine) == 1);
@@ -151,7 +151,7 @@ static void ColouriseTALDoc(unsigned int startPos, int length, int initStyle, Wo styler.StartSegment(startPos);
int visibleChars = 0;
- for (unsigned int i = startPos; i < lengthDoc; i++) {
+ for (Sci_PositionU i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
@@ -244,7 +244,7 @@ static void ColouriseTALDoc(unsigned int startPos, int length, int initStyle, Wo if (ch == '!' || (ch == '\r' || ch == '\n')) {
if (((i > styler.GetStartSegment() + 2) || (
(initStyle == SCE_C_COMMENTDOC) &&
- (styler.GetStartSegment() == static_cast<unsigned int>(startPos))))) {
+ (styler.GetStartSegment() == static_cast<Sci_PositionU>(startPos))))) {
ColourTo(styler, i, state, bInAsm);
state = SCE_C_DEFAULT;
}
@@ -268,14 +268,14 @@ static void ColouriseTALDoc(unsigned int startPos, int length, int initStyle, Wo ColourTo(styler, lengthDoc - 1, state, bInAsm);
}
-static void FoldTALDoc(unsigned int startPos, int length, int initStyle, WordList *[],
+static void FoldTALDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[],
Accessor &styler) {
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0;
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
- 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 levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
char chNext = styler[startPos];
@@ -284,9 +284,9 @@ static void FoldTALDoc(unsigned int startPos, int length, int initStyle, WordLis bool was_end = false;
bool section = false;
- int lastStart = 0;
+ Sci_Position lastStart = 0;
- 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;
@@ -345,7 +345,7 @@ static void FoldTALDoc(unsigned int startPos, int length, int initStyle, WordLis if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) {
if (ch == '{' && chNext == '$') {
- unsigned int j=i+2; // skip {$
+ Sci_PositionU j=i+2; // skip {$
while ((j<endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) {
j++;
}
|