aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-04-20 06:39:51 +0000
committernyamatongwe <devnull@localhost>2001-04-20 06:39:51 +0000
commitfd9066b22e02a09db77aa28ecf67d06666e1932f (patch)
treebedf9c4961975e0e1b32ccc65a1d3b3031b0ced4
parent1c7fba4f03872994bfe3c41bee565d56a4b62ba7 (diff)
downloadscintilla-mirror-fd9066b22e02a09db77aa28ecf67d06666e1932f.tar.gz
Added Lisp lexer to makefiles and simplified LexLisp.cxx.
-rw-r--r--gtk/makefile5
-rw-r--r--gtk/scintilla.mak47
-rw-r--r--src/LexLisp.cxx17
-rw-r--r--vcbuild/SciLexer.dsp4
-rw-r--r--win32/scintilla.mak11
5 files changed, 42 insertions, 42 deletions
diff --git a/gtk/makefile b/gtk/makefile
index 279ca8d7a..ab58ce2a8 100644
--- a/gtk/makefile
+++ b/gtk/makefile
@@ -25,8 +25,9 @@ endif
.cxx.o:
$(CC) `gtk-config --cflags` $(CXXFLAGS) -c $<
-LEXOBJS = LexAda.o LexAVE.o LexConf.o LexCPP.o LexHTML.o LexLua.o \
- LexOthers.o LexPascal.o LexPerl.o LexPython.o LexSQL.o LexVB.o
+LEXOBJS=LexAda.o LexAVE.o LexConf.o LexCPP.o LexHTML.o \
+ LexLisp.o LexLua.o LexOthers.o LexPascal.o LexPerl.o \
+ LexPython.o LexSQL.o LexVB.o
# The LEXOBJS have to be treated specially as the functions in them are not called from external code
diff --git a/gtk/scintilla.mak b/gtk/scintilla.mak
index ceba4c777..8ed33ac6b 100644
--- a/gtk/scintilla.mak
+++ b/gtk/scintilla.mak
@@ -115,9 +115,11 @@ SOBJS=\
$(DIR_O)\ViewStyle.obj
LEXOBJS=\
+ $(DIR_O)\LexAda.obj \
$(DIR_O)\LexConf.obj \
$(DIR_O)\LexCPP.obj \
$(DIR_O)\LexHTML.obj \
+ $(DIR_O)\LexLisp.obj \
$(DIR_O)\LexLua.obj \
$(DIR_O)\LexOthers.obj \
$(DIR_O)\LexPascal.obj \
@@ -197,6 +199,12 @@ $(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAMEFLAG)$@ ScintillaGTK.cxx
# Dependencies
+
+# All lexers depend on this set of headers
+LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \
+ ..\include\SString.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
$(DIR_O)\AutoComplete.obj: ..\src\AutoComplete.cxx ..\include\Platform.h ..\src\AutoComplete.h
$(DIR_O)\CallTip.obj: ..\src\CallTip.cxx ..\include\Platform.h ..\src\CallTip.h
@@ -221,41 +229,38 @@ $(DIR_O)\KeyMap.obj: ..\src\KeyMap.cxx ..\include\Platform.h ..\include\Scintill
$(DIR_O)\KeyWords.obj: ..\src\KeyWords.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
..\include\Scintilla.h ..\include\SciLexer.h
-$(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS)
-$(DIR_O)\LexConf.obj: ..\src\LexConf.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS)
-$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS)
-$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx $(LEX_HEADERS)
-$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS)
-$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS)
-$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS)
-$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS)
-$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx $(LEX_HEADERS)
-$(DIR_O)\LexVB.obj: ..\src\LexVB.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
- ..\include\Scintilla.h ..\include\SciLexer.h
+$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS)
+
+$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS)
+
+$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS)
+
+$(DIR_O)\LexVB.obj: ..\src\LexVB.cxx $(LEX_HEADERS)
$(DIR_O)\LineMarker.obj: ..\src\LineMarker.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\LineMarker.h
$(DIR_O)\PlatWin.obj: PlatWin.cxx ..\include\Platform.h PlatformRes.h ..\src\UniConversion.h
-$(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h
+$(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h \
+ ..\include\SString.h
$(DIR_O)\RESearch.obj: ..\src\RESearch.cxx ..\src\RESearch.h
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) {
diff --git a/vcbuild/SciLexer.dsp b/vcbuild/SciLexer.dsp
index 28c9959b6..81cf664c8 100644
--- a/vcbuild/SciLexer.dsp
+++ b/vcbuild/SciLexer.dsp
@@ -154,6 +154,10 @@ SOURCE=..\src\LexHTML.cxx
# End Source File
# Begin Source File
+SOURCE=..\src\LexLisp.cxx
+# End Source File
+# Begin Source File
+
SOURCE=..\src\LexLua.cxx
# End Source File
# Begin Source File
diff --git a/win32/scintilla.mak b/win32/scintilla.mak
index ad51df98a..1c40cdb66 100644
--- a/win32/scintilla.mak
+++ b/win32/scintilla.mak
@@ -108,6 +108,7 @@ LEXOBJS=\
$(DIR_O)\LexConf.obj \
$(DIR_O)\LexCPP.obj \
$(DIR_O)\LexHTML.obj \
+ $(DIR_O)\LexLisp.obj \
$(DIR_O)\LexLua.obj \
$(DIR_O)\LexOthers.obj \
$(DIR_O)\LexPascal.obj \
@@ -223,14 +224,16 @@ $(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx $(LEX_HEADERS)
$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS)
+$(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS)
+
$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS)
$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS)
-$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS)
-
$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx $(LEX_HEADERS)
+$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS)
+
$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS)
$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS)
@@ -241,11 +244,11 @@ $(DIR_O)\LineMarker.obj: ..\src\LineMarker.cxx ..\include\Platform.h ..\include\
$(DIR_O)\PlatWin.obj: PlatWin.cxx ..\include\Platform.h PlatformRes.h ..\src\UniConversion.h
-$(DIR_O)\RESearch.obj: ..\src\RESearch.cxx ..\src\RESearch.h
-
$(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h \
..\include\SString.h
+$(DIR_O)\RESearch.obj: ..\src\RESearch.cxx ..\src\RESearch.h
+
$(DIR_O)\ScintillaBase.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h \
..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h ..\src\AutoComplete.h ..\src\Document.h ..\src\Editor.h \