diff options
author | nyamatongwe <devnull@localhost> | 2001-04-20 06:39:51 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-04-20 06:39:51 +0000 |
commit | fd9066b22e02a09db77aa28ecf67d06666e1932f (patch) | |
tree | bedf9c4961975e0e1b32ccc65a1d3b3031b0ced4 /src | |
parent | 1c7fba4f03872994bfe3c41bee565d56a4b62ba7 (diff) | |
download | scintilla-mirror-fd9066b22e02a09db77aa28ecf67d06666e1932f.tar.gz |
Added Lisp lexer to makefiles and simplified LexLisp.cxx.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexLisp.cxx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/LexLisp.cxx b/src/LexLisp.cxx index 0fa1dcb31..623ca7cfa 100644 --- a/src/LexLisp.cxx +++ b/src/LexLisp.cxx @@ -66,14 +66,11 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W styler.StartAt(startPos); int state = initStyle; - int styleBeforeLineStart = initStyle; if (state == SCE_LISP_STRINGEOL) // Does not leak onto next line state = SCE_LISP_DEFAULT; char chPrev = ' '; char chNext = styler[startPos]; - char chPrevNonWhite = ' '; unsigned int lengthDoc = startPos + length; - int visibleChars = 0; styler.StartSegment(startPos); for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = chNext; @@ -147,21 +144,12 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W } } - if (atEOL) { - styleBeforeLineStart = state; - visibleChars = 0; - } - if (!isspacechar(ch)) - visibleChars++; - chPrev = ch; - if (ch != ' ' && ch != '\t') - chPrevNonWhite = ch; } styler.ColourTo(lengthDoc - 1, state); } -static void FoldLispDoc(unsigned int startPos, int length, int initStyle, WordList *[], +static void FoldLispDoc(unsigned int startPos, int length, int /* initStyle */, WordList *[], Accessor &styler) { unsigned int lengthDoc = startPos + length; int visibleChars = 0; @@ -170,11 +158,10 @@ static void FoldLispDoc(unsigned int startPos, int length, int initStyle, WordLi int levelCurrent = levelPrev; char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); - int style = initStyle; for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); - style = styleNext; + int style = styleNext; styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_LISP_OPERATOR) { |