diff options
author | nyamatongwe <unknown> | 2001-10-24 11:50:29 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-10-24 11:50:29 +0000 |
commit | e7333cbfe272f9a08782ff889d70efd94d291da6 (patch) | |
tree | fa59638e5b742d6d2b128f09d822e29e873630ff /src | |
parent | 9c8738a1b441696f93f2293748a2d25f7623edae (diff) | |
download | scintilla-mirror-e7333cbfe272f9a08782ff889d70efd94d291da6.tar.gz |
Made file handle constants in statements such as "close #1" work by styling
them in the date literal style.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexVB.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/LexVB.cxx b/src/LexVB.cxx index bb180355e..bfd34d1e4 100644 --- a/src/LexVB.cxx +++ b/src/LexVB.cxx @@ -36,6 +36,11 @@ inline bool IsAWordStart(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_'); } +inline bool IsADateCharacter(const int ch) { + return (ch < 0x80) && + (isalnum(ch) || ch == '|' || ch == '-' || ch == '/' || ch == ':' || ch == ' ' || ch == '\t'); +} + static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[], Accessor &styler, bool vbScriptSyntax) { @@ -44,7 +49,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, styler.StartAt(startPos); int visibleChars = 0; - + StyleContext sc(startPos, length, initStyle, styler); for (; sc.More(); sc.Forward()) { @@ -95,7 +100,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_B_DEFAULT); } } else if (sc.state == SCE_B_DATE) { - if (sc.ch == '#') { + if (sc.ch == '#' || !IsADateCharacter(sc.chNext)) { sc.ForwardSetState(SCE_B_DEFAULT); } } |