diff options
author | nyamatongwe <unknown> | 2002-02-12 03:34:52 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-02-12 03:34:52 +0000 |
commit | 2c7158c928c73f02f4fc448fdd96ba4f45d0ea76 (patch) | |
tree | d1656678b1feffb7d5b8e089d5da63f74dc8ffce /src/LexLua.cxx | |
parent | f540bc2de8cefe784c71b3401ebaf971043546e7 (diff) | |
download | scintilla-mirror-2c7158c928c73f02f4fc448fdd96ba4f45d0ea76.tar.gz |
Made lexer objects const so they do not show up in map as static / globals.
File specific inline functions marker as static to ensure no bad linking.
Diffstat (limited to 'src/LexLua.cxx')
-rw-r--r-- | src/LexLua.cxx | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/LexLua.cxx b/src/LexLua.cxx index dfa5d848e..253d9ba85 100644 --- a/src/LexLua.cxx +++ b/src/LexLua.cxx @@ -64,9 +64,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo if (initStyle == SCE_LUA_STRINGEOL) initStyle = SCE_LUA_DEFAULT; - int chPrevNonWhite = ' '; - int visibleChars = 0; - StyleContext sc(startPos, length, initStyle, styler); if(startPos == 0 && sc.ch == '#') sc.SetState(SCE_LUA_COMMENTLINE); for (; sc.More(); sc.Forward()) { @@ -117,7 +114,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo } else if (sc.state == SCE_LUA_COMMENTLINE ) { if (sc.atLineEnd) { sc.SetState(SCE_LUA_DEFAULT); - visibleChars = 0; } } else if (sc.state == SCE_LUA_STRING) { if (sc.ch == '\\') { @@ -129,7 +125,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo } else if (sc.atLineEnd) { sc.ChangeState(SCE_LUA_STRINGEOL); sc.ForwardSetState(SCE_LUA_DEFAULT); - visibleChars = 0; } } else if (sc.state == SCE_LUA_CHARACTER) { @@ -142,7 +137,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo } else if (sc.atLineEnd) { sc.ChangeState(SCE_LUA_STRINGEOL); sc.ForwardSetState(SCE_LUA_DEFAULT); - visibleChars = 0; } } else if (sc.state == SCE_LUA_LITERALSTRING) { if (sc.chPrev == '[' && sc.ch == '[' && literalStringFlag != 1) { @@ -175,17 +169,6 @@ static void ColouriseLuaDoc(unsigned int startPos, int length, int initStyle, Wo sc.SetState(SCE_LUA_OPERATOR); } } - - if (sc.atLineEnd) { - // Reset states to begining of colourise so no surprises - // if different sets of lines lexed. - chPrevNonWhite = ' '; - visibleChars = 0; - } - if (!IsASpace(sc.ch)) { - chPrevNonWhite = sc.ch; - visibleChars++; - } } sc.Complete(); } @@ -255,4 +238,4 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc); +const LexerModule lmLua(SCLEX_LUA, ColouriseLuaDoc, "lua", FoldLuaDoc); |