From 924270507fe35db90f99a88eb13242e1c5799bbc Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 17 Oct 2006 00:29:32 +0000 Subject: Patch from Kein-Hong Man properly handles + or - as operators in numbers like 1+2. --- src/LexLua.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/LexLua.cxx b/src/LexLua.cxx index b3a46ad34..c5801139a 100644 --- a/src/LexLua.cxx +++ b/src/LexLua.cxx @@ -149,7 +149,10 @@ static void ColouriseLuaDoc( // We stop the number definition on non-numerical non-dot non-eE non-sign non-hexdigit char if (!IsANumberChar(sc.ch)) { sc.SetState(SCE_LUA_DEFAULT); - } + } else if (sc.ch == '-' || sc.ch == '+') { + if (sc.chPrev != 'E' && sc.chPrev != 'e') + sc.SetState(SCE_LUA_DEFAULT); + } } else if (sc.state == SCE_LUA_IDENTIFIER) { if (!IsAWordChar(sc.ch) || sc.Match('.', '.')) { char s[100]; -- cgit v1.2.3