diff options
Diffstat (limited to 'lexers/LexCoffeeScript.cxx')
-rw-r--r-- | lexers/LexCoffeeScript.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lexers/LexCoffeeScript.cxx b/lexers/LexCoffeeScript.cxx index 0cd86e838..34ad716e9 100644 --- a/lexers/LexCoffeeScript.cxx +++ b/lexers/LexCoffeeScript.cxx @@ -48,7 +48,7 @@ static bool IsSpaceEquiv(int state) { // Putting a space between the '++' post-inc operator and the '+' binary op // fixes this, and is highly recommended for readability anyway. static bool FollowsPostfixOperator(StyleContext &sc, Accessor &styler) { - int pos = (int) sc.currentPos; + Sci_Position pos = (Sci_Position) sc.currentPos; while (--pos > 0) { char ch = styler[pos]; if (ch == '+' || ch == '-') { @@ -60,9 +60,9 @@ static bool FollowsPostfixOperator(StyleContext &sc, Accessor &styler) { static bool followsReturnKeyword(StyleContext &sc, Accessor &styler) { // Don't look at styles, so no need to flush. - int pos = (int) sc.currentPos; - int currentLine = styler.GetLine(pos); - int lineStartPos = styler.LineStart(currentLine); + Sci_Position pos = (Sci_Position) sc.currentPos; + Sci_Position currentLine = styler.GetLine(pos); + Sci_Position lineStartPos = styler.LineStart(currentLine); while (--pos > lineStartPos) { char ch = styler.SafeGetCharAt(pos); if (ch != ' ' && ch != '\t') { @@ -97,9 +97,9 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length int visibleChars = 0; // look back to set chPrevNonWhite properly for better regex colouring - int endPos = startPos + length; + Sci_Position endPos = startPos + length; if (startPos > 0 && IsSpaceEquiv(initStyle)) { - unsigned int back = startPos; + Sci_PositionU back = startPos; styler.Flush(); while (back > 0 && IsSpaceEquiv(styler.StyleAt(--back))) ; @@ -268,10 +268,10 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length sc.Complete(); } -static bool IsCommentLine(int line, Accessor &styler) { - int pos = styler.LineStart(line); - int eol_pos = styler.LineStart(line + 1) - 1; - for (int i = pos; i < eol_pos; i++) { +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { char ch = styler[i]; if (ch == '#') return true; @@ -284,9 +284,9 @@ static bool IsCommentLine(int line, Accessor &styler) { static void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { // A simplified version of FoldPyDoc - const int maxPos = startPos + length; - const int maxLines = styler.GetLine(maxPos - 1); // Requested last line - const int docLines = styler.GetLine(styler.Length() - 1); // Available last line + const Sci_Position maxPos = startPos + length; + const Sci_Position maxLines = styler.GetLine(maxPos - 1); // Requested last line + const Sci_Position docLines = styler.GetLine(styler.Length() - 1); // Available last line // property fold.coffeescript.comment const bool foldComment = styler.GetPropertyInt("fold.coffeescript.comment") != 0; @@ -298,7 +298,7 @@ static void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int // and so we can fix any preceding fold level (which is why we go back // at least one line in all cases) int spaceFlags = 0; - int lineCurrent = styler.GetLine(startPos); + Sci_Position lineCurrent = styler.GetLine(startPos); int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL); while (lineCurrent > 0) { lineCurrent--; @@ -321,7 +321,7 @@ static void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int // Gather info int lev = indentCurrent; - int lineNext = lineCurrent + 1; + Sci_Position lineNext = lineCurrent + 1; int indentNext = indentCurrent; if (lineNext <= docLines) { // Information about next line is only available if not at end of document @@ -365,7 +365,7 @@ static void FoldCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length, int // which is indented more than the line after the end of // the comment-block, use the level of the block before - int skipLine = lineNext; + Sci_Position skipLine = lineNext; int skipLevel = levelAfterComments; while (--skipLine > lineCurrent) { |