diff options
author | nyamatongwe <devnull@localhost> | 2010-07-13 21:44:00 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-07-13 21:44:00 +1000 |
commit | f5e7b31bb9c60f85e91a0958ae2e7452a2792063 (patch) | |
tree | b54aacc72daf0121e9c0e2b28583b2372a3b6aab /lexers/LexTCL.cxx | |
parent | 412fd42d7b9f10cb615e5e0ed01d1d9f51ae5f2d (diff) | |
download | scintilla-mirror-f5e7b31bb9c60f85e91a0958ae2e7452a2792063.tar.gz |
For new lexer design change includes to add new files and remove unused files.
Normalise order of includes.
Minor fixes for compatibility with new lexer design.
Diffstat (limited to 'lexers/LexTCL.cxx')
-rw-r--r-- | lexers/LexTCL.cxx | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/lexers/LexTCL.cxx b/lexers/LexTCL.cxx index 3c175de2a..0e196cb7f 100644 --- a/lexers/LexTCL.cxx +++ b/lexers/LexTCL.cxx @@ -7,18 +7,22 @@ #include <stdlib.h> #include <string.h> -#include <ctype.h> -#include <stdarg.h> #include <stdio.h> +#include <stdarg.h> +#include <assert.h> +#include <ctype.h> -#include "Platform.h" +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" -#include "PropSet.h" +#include "PropSetSimple.h" +#include "WordList.h" +#include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" -#include "KeyWords.h" -#include "Scintilla.h" -#include "SciLexer.h" +#include "CharacterSet.h" +#include "LexerModule.h" #ifdef SCI_NAMESPACE using namespace Scintilla; @@ -47,7 +51,7 @@ static void ColouriseTCLDoc(unsigned int startPos, int length, int , WordList *k bool foldComment = styler.GetPropertyInt("fold.comment") != 0; bool commentLevel = false; bool subBrace = false; // substitution begin with a brace ${.....} - enum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf, + enum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf, LS_COMMAND_EXPECTED = 16, LS_BRACE_ONLY = 32 } lineState = LS_DEFAULT; bool prevSlash = false; int currentLevel = 0; @@ -86,7 +90,7 @@ static void ColouriseTCLDoc(unsigned int startPos, int length, int , WordList *k StyleContext sc(startPos, length, SCE_TCL_DEFAULT, styler); for (; ; sc.Forward()) { next: - if (sc.ch=='\r' && sc.chNext == '\n') // only ignore \r on PC process on the mac + if (sc.ch=='\r' && sc.chNext == '\n') // only ignore \r on PC process on the mac continue; bool atEnd = !sc.More(); // make sure we coloured the last word if (lineState != LS_DEFAULT) { @@ -170,7 +174,7 @@ next: sc.ChangeState(SCE_TCL_WORD7); } else if (keywords9.InList(s)) { sc.ChangeState(SCE_TCL_WORD8); - } + } } expected = false; sc.SetState(quote ? SCE_TCL_IN_QUOTE : SCE_TCL_DEFAULT); @@ -212,7 +216,7 @@ next: } else if (sc.state == SCE_TCL_COMMENT_BOX) lineState = LS_COMMENT_BOX; } - styler.SetLineState(currentLine, + styler.SetLineState(currentLine, (subBrace ? LS_BRACE_ONLY : 0) | (expected ? LS_COMMAND_EXPECTED : 0) | lineState); if (lineState == LS_COMMENT_BOX) @@ -285,7 +289,7 @@ next: if (sc.ch == '\\') { prevSlash = true; - continue; + continue; } // Determine if a new state should be entered. @@ -322,7 +326,7 @@ next: subParen = 0; if (sc.chNext != '{') { sc.SetState(SCE_TCL_SUBSTITUTION); - } + } else { sc.SetState(SCE_TCL_OPERATOR); // $ sc.Forward(); // { |