diff options
author | nyamatongwe <unknown> | 2001-01-02 10:15:07 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-01-02 10:15:07 +0000 |
commit | dbde765402edb2b366fc2117258a5f8a250663e6 (patch) | |
tree | 6424cf880839231028fc582dd284430264d05503 | |
parent | b164f9ab272b78ab2f0734e522c65802265f20d2 (diff) | |
download | scintilla-mirror-dbde765402edb2b366fc2117258a5f8a250663e6.tar.gz |
Philippe added % and : operators and support for initial # line.
-rw-r--r-- | src/LexLua.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/LexLua.cxx b/src/LexLua.cxx index e737c5fbb..8eda566aa 100644 --- a/src/LexLua.cxx +++ b/src/LexLua.cxx @@ -25,12 +25,15 @@ inline bool isLuaOperator(char ch) { ch == '{' || ch == '}' || ch == '~' || ch == '[' || ch == ']' || ch == ';' || ch == '<' || ch == '>' || ch == ',' || - ch == '^' || ch == '.' ) + ch == '.' || ch == '^' || ch == '%' || ch == ':') return true; return false; } -static void classifyWordLua(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) +static void classifyWordLua(unsigned int start, + unsigned int end, + WordList &keywords, + Accessor &styler) { char s[100]; bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.'); @@ -128,6 +131,11 @@ static void ColouriseLuaDoc(unsigned int startPos, styler.ColourTo(i-1, state); state = SCE_LUA_PREPROCESSOR; } + else if (ch == '#' && firstChar) // Should be only on the first line of the file! Cannot be tested here + { + styler.ColourTo(i-1, state); + state = SCE_LUA_COMMENTLINE; + } else if (isLuaOperator(ch)) { styler.ColourTo(i-1, state); |