diff options
Diffstat (limited to 'lexers/LexCSS.cxx')
-rw-r--r-- | lexers/LexCSS.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lexers/LexCSS.cxx b/lexers/LexCSS.cxx index b56aff31b..19345af54 100644 --- a/lexers/LexCSS.cxx +++ b/lexers/LexCSS.cxx @@ -58,11 +58,11 @@ inline bool IsCssOperator(const int ch) { } // look behind (from start of document to our start position) to determine current nesting level -inline int NestingLevelLookBehind(unsigned int startPos, Accessor &styler) { +inline int NestingLevelLookBehind(Sci_PositionU startPos, Accessor &styler) { int ch; int nestingLevel = 0; - for (unsigned int i = 0; i < startPos; i++) { + for (Sci_PositionU i = 0; i < startPos; i++) { ch = styler.SafeGetCharAt(i); if (ch == '{') nestingLevel++; @@ -131,7 +131,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini if (lastStateC == -1) { // backtrack to get last state: // comments are like whitespace, so we must return to the previous state - unsigned int i = startPos; + Sci_PositionU i = startPos; for (; i > 0; i--) { if ((lastStateC = styler.StyleAt(i-1)) != SCE_CSS_COMMENT) { if (lastStateC == SCE_CSS_OPERATOR) { @@ -165,7 +165,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini if (sc.state == SCE_CSS_DOUBLESTRING || sc.state == SCE_CSS_SINGLESTRING) { if (sc.ch != (sc.state == SCE_CSS_DOUBLESTRING ? '\"' : '\'')) continue; - unsigned int i = sc.currentPos; + Sci_PositionU i = sc.currentPos; while (i && styler[i-1] == '\\') i--; if ((sc.currentPos - i) % 2 == 1) @@ -175,7 +175,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini if (sc.state == SCE_CSS_OPERATOR) { if (op == ' ') { - unsigned int i = startPos; + Sci_PositionU i = startPos; op = styler.SafeGetCharAt(i-1); opPrev = styler.SafeGetCharAt(i-2); while (--i) { @@ -380,10 +380,10 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini // check for nested rule selector if (sc.state == SCE_CSS_IDENTIFIER && (IsAWordChar(sc.ch) || sc.ch == ':' || sc.ch == '.' || sc.ch == '#')) { // look ahead to see whether { comes before next ; and } - unsigned int endPos = startPos + length; + Sci_PositionU endPos = startPos + length; int ch; - for (unsigned int i = sc.currentPos; i < endPos; i++) { + for (Sci_PositionU i = sc.currentPos; i < endPos; i++) { ch = styler.SafeGetCharAt(i); if (ch == ';' || ch == '}') break; @@ -505,14 +505,14 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini static void FoldCSSDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { bool foldComment = styler.GetPropertyInt("fold.comment") != 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]; bool inComment = (styler.StyleAt(startPos-1) == SCE_CSS_COMMENT); - 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 style = styler.StyleAt(i); |