aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-01-02 10:15:07 +0000
committernyamatongwe <devnull@localhost>2001-01-02 10:15:07 +0000
commitcbc4a14d15626bda45c2604c2e4ef3341b9a5533 (patch)
tree6424cf880839231028fc582dd284430264d05503
parentac5b72413d9d43c07df39695e781fdec8bbc428a (diff)
downloadscintilla-mirror-cbc4a14d15626bda45c2604c2e4ef3341b9a5533.tar.gz
Philippe added % and : operators and support for initial # line.
-rw-r--r--src/LexLua.cxx12
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);