From e7f619c6a2a7b7a586ab64e7be11dbaae095d7d0 Mon Sep 17 00:00:00 2001 From: Vicente Date: Sun, 5 Nov 2017 09:32:57 +1100 Subject: Backport: Indent more uniformly with spaces instead of tabs. Backport of changeset 6414:5f0b123ccdee. --- lexers/LexVHDL.cxx | 68 +++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/lexers/LexVHDL.cxx b/lexers/LexVHDL.cxx index 229013ea6..e0fc428fb 100644 --- a/lexers/LexVHDL.cxx +++ b/lexers/LexVHDL.cxx @@ -50,7 +50,7 @@ static inline bool IsAWordStart(const int ch) { /***************************************/ static inline bool IsABlank(unsigned int ch) { - return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; + return (ch == ' ') || (ch == 0x09) || (ch == 0x0b) ; } /***************************************/ @@ -156,50 +156,50 @@ static void ColouriseVHDLDoc( } //============================================================================= 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]; - char chNext = styler[i+1]; - if ((ch == '-') && (chNext == '-')) - return true; - else if (ch != ' ' && ch != '\t') - return false; - } - return false; + 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]; + char chNext = styler[i+1]; + if ((ch == '-') && (chNext == '-')) + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; } static bool IsCommentBlockStart(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]; - char chNext = styler[i+1]; - char style = styler.StyleAt(i); - if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '/') && (chNext == '*')) - return true; - } - return false; + 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]; + char chNext = styler[i+1]; + char style = styler.StyleAt(i); + if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '/') && (chNext == '*')) + return true; + } + return false; } static bool IsCommentBlockEnd(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]; - char chNext = styler[i+1]; - char style = styler.StyleAt(i); - if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '*') && (chNext == '/')) - return true; - } - return false; + 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]; + char chNext = styler[i+1]; + char style = styler.StyleAt(i); + if ((style == SCE_VHDL_BLOCK_COMMENT) && (ch == '*') && (chNext == '/')) + return true; + } + return false; } static bool IsCommentStyle(char style) { - return style == SCE_VHDL_BLOCK_COMMENT || style == SCE_VHDL_COMMENT || style == SCE_VHDL_COMMENTLINEBANG; + return style == SCE_VHDL_BLOCK_COMMENT || style == SCE_VHDL_COMMENT || style == SCE_VHDL_COMMENTLINEBANG; } //============================================================================= -- cgit v1.2.3