diff options
author | Vicente <unknown> | 2017-11-05 09:32:57 +1100 |
---|---|---|
committer | Vicente <unknown> | 2017-11-05 09:32:57 +1100 |
commit | e7f619c6a2a7b7a586ab64e7be11dbaae095d7d0 (patch) | |
tree | 68cd86c4438dcfd6f7fec176490632f4baba7b30 | |
parent | 2d4031e952f3da6d9a9f570c30f85a40c42f95cb (diff) | |
download | scintilla-mirror-e7f619c6a2a7b7a586ab64e7be11dbaae095d7d0.tar.gz |
Backport: Indent more uniformly with spaces instead of tabs.
Backport of changeset 6414:5f0b123ccdee.
-rw-r--r-- | lexers/LexVHDL.cxx | 68 |
1 files 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; } //============================================================================= |