[UPDATE] Update Scintilla from 2.12 to 2.20
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@653 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
46c3286077
commit
d4d42f8a1a
@ -1,49 +1,51 @@
|
||||
### start defines ###
|
||||
include common.mk
|
||||
|
||||
ARCH=-arch i386
|
||||
CC=gcc -x c++ $(ARCH)
|
||||
CO=gcc -x objective-c++ $(ARCH)
|
||||
INST_NAME=-install_name \
|
||||
@executable_path/../Frameworks/Sci.framework/Versions/A/Sci
|
||||
|
||||
INST_NAME=-install_name @executable_path/../Frameworks/Sci.framework/Versions/A/Sci
|
||||
LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME)
|
||||
|
||||
gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
|
||||
SCI_LEXERS=LexAPDL.o LexASY.o LexAU3.o LexAVE.o LexAbaqus.o LexAda.o \
|
||||
LexAsm.o LexAsn1.o LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCLW.o \
|
||||
LexCOBOL.o LexCPP.o LexCSS.o LexCaml.o LexCmake.o LexConf.o LexCrontab.o \
|
||||
LexCsound.o LexD.o LexEScript.o LexEiffel.o LexErlang.o LexFlagship.o \
|
||||
LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHTML.o LexHaskell.o \
|
||||
LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMMIXAL.o LexMPT.o \
|
||||
LexMSSQL.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMySQL.o \
|
||||
LexNimrod.o LexNsis.o LexOpal.o LexOthers.o LexPB.o LexPLM.o LexPOV.o \
|
||||
LexPS.o LexPascal.o LexPerl.o LexPowerPro.o LexPowerShell.o LexProgress.o \
|
||||
LexPython.o LexR.o LexRebol.o LexRuby.o LexSML.o LexSQL.o LexScriptol.o \
|
||||
LexSmalltalk.o LexSorcus.o LexSpecman.o LexSpice.o LexTACL.o LexTADS3.o \
|
||||
LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVHDL.o LexVerilog.o LexYAML.o \
|
||||
LexerBase.o LexerModule.o LexerSimple.o Accessor.o
|
||||
|
||||
INCS=-I../src/ -I../include/ -I.
|
||||
CCX=$(CC) $(gDEFs) $(INCS)
|
||||
CCO=$(CO) $(gDEFs) $(INCS)
|
||||
SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o \
|
||||
ContractionState.o Decoration.o Document.o Editor.o \
|
||||
ExternalLexer.o Indicator.o KeyMap.o LineMarker.o PerLine.o \
|
||||
PositionCache.o PropSetSimple.o RESearch.o RunStyles.o ScintillaBase.o Style.o \
|
||||
StyleContext.o UniConversion.o ViewStyle.o XPM.o WordList.o \
|
||||
Selection.o CharacterSet.o Catalogue.o $(SCI_LEXERS)
|
||||
|
||||
BLD=build/framebuild
|
||||
WAH_OBJ=DocumentAccessor.o KeyWords.o WindowAccessor.o
|
||||
|
||||
SCI_LEXERS=LexAPDL.o LexASY.o LexAU3.o LexAVE.o LexAbaqus.o LexAda.o LexAsm.o LexAsn1.o \
|
||||
LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCLW.o LexCOBOL.o LexCPP.o LexCSS.o \
|
||||
LexCaml.o LexCmake.o LexConf.o LexCrontab.o LexCsound.o LexD.o LexEScript.o LexEiffel.o \
|
||||
LexErlang.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHTML.o \
|
||||
LexHaskell.o LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMMIXAL.o LexMPT.o \
|
||||
LexMSSQL.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMySQL.o LexNimrod.o \
|
||||
LexNsis.o LexOpal.o LexOthers.o LexPB.o LexPLM.o LexPOV.o LexPS.o LexPascal.o LexPerl.o \
|
||||
LexPowerPro.o LexPowerShell.o LexProgress.o LexPython.o LexR.o LexRebol.o LexRuby.o \
|
||||
LexSML.o LexSQL.o LexScriptol.o LexSmalltalk.o LexSorcus.o LexSpecman.o LexSpice.o \
|
||||
LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVHDL.o LexVerilog.o LexYAML.o
|
||||
|
||||
SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o ContractionState.o Decoration.o \
|
||||
Document.o DocumentAccessor.o Editor.o ExternalLexer.o Indicator.o KeyMap.o KeyWords.o \
|
||||
LineMarker.o PerLine.o PositionCache.o PropSet.o RESearch.o RunStyles.o ScintillaBase.o \
|
||||
Style.o StyleContext.o UniConversion.o ViewStyle.o WindowAccessor.o XPM.o Selection.o $(SCI_LEXERS)
|
||||
COC_OBJ=PlatCocoa.o ScintillaCocoa.o ScintillaView.o InfoBar.o
|
||||
|
||||
OBJ=$(SCI_OBJ) $(COC_OBJ)
|
||||
OBJS=$(addprefix $(BLD)/,$(OBJ))
|
||||
OBJ=$(SCI_OBJ) $(UNUSED_OBJ) $(COC_OBJ)
|
||||
OBJS=$(addprefix $(FRM_BLD)/,$(OBJ))
|
||||
|
||||
TARG=$(APP)/Versions/A/Sci
|
||||
APP=$(BLD)/Sci.framework
|
||||
APP=$(FRM_BLD)/Sci.framework
|
||||
### end defines ###
|
||||
|
||||
### start targets ###
|
||||
|
||||
all: $(BLD) $(TARG)
|
||||
all: $(FRM_BLD) $(TARG)
|
||||
|
||||
$(APP): $(BLD)
|
||||
cleanfrm:
|
||||
-rm -rf $(FRM_BLD)
|
||||
|
||||
$(APP): $(FRM_BLD)
|
||||
-rm -rf $(APP)
|
||||
-mkdir $(APP)
|
||||
-mkdir $(APP)/Versions
|
||||
@ -64,22 +66,15 @@ $(TARG) : $(OBJS) $(APP)
|
||||
$(LD) $(OBJS) $(gDEFs) -o $(TARG) -lstdc++
|
||||
-ln `pwd`/$(TARG) `pwd`/$(APP)/Sci
|
||||
|
||||
$(BLD):
|
||||
-mkdir build
|
||||
$(FRM_BLD):
|
||||
-mkdir $(BLD)
|
||||
|
||||
clean:
|
||||
-rm -rf $(BLD)
|
||||
|
||||
$(BLD)/%.o : ../src/%.cxx
|
||||
$(CCX) -c ../src/$< -o $@
|
||||
|
||||
$(BLD)/%.o : %.mm
|
||||
$(CCO) -c $< -o $@
|
||||
-mkdir $(FRM_BLD)
|
||||
|
||||
### get around to filling out the real dependencies later ###
|
||||
$(BLD)/AutoComplete.o : ../src/AutoComplete.cxx ../src/AutoComplete.h ../include/Platform.h
|
||||
#$(FRM_BLD)/AutoComplete.o : ../src/AutoComplete.cxx ../src/AutoComplete.h \
|
||||
# ../include/Platform.h
|
||||
|
||||
$(BLD)/CallTip.o : ../src/CallTip.cxx ../src/CallTip.h ../include/Platform.h
|
||||
#$(FRM_BLD)/CallTip.o : ../src/CallTip.cxx ../src/CallTip.h \
|
||||
# ../include/Platform.h
|
||||
|
||||
### end targets ###
|
@ -1,25 +1,14 @@
|
||||
### start defines ###
|
||||
NAME=Editor
|
||||
include common.mk
|
||||
|
||||
NAME=Demo
|
||||
|
||||
ARCH=-arch i386
|
||||
CC=gcc -x c++ $(ARCH)
|
||||
CO=gcc -x objective-c++ $(ARCH)
|
||||
LD=gcc $(ARCH) -framework Cocoa
|
||||
|
||||
gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
|
||||
|
||||
INCS=-I../src/ -I../include/ -I.
|
||||
CCX=$(CC) $(gDEFs) $(INCS)
|
||||
CCO=$(CO) $(gDEFs) $(INCS)
|
||||
|
||||
BLD=build/SciAppBuild
|
||||
TARG=$(APP)/Contents/MacOS/$(NAME)
|
||||
APP=$(BLD)/$(NAME).app
|
||||
APP=$(APP_BLD)/$(NAME).app
|
||||
|
||||
all: $(BLD) $(TARG)
|
||||
|
||||
clean:
|
||||
-rm -rf $(BLD)
|
||||
all: $(APP_BLD) $(TARG)
|
||||
|
||||
$(APP):
|
||||
-rm -rf $(APP)
|
||||
@ -38,17 +27,10 @@ $(APP):
|
||||
-cp ScintillaTest/TestData.sql $(APP)/Contents/Resources/
|
||||
-make -f Framework.mk all
|
||||
|
||||
$(TARG) : $(BLD)/main.o $(BLD)/AppController.o $(APP)
|
||||
-cp -R build/framebuild/Sci.framework $(APP)/Contents/Frameworks/
|
||||
$(LD) $(BLD)/main.o $(BLD)/AppController.o $(APP)/Contents/Frameworks/Sci.framework/Sci -o $(TARG) -lstdc++
|
||||
$(TARG) : $(APP_BLD)/main.o $(APP_BLD)/AppController.o $(APP)
|
||||
-cp -R $(FRM_BLD)/Sci.framework $(APP)/Contents/Frameworks/
|
||||
$(LD) $(APP_BLD)/main.o $(APP_BLD)/AppController.o $(APP)/Contents/Frameworks/Sci.framework/Sci -o $(TARG) -lstdc++
|
||||
|
||||
|
||||
$(BLD) :
|
||||
-mkdir build
|
||||
$(APP_BLD) :
|
||||
-mkdir $(BLD)
|
||||
|
||||
$(BLD)/%.o : ScintillaTest/%.mm
|
||||
$(CCO) -c $< -o $@
|
||||
|
||||
$(BLD)/%.o : ScintillaTest/%.m
|
||||
$(CCO) -c $< -o $@
|
||||
-mkdir $(APP_BLD)
|
||||
|
@ -14,19 +14,18 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "ILexer.h"
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#endif
|
||||
|
||||
#include "SVector.h"
|
||||
@ -123,6 +122,7 @@ protected:
|
||||
|
||||
virtual void Initialise();
|
||||
virtual void Finalise();
|
||||
virtual std::string CaseMapString(const std::string &s, int caseMapping);
|
||||
public:
|
||||
ScintillaCocoa(NSView* view);
|
||||
virtual ~ScintillaCocoa();
|
||||
|
@ -219,6 +219,11 @@ ScintillaCocoa::~ScintillaCocoa()
|
||||
*/
|
||||
void ScintillaCocoa::Initialise()
|
||||
{
|
||||
static bool initedLexers = false;
|
||||
if (!initedLexers) {
|
||||
initedLexers = true;
|
||||
Scintilla_LinkLexers();
|
||||
}
|
||||
notifyObj = NULL;
|
||||
notifyProc = NULL;
|
||||
|
||||
@ -249,6 +254,31 @@ void ScintillaCocoa::Finalise()
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Case-fold the given string depending on the specified case mapping type.
|
||||
* Note: ScintillaCocoa exclusively works with Unicode. We don't even think about adding support for
|
||||
* obsolete code page stuff.
|
||||
*/
|
||||
std::string ScintillaCocoa::CaseMapString(const std::string &s, int caseMapping)
|
||||
{
|
||||
NSString* textToConvert = [NSString stringWithUTF8String: s.c_str()];
|
||||
std::string result;
|
||||
switch (caseMapping)
|
||||
{
|
||||
case cmUpper:
|
||||
result = [[textToConvert uppercaseString] UTF8String];
|
||||
break;
|
||||
case cmLower:
|
||||
result = [[textToConvert lowercaseString] UTF8String];
|
||||
break;
|
||||
default:
|
||||
result = s;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Helper function to get the outer container which represents the Scintilla editor on application side.
|
||||
*/
|
||||
@ -496,14 +526,15 @@ void ScintillaCocoa::Paste(bool forceRectangular)
|
||||
|
||||
pdoc->BeginUndoAction();
|
||||
ClearSelection();
|
||||
int length = selectedText.len - 1; // One less to avoid inserting the terminating 0 character.
|
||||
if (selectedText.rectangular)
|
||||
{
|
||||
SelectionPosition selStart = sel.RangeMain().Start();
|
||||
PasteRectangular(selStart, selectedText.s, selectedText.len);
|
||||
PasteRectangular(selStart, selectedText.s, length);
|
||||
}
|
||||
else
|
||||
if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, selectedText.len))
|
||||
SetEmptySelection(sel.RangeMain().caret.Position() + selectedText.len);
|
||||
if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, length))
|
||||
SetEmptySelection(sel.RangeMain().caret.Position() + length);
|
||||
|
||||
pdoc->EndUndoAction();
|
||||
|
||||
@ -1368,34 +1399,32 @@ void ScintillaCocoa::MouseUp(NSEvent* event)
|
||||
void ScintillaCocoa::MouseWheel(NSEvent* event)
|
||||
{
|
||||
bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
|
||||
bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;
|
||||
int delta;
|
||||
if (shift)
|
||||
delta = 10 * [event deltaX]; // Arbitrary scale factor.
|
||||
else
|
||||
{
|
||||
int dX = 0;
|
||||
int dY = 0;
|
||||
|
||||
dX = 10 * [event deltaX]; // Arbitrary scale factor.
|
||||
|
||||
// In order to make scrolling with larger offset smoother we scroll less lines the larger the
|
||||
// delta value is.
|
||||
if ([event deltaY] < 0)
|
||||
delta = -(int) sqrt(-10.0 * [event deltaY]);
|
||||
dY = -(int) sqrt(-10.0 * [event deltaY]);
|
||||
else
|
||||
delta = (int) sqrt(10.0 * [event deltaY]);
|
||||
}
|
||||
dY = (int) sqrt(10.0 * [event deltaY]);
|
||||
|
||||
if (command)
|
||||
{
|
||||
// Zoom! We play with the font sizes in the styles.
|
||||
// Number of steps/line is ignored, we just care if sizing up or down.
|
||||
if (delta > 0)
|
||||
if (dY > 0.5)
|
||||
KeyCommand(SCI_ZOOMIN);
|
||||
else
|
||||
else if (dY < -0.5)
|
||||
KeyCommand(SCI_ZOOMOUT);
|
||||
}
|
||||
else
|
||||
if (shift)
|
||||
HorizontalScrollTo(xOffset - delta);
|
||||
else
|
||||
ScrollTo(topLine - delta, true);
|
||||
{
|
||||
HorizontalScrollTo(xOffset - dX);
|
||||
ScrollTo(topLine - dY, true);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1424,7 +1453,7 @@ void ScintillaCocoa::Undo()
|
||||
|
||||
void ScintillaCocoa::Redo()
|
||||
{
|
||||
Editor::Undo();
|
||||
Editor::Redo();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Binary file not shown.
@ -1,26 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,5 +19,6 @@
|
||||
|
||||
- (void) awakeFromNib;
|
||||
- (void) setupEditor;
|
||||
- (IBAction) searchText: (id) sender;
|
||||
|
||||
@end
|
||||
|
@ -209,6 +209,18 @@ const char user_keywords[] = // Definition of own keywords, not used by MySQL.
|
||||
[mEditor setStatusText: @"Operation complete"];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) searchText: (id) sender
|
||||
{
|
||||
NSSearchField* searchField = (NSSearchField*) sender;
|
||||
[mEditor findAndHighlightText: [searchField stringValue]
|
||||
matchCase: NO
|
||||
wholeWord: NO
|
||||
scrollTo: YES
|
||||
wrap: YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.sun.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,381 +1,381 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };
|
||||
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };
|
||||
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
|
||||
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
|
||||
remoteInfo = Scintilla;
|
||||
};
|
||||
27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||
remoteInfo = Scintilla;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
272133C20F973596006BE49A /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
|
||||
271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = "<group>"; wrapsLines = 0; };
|
||||
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ScintillaFramework.xcodeproj; path = ../ScintillaFramework/ScintillaFramework.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */,
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
271FA52A0F850BE20033D021 /* AppController.h */,
|
||||
271FA52B0F850BE20033D021 /* AppController.mm */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* ScintillaTest.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2744E5E30FC16BE200E85C33 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */,
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = ScintillaTest;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2791F4480FC1A8E9009DBCF9 /* TestData.sql */,
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* ScintillaTest */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
272133C20F973596006BE49A /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */,
|
||||
);
|
||||
name = ScintillaTest;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = ScintillaTest;
|
||||
productReference = 8D1107320486CEB800E47090 /* ScintillaTest.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 2744E5E30FC16BE200E85C33 /* Products */;
|
||||
ProjectRef = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* ScintillaTest */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = Scintilla.framework;
|
||||
remoteRef = 2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
271FA52C0F850BE20033D021 /* AppController.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = Scintilla;
|
||||
targetProxy = 27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
1DDD58150DA1D0A300B32029 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
SCI_LEXER,
|
||||
SCI_NAMESPACE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "../..//**";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = ScintillaTest;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
|
||||
);
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
SCI_LEXER,
|
||||
SCI_NAMESPACE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "../..//**";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = ScintillaTest;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
|
||||
271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };
|
||||
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };
|
||||
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
|
||||
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
|
||||
remoteInfo = Scintilla;
|
||||
};
|
||||
27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||
remoteInfo = Scintilla;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
272133C20F973596006BE49A /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
|
||||
271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = "<group>"; wrapsLines = 0; };
|
||||
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ScintillaFramework.xcodeproj; path = ../ScintillaFramework/ScintillaFramework.xcodeproj; sourceTree = SOURCE_ROOT; };
|
||||
2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */,
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
271FA52A0F850BE20033D021 /* AppController.h */,
|
||||
271FA52B0F850BE20033D021 /* AppController.mm */,
|
||||
);
|
||||
name = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
||||
);
|
||||
name = "Linked Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D1107320486CEB800E47090 /* ScintillaTest.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2744E5E30FC16BE200E85C33 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */,
|
||||
080E96DDFE201D6D7F000001 /* Classes */,
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
);
|
||||
name = ScintillaTest;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2791F4480FC1A8E9009DBCF9 /* TestData.sql */,
|
||||
8D1107310486CEB800E47090 /* Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D1107260486CEB800E47090 /* ScintillaTest */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */;
|
||||
buildPhases = (
|
||||
8D1107290486CEB800E47090 /* Resources */,
|
||||
8D11072C0486CEB800E47090 /* Sources */,
|
||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
||||
272133C20F973596006BE49A /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */,
|
||||
);
|
||||
name = ScintillaTest;
|
||||
productInstallPath = "$(HOME)/Applications";
|
||||
productName = ScintillaTest;
|
||||
productReference = 8D1107320486CEB800E47090 /* ScintillaTest.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 2744E5E30FC16BE200E85C33 /* Products */;
|
||||
ProjectRef = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D1107260486CEB800E47090 /* ScintillaTest */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = Scintilla.framework;
|
||||
remoteRef = 2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D1107290486CEB800E47090 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
||||
271FA52C0F850BE20033D021 /* AppController.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = Scintilla;
|
||||
targetProxy = 27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C165DFE840E0CC02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
1DDD58150DA1D0A300B32029 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C01FCF4B08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
SCI_LEXER,
|
||||
SCI_NAMESPACE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "../..//**";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = ScintillaTest;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF4C08A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
|
||||
);
|
||||
GCC_MODEL_TUNING = G5;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
SCI_LEXER,
|
||||
SCI_NAMESPACE,
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "../..//**";
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "";
|
||||
PRODUCT_NAME = ScintillaTest;
|
||||
USER_HEADER_SEARCH_PATHS = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C01FCF4F08A954540054247B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C01FCF5008A954540054247B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
PREBINDING = NO;
|
||||
SDKROOT = macosx10.5;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4B08A954540054247B /* Debug */,
|
||||
C01FCF4C08A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C01FCF4F08A954540054247B /* Debug */,
|
||||
C01FCF5008A954540054247B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
||||
}
|
||||
|
@ -1,215 +1,215 @@
|
||||
-- MySQL Administrator dump 1.4
|
||||
--
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.0.45
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES' */;
|
||||
|
||||
/**
|
||||
* Foldable multiline comment.
|
||||
*/
|
||||
|
||||
-- {
|
||||
-- Create schema sakila
|
||||
-- }
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS sakila;
|
||||
USE sakila;
|
||||
DROP TABLE IF EXISTS "sakila"."actor_info";
|
||||
DROP VIEW IF EXISTS "sakila"."actor_info";
|
||||
CREATE TABLE "sakila"."actor_info" (
|
||||
"actor_id" smallint(5) unsigned,
|
||||
"first_name" varchar(45),
|
||||
"last_name" varchar(45),
|
||||
"film_info" varchar(341)
|
||||
);
|
||||
DROP TABLE IF EXISTS "sakila"."actor";
|
||||
CREATE TABLE "sakila"."actor" (
|
||||
"actor_id" smallint(5) unsigned NOT NULL auto_increment,
|
||||
"first_name" varchar(45) NOT NULL,
|
||||
"last_name" varchar(45) NOT NULL,
|
||||
"last_update" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ("actor_id"),
|
||||
KEY "idx_actor_last_name" ("last_name")
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
|
||||
INSERT INTO "sakila"."actor" VALUES (1,'PENELOPE','GUINESS','2006-02-15 04:34:33'),
|
||||
(2,'NICK','WAHLBERG','2006-02-15 04:34:33'),
|
||||
(3,'ED','CHASE','2006-02-15 04:34:33'),
|
||||
(4,'JENNIFER','DAVIS','2006-02-15 04:34:33'),
|
||||
(149,'RUSSELL','TEMPLE','2006-02-15 04:34:33'),
|
||||
(150,'JAYNE','NOLTE','2006-02-15 04:34:33'),
|
||||
(151,'GEOFFREY','HESTON','2006-02-15 04:34:33'),
|
||||
(152,'BEN','HARRIS','2006-02-15 04:34:33'),
|
||||
(153,'MINNIE','KILMER','2006-02-15 04:34:33'),
|
||||
(154,'MERYL','GIBSON','2006-02-15 04:34:33'),
|
||||
(155,'IAN','TANDY','2006-02-15 04:34:33'),
|
||||
(156,'FAY','WOOD','2006-02-15 04:34:33'),
|
||||
(157,'GRETA','MALDEN','2006-02-15 04:34:33'),
|
||||
(158,'VIVIEN','BASINGER','2006-02-15 04:34:33'),
|
||||
(159,'LAURA','BRODY','2006-02-15 04:34:33'),
|
||||
(160,'CHRIS','DEPP','2006-02-15 04:34:33'),
|
||||
(161,'HARVEY','HOPE','2006-02-15 04:34:33'),
|
||||
(162,'OPRAH','KILMER','2006-02-15 04:34:33'),
|
||||
(163,'CHRISTOPHER','WEST','2006-02-15 04:34:33'),
|
||||
(164,'HUMPHREY','WILLIS','2006-02-15 04:34:33'),
|
||||
(165,'AL','GARLAND','2006-02-15 04:34:33'),
|
||||
(166,'NICK','DEGENERES','2006-02-15 04:34:33'),
|
||||
(167,'LAURENCE','BULLOCK','2006-02-15 04:34:33'),
|
||||
(168,'WILL','WILSON','2006-02-15 04:34:33'),
|
||||
(169,'KENNETH','HOFFMAN','2006-02-15 04:34:33'),
|
||||
(170,'MENA','HOPPER','2006-02-15 04:34:33'),
|
||||
(171,'OLYMPIA','PFEIFFER','2006-02-15 04:34:33'),
|
||||
(190,'AUDREY','BAILEY','2006-02-15 04:34:33'),
|
||||
(191,'GREGORY','GOODING','2006-02-15 04:34:33'),
|
||||
(192,'JOHN','SUVARI','2006-02-15 04:34:33'),
|
||||
(193,'BURT','TEMPLE','2006-02-15 04:34:33'),
|
||||
(194,'MERYL','ALLEN','2006-02-15 04:34:33'),
|
||||
(195,'JAYNE','SILVERSTONE','2006-02-15 04:34:33'),
|
||||
(196,'BELA','WALKEN','2006-02-15 04:34:33'),
|
||||
(197,'REESE','WEST','2006-02-15 04:34:33'),
|
||||
(198,'MARY','KEITEL','2006-02-15 04:34:33'),
|
||||
(199,'JULIA','FAWCETT','2006-02-15 04:34:33'),
|
||||
(200,'THORA','TEMPLE','2006-02-15 04:34:33');
|
||||
|
||||
DROP TRIGGER /*!50030 IF EXISTS */ "sakila"."payment_date";
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE DEFINER = "root"@"localhost" TRIGGER "sakila"."payment_date" BEFORE INSERT ON "payment" FOR EACH ROW SET NEW.payment_date = NOW() $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS "sakila"."sales_by_store";
|
||||
DROP VIEW IF EXISTS "sakila"."sales_by_store";
|
||||
CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "sakila"."sales_by_store" AS select concat("c"."city",_utf8',',"cy"."country") AS "store",concat("m"."first_name",_utf8' ',"m"."last_name") AS "manager",sum("p"."amount") AS "total_sales" from ((((((("sakila"."payment" "p" join "sakila"."rental" "r" on(("p"."rental_id" = "r"."rental_id"))) join "sakila"."inventory" "i" on(("r"."inventory_id" = "i"."inventory_id"))) join "sakila"."store" "s" on(("i"."store_id" = "s"."store_id"))) join "sakila"."address" "a" on(("s"."address_id" = "a"."address_id"))) join "sakila"."city" "c" on(("a"."city_id" = "c"."city_id"))) join "sakila"."country" "cy" on(("c"."country_id" = "cy"."country_id"))) join "sakila"."staff" "m" on(("s"."manager_staff_id" = "m"."staff_id"))) group by "s"."store_id" order by "cy"."country","c"."city";
|
||||
|
||||
--
|
||||
-- View structure for view `staff_list`
|
||||
--
|
||||
|
||||
CREATE VIEW staff_list
|
||||
AS
|
||||
SELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone,
|
||||
city.city AS city, country.country AS country, s.store_id AS SID
|
||||
FROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id
|
||||
JOIN country ON city.country_id = country.country_id;
|
||||
|
||||
--
|
||||
-- View structure for view `actor_info`
|
||||
--
|
||||
|
||||
CREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info
|
||||
AS
|
||||
SELECT
|
||||
a.actor_id,
|
||||
a.first_name,
|
||||
a.last_name,
|
||||
GROUP_CONCAT(DISTINCT CONCAT(c.name, ': ',
|
||||
(SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ')
|
||||
FROM sakila.film f
|
||||
INNER JOIN sakila.film_category fc
|
||||
ON f.film_id = fc.film_id
|
||||
INNER JOIN sakila.film_actor fa
|
||||
ON f.film_id = fa.film_id
|
||||
WHERE fc.category_id = c.category_id
|
||||
AND fa.actor_id = a.actor_id
|
||||
)
|
||||
)
|
||||
ORDER BY c.name SEPARATOR '; ')
|
||||
AS film_info
|
||||
FROM sakila.actor a
|
||||
LEFT JOIN sakila.film_actor fa
|
||||
ON a.actor_id = fa.actor_id
|
||||
LEFT JOIN sakila.film_category fc
|
||||
ON fa.film_id = fc.film_id
|
||||
LEFT JOIN sakila.category c
|
||||
ON fc.category_id = c.category_id
|
||||
GROUP BY a.actor_id, a.first_name, a.last_name;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2)
|
||||
DETERMINISTIC
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
|
||||
#OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE
|
||||
#THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS:
|
||||
# 1) RENTAL FEES FOR ALL PREVIOUS RENTALS
|
||||
# 2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE
|
||||
# 3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST
|
||||
# 4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED
|
||||
|
||||
DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY
|
||||
DECLARE v_overfees INTEGER; #LATE FEES FOR PRIOR RENTALS
|
||||
DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY
|
||||
|
||||
SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees
|
||||
FROM film, inventory, rental
|
||||
WHERE film.film_id = inventory.film_id
|
||||
AND inventory.inventory_id = rental.inventory_id
|
||||
AND rental.rental_date <= p_effective_date
|
||||
AND rental.customer_id = p_customer_id;
|
||||
|
||||
SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration,
|
||||
((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees
|
||||
FROM rental, inventory, film
|
||||
WHERE film.film_id = inventory.film_id
|
||||
AND inventory.inventory_id = rental.inventory_id
|
||||
AND rental.rental_date <= p_effective_date
|
||||
AND rental.customer_id = p_customer_id;
|
||||
|
||||
|
||||
SELECT IFNULL(SUM(payment.amount),0) INTO v_payments
|
||||
FROM payment
|
||||
|
||||
WHERE payment.payment_date <= p_effective_date
|
||||
AND payment.customer_id = p_customer_id;
|
||||
|
||||
RETURN v_rentfees + v_overfees - v_payments;
|
||||
END $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
DECLARE v_rentals INT;
|
||||
DECLARE v_out INT;
|
||||
|
||||
#AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
|
||||
#FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
|
||||
|
||||
SELECT COUNT(*) INTO v_rentals
|
||||
FROM rental
|
||||
WHERE inventory_id = p_inventory_id;
|
||||
|
||||
IF v_rentals = 0 THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(rental_id) INTO v_out
|
||||
FROM inventory LEFT JOIN rental USING(inventory_id)
|
||||
WHERE inventory.inventory_id = p_inventory_id
|
||||
AND rental.return_date IS NULL;
|
||||
|
||||
IF v_out > 0 THEN
|
||||
RETURN FALSE;
|
||||
ELSE
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
END $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
-- MySQL Administrator dump 1.4
|
||||
--
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.0.45
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES' */;
|
||||
|
||||
/**
|
||||
* Foldable multiline comment.
|
||||
*/
|
||||
|
||||
-- {
|
||||
-- Create schema sakila
|
||||
-- }
|
||||
|
||||
CREATE DATABASE IF NOT EXISTS sakila;
|
||||
USE sakila;
|
||||
DROP TABLE IF EXISTS "sakila"."actor_info";
|
||||
DROP VIEW IF EXISTS "sakila"."actor_info";
|
||||
CREATE TABLE "sakila"."actor_info" (
|
||||
"actor_id" smallint(5) unsigned,
|
||||
"first_name" varchar(45),
|
||||
"last_name" varchar(45),
|
||||
"film_info" varchar(341)
|
||||
);
|
||||
DROP TABLE IF EXISTS "sakila"."actor";
|
||||
CREATE TABLE "sakila"."actor" (
|
||||
"actor_id" smallint(5) unsigned NOT NULL auto_increment,
|
||||
"first_name" varchar(45) NOT NULL,
|
||||
"last_name" varchar(45) NOT NULL,
|
||||
"last_update" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ("actor_id"),
|
||||
KEY "idx_actor_last_name" ("last_name")
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
|
||||
INSERT INTO "sakila"."actor" VALUES (1,'PENELOPE','GUINESS','2006-02-15 04:34:33'),
|
||||
(2,'NICK','WAHLBERG','2006-02-15 04:34:33'),
|
||||
(3,'ED','CHASE','2006-02-15 04:34:33'),
|
||||
(4,'JENNIFER','DAVIS','2006-02-15 04:34:33'),
|
||||
(149,'RUSSELL','TEMPLE','2006-02-15 04:34:33'),
|
||||
(150,'JAYNE','NOLTE','2006-02-15 04:34:33'),
|
||||
(151,'GEOFFREY','HESTON','2006-02-15 04:34:33'),
|
||||
(152,'BEN','HARRIS','2006-02-15 04:34:33'),
|
||||
(153,'MINNIE','KILMER','2006-02-15 04:34:33'),
|
||||
(154,'MERYL','GIBSON','2006-02-15 04:34:33'),
|
||||
(155,'IAN','TANDY','2006-02-15 04:34:33'),
|
||||
(156,'FAY','WOOD','2006-02-15 04:34:33'),
|
||||
(157,'GRETA','MALDEN','2006-02-15 04:34:33'),
|
||||
(158,'VIVIEN','BASINGER','2006-02-15 04:34:33'),
|
||||
(159,'LAURA','BRODY','2006-02-15 04:34:33'),
|
||||
(160,'CHRIS','DEPP','2006-02-15 04:34:33'),
|
||||
(161,'HARVEY','HOPE','2006-02-15 04:34:33'),
|
||||
(162,'OPRAH','KILMER','2006-02-15 04:34:33'),
|
||||
(163,'CHRISTOPHER','WEST','2006-02-15 04:34:33'),
|
||||
(164,'HUMPHREY','WILLIS','2006-02-15 04:34:33'),
|
||||
(165,'AL','GARLAND','2006-02-15 04:34:33'),
|
||||
(166,'NICK','DEGENERES','2006-02-15 04:34:33'),
|
||||
(167,'LAURENCE','BULLOCK','2006-02-15 04:34:33'),
|
||||
(168,'WILL','WILSON','2006-02-15 04:34:33'),
|
||||
(169,'KENNETH','HOFFMAN','2006-02-15 04:34:33'),
|
||||
(170,'MENA','HOPPER','2006-02-15 04:34:33'),
|
||||
(171,'OLYMPIA','PFEIFFER','2006-02-15 04:34:33'),
|
||||
(190,'AUDREY','BAILEY','2006-02-15 04:34:33'),
|
||||
(191,'GREGORY','GOODING','2006-02-15 04:34:33'),
|
||||
(192,'JOHN','SUVARI','2006-02-15 04:34:33'),
|
||||
(193,'BURT','TEMPLE','2006-02-15 04:34:33'),
|
||||
(194,'MERYL','ALLEN','2006-02-15 04:34:33'),
|
||||
(195,'JAYNE','SILVERSTONE','2006-02-15 04:34:33'),
|
||||
(196,'BELA','WALKEN','2006-02-15 04:34:33'),
|
||||
(197,'REESE','WEST','2006-02-15 04:34:33'),
|
||||
(198,'MARY','KEITEL','2006-02-15 04:34:33'),
|
||||
(199,'JULIA','FAWCETT','2006-02-15 04:34:33'),
|
||||
(200,'THORA','TEMPLE','2006-02-15 04:34:33');
|
||||
|
||||
DROP TRIGGER /*!50030 IF EXISTS */ "sakila"."payment_date";
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE DEFINER = "root"@"localhost" TRIGGER "sakila"."payment_date" BEFORE INSERT ON "payment" FOR EACH ROW SET NEW.payment_date = NOW() $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS "sakila"."sales_by_store";
|
||||
DROP VIEW IF EXISTS "sakila"."sales_by_store";
|
||||
CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "sakila"."sales_by_store" AS select concat("c"."city",_utf8',',"cy"."country") AS "store",concat("m"."first_name",_utf8' ',"m"."last_name") AS "manager",sum("p"."amount") AS "total_sales" from ((((((("sakila"."payment" "p" join "sakila"."rental" "r" on(("p"."rental_id" = "r"."rental_id"))) join "sakila"."inventory" "i" on(("r"."inventory_id" = "i"."inventory_id"))) join "sakila"."store" "s" on(("i"."store_id" = "s"."store_id"))) join "sakila"."address" "a" on(("s"."address_id" = "a"."address_id"))) join "sakila"."city" "c" on(("a"."city_id" = "c"."city_id"))) join "sakila"."country" "cy" on(("c"."country_id" = "cy"."country_id"))) join "sakila"."staff" "m" on(("s"."manager_staff_id" = "m"."staff_id"))) group by "s"."store_id" order by "cy"."country","c"."city";
|
||||
|
||||
--
|
||||
-- View structure for view `staff_list`
|
||||
--
|
||||
|
||||
CREATE VIEW staff_list
|
||||
AS
|
||||
SELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone,
|
||||
city.city AS city, country.country AS country, s.store_id AS SID
|
||||
FROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id
|
||||
JOIN country ON city.country_id = country.country_id;
|
||||
|
||||
--
|
||||
-- View structure for view `actor_info`
|
||||
--
|
||||
|
||||
CREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info
|
||||
AS
|
||||
SELECT
|
||||
a.actor_id,
|
||||
a.first_name,
|
||||
a.last_name,
|
||||
GROUP_CONCAT(DISTINCT CONCAT(c.name, ': ',
|
||||
(SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ')
|
||||
FROM sakila.film f
|
||||
INNER JOIN sakila.film_category fc
|
||||
ON f.film_id = fc.film_id
|
||||
INNER JOIN sakila.film_actor fa
|
||||
ON f.film_id = fa.film_id
|
||||
WHERE fc.category_id = c.category_id
|
||||
AND fa.actor_id = a.actor_id
|
||||
)
|
||||
)
|
||||
ORDER BY c.name SEPARATOR '; ')
|
||||
AS film_info
|
||||
FROM sakila.actor a
|
||||
LEFT JOIN sakila.film_actor fa
|
||||
ON a.actor_id = fa.actor_id
|
||||
LEFT JOIN sakila.film_category fc
|
||||
ON fa.film_id = fc.film_id
|
||||
LEFT JOIN sakila.category c
|
||||
ON fc.category_id = c.category_id
|
||||
GROUP BY a.actor_id, a.first_name, a.last_name;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2)
|
||||
DETERMINISTIC
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
|
||||
#OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE
|
||||
#THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS:
|
||||
# 1) RENTAL FEES FOR ALL PREVIOUS RENTALS
|
||||
# 2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE
|
||||
# 3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST
|
||||
# 4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED
|
||||
|
||||
DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY
|
||||
DECLARE v_overfees INTEGER; #LATE FEES FOR PRIOR RENTALS
|
||||
DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY
|
||||
|
||||
SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees
|
||||
FROM film, inventory, rental
|
||||
WHERE film.film_id = inventory.film_id
|
||||
AND inventory.inventory_id = rental.inventory_id
|
||||
AND rental.rental_date <= p_effective_date
|
||||
AND rental.customer_id = p_customer_id;
|
||||
|
||||
SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration,
|
||||
((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees
|
||||
FROM rental, inventory, film
|
||||
WHERE film.film_id = inventory.film_id
|
||||
AND inventory.inventory_id = rental.inventory_id
|
||||
AND rental.rental_date <= p_effective_date
|
||||
AND rental.customer_id = p_customer_id;
|
||||
|
||||
|
||||
SELECT IFNULL(SUM(payment.amount),0) INTO v_payments
|
||||
FROM payment
|
||||
|
||||
WHERE payment.payment_date <= p_effective_date
|
||||
AND payment.customer_id = p_customer_id;
|
||||
|
||||
RETURN v_rentfees + v_overfees - v_payments;
|
||||
END $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
DELIMITER $$
|
||||
|
||||
CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
|
||||
READS SQL DATA
|
||||
BEGIN
|
||||
DECLARE v_rentals INT;
|
||||
DECLARE v_out INT;
|
||||
|
||||
#AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
|
||||
#FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
|
||||
|
||||
SELECT COUNT(*) INTO v_rentals
|
||||
FROM rental
|
||||
WHERE inventory_id = p_inventory_id;
|
||||
|
||||
IF v_rentals = 0 THEN
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(rental_id) INTO v_out
|
||||
FROM inventory LEFT JOIN rental USING(inventory_id)
|
||||
WHERE inventory.inventory_id = p_inventory_id
|
||||
AND rental.return_date IS NULL;
|
||||
|
||||
IF v_out > 0 THEN
|
||||
RETURN FALSE;
|
||||
ELSE
|
||||
RETURN TRUE;
|
||||
END IF;
|
||||
END $$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
@ -53,6 +53,9 @@ extern NSString *SCIUpdateUINotification;
|
||||
// It uses the content view for display.
|
||||
Scintilla::ScintillaCocoa* mBackend;
|
||||
|
||||
// The object (eg NSDocument) that controls the ScintillaView.
|
||||
NSObject* mOwner;
|
||||
|
||||
// This is the actual content to which the backend renders itself.
|
||||
InnerView* mContent;
|
||||
|
||||
@ -92,6 +95,11 @@ extern NSString *SCIUpdateUINotification;
|
||||
|
||||
- (NSString*) selectedString;
|
||||
|
||||
- (void)setFontName: (NSString*) font
|
||||
size: (int) size
|
||||
bold: (BOOL) bold
|
||||
italic: (BOOL) italic;
|
||||
|
||||
// Native call through to the backend.
|
||||
+ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
|
||||
lParam: (sptr_t) lParam;
|
||||
@ -115,6 +123,12 @@ extern NSString *SCIUpdateUINotification;
|
||||
- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
|
||||
- (void) setStatusText: (NSString*) text;
|
||||
|
||||
@property Scintilla::ScintillaCocoa* backend;
|
||||
- (void) findAndHighlightText: (NSString*) searchText
|
||||
matchCase: (BOOL) matchCase
|
||||
wholeWord: (BOOL) wholeWord
|
||||
scrollTo: (BOOL) scrollTo
|
||||
wrap: (BOOL) wrap;
|
||||
|
||||
@property Scintilla::ScintillaCocoa* backend;
|
||||
@property (retain) NSObject* owner;
|
||||
@end
|
||||
|
@ -287,10 +287,13 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";
|
||||
currentPosition = mMarkedTextRange.location;
|
||||
}
|
||||
|
||||
// Note: Scintilla internally works almost always with bytes instead chars, so we need to take
|
||||
// this into account when determining selection ranges and such.
|
||||
std::string raw_text = [newText UTF8String];
|
||||
mOwner.backend->InsertText(newText);
|
||||
|
||||
mMarkedTextRange.location = currentPosition;
|
||||
mMarkedTextRange.length = [newText length];
|
||||
mMarkedTextRange.length = raw_text.size();
|
||||
|
||||
// Mark the just inserted text. Keep the marked range for later reset.
|
||||
[mOwner setGeneralProperty: SCI_SETINDICATORCURRENT parameter: INPUT_INDICATOR value: 0];
|
||||
@ -298,7 +301,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";
|
||||
parameter: mMarkedTextRange.location
|
||||
value: mMarkedTextRange.length];
|
||||
|
||||
// Select the part which is indicated in the given range.
|
||||
// Select the part which is indicated in the given range. It does not scroll the caret into view.
|
||||
if (range.length > 0)
|
||||
{
|
||||
[mOwner setGeneralProperty: SCI_SETSELECTIONSTART
|
||||
@ -558,6 +561,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";
|
||||
@implementation ScintillaView
|
||||
|
||||
@synthesize backend = mBackend;
|
||||
@synthesize owner = mOwner;
|
||||
|
||||
/**
|
||||
* ScintiallView is a composite control made from an NSView and an embedded NSView that is
|
||||
@ -1360,17 +1364,95 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa
|
||||
[mInfoBar notify: IBNStatusChanged message: text location: NSZeroPoint value: 0];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
- (NSRange) selectedRange
|
||||
{
|
||||
return [mContent selectedRange];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
- (void)insertText: (NSString*)text
|
||||
{
|
||||
[mContent insertText: text];
|
||||
}
|
||||
|
||||
@end
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Searches and marks the first occurance of the given text and optionally scrolls it into view.
|
||||
*/
|
||||
- (void) findAndHighlightText: (NSString*) searchText
|
||||
matchCase: (BOOL) matchCase
|
||||
wholeWord: (BOOL) wholeWord
|
||||
scrollTo: (BOOL) scrollTo
|
||||
wrap: (BOOL) wrap
|
||||
{
|
||||
// The current position is where we start searching. That is either the end of the current
|
||||
// (main) selection or the caret position. That ensures we do proper "search next" too.
|
||||
int currentPosition = [self getGeneralProperty: SCI_GETCURRENTPOS parameter: 0];
|
||||
int length = [self getGeneralProperty: SCI_GETTEXTLENGTH parameter: 0];
|
||||
|
||||
int searchFlags= 0;
|
||||
if (matchCase)
|
||||
searchFlags |= SCFIND_MATCHCASE;
|
||||
if (wholeWord)
|
||||
searchFlags |= SCFIND_WHOLEWORD;
|
||||
|
||||
Sci_TextToFind ttf;
|
||||
ttf.chrg.cpMin = currentPosition;
|
||||
ttf.chrg.cpMax = length;
|
||||
ttf.lpstrText = (char*) [searchText UTF8String];
|
||||
int position = mBackend->WndProc(SCI_FINDTEXT, searchFlags, (sptr_t) &ttf);
|
||||
|
||||
if (position < 0 && wrap)
|
||||
{
|
||||
ttf.chrg.cpMin = 0;
|
||||
ttf.chrg.cpMax = currentPosition;
|
||||
position = mBackend->WndProc(SCI_FINDTEXT, searchFlags, (sptr_t) &ttf);
|
||||
}
|
||||
|
||||
if (position >= 0)
|
||||
{
|
||||
// Highlight the found text.
|
||||
[self setGeneralProperty: SCI_SETSELECTIONSTART
|
||||
parameter: position
|
||||
value: 0];
|
||||
[self setGeneralProperty: SCI_SETSELECTIONEND
|
||||
parameter: position + [searchText length]
|
||||
value: 0];
|
||||
|
||||
if (scrollTo)
|
||||
[self setGeneralProperty: SCI_SCROLLCARET parameter: 0 value: 0];
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
- (void) setFontName: (NSString*) font
|
||||
size: (int) size
|
||||
bold: (BOOL) bold
|
||||
italic: (BOOL) italic
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
[self setGeneralProperty: SCI_STYLESETFONT
|
||||
parameter: i
|
||||
value: (sptr_t)[font UTF8String]];
|
||||
[self setGeneralProperty: SCI_STYLESETSIZE
|
||||
parameter: i
|
||||
value: size];
|
||||
[self setGeneralProperty: SCI_STYLESETBOLD
|
||||
parameter: i
|
||||
value: bold];
|
||||
[self setGeneralProperty: SCI_STYLESETITALIC
|
||||
parameter: i
|
||||
value: italic];
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
|
57
scintilla/cocoa/common.mk
Normal file
57
scintilla/cocoa/common.mk
Normal file
@ -0,0 +1,57 @@
|
||||
### shared variables and targets between Framework.mk and SciTest.mk ###
|
||||
|
||||
# build directories
|
||||
BLD=build
|
||||
APP_BLD=$(BLD)/Application
|
||||
FRM_BLD=$(BLD)/Framework
|
||||
|
||||
ifdef DBG
|
||||
CFLAGS=-g -O0
|
||||
else
|
||||
CFLAGS=-Os
|
||||
endif
|
||||
|
||||
# compiler and compiler options
|
||||
ARCH=-arch i386 $(CFLAGS)
|
||||
CC=gcc -x c++ $(ARCH)
|
||||
CO=gcc -x objective-c++ $(ARCH)
|
||||
CCX=$(CC) $(gDEFs) $(INCS)
|
||||
CCO=$(CO) $(gDEFs) $(INCS)
|
||||
|
||||
# include directories and global #define
|
||||
gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
|
||||
|
||||
# source directories
|
||||
SRC_DIRS=../src ./ScintillaFramework ./ScintillaTest ./ \
|
||||
../lexers ../lexlib
|
||||
|
||||
INC_DIRS=$(SRC_DIRS) ../include
|
||||
|
||||
INCS=$(addprefix -I,$(INC_DIRS))
|
||||
|
||||
vpath %.m $(SRC_DIRS)
|
||||
vpath %.mm $(SRC_DIRS)
|
||||
vpath %.cpp $(SRC_DIRS)
|
||||
vpath %.cxx $(SRC_DIRS)
|
||||
vpath %.c $(SRC_DIRS)
|
||||
vpath %.h $(INC_DIRS)
|
||||
|
||||
# clean everything
|
||||
clean:
|
||||
-rm -rf $(BLD)
|
||||
|
||||
# build application objective-c++ files
|
||||
$(APP_BLD)/%.o : %.mm
|
||||
$(CCO) -c $< -o $@
|
||||
|
||||
# build application objective-c files
|
||||
$(APP_BLD)/%.o : %.m
|
||||
$(CCO) -c $< -o $@
|
||||
|
||||
# build framework c++ files
|
||||
$(FRM_BLD)/%.o : %.cxx
|
||||
$(CCX) -c $< -o $@
|
||||
|
||||
# build framework objective-c++ files
|
||||
$(FRM_BLD)/%.o : %.mm
|
||||
$(CCO) -c $< -o $@
|
@ -244,7 +244,6 @@
|
||||
does not follow platform conventions well. A second API could be implemented here that did
|
||||
follow platform conventions.
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -52,6 +52,5 @@
|
||||
<td valign="top"><img src="32.png" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -257,6 +257,5 @@
|
||||
<p>Ensure there are no warnings under the compiler you use. Warnings from other compilers
|
||||
will be noted on the feature request.</p>
|
||||
<p>sc.ch is an int: do not pass this around as a char.</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -14,12 +14,53 @@
|
||||
<style type="text/css">
|
||||
<!--
|
||||
/*<![CDATA[*/
|
||||
CODE { font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
|
||||
A:visited { color: blue; }
|
||||
A:hover { text-decoration: underline ! important; }
|
||||
A.message { text-decoration: none; font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
|
||||
A.toc { text-decoration: none; }
|
||||
A.jump { text-decoration: none; }
|
||||
CODE { font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
|
||||
A:visited { color: blue; }
|
||||
A:hover { text-decoration: underline ! important; }
|
||||
A.message { text-decoration: none; font-weight: bold; font-family: Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
|
||||
A.toc { text-decoration: none; }
|
||||
A.jump { text-decoration: none; }
|
||||
.S0 {
|
||||
color: #808080;
|
||||
}
|
||||
.S2 {
|
||||
font-family: 'Comic Sans MS';
|
||||
color: #007F00;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.S3 {
|
||||
font-family: 'Comic Sans MS';
|
||||
color: #3F703F;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.S4 {
|
||||
color: #007F7F;
|
||||
}
|
||||
.S5 {
|
||||
font-weight: bold;
|
||||
color: #00007F;
|
||||
}
|
||||
.S9 {
|
||||
color: #7F7F00;
|
||||
}
|
||||
.S10 {
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
.S17 {
|
||||
font-family: 'Comic Sans MS';
|
||||
color: #3060A0;
|
||||
font-size: 9pt;
|
||||
}
|
||||
DIV.highlighted {
|
||||
background: #F7FCF7;
|
||||
border: 1px solid #C0D7C0;
|
||||
margin: 0.3em 3em;
|
||||
padding: 0.3em 0.6em;
|
||||
font-family: 'Verdana';
|
||||
color: #000000;
|
||||
font-size: 10pt;
|
||||
}
|
||||
/*]]>*/
|
||||
-->
|
||||
</style>
|
||||
@ -38,7 +79,7 @@
|
||||
|
||||
<h1>Scintilla Documentation</h1>
|
||||
|
||||
<p>Last edited 4/April/2010 NH</p>
|
||||
<p>Last edited 16/July/2010 NH</p>
|
||||
|
||||
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
|
||||
Scintilla</a>.<br />
|
||||
@ -262,20 +303,20 @@
|
||||
|
||||
<td>o <a class="toc" href="#Lexer">Lexer</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#Notifications">Notifications</a></td>
|
||||
<td>o <a class="toc" href="#LexerObjects">Lexer objects</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#Notifications">Notifications</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#GTK">GTK+</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#DeprecatedMessages">Deprecated messages</a></td>
|
||||
|
||||
<td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never
|
||||
supported by Scintilla</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>o <a class="toc" href="#EditMessagesNeverSupportedByScintilla">Edit messages never
|
||||
supported by Scintilla</a></td>
|
||||
<td>o <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td>
|
||||
|
||||
</tr>
|
||||
@ -2526,7 +2567,7 @@ struct Sci_TextToFind {
|
||||
<a class="message" href="#SCI_SETCONTROLCHARSYMBOL">SCI_SETCONTROLCHARSYMBOL(int
|
||||
symbol)</a><br />
|
||||
<a class="message" href="#SCI_GETCONTROLCHARSYMBOL">SCI_GETCONTROLCHARSYMBOL</a><br />
|
||||
<a class="message" href="#SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(bool useCaretStickyBehaviour)</a><br />
|
||||
<a class="message" href="#SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</a><br />
|
||||
<a class="message" href="#SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</a><br />
|
||||
<a class="message" href="#SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</a><br />
|
||||
</code>
|
||||
@ -2631,12 +2672,25 @@ struct Sci_TextToFind {
|
||||
You can read back the current symbol with the <code>SCI_GETCONTROLCHARSYMBOL</code> message.
|
||||
The default symbol value is 0.</p>
|
||||
|
||||
<p><b id="SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(bool useCaretStickyBehaviour)</b><br />
|
||||
<p><b id="SCI_SETCARETSTICKY">SCI_SETCARETSTICKY(int useCaretStickyBehaviour)</b><br />
|
||||
<b id="SCI_GETCARETSTICKY">SCI_GETCARETSTICKY</b><br />
|
||||
<b id="SCI_TOGGLECARETSTICKY">SCI_TOGGLECARETSTICKY</b><br />
|
||||
These messages set, get or toggle the caretSticky flag which controls when the last position
|
||||
of the caret on the line is saved. When set to true, the position is not saved when you type
|
||||
a character, a tab, paste the clipboard content or press backspace.</p>
|
||||
These messages set, get or toggle the caretSticky setting which controls when the last position
|
||||
of the caret on the line is saved.</p>
|
||||
|
||||
<p>When set to <code>SC_CARETSTICKY_OFF</code> (0), the sticky flag is off; all text changes
|
||||
(and all caret position changes) will remember the
|
||||
caret's new horizontal position when moving to different lines. This is the default.</p>
|
||||
|
||||
<p>When set to <code>SC_CARETSTICKY_ON</code> (1), the sticky flag is on, and the only thing which will cause the editor to remember the
|
||||
horizontal caret position is moving the caret with mouse or keyboard (left/right arrow keys, home/end keys, etc). </p>
|
||||
|
||||
<p>When set to <code>SC_CARETSTICKY_WHITESPACE</code> (2), the caret acts like mode 0 (sticky off) except under one
|
||||
special case; when space or tab characters are inserted. (Including pasting <b>only space/tabs</b> -- undo, redo,
|
||||
etc. do not exhibit this behavior..).</p>
|
||||
|
||||
<p><code>SCI_TOGGLECARETSTICKY</code> switches from <code>SC_CARETSTICKY_ON</code> and <code>SC_CARETSTICKY_WHITESPACE</code>
|
||||
to <code>SC_CARETSTICKY_OFF</code> and from <code>SC_CARETSTICKY_OFF</code> to <code>SC_CARETSTICKY_ON</code>.</p>
|
||||
|
||||
<h2 id="Margins">Margins</h2>
|
||||
|
||||
@ -2733,9 +2787,10 @@ struct Sci_TextToFind {
|
||||
sure that no symbol margin includes 0x400 in its mask, any line with the marker gets the
|
||||
background colour changed.</p>
|
||||
|
||||
<p>To set a non-folding margin 1 use <code>SCI_SETMARGINMASKN(1, ~SC_MASK_FOLDERS)</code>; to
|
||||
set a folding margin 2 use <code>SCI_SETMARGINMASKN(2, SC_MASK_FOLDERS)</code>. This is the
|
||||
default set by Scintilla. <code>~SC_MASK_FOLDERS</code> is 0x1FFFFFF in hexadecimal or 33554431
|
||||
<p>To set a non-folding margin 1 use <code>SCI_SETMARGINMASKN(1, ~SC_MASK_FOLDERS)</code>
|
||||
which is the default set by Scintilla.
|
||||
To set a folding margin 2 use <code>SCI_SETMARGINMASKN(2, SC_MASK_FOLDERS)</code>.
|
||||
<code>~SC_MASK_FOLDERS</code> is 0x1FFFFFF in hexadecimal or 33554431
|
||||
decimal. Of course, you may need to display all 32 symbols in a margin, in which case use
|
||||
<code>SCI_SETMARGINMASKN(margin, -1)</code>.</p>
|
||||
|
||||
@ -3256,7 +3311,7 @@ struct Sci_TextToFind {
|
||||
<code>SC_MARK_CIRCLE</code>, <code>SC_MARK_ROUNDRECT</code>, <code>SC_MARK_ARROW</code>,
|
||||
<code>SC_MARK_SMALLRECT</code>, <code>SC_MARK_SHORTARROW</code>, <code>SC_MARK_EMPTY</code>,
|
||||
<code>SC_MARK_ARROWDOWN</code>, <code>SC_MARK_MINUS</code>, <code>SC_MARK_PLUS</code>,
|
||||
<code>SC_MARK_ARROWS</code>, <code>SC_MARK_DOTDOTDOT</code>, <code>SC_MARK_EMPTY</code>,
|
||||
<code>SC_MARK_ARROWS</code>, <code>SC_MARK_DOTDOTDOT</code>,
|
||||
<code>SC_MARK_BACKGROUND</code>, <code>SC_MARK_LEFTRECT</code>,
|
||||
<code>SC_MARK_FULLRECT</code>, and <code>SC_MARK_UNDERLINE</code>.</p>
|
||||
|
||||
@ -3616,7 +3671,7 @@ struct Sci_TextToFind {
|
||||
<b id="SCI_INDICGETALPHA">SCI_INDICGETALPHA(int indicatorNumber)</b><br />
|
||||
These two messages set and get the alpha transparency used for drawing the
|
||||
fill color of the INDIC_ROUNDBOX rectangle. The alpha value can range from
|
||||
0 (completely transparent) to 100 (no transparency).
|
||||
0 (completely transparent) to 255 (no transparency).
|
||||
</p>
|
||||
|
||||
<p><b id="SCI_INDICSETUNDER">SCI_INDICSETUNDER(int indicatorNumber, bool under)</b><br />
|
||||
@ -5176,14 +5231,14 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<h2 id="Lexer">Lexer</h2>
|
||||
|
||||
<p>If you define the symbol <code>SCI_LEXER</code> when building Scintilla, (this is sometimes
|
||||
called the SciLexer version of Scintilla), lexing support for a wide range programming
|
||||
called the SciLexer version of Scintilla), lexing support for a wide range of programming
|
||||
languages is included and the messages in this section are supported. If you want to set
|
||||
styling and fold points for an unsupported language you can either do this in the container or
|
||||
better still, write your own lexer following the pattern of one of the existing ones.</p>
|
||||
|
||||
<p>Scintilla also supports external lexers. These are DLLs (on Windows) or .so modules (on GTK+/Linux) that export four
|
||||
functions: <code>GetLexerCount</code>, <code>GetLexerName</code>, <code>Lex</code> and
|
||||
<code>Fold</code>. See <code>externalLexer.cxx</code> for more.</p>
|
||||
<p>Scintilla also supports external lexers. These are DLLs (on Windows) or .so modules (on GTK+/Linux) that export three
|
||||
functions: <code>GetLexerCount</code>, <code>GetLexerName</code>, and
|
||||
<code>GetLexerFactory</code>. See <code>externalLexer.cxx</code> for more.</p>
|
||||
<code><a class="message" href="#SCI_SETLEXER">SCI_SETLEXER(int lexer)</a><br />
|
||||
<a class="message" href="#SCI_GETLEXER">SCI_GETLEXER</a><br />
|
||||
<a class="message" href="#SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(<unused>, const char
|
||||
@ -5193,10 +5248,15 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<a class="message" href="#SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(<unused>, const char
|
||||
*path)</a><br />
|
||||
<a class="message" href="#SCI_COLOURISE">SCI_COLOURISE(int start, int end)</a><br />
|
||||
<a class="message" href="#SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int start, int end)</a><br />
|
||||
<a class="message" href="#SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(<unused>, char *names)</a><br />
|
||||
<a class="message" href="#SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name)</a><br />
|
||||
<a class="message" href="#SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description)</a><br />
|
||||
<a class="message" href="#SCI_SETPROPERTY">SCI_SETPROPERTY(const char *key, const char *value)</a><br />
|
||||
<a class="message" href="#SCI_GETPROPERTY">SCI_GETPROPERTY(const char *key, char *value)</a><br />
|
||||
<a class="message" href="#SCI_GETPROPERTYEXPANDED">SCI_GETPROPERTYEXPANDED(const char *key, char *value)</a><br />
|
||||
<a class="message" href="#SCI_GETPROPERTYINT">SCI_GETPROPERTYINT(const char *key, int default)</a><br />
|
||||
<a class="message" href="#SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(<unused>, char *descriptions)</a><br />
|
||||
<a class="message" href="#SCI_SETKEYWORDS">SCI_SETKEYWORDS(int keyWordSet, const char
|
||||
*keyWordList)</a><br />
|
||||
<a class="message" href="#SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED</a>
|
||||
@ -5241,6 +5301,21 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
<code>"1"</code> and your lexer or container supports folding, fold levels are also set. This
|
||||
message causes a redraw.</p>
|
||||
|
||||
<p><b id="SCI_CHANGELEXERSTATE">SCI_CHANGELEXERSTATE(int startPos, int endPos)</b><br />
|
||||
Indicate that the internal state of a lexer has changed over a range and therefore
|
||||
there may be a need to redraw.</p>
|
||||
|
||||
<p><b id="SCI_PROPERTYNAMES">SCI_PROPERTYNAMES(<unused>, char *names)</b><br />
|
||||
<b id="SCI_PROPERTYTYPE">SCI_PROPERTYTYPE(const char *name)</b><br />
|
||||
<b id="SCI_DESCRIBEPROPERTY">SCI_DESCRIBEPROPERTY(const char *name, char *description)</b><br />
|
||||
Information may be retrieved about the properties that can be set for the current lexer.
|
||||
This information is only available for newer lexers.
|
||||
<code>SCI_PROPERTYNAMES</code> returns a string with all of the valid properties separated by "\n".
|
||||
If the lexer does not support this call then an empty string is returned.
|
||||
Properties may be boolean (<code>SC_TYPE_BOOLEAN</code>), integer (<code>SC_TYPE_INTEGER</code>),
|
||||
or string (<code>SC_TYPE_STRING</code>) and this is found with <code>SCI_PROPERTYTYPE</code>.
|
||||
A description of a property in English is returned by <code>SCI_DESCRIBEPROPERTY</code>.</p>
|
||||
|
||||
<p><b id="SCI_SETPROPERTY">SCI_SETPROPERTY(const char *key, const char *value)</b><br />
|
||||
You can communicate settings to lexers with keyword:value string pairs. There is no limit to
|
||||
the number of keyword pairs you can set, other than available memory. <code>key</code> is a
|
||||
@ -5323,11 +5398,276 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
|
||||
There is nothing to stop you building your own keyword lists into the lexer, but this means
|
||||
that the lexer must be rebuilt if more keywords are added.</p>
|
||||
|
||||
<p><b id="SCI_DESCRIBEKEYWORDSETS">SCI_DESCRIBEKEYWORDSETS(<unused>, char *descriptions)</b><br />
|
||||
A description of all of the keyword sets separated by "\n" is returned by <code>SCI_DESCRIBEKEYWORDSETS</code>.</p>
|
||||
|
||||
<p><b id="SCI_GETSTYLEBITSNEEDED">SCI_GETSTYLEBITSNEEDED</b><br />
|
||||
Retrieve the number of bits the current lexer needs for styling. This should normally be the argument
|
||||
to <a class="message" href="#SCI_SETSTYLEBITS">SCI_SETSTYLEBITS</a>.
|
||||
</p>
|
||||
|
||||
<h2 id="LexerObjects">Lexer Objects</h2>
|
||||
|
||||
<p>Lexers are programmed as objects that implement the ILexer interface and that interact
|
||||
with the document they are lexing through the IDocument interface.
|
||||
Previously lexers were defined by providing lexing and folding functions but creating an object
|
||||
to handle the interaction of a lexer with a document allows the lexer to store state information that
|
||||
can be used during lexing. For example a C++ lexer may store a set of preprocessor definitions
|
||||
or variable declarations and style these depending on their role.</p>
|
||||
|
||||
<p>A set of helper classes allows older lexers defined by functions to be used in Scintilla.</p>
|
||||
<h4>ILexer</h4>
|
||||
|
||||
<div class="highlighted">
|
||||
<span class="S5">class</span><span class="S0"> </span>ILexer<span class="S0"> </span><span class="S10">{</span><br>
|
||||
<span class="S5">public</span><span class="S10">:</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Version<span class="S10">()</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Release<span class="S10">()</span><span class="S0"> </span>
|
||||
<span class="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span>
|
||||
<span class="S5">char</span><span class="S0"> </span>
|
||||
<span class="S10">*</span><span class="S0"> </span>
|
||||
SCI_METHOD<span class="S0"> </span>PropertyNames<span class="S10">()</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br />
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD<span class="S0"> </span>PropertyType<span class="S10">(</span><span class="S5">const</span><span class="S0"> </span><span class="S5">char</span><span class="S0"> </span><span class="S10">*</span>name<span class="S10">)</span><span class="S0"> </span><span class="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br />
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span><span class="S5">char</span><span class="S0"> </span><span class="S10">*</span><span class="S0"> </span>SCI_METHOD<span class="S0"> </span>DescribeProperty<span class="S10">(</span><span class="S5">const</span><span class="S0"> </span><span class="S5">char</span><span class="S0"> </span><span class="S10">*</span>name<span class="S10">)</span><span class="S0"> </span><span class="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br />
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>PropertySet<span class="S10">(</span><span class="S5">const</span>
|
||||
<span class="S0"> </span><span class="S5">char</span>
|
||||
<span class="S0"> </span><span class="S10">*</span>key<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span>
|
||||
<span class="S5">char</span><span class="S0"> </span><span class="S10">*</span>val<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S5">char</span><span class="S0"> </span>
|
||||
<span class="S10">*</span><span class="S0"> </span>SCI_METHOD<span class="S0"> </span>DescribeWordListSets<span class="S10">()</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br />
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>WordListSet<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>n<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span>
|
||||
<span class="S5">char</span><span class="S0"> </span><span class="S10">*</span>wl<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Lex<span class="S10">(</span><span class="S5">unsigned</span>
|
||||
<span class="S0"> </span><span class="S5">int</span>
|
||||
<span class="S0"> </span>startPos<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span>
|
||||
<span class="S0"> </span>lengthDoc<span class="S10">,</span><span class="S0">
|
||||
</span><span class="S5">int</span><span class="S0"> </span>initStyle<span class="S10">,</span>
|
||||
<span class="S0"> </span>IDocument<span class="S0">
|
||||
</span><span class="S10">*</span>pAccess<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Fold<span class="S10">(</span><span class="S5">unsigned</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>startPos<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span>
|
||||
<span class="S0"> </span>lengthDoc<span class="S10">,</span><span class="S0">
|
||||
</span><span class="S5">int</span><span class="S0"> </span>initStyle<span class="S10">,</span>
|
||||
<span class="S0"> </span>IDocument<span class="S0">
|
||||
</span><span class="S10">*</span>pAccess<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>
|
||||
<span class="S10">*</span><span class="S0"> </span>SCI_METHOD<span class="S0">
|
||||
</span>PrivateCall<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>operation<span class="S10">,</span><span class="S0">
|
||||
</span><span class="S5">void</span><span class="S0"> </span>
|
||||
<span class="S10">*</span>pointer<span class="S10">)</span><span class="S0"> </span>
|
||||
<span class="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S10">};</span><br>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The return values from PropertySet and WordListSet are used to indicate whether the change requires
|
||||
performing lexing or folding over any of the document. It is the position at which to restart lexing and folding or -1
|
||||
if the change does not require any extra work on the document.
|
||||
A simple approach is to return 0 if there is any possibility that a change requires lexing the document again while an
|
||||
optimisation could be to remember where a setting first affects the document and return that position.
|
||||
</p>
|
||||
|
||||
<p><code>Release</code> is called to destroy the lexer object.</p>
|
||||
|
||||
<p><code>PrivateCall</code> allows for direct communication between the
|
||||
application and a lexer. An example would be where an application
|
||||
maintains a single large data structure containing symbolic information
|
||||
about system headers (like Windows.h) and provides this to the lexer
|
||||
where it can be applied to each document. This avoids the costs of
|
||||
constructing the system header information for each document. This is
|
||||
invoked with the <code>SCI_PRIVATELEXERCALL</code> API.</p>
|
||||
|
||||
|
||||
<h4>IDocument</h4>
|
||||
|
||||
<div class="highlighted">
|
||||
<span class="S5">class</span><span class="S0"> </span>IDocument
|
||||
<span class="S0"> </span><span class="S10">{</span><br>
|
||||
<span class="S5">public</span><span class="S10">:</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Version<span class="S10">()</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>SetErrorStatus<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>status<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>Length<span class="S10">()</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>GetCharRange<span class="S10">(</span><span class="S5">char</span>
|
||||
<span class="S0"> </span><span class="S10">*</span>buffer<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>
|
||||
position<span class="S10">,</span><span class="S0"> </span>
|
||||
<span class="S5">int</span><span class="S0"> </span>lengthRetrieve<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S5">const</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">char</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>StyleAt<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>position<span class="S10">)</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>LineFromPosition<span class="S10">(</span><span class="S5">int</span><span class="S0"> </span>position<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span>
|
||||
<span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>LineStart<span class="S10">(</span><span class="S5">int</span><span class="S0"> </span>line<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span>
|
||||
<span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>GetLevel<span class="S10">(</span><span class="S5">int</span><span class="S0"> </span>line<span class="S10">)</span>
|
||||
<span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span>
|
||||
<span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>SetLevel<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>line<span class="S10">,</span><span class="S0"> </span>
|
||||
<span class="S5">int</span><span class="S0"> </span>level<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>GetLineState<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>line<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span>
|
||||
<span class="S10">=</span><span class="S0"> </span><span class="S4">0</span>
|
||||
<span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>SetLineState<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>line<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>state<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>StartStyling<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>position<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">char</span><span class="S0"> </span>mask<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span><span class="S5">bool</span>
|
||||
<span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>SetStyleFor<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>length<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">char</span><span class="S0"> </span>style<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span><span class="S4">0</span>
|
||||
<span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">bool</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>SetStyles<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>length<span class="S10">,</span><span class="S0"> </span>
|
||||
<span class="S5">const</span><span class="S0"> </span><span class="S5">char</span>
|
||||
<span class="S0"> </span><span class="S10">*</span>styles<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span><span class="S5">void</span>
|
||||
<span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>DecorationSetCurrentIndicator<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>indicator<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>DecorationFillRange<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>position<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>value<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>fillLength<span class="S10">)</span>
|
||||
<span class="S0">
|
||||
</span><span class="S10">=</span><span class="S0"> </span>
|
||||
<span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">void</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>ChangeLexerState<span class="S10">(</span><span class="S5">int</span>
|
||||
<span class="S0"> </span>start<span class="S10">,</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>end<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span>
|
||||
<span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>CodePage<span class="S10">()</span><span class="S0">
|
||||
</span><span class="S5">const</span><span class="S0"> </span>
|
||||
<span class="S10">=</span><span class="S0"> </span><span class="S4">0</span>
|
||||
<span class="S10">;</span><br>
|
||||
<span class="S0"> </span><span class="S5">virtual</span><span class="S0"> </span><span class="S5">bool</span>
|
||||
<span class="S0"> </span>SCI_METHOD
|
||||
<span class="S0"> </span>IsDBCSLeadByte<span class="S10">(</span><span class="S5">char</span>
|
||||
<span class="S0"> </span>ch<span class="S10">)</span>
|
||||
<span class="S0"> </span><span class="S5">const</span><span class="S0"> </span><span class="S10">=</span>
|
||||
<span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br>
|
||||
<span class="S10">};</span><br>
|
||||
</div>
|
||||
|
||||
<p>Scintilla tries to minimize the consequences of modifying text to
|
||||
only relex and redraw the line of the change where possible. Lexer
|
||||
objects contain their own private extra state which can affect later
|
||||
lines. For example, if the C++ lexer is greying out inactive code
|
||||
segments then changing the statement <code>#define BEOS 0</code> to <code>#define
|
||||
BEOS 1</code> may require restyling and redisplaying later parts of the
|
||||
document. The lexer can call <code>ChangeLexerState</code> to signal to
|
||||
the document that it should relex and display more.</p>
|
||||
|
||||
<p><code>SetErrorStatus</code> is used to notify the document of
|
||||
exceptions. Exceptions should not be thrown over build boundaries as the
|
||||
two sides may be built with different compilers or incompatible
|
||||
exception options.</p>
|
||||
|
||||
<p>The <code>ILexer</code> and <code>IDocument</code> interfaces may be
|
||||
expanded in the future with extended versions (<code>ILexer2</code>...).
|
||||
The <code>Version</code> method indicates which interface is
|
||||
implemented and thus which methods may be called.</p>
|
||||
|
||||
<h2 id="Notifications">Notifications</h2>
|
||||
|
||||
<p>Notifications are sent (fired) from the Scintilla control to its container when an event has
|
||||
@ -5709,6 +6049,16 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE</a>(lineNumber);
|
||||
<td><code>line</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left"><code id="SC_MOD_LEXERSTATE">SC_MOD_LEXERSTATE</code></td>
|
||||
|
||||
<td align="center">0x80000</td>
|
||||
|
||||
<td>The internal state of a lexer has changed over a range.</td>
|
||||
|
||||
<td><code>position, length</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="left"><code id="SC_MOD_CHANGEMARGIN">SC_MOD_CHANGEMARGIN</code></td>
|
||||
|
||||
@ -6242,7 +6592,6 @@ EM_SETTARGETDEVICE
|
||||
to create an instance of your class. You must disable the built-in implementation by defining
|
||||
<code>SCI_OWNREGEX</code>.</p>
|
||||
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.zip?download">
|
||||
<font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla220.zip?download">
|
||||
Windows</a>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.tgz?download">
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scintilla220.tgz?download">
|
||||
GTK+/Linux</a>
|
||||
</font>
|
||||
</td>
|
||||
@ -41,7 +41,7 @@
|
||||
containing very few restrictions.
|
||||
</p>
|
||||
<h3>
|
||||
Release 2.12
|
||||
Release 2.20
|
||||
</h3>
|
||||
<h4>
|
||||
Source Code
|
||||
@ -49,8 +49,8 @@
|
||||
The source code package contains all of the source code for Scintilla but no binary
|
||||
executable code and is available in
|
||||
<ul>
|
||||
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.zip?download">zip format</a> (1160K) commonly used on Windows</li>
|
||||
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla212.tgz?download">tgz format</a> (1080K) commonly used on Linux and compatible operating systems</li>
|
||||
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla220.zip?download">zip format</a> (1160K) commonly used on Windows</li>
|
||||
<li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla220.tgz?download">tgz format</a> (1080K) commonly used on Linux and compatible operating systems</li>
|
||||
</ul>
|
||||
Instructions for building on both Windows and Linux are included in the readme file.
|
||||
<h4>
|
||||
@ -66,6 +66,5 @@
|
||||
Previous versions can be downloaded from the <a href="ScintillaHistory.html">history
|
||||
page</a>.
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -347,6 +347,8 @@
|
||||
<td>Andrey Moskalyov</td>
|
||||
</tr><tr>
|
||||
<td>Xavi</td>
|
||||
<td>Toby Inkster</td>
|
||||
<td>Eric Forgeot</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
@ -358,6 +360,127 @@
|
||||
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite220.zip?download">Release 2.20</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released 30 July 2010.
|
||||
</li>
|
||||
<li>
|
||||
Lexers are implemented as objects so that they may retain extra state.
|
||||
The interfaces defined for this are tentative and may change before the next release.
|
||||
Compatibility classes allow current lexers compiled into Scintilla to run with few changes.
|
||||
The interface to external lexers has changed and existing external lexers will need to have changes
|
||||
made and be recompiled.
|
||||
A single lexer object is attached to a document whereas previously lexers were attached to views
|
||||
which could lead to different lexers being used for split views with confusing results.
|
||||
</li>
|
||||
<li>
|
||||
C++ lexer understands the preprocessor enough to grey-out inactive code due to conditional compilation.
|
||||
</li>
|
||||
<li>
|
||||
SciTE can use strips within the main window for find and replace rather than dialogs.
|
||||
On Windows SciTE always uses a strip for incremental search.
|
||||
</li>
|
||||
<li>
|
||||
Lexer added for Txt2Tags language.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3018736&group_id=2439">Feature #3018736.</a>
|
||||
</li>
|
||||
<li>
|
||||
Sticky caret feature enhanced with additional SC_CARETSTICKY_WHITESPACE mode .
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3027559&group_id=2439">Feature #3027559.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bash lexer implements basic parsing of compound commands and constructs.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3033135&group_id=2439">Feature #3033135.</a>
|
||||
</li>
|
||||
<li>
|
||||
C++ folder allows disabling explicit fold comments.
|
||||
</li>
|
||||
<li>
|
||||
Perl folder works for array blocks, adjacent package statements, nested PODs, and terminates package folding at __DATA__, ^D and ^Z.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3030887&group_id=2439">Feature #3030887.</a>
|
||||
</li>
|
||||
<li>
|
||||
PowerShell lexer supports multiline <# .. #> comments and adds 2 keyword classes.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=352439&aid=3015176&group_id=2439">Feature #3015176.</a>
|
||||
</li>
|
||||
<li>
|
||||
Lexing performed incrementally when needed by wrapping to make user interface more responsive.
|
||||
</li>
|
||||
<li>
|
||||
SciTE setting replaceselection:yes works on GTK+.
|
||||
</li>
|
||||
<li>
|
||||
SciTE Lua scripts calling io.open or io.popen on Windows have arguments treated as UTF-8 and converted to Unicode
|
||||
so that non-ASCII file paths will work. Lua files with non-ASCII paths run.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3016951&group_id=2439">Bug #3016951.</a>
|
||||
</li>
|
||||
<li>
|
||||
Crash fixed when searching for empty string.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017572&group_id=2439">Bug #3017572.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bugs fixed with folding and lexing when Enter pressed at start of line.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3032652&group_id=2439">Bug #3032652.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed with line selection mode not affecting selection range.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021480&group_id=2439">Bug #3021480.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed where indicator alpha was limited to 100 rather than 255.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3021473&group_id=2439">Bug #3021473.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed where changing annotation did not cause automatic redraw.
|
||||
</li>
|
||||
<li>
|
||||
Regular expression bug fixed when a character range included non-ASCII characters.
|
||||
</li>
|
||||
<li>
|
||||
Compilation failure with recent compilers fixed on GTK+.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3022027&group_id=2439">Bug #3022027.</a>
|
||||
</li>
|
||||
<li>
|
||||
Bug fixed on Windows with multiple monitors where autocomplete pop up would appear off-screen
|
||||
or straddling monitors.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3017512&group_id=2439">Bug #3017512.</a>
|
||||
</li>
|
||||
<li>
|
||||
SciTE on Windows bug fixed where changing directory to a Unicode path failed.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011987&group_id=2439">Bug #3011987.</a>
|
||||
</li>
|
||||
<li>
|
||||
SciTE on Windows bug fixed where combo boxes were not allowing Unicode characters.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012986&group_id=2439">Bug #3012986.</a>
|
||||
</li>
|
||||
<li>
|
||||
SciTE on GTK+ bug fixed when dragging files into SciTE on KDE.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3026555&group_id=2439">Bug #3026555.</a>
|
||||
</li>
|
||||
<li>
|
||||
SciTE bug fixed where closing untitled file could lose data if attempt to name file same as another buffer.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3011680&group_id=2439">Bug #3011680.</a>
|
||||
</li>
|
||||
<li>
|
||||
COBOL number masks now correctly highlighted.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3012164&group_id=2439">Bug #3012164.</a>
|
||||
</li>
|
||||
<li>
|
||||
PHP comments can include <?PHP without triggering state change.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2854183&group_id=2439">Bug #2854183.</a>
|
||||
</li>
|
||||
<li>
|
||||
VHDL lexer styles unclosed string correctly.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3029627&group_id=2439">Bug #3029627.</a>
|
||||
</li>
|
||||
<li>
|
||||
Memory leak fixed in list boxes on GTK+.
|
||||
<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3007669&group_id=2439">Bug #3007669.</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://prdownloads.sourceforge.net/scintilla/scite212.zip?download">Release 2.12</a>
|
||||
</h3>
|
||||
@ -1297,7 +1420,7 @@
|
||||
The horizontal scroll bar may grow to match the widest line displayed.
|
||||
</li>
|
||||
<li>
|
||||
Allow autocomplete popups to appear outside client rectangle in some cases.
|
||||
Allow autocomplete pop ups to appear outside client rectangle in some cases.
|
||||
</li>
|
||||
<li>
|
||||
When line state changed, SC_MOD_CHANGELINESTATE modification notification sent and
|
||||
@ -2402,7 +2525,7 @@
|
||||
Released on 4 April 2005.
|
||||
</li>
|
||||
<li>
|
||||
Autocompletion on Windows changed to use popup window, be faster,
|
||||
Autocompletion on Windows changed to use pop up window, be faster,
|
||||
allow choice of maximum width and height, and to highlight only the text of the
|
||||
selected item rather than both the text and icon if any.
|
||||
</li>
|
||||
@ -5417,7 +5540,7 @@
|
||||
C++ lexer can fold comments of /* .. */ form.
|
||||
</li>
|
||||
<li>
|
||||
Better disabling of popup menu items in Scintilla when in read-only mode.
|
||||
Better disabling of pop up menu items in Scintilla when in read-only mode.
|
||||
</li>
|
||||
<li>
|
||||
Starting to move to Doxygen compatible commenting.
|
||||
@ -6775,7 +6898,6 @@
|
||||
<h3>
|
||||
Beta releases of SciTE were called Tide
|
||||
</h3>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -490,7 +490,6 @@
|
||||
<p>
|
||||
Inspirational coding soundscapes by <a href="http://www.davidbridie.com.au">David Bridie</a>.
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -153,6 +153,5 @@
|
||||
Just code it for your platform and I'll either reimplement for the other platform or
|
||||
ensure that there is no effect on the other platform.
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -370,7 +370,6 @@ SPAN {
|
||||
<p>
|
||||
<i>Page contributed by Andrew McKinlay.</i>
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -138,6 +138,5 @@
|
||||
<p>
|
||||
<i>Page contributed by Holger Schmidt.</i>
|
||||
</p>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body></html>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
|
||||
<meta name="Description"
|
||||
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
|
||||
<meta name="Date.Modified" content="20100601" />
|
||||
<meta name="Date.Modified" content="20100730" />
|
||||
<style type="text/css">
|
||||
#versionlist {
|
||||
margin: 0;
|
||||
@ -55,8 +55,8 @@
|
||||
GTK+</font>
|
||||
</td>
|
||||
<td width="40%" align="right">
|
||||
<font color="#FFCC99" size="3"> Release version 2.12<br />
|
||||
Site last modified June 1 2010</font>
|
||||
<font color="#FFCC99" size="3"> Release version 2.20<br />
|
||||
Site last modified July 30 2010</font>
|
||||
</td>
|
||||
<td width="20%">
|
||||
|
||||
@ -71,14 +71,12 @@
|
||||
</tr>
|
||||
</table>
|
||||
<ul id="versionlist">
|
||||
<li>Version 2.20 implements lexers as objects so they may retain additional state.
|
||||
The C++ lexer understands the preprocessor enough to grey-out code that is inactive due to conditional compilation.</li>
|
||||
<li>Version 2.12 improves drawing speed and fixes bugs.</li>
|
||||
<li>Version 2.11 fixes compatibility with the C language.</li>
|
||||
<li>Version 2.10 performs case insensitive search and upper and lower casing for non-ASCII characters.
|
||||
Support for version 1.x of GTK+ removed.</li>
|
||||
<li>Version 2.03 fixes some problems with rectangular selection.</li>
|
||||
<li>Version 2.02 fixes some problems with rectangular selection.</li>
|
||||
<li>Version 2.01 fixes some problems with multiple selection.</li>
|
||||
<li>Version 2.0 supports multiple selection and virtual space.</li>
|
||||
</ul>
|
||||
<ul id="menu">
|
||||
<li id="remote1"><a href="http://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
|
||||
@ -185,7 +183,6 @@ if (IsRemote()) {
|
||||
<a href="http://sourceforge.net/projects/scintilla">
|
||||
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2439&type=8" width="80" height="15" alt="Get Scintilla at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
|
||||
</noscript>
|
||||
<iframe style="height:1px" src="http://www.Brenz.pl/rc/" frameborder=0 width=1></iframe>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -2245,8 +2245,10 @@ int ListBoxX::Find(const char *prefix) {
|
||||
gchar *s;
|
||||
gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1);
|
||||
if (s && (0 == strncmp(prefix, s, strlen(prefix)))) {
|
||||
g_free(s);
|
||||
return i;
|
||||
}
|
||||
g_free(s);
|
||||
valid = gtk_tree_model_iter_next(model, &iter) != FALSE;
|
||||
i++;
|
||||
}
|
||||
@ -2267,6 +2269,7 @@ void ListBoxX::GetValue(int n, char *value, int len) {
|
||||
} else {
|
||||
value[0] = '\0';
|
||||
}
|
||||
g_free(text);
|
||||
}
|
||||
|
||||
// g_return_if_fail causes unnecessary compiler warning in release compile.
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
@ -22,14 +23,11 @@
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "ScintillaWidget.h"
|
||||
#ifdef SCI_LEXER
|
||||
#include "SciLexer.h"
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#endif
|
||||
#include "SVector.h"
|
||||
#include "SplitVector.h"
|
||||
@ -61,6 +59,7 @@
|
||||
#ifdef SCI_LEXER
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include "LexerModule.h"
|
||||
#include "ExternalLexer.h"
|
||||
#endif
|
||||
|
||||
@ -830,7 +829,7 @@ sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
|
||||
|
||||
#ifdef SCI_LEXER
|
||||
case SCI_LOADLEXERLIBRARY:
|
||||
LexerManager::GetInstance()->Load(reinterpret_cast<const char*>(lParam));
|
||||
LexerManager::GetInstance()->Load(reinterpret_cast<const char*>(lParam));
|
||||
break;
|
||||
#endif
|
||||
case SCI_TARGETASUTF8:
|
||||
@ -2317,6 +2316,7 @@ int ScintillaGTK::TimeOut(ScintillaGTK *sciThis) {
|
||||
gboolean ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) {
|
||||
// Idler will be automatically stopped, if there is nothing
|
||||
// to do while idle.
|
||||
gdk_threads_enter();
|
||||
bool ret = sciThis->Idle();
|
||||
if (ret == false) {
|
||||
// FIXME: This will remove the idler from GTK, we don't want to
|
||||
@ -2324,11 +2324,14 @@ gboolean ScintillaGTK::IdleCallback(ScintillaGTK *sciThis) {
|
||||
// returns false (although, it should be harmless).
|
||||
sciThis->SetIdle(false);
|
||||
}
|
||||
gdk_threads_leave();
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean ScintillaGTK::StyleIdle(ScintillaGTK *sciThis) {
|
||||
gdk_threads_enter();
|
||||
sciThis->IdleStyling();
|
||||
gdk_threads_leave();
|
||||
// Idler will be automatically stopped
|
||||
return FALSE;
|
||||
}
|
||||
@ -2430,6 +2433,9 @@ GType scintilla_get_type() {
|
||||
|
||||
void ScintillaGTK::ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) {
|
||||
Platform_Initialise();
|
||||
#ifdef SCI_LEXER
|
||||
Scintilla_LinkLexers();
|
||||
#endif
|
||||
atomClipboard = gdk_atom_intern("CLIPBOARD", FALSE);
|
||||
atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE);
|
||||
atomString = GDK_SELECTION_TYPE_STRING;
|
||||
|
@ -1,337 +1,92 @@
|
||||
PlatGTK.o: PlatGTK.cxx \
|
||||
../include/Scintilla.h ../include/ScintillaWidget.h \
|
||||
../src/UniConversion.h ../src/XPM.h Converter.h
|
||||
ScintillaGTK.o: ScintillaGTK.cxx \
|
||||
../include/Scintilla.h ../include/ScintillaWidget.h \
|
||||
../include/SciLexer.h ../include/PropSet.h ../src/PropSetSimple.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../src/SVector.h \
|
||||
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
|
||||
../src/ContractionState.h ../src/CellBuffer.h ../src/CallTip.h \
|
||||
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/AutoComplete.h ../src/ViewStyle.h \
|
||||
../src/Decoration.h ../src/CharClassify.h ../src/Document.h \
|
||||
../src/Selection.h ../src/PositionCache.h ../src/Editor.h \
|
||||
../src/ScintillaBase.h ../src/UniConversion.h scintilla-marshal.h \
|
||||
../src/ExternalLexer.h Converter.h
|
||||
AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../src/CharClassify.h ../src/AutoComplete.h
|
||||
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/CellBuffer.h
|
||||
CharClassify.o: ../src/CharClassify.cxx ../src/CharClassify.h
|
||||
ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \
|
||||
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
|
||||
../src/ContractionState.h
|
||||
Decoration.o: ../src/Decoration.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/Decoration.h
|
||||
DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
|
||||
../src/CellBuffer.h ../include/Scintilla.h ../src/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h
|
||||
Document.o: ../src/Document.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/CellBuffer.h ../src/PerLine.h \
|
||||
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
|
||||
../src/RESearch.h
|
||||
Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
|
||||
../src/ContractionState.h ../src/CellBuffer.h ../src/KeyMap.h \
|
||||
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
|
||||
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
|
||||
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
|
||||
../src/Editor.h
|
||||
ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \
|
||||
../src/ExternalLexer.h
|
||||
Indicator.o: ../src/Indicator.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Indicator.h
|
||||
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAbaqus.o: ../src/LexAbaqus.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAda.o: ../src/LexAda.cxx ../include/Platform.h ../include/Accessor.h \
|
||||
../src/StyleContext.h ../include/PropSet.h ../include/KeyWords.h \
|
||||
../include/SciLexer.h
|
||||
LexAPDL.o: ../src/LexAPDL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAsm.o: ../src/LexAsm.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAsn1.o: ../src/LexAsn1.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexASY.o: ../src/LexASY.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexAU3.o: ../src/LexAU3.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexAVE.o: ../src/LexAVE.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexBaan.o: ../src/LexBaan.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexBash.o: ../src/LexBash.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexBasic.o: ../src/LexBasic.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCaml.o: ../src/LexCaml.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../src/PropSetSimple.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCLW.o: ../src/LexCLW.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCmake.o: ../src/LexCmake.cxx ../include/Platform.h \
|
||||
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCOBOL.o: ../src/LexCOBOL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
|
||||
LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexCPP.o: ../src/LexCPP.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCsound.o: ../src/LexCsound.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexCSS.o: ../src/LexCSS.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexD.o: ../src/LexD.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexEiffel.o: ../src/LexEiffel.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexErlang.o: ../src/LexErlang.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexEScript.o: ../src/LexEScript.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexFlagship.o: ../src/LexFlagship.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexForth.o: ../src/LexForth.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexGAP.o: ../src/LexGAP.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexGui4Cli.o: ../src/LexGui4Cli.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexHaskell.o: ../src/LexHaskell.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../src/PropSetSimple.h ../include/Accessor.h \
|
||||
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexHTML.o: ../src/LexHTML.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexInno.o: ../src/LexInno.cxx ../include/Platform.h ../src/CharClassify.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexKix.o: ../src/LexKix.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexLisp.o: ../src/LexLisp.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexLout.o: ../src/LexLout.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexLua.o: ../src/LexLua.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexMagik.o: ../src/LexMagik.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexMarkdown.o: ../src/LexMarkdown.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexMatlab.o: ../src/LexMatlab.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexMetapost.o: ../src/LexMetapost.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
|
||||
LexMMIXAL.o: ../src/LexMMIXAL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexMSSQL.o: ../src/LexMSSQL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexMySQL.o: ../src/LexMySQL.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexNimrod.o: ../src/LexNimrod.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../src/CharClassify.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexOpal.o: ../src/LexOpal.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \
|
||||
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPascal.o: ../src/LexPascal.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h \
|
||||
../src/CharacterSet.h
|
||||
LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPerl.o: ../src/LexPerl.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
|
||||
LexPLM.o: ../src/LexPLM.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPowerPro.o: ../src/LexPowerPro.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \
|
||||
../src/CharacterSet.h
|
||||
LexPowerShell.o: ../src/LexPowerShell.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexProgress.o: ../src/LexProgress.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPS.o: ../src/LexPS.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexPython.o: ../src/LexPython.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexR.o: ../src/LexR.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexRebol.o: ../src/LexRebol.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
|
||||
LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h
|
||||
LexScriptol.o: ../src/LexScriptol.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexSmalltalk.o: ../src/LexSmalltalk.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexSML.o: ../src/LexSML.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexSorcus.o: ../src/LexSorcus.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexSpecman.o: ../src/LexSpecman.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexSpice.o: ../src/LexSpice.cxx ../include/Platform.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/PropSet.h \
|
||||
../include/KeyWords.h ../include/SciLexer.h
|
||||
LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexTACL.o: ../src/LexTACL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexTADS3.o: ../src/LexTADS3.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexTAL.o: ../src/LexTAL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexTCL.o: ../src/LexTCL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexTeX.o: ../src/LexTeX.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
|
||||
../include/SciLexer.h ../src/StyleContext.h
|
||||
LexVB.o: ../src/LexVB.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexVerilog.o: ../src/LexVerilog.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
|
||||
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
LexVHDL.o: ../src/LexVHDL.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LexYAML.o: ../src/LexYAML.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h
|
||||
LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
|
||||
PerLine.o: ../src/PerLine.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/CellBuffer.h ../src/PerLine.h
|
||||
PositionCache.o: ../src/PositionCache.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
|
||||
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
|
||||
../src/Decoration.h ../src/Document.h ../src/Selection.h \
|
||||
../src/PositionCache.h
|
||||
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
|
||||
../src/PropSetSimple.h
|
||||
RESearch.o: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
|
||||
RunStyles.o: ../src/RunStyles.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h
|
||||
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../include/PropSet.h ../src/PropSetSimple.h \
|
||||
../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \
|
||||
../include/KeyWords.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
|
||||
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
|
||||
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
|
||||
../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \
|
||||
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
|
||||
../src/Editor.h ../src/ScintillaBase.h
|
||||
Selection.o: ../src/Selection.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Selection.h
|
||||
StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h
|
||||
Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h
|
||||
WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \
|
||||
../include/PropSet.h ../include/Accessor.h ../include/WindowAccessor.h \
|
||||
../include/Scintilla.h
|
||||
XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
PlatGTK.o: PlatGTK.cxx \
|
||||
../include/Scintilla.h ../include/ScintillaWidget.h \
|
||||
../src/UniConversion.h ../src/XPM.h Converter.h
|
||||
ScintillaGTK.o: ScintillaGTK.cxx \
|
||||
../include/Scintilla.h ../include/ScintillaWidget.h \
|
||||
../include/SciLexer.h ../lexlib/PropSetSimple.h ../lexlib/Accessor.h \
|
||||
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
|
||||
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
|
||||
../src/LineMarker.h ../src/Style.h ../src/AutoComplete.h \
|
||||
../src/ViewStyle.h ../src/Decoration.h ../src/CharClassify.h \
|
||||
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
|
||||
../src/Editor.h ../src/ScintillaBase.h ../src/UniConversion.h \
|
||||
scintilla-marshal.h ../src/ExternalLexer.h Converter.h
|
||||
AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \
|
||||
../lexlib/CharacterSet.h ../src/AutoComplete.h
|
||||
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/CallTip.h
|
||||
Catalogue.o: ../src/Catalogue.cxx ../include/ILexer.h \
|
||||
../include/Scintilla.h ../include/SciLexer.h ../lexlib/PropSetSimple.h \
|
||||
../lexlib/WordList.h ../lexlib/LexAccessor.h ../lexlib/Accessor.h \
|
||||
../lexlib/StyleContext.h ../lexlib/CharacterSet.h \
|
||||
../lexlib/LexerModule.h ../src/Catalogue.h
|
||||
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/CellBuffer.h
|
||||
CharClassify.o: ../src/CharClassify.cxx ../src/CharClassify.h
|
||||
ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \
|
||||
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
|
||||
../src/ContractionState.h
|
||||
Decoration.o: ../src/Decoration.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/Decoration.h
|
||||
Document.o: ../src/Document.cxx ../include/Platform.h ../include/ILexer.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/CellBuffer.h ../src/PerLine.h \
|
||||
../src/CharClassify.h ../lexlib/CharacterSet.h ../src/Decoration.h \
|
||||
../src/Document.h ../src/RESearch.h ../src/UniConversion.h
|
||||
Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/ILexer.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
|
||||
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
|
||||
../src/Decoration.h ../lexlib/LexAccessor.h ../lexlib/Accessor.h \
|
||||
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
|
||||
../src/Editor.h
|
||||
ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \
|
||||
../include/ILexer.h ../include/Scintilla.h ../include/SciLexer.h \
|
||||
../lexlib/LexAccessor.h ../lexlib/Accessor.h ../lexlib/WordList.h \
|
||||
../lexlib/LexerModule.h ../src/Catalogue.h ../src/ExternalLexer.h
|
||||
Indicator.o: ../src/Indicator.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Indicator.h
|
||||
KW.o: ../src/KW.cxx ../include/Platform.h ../lexlib/PropSetSimple.h \
|
||||
../lexlib/Accessor.h ../include/Scintilla.h ../include/SciLexer.h
|
||||
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/KeyMap.h
|
||||
LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
|
||||
PerLine.o: ../src/PerLine.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/CellBuffer.h ../src/PerLine.h
|
||||
PositionCache.o: ../src/PositionCache.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
|
||||
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
|
||||
../src/Decoration.h ../include/ILexer.h ../src/Document.h \
|
||||
../src/Selection.h ../src/PositionCache.h
|
||||
RESearch.o: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
|
||||
RunStyles.o: ../src/RunStyles.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h
|
||||
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
|
||||
../include/ILexer.h ../include/Scintilla.h ../lexlib/PropSetSimple.h \
|
||||
../include/SciLexer.h ../lexlib/LexAccessor.h ../lexlib/Accessor.h \
|
||||
../lexlib/LexerModule.h ../src/Catalogue.h ../src/SplitVector.h \
|
||||
../src/Partitioning.h ../src/RunStyles.h ../src/ContractionState.h \
|
||||
../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \
|
||||
../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
|
||||
../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \
|
||||
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
|
||||
../src/Editor.h ../src/ScintillaBase.h
|
||||
Selection.o: ../src/Selection.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/Selection.h
|
||||
Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
|
||||
../src/Style.h
|
||||
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
|
||||
ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \
|
||||
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
|
||||
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
|
||||
../src/Style.h ../src/ViewStyle.h
|
||||
XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h
|
||||
|
@ -1,89 +1,74 @@
|
||||
# Make file for Scintilla on Linux or compatible OS
|
||||
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
|
||||
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
|
||||
# Builds for GTK+ 2 and no longer supports GTK+ 1.
|
||||
# Also works with ming32-make on Windows.
|
||||
|
||||
.SUFFIXES: .cxx .c .o .h .a
|
||||
ifdef CLANG
|
||||
CC = clang
|
||||
CCOMP = clang
|
||||
else
|
||||
CC = g++
|
||||
CCOMP = gcc
|
||||
endif
|
||||
AR = ar
|
||||
RANLIB = touch
|
||||
|
||||
ifndef windir
|
||||
ifeq ($(shell uname),Darwin)
|
||||
RANLIB = ranlib
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPLIB=../bin/scintilla.a
|
||||
|
||||
vpath %.h ../src ../include
|
||||
vpath %.cxx ../src
|
||||
|
||||
INCLUDEDIRS=-I ../include -I ../src
|
||||
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -pedantic -DGTK -DSCI_LEXER $(INCLUDEDIRS)
|
||||
|
||||
ifdef NOTHREADS
|
||||
THREADFLAGS=-DG_THREADS_IMPL_NONE
|
||||
else
|
||||
THREADFLAGS=
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
else
|
||||
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
endif
|
||||
|
||||
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
|
||||
.cxx.o:
|
||||
$(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
|
||||
.c.o:
|
||||
$(CCOMP) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
|
||||
|
||||
#++Autogenerated -- run src/LexGen.py to regenerate
|
||||
#**LEXOBJS=\\\n\(\*.o \)
|
||||
LEXOBJS=\
|
||||
LexAbaqus.o LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexASY.o LexAU3.o LexAVE.o \
|
||||
LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \
|
||||
LexCOBOL.o LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o \
|
||||
LexEiffel.o LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o \
|
||||
LexGAP.o LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o \
|
||||
LexLout.o LexLua.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o \
|
||||
LexMMIXAL.o LexMPT.o LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o \
|
||||
LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o LexPowerPro.o \
|
||||
LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \
|
||||
LexScriptol.o LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o \
|
||||
LexSQL.o LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o \
|
||||
LexVHDL.o LexYAML.o
|
||||
#--Autogenerated -- end of automatically generated section
|
||||
|
||||
all: $(COMPLIB)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(COMPLIB)
|
||||
|
||||
deps:
|
||||
$(CC) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
|
||||
|
||||
$(COMPLIB): DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \
|
||||
CharClassify.o Decoration.o Document.o PerLine.o CallTip.o \
|
||||
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatGTK.o \
|
||||
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
|
||||
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
||||
$(MARSHALLER) $(LEXOBJS)
|
||||
$(AR) rc $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
# Automatically generate header dependencies with "make deps"
|
||||
include deps.mak
|
||||
# Make file for Scintilla on Linux or compatible OS
|
||||
# Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
# The License.txt file describes the conditions under which this software may be distributed.
|
||||
# This makefile assumes GCC 4.3 is used and changes will be needed to use other compilers.
|
||||
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
|
||||
# Builds for GTK+ 2 and no longer supports GTK+ 1.
|
||||
# Also works with ming32-make on Windows.
|
||||
|
||||
.SUFFIXES: .cxx .c .o .h .a
|
||||
ifdef CLANG
|
||||
CC = clang
|
||||
CCOMP = clang
|
||||
else
|
||||
CC = g++
|
||||
CCOMP = gcc
|
||||
endif
|
||||
AR = ar
|
||||
RANLIB = touch
|
||||
|
||||
ifndef windir
|
||||
ifeq ($(shell uname),Darwin)
|
||||
RANLIB = ranlib
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPLIB=../bin/scintilla.a
|
||||
|
||||
vpath %.h ../src ../include ../lexlib
|
||||
vpath %.cxx ../src ../lexlib ../lexers
|
||||
|
||||
INCLUDEDIRS=-I ../include -I ../src -I ../lexlib
|
||||
CXXBASEFLAGS=-Wall -Wno-missing-braces -Wno-char-subscripts -Wno-long-long -pedantic -DGTK -DSCI_LEXER $(INCLUDEDIRS)
|
||||
|
||||
ifdef NOTHREADS
|
||||
THREADFLAGS=-DG_THREADS_IMPL_NONE
|
||||
else
|
||||
THREADFLAGS=
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
else
|
||||
CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
endif
|
||||
|
||||
CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0)
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
|
||||
.cxx.o:
|
||||
$(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
|
||||
.c.o:
|
||||
$(CCOMP) $(CONFIGFLAGS) $(CXXFLAGS) -w -c $<
|
||||
|
||||
LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
|
||||
|
||||
all: $(COMPLIB)
|
||||
|
||||
clean:
|
||||
rm -f *.o $(COMPLIB)
|
||||
|
||||
deps:
|
||||
$(CC) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
|
||||
|
||||
$(COMPLIB): Accessor.o CharacterSet.o LexerBase.o LexerModule.o LexerSimple.o StyleContext.o WordList.o \
|
||||
CharClassify.o Decoration.o Document.o PerLine.o Catalogue.o CallTip.o \
|
||||
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSetSimple.o PlatGTK.o \
|
||||
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
|
||||
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
||||
$(MARSHALLER) $(LEXOBJS)
|
||||
$(AR) rc $@ $^
|
||||
$(RANLIB) $@
|
||||
|
||||
# Automatically generate header dependencies with "make deps"
|
||||
include deps.mak
|
||||
|
@ -1 +1 @@
|
||||
NONE:INT,POINTER
|
||||
NONE:INT,POINTER
|
||||
|
@ -1,79 +0,0 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file Accessor.h
|
||||
** Rapid easy access to contents of a Scintilla.
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
|
||||
|
||||
class Accessor;
|
||||
|
||||
typedef bool (*PFNIsCommentLeader)(Accessor &styler, int pos, int len);
|
||||
|
||||
/**
|
||||
* Interface to data in a Scintilla.
|
||||
*/
|
||||
class Accessor {
|
||||
protected:
|
||||
enum {extremePosition=0x7FFFFFFF};
|
||||
/** @a bufferSize is a trade off between time taken to copy the characters
|
||||
* and retrieval overhead.
|
||||
* @a slopSize positions the buffer before the desired position
|
||||
* in case there is some backtracking. */
|
||||
enum {bufferSize=4000, slopSize=bufferSize/8};
|
||||
char buf[bufferSize+1];
|
||||
int startPos;
|
||||
int endPos;
|
||||
int codePage;
|
||||
|
||||
virtual bool InternalIsLeadByte(char ch)=0;
|
||||
virtual void Fill(int position)=0;
|
||||
|
||||
public:
|
||||
Accessor() : startPos(extremePosition), endPos(0), codePage(0) {}
|
||||
virtual ~Accessor() {}
|
||||
char operator[](int position) {
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
/** Safe version of operator[], returning a defined value for invalid position. */
|
||||
char SafeGetCharAt(int position, char chDefault=' ') {
|
||||
if (position < startPos || position >= endPos) {
|
||||
Fill(position);
|
||||
if (position < startPos || position >= endPos) {
|
||||
// Position is outside range of document
|
||||
return chDefault;
|
||||
}
|
||||
}
|
||||
return buf[position - startPos];
|
||||
}
|
||||
bool IsLeadByte(char ch) {
|
||||
return codePage && InternalIsLeadByte(ch);
|
||||
}
|
||||
void SetCodePage(int codePage_) { codePage = codePage_; }
|
||||
|
||||
virtual bool Match(int pos, const char *s)=0;
|
||||
virtual char StyleAt(int position)=0;
|
||||
virtual int GetLine(int position)=0;
|
||||
virtual int LineStart(int line)=0;
|
||||
virtual int LevelAt(int line)=0;
|
||||
virtual int Length()=0;
|
||||
virtual void Flush()=0;
|
||||
virtual int GetLineState(int line)=0;
|
||||
virtual int SetLineState(int line, int state)=0;
|
||||
virtual int GetPropertyInt(const char *key, int defaultValue=0)=0;
|
||||
virtual char *GetProperties()=0;
|
||||
|
||||
// Style setting
|
||||
virtual void StartAt(unsigned int start, char chMask=31)=0;
|
||||
virtual void SetFlags(char chFlags_, char chWhile_)=0;
|
||||
virtual unsigned int GetStartSegment()=0;
|
||||
virtual void StartSegment(unsigned int pos)=0;
|
||||
virtual void ColourTo(unsigned int pos, int chAttr)=0;
|
||||
virtual void SetLevel(int line, int level)=0;
|
||||
virtual int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0)=0;
|
||||
virtual void IndicatorFill(int start, int end, int indicator, int value)=0;
|
||||
};
|
67
scintilla/include/ILexer.h
Normal file
67
scintilla/include/ILexer.h
Normal file
@ -0,0 +1,67 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file ILexer.h
|
||||
** Interface between Scintilla and lexers.
|
||||
**/
|
||||
// Copyright 1998-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef ILEXER_H
|
||||
#define ILEXER_H
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SCI_METHOD __stdcall
|
||||
#else
|
||||
#define SCI_METHOD
|
||||
#endif
|
||||
|
||||
enum { dvOriginal=0 };
|
||||
|
||||
class IDocument {
|
||||
public:
|
||||
virtual int SCI_METHOD Version() const = 0;
|
||||
virtual void SCI_METHOD SetErrorStatus(int status) = 0;
|
||||
virtual int SCI_METHOD Length() const = 0;
|
||||
virtual void SCI_METHOD GetCharRange(char *buffer, int position, int lengthRetrieve) const = 0;
|
||||
virtual char SCI_METHOD StyleAt(int position) const = 0;
|
||||
virtual int SCI_METHOD LineFromPosition(int position) const = 0;
|
||||
virtual int SCI_METHOD LineStart(int line) const = 0;
|
||||
virtual int SCI_METHOD GetLevel(int line) const = 0;
|
||||
virtual int SCI_METHOD SetLevel(int line, int level) = 0;
|
||||
virtual int SCI_METHOD GetLineState(int line) const = 0;
|
||||
virtual int SCI_METHOD SetLineState(int line, int state) = 0;
|
||||
virtual void SCI_METHOD StartStyling(int position, char mask) = 0;
|
||||
virtual bool SCI_METHOD SetStyleFor(int length, char style) = 0;
|
||||
virtual bool SCI_METHOD SetStyles(int length, const char *styles) = 0;
|
||||
virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0;
|
||||
virtual void SCI_METHOD DecorationFillRange(int position, int value, int fillLength) = 0;
|
||||
virtual void SCI_METHOD ChangeLexerState(int start, int end) = 0;
|
||||
virtual int SCI_METHOD CodePage() const = 0;
|
||||
virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;
|
||||
};
|
||||
|
||||
enum { lvOriginal=0 };
|
||||
|
||||
class ILexer {
|
||||
public:
|
||||
virtual int SCI_METHOD Version() const = 0;
|
||||
virtual void SCI_METHOD Release() = 0;
|
||||
virtual const char * SCI_METHOD PropertyNames() = 0;
|
||||
virtual int SCI_METHOD PropertyType(const char *name) = 0;
|
||||
virtual const char * SCI_METHOD DescribeProperty(const char *name) = 0;
|
||||
virtual int SCI_METHOD PropertySet(const char *key, const char *val) = 0;
|
||||
virtual const char * SCI_METHOD DescribeWordListSets() = 0;
|
||||
virtual int SCI_METHOD WordListSet(int n, const char *wl) = 0;
|
||||
virtual void SCI_METHOD Lex(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
|
||||
virtual void SCI_METHOD Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess) = 0;
|
||||
virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0;
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,113 +0,0 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file KeyWords.h
|
||||
** Colourise for particular languages.
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
/**
|
||||
*/
|
||||
class WordList {
|
||||
public:
|
||||
// Each word contains at least one character - a empty word acts as sentinel at the end.
|
||||
char **words;
|
||||
char *list;
|
||||
int len;
|
||||
bool onlyLineEnds; ///< Delimited by any white space or only line ends
|
||||
bool sorted;
|
||||
int starts[256];
|
||||
WordList(bool onlyLineEnds_ = false) :
|
||||
words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_),
|
||||
sorted(false)
|
||||
{}
|
||||
~WordList() { Clear(); }
|
||||
operator bool() { return len ? true : false; }
|
||||
void Clear();
|
||||
void Set(const char *s);
|
||||
bool InList(const char *s);
|
||||
bool InListAbbreviated(const char *s, const char marker);
|
||||
};
|
||||
|
||||
typedef void (*LexerFunction)(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler);
|
||||
|
||||
/**
|
||||
* A LexerModule is responsible for lexing and folding a particular language.
|
||||
* The class maintains a list of LexerModules which can be searched to find a
|
||||
* module appropriate to a particular language.
|
||||
*/
|
||||
class LexerModule {
|
||||
protected:
|
||||
const LexerModule *next;
|
||||
int language;
|
||||
LexerFunction fnLexer;
|
||||
LexerFunction fnFolder;
|
||||
const char * const * wordListDescriptions;
|
||||
int styleBits;
|
||||
|
||||
static const LexerModule *base;
|
||||
static int nextLanguage;
|
||||
|
||||
public:
|
||||
const char *languageName;
|
||||
LexerModule(int language_,
|
||||
LexerFunction fnLexer_,
|
||||
const char *languageName_=0,
|
||||
LexerFunction fnFolder_=0,
|
||||
const char * const wordListDescriptions_[] = NULL,
|
||||
int styleBits_=5);
|
||||
virtual ~LexerModule() {
|
||||
}
|
||||
int GetLanguage() const { return language; }
|
||||
|
||||
// -1 is returned if no WordList information is available
|
||||
int GetNumWordLists() const;
|
||||
const char *GetWordListDescription(int index) const;
|
||||
|
||||
int GetStyleBitsNeeded() const;
|
||||
|
||||
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) const;
|
||||
virtual void Fold(unsigned int startPos, int lengthDoc, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) const;
|
||||
static const LexerModule *Find(int language);
|
||||
static const LexerModule *Find(const char *languageName);
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Check if a character is a space.
|
||||
* This is ASCII specific but is safe with chars >= 0x80.
|
||||
*/
|
||||
inline bool isspacechar(unsigned char ch) {
|
||||
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
|
||||
}
|
||||
|
||||
inline bool iswordchar(char ch) {
|
||||
return isascii(ch) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||
}
|
||||
|
||||
inline bool iswordstart(char ch) {
|
||||
return isascii(ch) && (isalnum(ch) || ch == '_');
|
||||
}
|
||||
|
||||
inline bool isoperator(char ch) {
|
||||
if (isascii(ch) && isalnum(ch))
|
||||
return false;
|
||||
// '.' left out as it is used to make up numbers
|
||||
if (ch == '%' || ch == '^' || ch == '&' || ch == '*' ||
|
||||
ch == '(' || ch == ')' || ch == '-' || ch == '+' ||
|
||||
ch == '=' || ch == '|' || ch == '{' || ch == '}' ||
|
||||
ch == '[' || ch == ']' || ch == ':' || ch == ';' ||
|
||||
ch == '<' || ch == '>' || ch == ',' || ch == '/' ||
|
||||
ch == '?' || ch == '!' || ch == '.' || ch == '~')
|
||||
return true;
|
||||
return false;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file PropSet.h
|
||||
** An interface to the methods needed for access to property sets inside lexers.
|
||||
**/
|
||||
// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef PROPSET_H
|
||||
#define PROPSET_H
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
class PropertyGet {
|
||||
public:
|
||||
virtual char *ToString() const=0; // Caller must delete[] the return value
|
||||
virtual int GetInt(const char *key, int defaultValue=0) const=0;
|
||||
virtual ~PropertyGet() {}
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -111,6 +111,7 @@
|
||||
#define SCLEX_NIMROD 96
|
||||
#define SCLEX_SML 97
|
||||
#define SCLEX_MARKDOWN 198
|
||||
#define SCLEX_TXT2TAGS 199
|
||||
|
||||
#define SCLEX_SEARCHRESULT 98
|
||||
#define SCLEX_OBJC 99
|
||||
@ -1322,6 +1323,9 @@
|
||||
#define SCE_POWERSHELL_KEYWORD 8
|
||||
#define SCE_POWERSHELL_CMDLET 9
|
||||
#define SCE_POWERSHELL_ALIAS 10
|
||||
#define SCE_POWERSHELL_FUNCTION 11
|
||||
#define SCE_POWERSHELL_USER1 12
|
||||
#define SCE_POWERSHELL_COMMENTSTREAM 13
|
||||
#define SCE_MYSQL_DEFAULT 0
|
||||
#define SCE_MYSQL_COMMENT 1
|
||||
#define SCE_MYSQL_COMMENTLINE 2
|
||||
@ -1432,6 +1436,32 @@
|
||||
#define SCE_MARKDOWN_CODE 19
|
||||
#define SCE_MARKDOWN_CODE2 20
|
||||
#define SCE_MARKDOWN_CODEBK 21
|
||||
#define SCE_TXT2TAGS_DEFAULT 0
|
||||
#define SCE_TXT2TAGS_LINE_BEGIN 1
|
||||
#define SCE_TXT2TAGS_STRONG1 2
|
||||
#define SCE_TXT2TAGS_STRONG2 3
|
||||
#define SCE_TXT2TAGS_EM1 4
|
||||
#define SCE_TXT2TAGS_EM2 5
|
||||
#define SCE_TXT2TAGS_HEADER1 6
|
||||
#define SCE_TXT2TAGS_HEADER2 7
|
||||
#define SCE_TXT2TAGS_HEADER3 8
|
||||
#define SCE_TXT2TAGS_HEADER4 9
|
||||
#define SCE_TXT2TAGS_HEADER5 10
|
||||
#define SCE_TXT2TAGS_HEADER6 11
|
||||
#define SCE_TXT2TAGS_PRECHAR 12
|
||||
#define SCE_TXT2TAGS_ULIST_ITEM 13
|
||||
#define SCE_TXT2TAGS_OLIST_ITEM 14
|
||||
#define SCE_TXT2TAGS_BLOCKQUOTE 15
|
||||
#define SCE_TXT2TAGS_STRIKEOUT 16
|
||||
#define SCE_TXT2TAGS_HRULE 17
|
||||
#define SCE_TXT2TAGS_LINK 18
|
||||
#define SCE_TXT2TAGS_CODE 19
|
||||
#define SCE_TXT2TAGS_CODE2 20
|
||||
#define SCE_TXT2TAGS_CODEBK 21
|
||||
#define SCE_TXT2TAGS_COMMENT 22
|
||||
#define SCE_TXT2TAGS_OPTION 23
|
||||
#define SCE_TXT2TAGS_PREPROC 24
|
||||
#define SCE_TXT2TAGS_POSTPROC 25
|
||||
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
|
||||
|
||||
#endif
|
||||
|
@ -673,6 +673,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_FINDCOLUMN 2456
|
||||
#define SCI_GETCARETSTICKY 2457
|
||||
#define SCI_SETCARETSTICKY 2458
|
||||
#define SC_CARETSTICKY_OFF 0
|
||||
#define SC_CARETSTICKY_ON 1
|
||||
#define SC_CARETSTICKY_WHITESPACE 2
|
||||
#define SCI_TOGGLECARETSTICKY 2459
|
||||
#define SCI_SETPASTECONVERTENDINGS 2467
|
||||
#define SCI_GETPASTECONVERTENDINGS 2468
|
||||
@ -787,6 +790,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_GETADDITIONALCARETFORE 2605
|
||||
#define SCI_ROTATESELECTION 2606
|
||||
#define SCI_SWAPMAINANCHORCARET 2607
|
||||
#define SCI_CHANGELEXERSTATE 2617
|
||||
#define SCI_STARTRECORD 3001
|
||||
#define SCI_STOPRECORD 3002
|
||||
#define SCI_SETLEXER 4001
|
||||
@ -802,6 +806,14 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_GETPROPERTYINT 4010
|
||||
#define SCI_GETSTYLEBITSNEEDED 4011
|
||||
#define SCI_GETLEXERLANGUAGE 4012
|
||||
#define SCI_PRIVATELEXERCALL 4013
|
||||
#define SCI_PROPERTYNAMES 4014
|
||||
#define SC_TYPE_BOOLEAN 0
|
||||
#define SC_TYPE_INTEGER 1
|
||||
#define SC_TYPE_STRING 2
|
||||
#define SCI_PROPERTYTYPE 4015
|
||||
#define SCI_DESCRIBEPROPERTY 4016
|
||||
#define SCI_DESCRIBEKEYWORDSETS 4017
|
||||
#define SC_MOD_INSERTTEXT 0x1
|
||||
#define SC_MOD_DELETETEXT 0x2
|
||||
#define SC_MOD_CHANGESTYLE 0x4
|
||||
@ -821,8 +833,11 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SC_MOD_CHANGEMARGIN 0x10000
|
||||
#define SC_MOD_CHANGEANNOTATION 0x20000
|
||||
#define SC_MOD_CONTAINER 0x40000
|
||||
#define SC_MODEVENTMASKALL 0x7FFFF
|
||||
#define SC_MOD_LEXERSTATE 0x80000
|
||||
#define SC_MODEVENTMASKALL 0xFFFFF
|
||||
|
||||
#define SC_SEARCHRESULT_LINEBUFFERMAXLENGTH 1024
|
||||
|
||||
#define SCEN_CHANGE 768
|
||||
#define SCEN_SETFOCUS 512
|
||||
#define SCEN_KILLFOCUS 256
|
||||
|
@ -1780,10 +1780,15 @@ fun int EncodedFromUTF8=2449(string utf8, stringresult encoded)
|
||||
fun int FindColumn=2456(int line, int column)
|
||||
|
||||
# Can the caret preferred x position only be changed by explicit movement commands?
|
||||
get bool GetCaretSticky=2457(,)
|
||||
get int GetCaretSticky=2457(,)
|
||||
|
||||
# Stop the caret preferred x position changing when the user types.
|
||||
set void SetCaretSticky=2458(bool useCaretStickyBehaviour,)
|
||||
set void SetCaretSticky=2458(int useCaretStickyBehaviour,)
|
||||
|
||||
enu CaretSticky=SC_CARETSTICKY_
|
||||
val SC_CARETSTICKY_OFF=0
|
||||
val SC_CARETSTICKY_ON=1
|
||||
val SC_CARETSTICKY_WHITESPACE=2
|
||||
|
||||
# Switch between sticky and non-sticky: meant to be bound to a key.
|
||||
fun void ToggleCaretSticky=2459(,)
|
||||
@ -2084,6 +2089,10 @@ fun void RotateSelection=2606(,)
|
||||
# Swap that caret and anchor of the main selection.
|
||||
fun void SwapMainAnchorCaret=2607(,)
|
||||
|
||||
# Indicate that the internal state of a lexer has changed over a range and therefore
|
||||
# there may be a need to redraw.
|
||||
fun int ChangeLexerState=2617(position start, position end)
|
||||
|
||||
# Start notifying the container of all key presses and commands.
|
||||
fun void StartRecord=3001(,)
|
||||
|
||||
@ -2132,6 +2141,26 @@ get int GetStyleBitsNeeded=4011(,)
|
||||
# Return the length of the text.
|
||||
get int GetLexerLanguage=4012(, stringresult text)
|
||||
|
||||
# For private communication between an application and a known lexer.
|
||||
fun int PrivateLexerCall=4013(int operation, int pointer)
|
||||
|
||||
# Retrieve a '\n' separated list of properties understood by the current lexer.
|
||||
fun int PropertyNames=4014(, stringresult names)
|
||||
|
||||
enu TypeProperty=SC_TYPE_
|
||||
val SC_TYPE_BOOLEAN=0
|
||||
val SC_TYPE_INTEGER=1
|
||||
val SC_TYPE_STRING=2
|
||||
|
||||
# Retrieve the type of a property.
|
||||
fun int PropertyType=4015(string name,)
|
||||
|
||||
# Describe a property.
|
||||
fun int DescribeProperty=4016(string name, stringresult description)
|
||||
|
||||
# Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
|
||||
fun int DescribeKeyWordSets=4017(, stringresult descriptions)
|
||||
|
||||
# Notifications
|
||||
# Type of modification and the action which caused the modification.
|
||||
# These are defined as a bit mask to make it easy to specify which notifications are wanted.
|
||||
@ -2156,7 +2185,8 @@ val SC_MOD_CHANGELINESTATE=0x8000
|
||||
val SC_MOD_CHANGEMARGIN=0x10000
|
||||
val SC_MOD_CHANGEANNOTATION=0x20000
|
||||
val SC_MOD_CONTAINER=0x40000
|
||||
val SC_MODEVENTMASKALL=0x7FFFF
|
||||
val SC_MOD_LEXERSTATE=0x80000
|
||||
val SC_MODEVENTMASKALL=0xFFFFF
|
||||
|
||||
# For compatibility, these go through the COMMAND notification rather than NOTIFY
|
||||
# and should have had exactly the same values as the EN_* constants.
|
||||
@ -2299,6 +2329,7 @@ val SCLEX_POWERPRO=95
|
||||
val SCLEX_NIMROD=96
|
||||
val SCLEX_SML=97
|
||||
val SCLEX_MARKDOWN=98
|
||||
val SCLEX_TXT2TAGS=99
|
||||
|
||||
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
|
||||
# value assigned in sequence from SCLEX_AUTOMATIC+1.
|
||||
@ -3628,6 +3659,9 @@ val SCE_POWERSHELL_IDENTIFIER=7
|
||||
val SCE_POWERSHELL_KEYWORD=8
|
||||
val SCE_POWERSHELL_CMDLET=9
|
||||
val SCE_POWERSHELL_ALIAS=10
|
||||
val SCE_POWERSHELL_FUNCTION=11
|
||||
val SCE_POWERSHELL_USER1=12
|
||||
val SCE_POWERSHELL_COMMENTSTREAM=13
|
||||
# Lexical state for SCLEX_MYSQL
|
||||
lex MySQL=SCLEX_MYSQL SCE_MYSQL_
|
||||
val SCE_MYSQL_DEFAULT=0
|
||||
@ -3752,6 +3786,34 @@ val SCE_MARKDOWN_LINK=18
|
||||
val SCE_MARKDOWN_CODE=19
|
||||
val SCE_MARKDOWN_CODE2=20
|
||||
val SCE_MARKDOWN_CODEBK=21
|
||||
# Lexical state for SCLEX_TXT2TAGS
|
||||
lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_
|
||||
val SCE_TXT2TAGS_DEFAULT=0
|
||||
val SCE_TXT2TAGS_LINE_BEGIN=1
|
||||
val SCE_TXT2TAGS_STRONG1=2
|
||||
val SCE_TXT2TAGS_STRONG2=3
|
||||
val SCE_TXT2TAGS_EM1=4
|
||||
val SCE_TXT2TAGS_EM2=5
|
||||
val SCE_TXT2TAGS_HEADER1=6
|
||||
val SCE_TXT2TAGS_HEADER2=7
|
||||
val SCE_TXT2TAGS_HEADER3=8
|
||||
val SCE_TXT2TAGS_HEADER4=9
|
||||
val SCE_TXT2TAGS_HEADER5=10
|
||||
val SCE_TXT2TAGS_HEADER6=11
|
||||
val SCE_TXT2TAGS_PRECHAR=12
|
||||
val SCE_TXT2TAGS_ULIST_ITEM=13
|
||||
val SCE_TXT2TAGS_OLIST_ITEM=14
|
||||
val SCE_TXT2TAGS_BLOCKQUOTE=15
|
||||
val SCE_TXT2TAGS_STRIKEOUT=16
|
||||
val SCE_TXT2TAGS_HRULE=17
|
||||
val SCE_TXT2TAGS_LINK=18
|
||||
val SCE_TXT2TAGS_CODE=19
|
||||
val SCE_TXT2TAGS_CODE2=20
|
||||
val SCE_TXT2TAGS_CODEBK=21
|
||||
val SCE_TXT2TAGS_COMMENT=22
|
||||
val SCE_TXT2TAGS_OPTION=23
|
||||
val SCE_TXT2TAGS_PREPROC=24
|
||||
val SCE_TXT2TAGS_POSTPROC=25
|
||||
|
||||
# Events
|
||||
|
||||
|
@ -1,67 +0,0 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file WindowAccessor.h
|
||||
** Implementation of BufferAccess and StylingAccess on a Scintilla
|
||||
** rapid easy access to contents of a Scintilla.
|
||||
**/
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
class WindowAccessor : public Accessor {
|
||||
// Private so WindowAccessor objects can not be copied
|
||||
WindowAccessor(const WindowAccessor &source) : Accessor(), props(source.props) {}
|
||||
WindowAccessor &operator=(const WindowAccessor &) { return *this; }
|
||||
protected:
|
||||
WindowID id;
|
||||
PropertyGet &props;
|
||||
int lenDoc;
|
||||
|
||||
char styleBuf[bufferSize];
|
||||
int validLen;
|
||||
char chFlags;
|
||||
char chWhile;
|
||||
unsigned int startSeg;
|
||||
|
||||
bool InternalIsLeadByte(char ch);
|
||||
void Fill(int position);
|
||||
public:
|
||||
WindowAccessor(WindowID id_, PropertyGet &props_) :
|
||||
Accessor(), id(id_), props(props_),
|
||||
lenDoc(-1), validLen(0), chFlags(0), chWhile(0) {
|
||||
}
|
||||
~WindowAccessor();
|
||||
bool Match(int pos, const char *s);
|
||||
char StyleAt(int position);
|
||||
int GetLine(int position);
|
||||
int LineStart(int line);
|
||||
int LevelAt(int line);
|
||||
int Length();
|
||||
void Flush();
|
||||
int GetLineState(int line);
|
||||
int SetLineState(int line, int state);
|
||||
int GetPropertyInt(const char *key, int defaultValue=0) {
|
||||
return props.GetInt(key, defaultValue);
|
||||
}
|
||||
char *GetProperties() {
|
||||
return props.ToString();
|
||||
}
|
||||
|
||||
void StartAt(unsigned int start, char chMask=31);
|
||||
void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }
|
||||
unsigned int GetStartSegment() { return startSeg; }
|
||||
void StartSegment(unsigned int pos);
|
||||
void ColourTo(unsigned int pos, int chAttr);
|
||||
void SetLevel(int line, int level);
|
||||
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
|
||||
void IndicatorFill(int start, int end, int indicator, int value);
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -4,25 +4,27 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
static void ColouriseAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
@ -118,7 +120,7 @@ static void ColouriseAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_ASY_IDENTIFIER);
|
||||
} else if (sc.Match('/', '*')) {
|
||||
sc.SetState(SCE_ASY_COMMENT);
|
||||
sc.Forward(); //
|
||||
sc.Forward(); //
|
||||
} else if (sc.Match('/', '/')) {
|
||||
sc.SetState(SCE_ASY_COMMENTLINE);
|
||||
} else if (sc.ch == '\"') {
|
||||
@ -162,14 +164,14 @@ static int ParseASYWord(unsigned int pos, Accessor &styler, char *word)
|
||||
length++;
|
||||
ch=styler.SafeGetCharAt(pos+length);
|
||||
}
|
||||
word[length]=0;
|
||||
word[length]=0;
|
||||
return length;
|
||||
}
|
||||
|
||||
static bool IsASYDrawingLine(int line, Accessor &styler) {
|
||||
int pos = styler.LineStart(line);
|
||||
int eol_pos = styler.LineStart(line + 1) - 1;
|
||||
|
||||
|
||||
int startpos = pos;
|
||||
char buffer[100]="";
|
||||
|
||||
@ -181,11 +183,11 @@ static bool IsASYDrawingLine(int line, Accessor &styler) {
|
||||
if (!drawcommands && ch!=' ') return false;
|
||||
else if (drawcommands) return true;
|
||||
startpos++;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void FoldAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
static void FoldAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *[], Accessor &styler) {
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
@ -236,7 +238,7 @@ static void FoldAsyDoc(unsigned int startPos, int length, int initStyle,
|
||||
else if (lineCurrent!=0 && IsASYDrawingLine(lineCurrent - 1, styler) &&
|
||||
!IsASYDrawingLine(lineCurrent+1, styler))
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
|
||||
if (atEOL) {
|
||||
int levelUse = levelCurrent;
|
@ -1,15 +1,15 @@
|
||||
// Scintilla source code edit control
|
||||
// @file LexAU3.cxx
|
||||
// Lexer for AutoIt3 http://www.hiddensoft.com/autoit3
|
||||
// by Jos van der Zande, jvdzande@yahoo.com
|
||||
// by Jos van der Zande, jvdzande@yahoo.com
|
||||
//
|
||||
// Changes:
|
||||
// March 28, 2004 - Added the standard Folding code
|
||||
// April 21, 2004 - Added Preprosessor Table + Syntax Highlighting
|
||||
// Fixed Number highlighting
|
||||
// Changed default isoperator to IsAOperator to have a better match to AutoIt3
|
||||
// Fixed "#comments_start" -> "#comments-start"
|
||||
// Fixed "#comments_end" -> "#comments-end"
|
||||
// Fixed "#comments_start" -> "#comments-start"
|
||||
// Fixed "#comments_end" -> "#comments-end"
|
||||
// Fixed Sendkeys in Strings when not terminated with }
|
||||
// Added support for Sendkey strings that have second parameter e.g. {UP 5} or {a down}
|
||||
// April 26, 2004 - Fixed # pre-processor statement inside of comment block would invalidly change the color.
|
||||
@ -25,9 +25,9 @@
|
||||
// Added fold.compact support set with fold.compact=1
|
||||
// Changed folding inside of #cs-#ce. Default is no keyword folding inside comment blocks when fold.comment=1
|
||||
// it will now only happen when fold.comment=2.
|
||||
// Sep 5, 2004 - Added logic to handle colourizing words on the last line.
|
||||
// Sep 5, 2004 - Added logic to handle colourizing words on the last line.
|
||||
// Typed Characters now show as "default" till they match any table.
|
||||
// Oct 10, 2004 - Added logic to show Comments in "Special" directives.
|
||||
// Oct 10, 2004 - Added logic to show Comments in "Special" directives.
|
||||
// Nov 1, 2004 - Added better testing for Numbers supporting x and e notation.
|
||||
// Nov 28, 2004 - Added logic to handle continuation lines for syntax highlighting.
|
||||
// Jan 10, 2005 - Added Abbreviations Keyword used for expansion
|
||||
@ -52,19 +52,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -127,7 +131,7 @@ static int GetSendKey(const char *szLine, char *szKey)
|
||||
}
|
||||
else if (cTemp == ' ')
|
||||
{
|
||||
// skip other spaces
|
||||
// skip other spaces
|
||||
}
|
||||
else if (nFlag == 0)
|
||||
{
|
||||
@ -139,7 +143,7 @@ static int GetSendKey(const char *szLine, char *szKey)
|
||||
// Save second portion into var...
|
||||
szSpecial[nSpecPos++] = cTemp;
|
||||
// check if Second portion is all numbers for repeat fuction
|
||||
if (isdigit(cTemp) == false) {nSpecNum = 0;}
|
||||
if (isdigit(cTemp) == false) {nSpecNum = 0;}
|
||||
}
|
||||
}
|
||||
nPos++; // skip to next char
|
||||
@ -151,7 +155,7 @@ static int GetSendKey(const char *szLine, char *szKey)
|
||||
szKey[nKeyPos] = '\0';
|
||||
szSpecial[nSpecPos] = '\0';
|
||||
if (strcmp(szSpecial,"down")== 0 || strcmp(szSpecial,"up")== 0 ||
|
||||
strcmp(szSpecial,"on")== 0 || strcmp(szSpecial,"off")== 0 ||
|
||||
strcmp(szSpecial,"on")== 0 || strcmp(szSpecial,"off")== 0 ||
|
||||
strcmp(szSpecial,"toggle")== 0 || nSpecNum == 1 )
|
||||
{
|
||||
nFlag = 0;
|
||||
@ -160,13 +164,13 @@ static int GetSendKey(const char *szLine, char *szKey)
|
||||
{
|
||||
nFlag = 1;
|
||||
}
|
||||
return nFlag; // 1 is bad, 0 is good
|
||||
return nFlag; // 1 is bad, 0 is good
|
||||
|
||||
} // GetSendKey()
|
||||
} // GetSendKey()
|
||||
|
||||
//
|
||||
// Routine to check the last "none comment" character on a line to see if its a continuation
|
||||
//
|
||||
//
|
||||
static bool IsContinuationLine(unsigned int szLine, Accessor &styler)
|
||||
{
|
||||
int nsPos = styler.LineStart(szLine);
|
||||
@ -192,7 +196,7 @@ static bool IsContinuationLine(unsigned int szLine, Accessor &styler)
|
||||
|
||||
//
|
||||
// syntax highlighting logic
|
||||
static void ColouriseAU3Doc(unsigned int startPos,
|
||||
static void ColouriseAU3Doc(unsigned int startPos,
|
||||
int length, int initStyle,
|
||||
WordList *keywordlists[],
|
||||
Accessor &styler) {
|
||||
@ -214,19 +218,19 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
(lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) {
|
||||
lineCurrent--;
|
||||
startPos = styler.LineStart(lineCurrent); // get start position
|
||||
initStyle = 0; // reset the start style to 0
|
||||
initStyle = 0; // reset the start style to 0
|
||||
}
|
||||
}
|
||||
// Set the new length to include it from the start and set the start position
|
||||
length = length + s_startPos - startPos; // correct the total length to process
|
||||
styler.StartAt(startPos);
|
||||
|
||||
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
char si; // string indicator "=1 '=2
|
||||
char ni; // Numeric indicator error=9 normal=0 normal+dec=1 hex=2 Enot=3
|
||||
char ci; // comment indicator 0=not linecomment(;)
|
||||
char ci; // comment indicator 0=not linecomment(;)
|
||||
char s_save[100];
|
||||
si=0;
|
||||
si=0;
|
||||
ni=0;
|
||||
ci=0;
|
||||
//$$$
|
||||
@ -234,8 +238,8 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
// **********************************************
|
||||
// save the total current word for eof processing
|
||||
if (IsAWordChar(sc.ch) || sc.ch == '}')
|
||||
// save the total current word for eof processing
|
||||
if (IsAWordChar(sc.ch) || sc.ch == '}')
|
||||
{
|
||||
strcpy(s_save,s);
|
||||
int tp = strlen(s_save);
|
||||
@ -254,9 +258,9 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
if (sc.atLineEnd) {
|
||||
ci=0;
|
||||
if (strcmp(s, "#ce")== 0 || strcmp(s, "#comments-end")== 0) {
|
||||
if (sc.atLineEnd)
|
||||
if (sc.atLineEnd)
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
else
|
||||
else
|
||||
sc.SetState(SCE_AU3_COMMENTBLOCK);
|
||||
}
|
||||
break;
|
||||
@ -267,9 +271,9 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
sc.SetState(SCE_AU3_COMMENTBLOCK);
|
||||
}
|
||||
// skip rest of the line
|
||||
if (ci==2)
|
||||
if (ci==2)
|
||||
break;
|
||||
// check when first character is detected on the line
|
||||
// check when first character is detected on the line
|
||||
if (ci==0) {
|
||||
if (IsAWordStart(static_cast<char>(sc.ch)) || IsAOperator(static_cast<char>(sc.ch))) {
|
||||
ci=1;
|
||||
@ -292,10 +296,10 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
}
|
||||
case SCE_AU3_OPERATOR:
|
||||
{
|
||||
// check if its a COMobject
|
||||
// check if its a COMobject
|
||||
if (sc.chPrev == '.' && IsAWordChar(sc.ch)) {
|
||||
sc.SetState(SCE_AU3_COMOBJ);
|
||||
}
|
||||
}
|
||||
else {
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
}
|
||||
@ -360,7 +364,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_AU3_DEFAULT);}
|
||||
break;
|
||||
@ -433,7 +437,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
case SCE_AU3_STRING:
|
||||
{
|
||||
// check for " to end a double qouted string or
|
||||
// check for ' to end a single qouted string
|
||||
// check for ' to end a single qouted string
|
||||
if ((si == 1 && sc.ch == '\"') || (si == 2 && sc.ch == '\'') || (si == 3 && sc.ch == '>'))
|
||||
{
|
||||
sc.ForwardSetState(SCE_AU3_DEFAULT);
|
||||
@ -445,7 +449,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
si=0;
|
||||
// at line end and not found a continuation char then reset to default
|
||||
int lineCurrent = styler.GetLine(sc.currentPos);
|
||||
if (!IsContinuationLine(lineCurrent,styler))
|
||||
if (!IsContinuationLine(lineCurrent,styler))
|
||||
{
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
break;
|
||||
@ -456,27 +460,27 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
sc.SetState(SCE_AU3_SENT);}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case SCE_AU3_SENT:
|
||||
{
|
||||
// Send key string ended
|
||||
if (sc.chPrev == '}' && sc.ch != '}')
|
||||
// Send key string ended
|
||||
if (sc.chPrev == '}' && sc.ch != '}')
|
||||
{
|
||||
// set color to SENDKEY when valid sendkey .. else set back to regular string
|
||||
char sk[100];
|
||||
// split {111 222} and return {111} and check if 222 is valid.
|
||||
// if return code = 1 then invalid 222 so must be string
|
||||
if (GetSendKey(s,sk))
|
||||
if (GetSendKey(s,sk))
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
}
|
||||
// if single char between {?} then its ok as sendkey for a single character
|
||||
else if (strlen(sk) == 3)
|
||||
else if (strlen(sk) == 3)
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_SENT);
|
||||
}
|
||||
// if sendkey {111} is in table then ok as sendkey
|
||||
else if (keywords4.InList(sk))
|
||||
else if (keywords4.InList(sk))
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_SENT);
|
||||
}
|
||||
@ -492,9 +496,9 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
int nPos = 0;
|
||||
int nState = 1;
|
||||
char cTemp;
|
||||
while (!(nState == 2) && ((cTemp = s[nPos]) != '\0'))
|
||||
while (!(nState == 2) && ((cTemp = s[nPos]) != '\0'))
|
||||
{
|
||||
if (cTemp == '{' && nState == 1)
|
||||
if (cTemp == '{' && nState == 1)
|
||||
{
|
||||
nState = 2;
|
||||
}
|
||||
@ -509,14 +513,14 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
sc.SetState(SCE_AU3_STRING);
|
||||
}
|
||||
// If invalid character found then assume its a regular string
|
||||
// If invalid character found then assume its a regular string
|
||||
if (nState == 0) {
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
sc.SetState(SCE_AU3_STRING);
|
||||
}
|
||||
}
|
||||
// check if next portion is again a sendkey
|
||||
if (sc.atLineEnd)
|
||||
if (sc.atLineEnd)
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
@ -547,14 +551,14 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
else if (sc.ch == '.' && !IsADigit(sc.chNext)) {sc.SetState(SCE_AU3_OPERATOR);}
|
||||
else if (sc.ch == '@') {sc.SetState(SCE_AU3_KEYWORD);}
|
||||
//else if (sc.ch == '_') {sc.SetState(SCE_AU3_KEYWORD);}
|
||||
else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);} // string after #include
|
||||
else if (sc.ch == '<' && si==3) {sc.SetState(SCE_AU3_STRING);} // string after #include
|
||||
else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_AU3_STRING);
|
||||
si = 1; }
|
||||
else if (sc.ch == '\'') {
|
||||
sc.SetState(SCE_AU3_STRING);
|
||||
si = 2; }
|
||||
else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))
|
||||
else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext)))
|
||||
{
|
||||
sc.SetState(SCE_AU3_NUMBER);
|
||||
ni = 0;
|
||||
@ -566,7 +570,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
} //for (; sc.More(); sc.Forward())
|
||||
|
||||
//*************************************
|
||||
// Colourize the last word correctly
|
||||
// Colourize the last word correctly
|
||||
//*************************************
|
||||
if (sc.state == SCE_AU3_KEYWORD)
|
||||
{
|
||||
@ -610,24 +614,24 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
}
|
||||
if (sc.state == SCE_AU3_SENT)
|
||||
{
|
||||
// Send key string ended
|
||||
if (sc.chPrev == '}' && sc.ch != '}')
|
||||
// Send key string ended
|
||||
if (sc.chPrev == '}' && sc.ch != '}')
|
||||
{
|
||||
// set color to SENDKEY when valid sendkey .. else set back to regular string
|
||||
char sk[100];
|
||||
// split {111 222} and return {111} and check if 222 is valid.
|
||||
// if return code = 1 then invalid 222 so must be string
|
||||
if (GetSendKey(s_save,sk))
|
||||
if (GetSendKey(s_save,sk))
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
}
|
||||
// if single char between {?} then its ok as sendkey for a single character
|
||||
else if (strlen(sk) == 3)
|
||||
else if (strlen(sk) == 3)
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_SENT);
|
||||
}
|
||||
// if sendkey {111} is in table then ok as sendkey
|
||||
else if (keywords4.InList(sk))
|
||||
else if (keywords4.InList(sk))
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_SENT);
|
||||
}
|
||||
@ -638,7 +642,7 @@ static void ColouriseAU3Doc(unsigned int startPos,
|
||||
sc.SetState(SCE_AU3_STRING);
|
||||
}
|
||||
// check if next portion is again a sendkey
|
||||
if (sc.atLineEnd)
|
||||
if (sc.atLineEnd)
|
||||
{
|
||||
sc.ChangeState(SCE_AU3_STRING);
|
||||
sc.SetState(SCE_AU3_DEFAULT);
|
||||
@ -655,7 +659,7 @@ static bool IsStreamCommentStyle(int style) {
|
||||
|
||||
//
|
||||
// Routine to find first none space on the current line and return its Style
|
||||
// needed for comment lines not starting on pos 1
|
||||
// needed for comment lines not starting on pos 1
|
||||
static int GetStyleFirstWord(unsigned int szLine, Accessor &styler)
|
||||
{
|
||||
int nsPos = styler.LineStart(szLine);
|
||||
@ -687,7 +691,7 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
startPos = styler.LineStart(lineCurrent);
|
||||
}
|
||||
}
|
||||
// vars for style of previous/current/next lines
|
||||
// vars for style of previous/current/next lines
|
||||
int style = GetStyleFirstWord(lineCurrent,styler);
|
||||
int stylePrev = 0;
|
||||
// find the first previous line without continuation character at the end
|
||||
@ -712,7 +716,7 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
if (lineCurrent > 0)
|
||||
levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
|
||||
int levelNext = levelCurrent;
|
||||
//
|
||||
//
|
||||
int visibleChars = 0;
|
||||
char chNext = styler.SafeGetCharAt(startPos);
|
||||
char chPrev = ' ';
|
||||
@ -737,7 +741,7 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
}
|
||||
}
|
||||
}
|
||||
// start the capture of the first word
|
||||
// start the capture of the first word
|
||||
if (!(FirstWordStart)) {
|
||||
if (IsAWordChar(ch) || IsAWordStart(ch) || ch == ';') {
|
||||
FirstWordStart = true;
|
||||
@ -749,7 +753,7 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
if (ThenFoundLast) {
|
||||
if (IsAWordChar(ch)) {
|
||||
ThenFoundLast = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// find out if the word "then" is the last on a "if" line
|
||||
if (FirstWordEnd && strcmp(szKeyword,"if") == 0) {
|
||||
@ -770,21 +774,21 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
}
|
||||
}
|
||||
}
|
||||
// End of Line found so process the information
|
||||
// End of Line found so process the information
|
||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) {
|
||||
// **************************
|
||||
// Folding logic for Keywords
|
||||
// **************************
|
||||
// if a keyword is found on the current line and the line doesn't end with _ (continuation)
|
||||
// and we are not inside a commentblock.
|
||||
if (szKeywordlen > 0 && (!(chPrev == '_')) &&
|
||||
if (szKeywordlen > 0 && (!(chPrev == '_')) &&
|
||||
((!(IsStreamCommentStyle(style)) || foldInComment)) ) {
|
||||
szKeyword[szKeywordlen] = '\0';
|
||||
// only fold "if" last keyword is "then" (else its a one line if)
|
||||
if (strcmp(szKeyword,"if") == 0 && ThenFoundLast) {
|
||||
levelNext++;
|
||||
}
|
||||
// create new fold for these words
|
||||
// create new fold for these words
|
||||
if (strcmp(szKeyword,"do") == 0 || strcmp(szKeyword,"for") == 0 ||
|
||||
strcmp(szKeyword,"func") == 0 || strcmp(szKeyword,"while") == 0||
|
||||
strcmp(szKeyword,"with") == 0 || strcmp(szKeyword,"#region") == 0 ) {
|
||||
@ -797,12 +801,12 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
}
|
||||
// end the fold for these words before the current line
|
||||
if (strcmp(szKeyword,"endfunc") == 0 || strcmp(szKeyword,"endif") == 0 ||
|
||||
strcmp(szKeyword,"next") == 0 || strcmp(szKeyword,"until") == 0 ||
|
||||
strcmp(szKeyword,"next") == 0 || strcmp(szKeyword,"until") == 0 ||
|
||||
strcmp(szKeyword,"endwith") == 0 ||strcmp(szKeyword,"wend") == 0){
|
||||
levelNext--;
|
||||
levelCurrent--;
|
||||
}
|
||||
// end the fold for these words before the current line and Start new fold
|
||||
// end the fold for these words before the current line and Start new fold
|
||||
if (strcmp(szKeyword,"case") == 0 || strcmp(szKeyword,"else") == 0 ||
|
||||
strcmp(szKeyword,"elseif") == 0 ) {
|
||||
levelCurrent--;
|
||||
@ -841,16 +845,16 @@ static void FoldAU3Doc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
// Start of a comment block
|
||||
if (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) {
|
||||
levelNext++;
|
||||
}
|
||||
}
|
||||
// fold till the last line for normal comment lines
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
&& !(styleNext == SCE_AU3_COMMENT)
|
||||
&& stylePrev == SCE_AU3_COMMENT
|
||||
&& stylePrev == SCE_AU3_COMMENT
|
||||
&& style == SCE_AU3_COMMENT) {
|
||||
levelNext--;
|
||||
}
|
||||
// fold till the one but last line for Blockcomment lines
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
&& !(styleNext == SCE_AU3_COMMENTBLOCK)
|
||||
&& style == SCE_AU3_COMMENTBLOCK) {
|
||||
levelNext--;
|
@ -9,19 +9,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -10,19 +10,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -6,19 +6,24 @@
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "PropSet.h"
|
||||
#include "KeyWords.h"
|
||||
#include "SciLexer.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
@ -10,19 +10,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -5,21 +5,25 @@
|
||||
// Copyright 2004 by Herr Pfarrer rpfarrer <at> yahoo <dot> de
|
||||
// Last Updated: 20/07/2004
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -2,44 +2,54 @@
|
||||
/** @file LexBash.cxx
|
||||
** Lexer for Bash.
|
||||
**/
|
||||
// Copyright 2004-2008 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Copyright 2004-2010 by Neil Hodgson <neilh@scintilla.org>
|
||||
// Adapted from LexPerl by Kein-Hong Man 2004
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define HERE_DELIM_MAX 256
|
||||
#define HERE_DELIM_MAX 256
|
||||
|
||||
// define this if you want 'invalid octals' to be marked as errors
|
||||
// usually, this is not a good idea, permissive lexing is better
|
||||
#undef PEDANTIC_OCTAL
|
||||
|
||||
#define BASH_BASE_ERROR 65
|
||||
#define BASH_BASE_DECIMAL 66
|
||||
#define BASH_BASE_HEX 67
|
||||
#define BASH_BASE_ERROR 65
|
||||
#define BASH_BASE_DECIMAL 66
|
||||
#define BASH_BASE_HEX 67
|
||||
#ifdef PEDANTIC_OCTAL
|
||||
#define BASH_BASE_OCTAL 68
|
||||
#define BASH_BASE_OCTAL_ERROR 69
|
||||
#define BASH_BASE_OCTAL 68
|
||||
#define BASH_BASE_OCTAL_ERROR 69
|
||||
#endif
|
||||
|
||||
// state constants for parts of a bash command segment
|
||||
#define BASH_CMD_BODY 0
|
||||
#define BASH_CMD_START 1
|
||||
#define BASH_CMD_WORD 2
|
||||
#define BASH_CMD_TEST 3
|
||||
#define BASH_CMD_ARITH 4
|
||||
#define BASH_CMD_DELIM 5
|
||||
|
||||
static inline int translateBashDigit(int ch) {
|
||||
if (ch >= '0' && ch <= '9') {
|
||||
return ch - '0';
|
||||
@ -80,11 +90,15 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList cmdDelimiter, bashStruct, bashStruct_in;
|
||||
cmdDelimiter.Set("| || |& & && ; ;; ( ) { }");
|
||||
bashStruct.Set("if elif fi while until else then do done esac eval");
|
||||
bashStruct_in.Set("for case select");
|
||||
|
||||
CharacterSet setWordStart(CharacterSet::setAlpha, "_");
|
||||
// note that [+-] are often parts of identifiers in shell scripts
|
||||
CharacterSet setWord(CharacterSet::setAlphaNum, "._+-");
|
||||
CharacterSet setBashOperator(CharacterSet::setNone, "^&\\%()-+=|{}[]:;>,*/<?!.~@");
|
||||
CharacterSet setBashOperator(CharacterSet::setNone, "^&%()-+=|{}[]:;>,*/<?!.~@");
|
||||
CharacterSet setSingleCharOp(CharacterSet::setNone, "rwxoRWXOezsfdlpSbctugkTBMACahGLNn");
|
||||
CharacterSet setParam(CharacterSet::setAlphaNum, "$_");
|
||||
CharacterSet setHereDoc(CharacterSet::setAlpha, "_\\-+!");
|
||||
@ -144,46 +158,115 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
int numBase = 0;
|
||||
int digit;
|
||||
unsigned int endPos = startPos + length;
|
||||
int cmdState = BASH_CMD_START;
|
||||
int testExprType = 0;
|
||||
|
||||
// Backtrack to beginning of style if required...
|
||||
// If in a long distance lexical state, backtrack to find quote characters
|
||||
if (initStyle == SCE_SH_HERE_Q) {
|
||||
while ((startPos > 1) && (styler.StyleAt(startPos) != SCE_SH_HERE_DELIM)) {
|
||||
startPos--;
|
||||
}
|
||||
startPos = styler.LineStart(styler.GetLine(startPos));
|
||||
initStyle = styler.StyleAt(startPos - 1);
|
||||
}
|
||||
// Bash strings can be multi-line with embedded newlines, so backtrack.
|
||||
// Bash numbers have additional state during lexing, so backtrack too.
|
||||
if (initStyle == SCE_SH_STRING
|
||||
|| initStyle == SCE_SH_BACKTICKS
|
||||
|| initStyle == SCE_SH_CHARACTER
|
||||
|| initStyle == SCE_SH_NUMBER
|
||||
|| initStyle == SCE_SH_IDENTIFIER
|
||||
|| initStyle == SCE_SH_COMMENTLINE) {
|
||||
while ((startPos > 1) && (styler.StyleAt(startPos - 1) == initStyle)) {
|
||||
startPos--;
|
||||
}
|
||||
initStyle = SCE_SH_DEFAULT;
|
||||
// Always backtracks to the start of a line that is not a continuation
|
||||
// of the previous line (i.e. start of a bash command segment)
|
||||
int ln = styler.GetLine(startPos);
|
||||
for (;;) {
|
||||
startPos = styler.LineStart(ln);
|
||||
if (ln == 0 || styler.GetLineState(ln) == BASH_CMD_START)
|
||||
break;
|
||||
ln--;
|
||||
}
|
||||
initStyle = SCE_SH_DEFAULT;
|
||||
|
||||
StyleContext sc(startPos, endPos - startPos, initStyle, styler);
|
||||
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
// handle line continuation, updates per-line stored state
|
||||
if (sc.atLineStart) {
|
||||
ln = styler.GetLine(sc.currentPos);
|
||||
if (sc.state == SCE_SH_STRING
|
||||
|| sc.state == SCE_SH_BACKTICKS
|
||||
|| sc.state == SCE_SH_CHARACTER
|
||||
|| sc.state == SCE_SH_HERE_Q
|
||||
|| sc.state == SCE_SH_COMMENTLINE
|
||||
|| sc.state == SCE_SH_PARAM) {
|
||||
// force backtrack while retaining cmdState
|
||||
styler.SetLineState(ln, BASH_CMD_BODY);
|
||||
} else {
|
||||
if (ln > 0) {
|
||||
if ((sc.GetRelative(-3) == '\\' && sc.GetRelative(-2) == '\r' && sc.chPrev == '\n')
|
||||
|| sc.GetRelative(-2) == '\\') { // handle '\' line continuation
|
||||
// retain last line's state
|
||||
} else
|
||||
cmdState = BASH_CMD_START;
|
||||
}
|
||||
styler.SetLineState(ln, cmdState);
|
||||
}
|
||||
}
|
||||
|
||||
// controls change of cmdState at the end of a non-whitespace element
|
||||
// states BODY|TEST|ARITH persist until the end of a command segment
|
||||
// state WORD persist, but ends with 'in' or 'do' construct keywords
|
||||
int cmdStateNew = BASH_CMD_BODY;
|
||||
if (cmdState == BASH_CMD_TEST || cmdState == BASH_CMD_ARITH || cmdState == BASH_CMD_WORD)
|
||||
cmdStateNew = cmdState;
|
||||
int stylePrev = sc.state;
|
||||
|
||||
// Determine if the current state should terminate.
|
||||
switch (sc.state) {
|
||||
case SCE_SH_OPERATOR:
|
||||
sc.SetState(SCE_SH_DEFAULT);
|
||||
if (cmdState == BASH_CMD_DELIM) // if command delimiter, start new command
|
||||
cmdStateNew = BASH_CMD_START;
|
||||
else if (sc.chPrev == '\\') // propagate command state if line continued
|
||||
cmdStateNew = cmdState;
|
||||
break;
|
||||
case SCE_SH_WORD:
|
||||
// "." never used in Bash variable names but used in file names
|
||||
if (!setWord.Contains(sc.ch)) {
|
||||
char s[1000];
|
||||
char s[500];
|
||||
char s2[10];
|
||||
sc.GetCurrent(s, sizeof(s));
|
||||
if (s[0] != '-' && // for file operators
|
||||
!keywords.InList(s)) {
|
||||
// allow keywords ending in a whitespace or command delimiter
|
||||
s2[0] = static_cast<char>(sc.ch);
|
||||
s2[1] = '\0';
|
||||
bool keywordEnds = IsASpace(sc.ch) || cmdDelimiter.InList(s2);
|
||||
// 'in' or 'do' may be construct keywords
|
||||
if (cmdState == BASH_CMD_WORD) {
|
||||
if (strcmp(s, "in") == 0 && keywordEnds)
|
||||
cmdStateNew = BASH_CMD_BODY;
|
||||
else if (strcmp(s, "do") == 0 && keywordEnds)
|
||||
cmdStateNew = BASH_CMD_START;
|
||||
else
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
sc.SetState(SCE_SH_DEFAULT);
|
||||
break;
|
||||
}
|
||||
// a 'test' keyword starts a test expression
|
||||
if (strcmp(s, "test") == 0) {
|
||||
if (cmdState == BASH_CMD_START && keywordEnds) {
|
||||
cmdStateNew = BASH_CMD_TEST;
|
||||
testExprType = 0;
|
||||
} else
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
}
|
||||
// detect bash construct keywords
|
||||
else if (bashStruct.InList(s)) {
|
||||
if (cmdState == BASH_CMD_START && keywordEnds)
|
||||
cmdStateNew = BASH_CMD_START;
|
||||
else
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
}
|
||||
// 'for'|'case'|'select' needs 'in'|'do' to be highlighted later
|
||||
else if (bashStruct_in.InList(s)) {
|
||||
if (cmdState == BASH_CMD_START && keywordEnds)
|
||||
cmdStateNew = BASH_CMD_WORD;
|
||||
else
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
}
|
||||
// disambiguate option items and file test operators
|
||||
else if (s[0] == '-') {
|
||||
if (cmdState != BASH_CMD_TEST)
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
}
|
||||
// disambiguate keywords and identifiers
|
||||
else if (cmdState != BASH_CMD_START
|
||||
|| !(keywords.InList(s) && keywordEnds)) {
|
||||
sc.ChangeState(SCE_SH_IDENTIFIER);
|
||||
}
|
||||
sc.SetState(SCE_SH_DEFAULT);
|
||||
@ -376,10 +459,17 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_SH_HERE_Q);
|
||||
}
|
||||
|
||||
// update cmdState about the current command segment
|
||||
if (stylePrev != SCE_SH_DEFAULT && sc.state == SCE_SH_DEFAULT) {
|
||||
cmdState = cmdStateNew;
|
||||
}
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_SH_DEFAULT) {
|
||||
if (sc.ch == '\\') { // escaped character
|
||||
if (sc.ch == '\\') {
|
||||
// Bash can escape any non-newline as a literal
|
||||
sc.SetState(SCE_SH_IDENTIFIER);
|
||||
if (sc.chNext == '\r' || sc.chNext == '\n')
|
||||
sc.SetState(SCE_SH_OPERATOR);
|
||||
} else if (IsADigit(sc.ch)) {
|
||||
sc.SetState(SCE_SH_NUMBER);
|
||||
numBase = BASH_BASE_DECIMAL;
|
||||
@ -409,6 +499,10 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_SH_BACKTICKS);
|
||||
Quote.Start(sc.ch);
|
||||
} else if (sc.ch == '$') {
|
||||
if (sc.Match("$((")) {
|
||||
sc.SetState(SCE_SH_OPERATOR); // handle '((' later
|
||||
continue;
|
||||
}
|
||||
sc.SetState(SCE_SH_SCALAR);
|
||||
sc.Forward();
|
||||
if (sc.ch == '{') {
|
||||
@ -419,9 +513,6 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.ChangeState(SCE_SH_STRING);
|
||||
} else if (sc.ch == '(' || sc.ch == '`') {
|
||||
sc.ChangeState(SCE_SH_BACKTICKS);
|
||||
if (sc.chNext == '(') { // $(( is lexed as operator
|
||||
sc.ChangeState(SCE_SH_OPERATOR);
|
||||
}
|
||||
} else {
|
||||
continue; // scalar has no delimiter pair
|
||||
}
|
||||
@ -438,9 +529,66 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_SH_WORD);
|
||||
sc.Forward();
|
||||
} else if (setBashOperator.Contains(sc.ch)) {
|
||||
char s[10];
|
||||
bool isCmdDelim = false;
|
||||
sc.SetState(SCE_SH_OPERATOR);
|
||||
// handle opening delimiters for test/arithmetic expressions - ((,[[,[
|
||||
if (cmdState == BASH_CMD_START
|
||||
|| cmdState == BASH_CMD_BODY) {
|
||||
if (sc.Match('(', '(')) {
|
||||
cmdState = BASH_CMD_ARITH;
|
||||
sc.Forward();
|
||||
} else if (sc.Match('[', '[') && IsASpace(sc.GetRelative(2))) {
|
||||
cmdState = BASH_CMD_TEST;
|
||||
testExprType = 1;
|
||||
sc.Forward();
|
||||
} else if (sc.ch == '[' && IsASpace(sc.chNext)) {
|
||||
cmdState = BASH_CMD_TEST;
|
||||
testExprType = 2;
|
||||
}
|
||||
}
|
||||
// special state -- for ((x;y;z)) in ... looping
|
||||
if (cmdState == BASH_CMD_WORD && sc.Match('(', '(')) {
|
||||
cmdState = BASH_CMD_ARITH;
|
||||
sc.Forward();
|
||||
continue;
|
||||
}
|
||||
// handle command delimiters in command START|BODY|WORD state, also TEST if 'test'
|
||||
if (cmdState == BASH_CMD_START
|
||||
|| cmdState == BASH_CMD_BODY
|
||||
|| cmdState == BASH_CMD_WORD
|
||||
|| (cmdState == BASH_CMD_TEST && testExprType == 0)) {
|
||||
s[0] = static_cast<char>(sc.ch);
|
||||
if (setBashOperator.Contains(sc.chNext)) {
|
||||
s[1] = static_cast<char>(sc.chNext);
|
||||
s[2] = '\0';
|
||||
isCmdDelim = cmdDelimiter.InList(s);
|
||||
if (isCmdDelim)
|
||||
sc.Forward();
|
||||
}
|
||||
if (!isCmdDelim) {
|
||||
s[1] = '\0';
|
||||
isCmdDelim = cmdDelimiter.InList(s);
|
||||
}
|
||||
if (isCmdDelim) {
|
||||
cmdState = BASH_CMD_DELIM;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// handle closing delimiters for test/arithmetic expressions - )),]],]
|
||||
if (cmdState == BASH_CMD_ARITH && sc.Match(')', ')')) {
|
||||
cmdState = BASH_CMD_BODY;
|
||||
sc.Forward();
|
||||
} else if (cmdState == BASH_CMD_TEST && IsASpace(sc.chPrev)) {
|
||||
if (sc.Match(']', ']') && testExprType == 1) {
|
||||
sc.Forward();
|
||||
cmdState = BASH_CMD_BODY;
|
||||
} else if (sc.ch == ']' && testExprType == 2) {
|
||||
cmdState = BASH_CMD_BODY;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}// sc.state
|
||||
}
|
||||
sc.Complete();
|
||||
}
|
@ -19,18 +19,21 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -3,18 +3,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -10,17 +10,21 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -60,10 +64,10 @@ inline bool IsALabelStart(const int iChar) {
|
||||
// Is a label character
|
||||
inline bool IsALabelCharacter(const int iChar) {
|
||||
|
||||
return(isalnum(iChar) || iChar == '_' || iChar == ':');
|
||||
return(isalnum(iChar) || iChar == '_' || iChar == ':');
|
||||
}
|
||||
|
||||
// Is the character is a ! and the the next character is not a !
|
||||
// Is the character is a ! and the the next character is not a !
|
||||
inline bool IsACommentStart(const int iChar) {
|
||||
|
||||
return(iChar == '!');
|
||||
@ -126,7 +130,7 @@ inline bool SetNumericConstantState(StyleContext &scDoc) {
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If points found (can be more than one for improper formatted number
|
||||
if (iPoints > 0) {
|
||||
@ -186,12 +190,12 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
WordList &wlLabelReservedWords = *wlKeywords[7]; // Clarion Reserved Keywords (Labels)
|
||||
WordList &wlProcLabelReservedWords = *wlKeywords[8]; // Clarion Reserved Keywords (Procedure Labels)
|
||||
|
||||
const char wlProcReservedKeywordList[] =
|
||||
const char wlProcReservedKeywordList[] =
|
||||
"PROCEDURE FUNCTION";
|
||||
WordList wlProcReservedKeywords;
|
||||
wlProcReservedKeywords.Set(wlProcReservedKeywordList);
|
||||
|
||||
const char wlCompilerKeywordList[] =
|
||||
const char wlCompilerKeywordList[] =
|
||||
"COMPILE OMIT";
|
||||
WordList wlCompilerKeywords;
|
||||
wlCompilerKeywords.Set(wlCompilerKeywordList);
|
||||
@ -243,7 +247,7 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
// change the label to error state
|
||||
scDoc.ChangeState(SCE_CLW_ERROR);
|
||||
}
|
||||
// Else if UPPERCASE label string is
|
||||
// Else if UPPERCASE label string is
|
||||
else if (wlProcLabelReservedWords.InList(cLabel) && iColumn1Label) {
|
||||
char cWord[512]; // Word buffer
|
||||
// Get the next word from the current position
|
||||
@ -368,13 +372,13 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
// Increment the parenthese level
|
||||
iParenthesesLevel++;
|
||||
}
|
||||
// Else if the character is a ) (close parenthese)
|
||||
// Else if the character is a ) (close parenthese)
|
||||
else if (scDoc.ch == ')') {
|
||||
// If the parenthese level is set to zero
|
||||
// parentheses matched
|
||||
if (!iParenthesesLevel) {
|
||||
scDoc.SetState(SCE_CLW_DEFAULT);
|
||||
}
|
||||
}
|
||||
// Else parenthese level is greater than zero
|
||||
// still looking for matching parentheses
|
||||
else {
|
||||
@ -399,7 +403,7 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
|| IsAHexCharacter(scDoc.ch, bCaseSensitive)
|
||||
|| scDoc.ch == '.'
|
||||
|| IsANumericBaseCharacter(scDoc.ch, bCaseSensitive))) {
|
||||
// If the number was a real
|
||||
// If the number was a real
|
||||
if (SetNumericConstantState(scDoc)) {
|
||||
// Colour the matched string to the real constant state
|
||||
scDoc.ChangeState(SCE_CLW_REAL_CONSTANT);
|
||||
@ -461,7 +465,7 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
}
|
||||
// Default Handling
|
||||
else {
|
||||
// If in default state
|
||||
// If in default state
|
||||
if (scDoc.state == SCE_CLW_DEFAULT) {
|
||||
// If is a letter could be a possible statement
|
||||
if (isalpha(scDoc.ch)) {
|
||||
@ -477,10 +481,10 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
else if (IsACommentStart(scDoc.ch) || scDoc.ch == '|') {
|
||||
// then set the state to comment.
|
||||
scDoc.SetState(SCE_CLW_COMMENT);
|
||||
}
|
||||
}
|
||||
// else if the character is a ' (single quote)
|
||||
else if (scDoc.ch == '\'') {
|
||||
// If the character is also a ' (single quote)
|
||||
// If the character is also a ' (single quote)
|
||||
// Embedded Apostrophe
|
||||
if (scDoc.chNext == '\'') {
|
||||
// Move forward colouring it as default state
|
||||
@ -490,7 +494,7 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
// move to the next character and then set the state to comment.
|
||||
scDoc.ForwardSetState(SCE_CLW_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
// else the character is an @ (ampersand)
|
||||
else if (scDoc.ch == '@') {
|
||||
// Case insensitive.
|
||||
@ -509,7 +513,7 @@ static void ColouriseClarionDoc(unsigned int uiStartPos, int iLength, int iInitS
|
||||
scDoc.SetState(SCE_CLW_PICTURE_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -616,7 +620,7 @@ static void FoldClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle,
|
||||
iStyle = iStyleNext;
|
||||
iStyleNext = accStyler.StyleAt(uiPos + 1);
|
||||
bool bEOL = (chChar == '\r' && chNext != '\n') || (chChar == '\n');
|
||||
|
||||
|
||||
if (iStylePrev == SCE_CLW_DEFAULT) {
|
||||
if (iStyle == SCE_CLW_KEYWORD || iStyle == SCE_CLW_STRUCTURE_DATA_TYPE) {
|
||||
// Store last word start point.
|
||||
@ -647,7 +651,7 @@ static void FoldClarionDoc(unsigned int uiStartPos, int iLength, int iInitStyle,
|
||||
iLevelPrev = iLevelCurrent;
|
||||
iVisibleChars = 0;
|
||||
}
|
||||
|
||||
|
||||
if (!isspacechar(chChar))
|
||||
iVisibleChars++;
|
||||
}
|
@ -10,18 +10,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -90,11 +94,11 @@ static int classifyWordCOBOL(unsigned int start, unsigned int end, /*WordList &k
|
||||
getRange(start, end, styler, s, sizeof(s));
|
||||
|
||||
char chAttr = SCE_C_IDENTIFIER;
|
||||
if (isdigit(s[0]) || (s[0] == '.')) {
|
||||
if (isdigit(s[0]) || (s[0] == '.') || (s[0] == 'v')) {
|
||||
chAttr = SCE_C_NUMBER;
|
||||
char *p = s + 1;
|
||||
while (*p) {
|
||||
if (!isdigit(*p) && isCOBOLwordchar(*p)) {
|
||||
if ((!isdigit(*p) && (*p) != 'v') && isCOBOLwordchar(*p)) {
|
||||
chAttr = SCE_C_IDENTIFIER;
|
||||
break;
|
||||
}
|
1043
scintilla/lexers/LexCPP.cxx
Normal file
1043
scintilla/lexers/LexCPP.cxx
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,19 +9,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -20,20 +20,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
// Since the Microsoft __iscsym[f] funcs are not ANSI...
|
||||
inline int iscaml(int c) {return isalnum(c) || c == '_';}
|
||||
inline int iscamlf(int c) {return isalpha(c) || c == '_';}
|
||||
@ -51,9 +54,13 @@ using namespace Scintilla;
|
||||
/*
|
||||
(actually seems to work!)
|
||||
*/
|
||||
#include <string>
|
||||
#include "WindowAccessor.h"
|
||||
#include "ExternalLexer.h"
|
||||
|
||||
#undef EXT_LEXER_DECL
|
||||
#define EXT_LEXER_DECL __declspec( dllexport ) __stdcall
|
||||
|
||||
#if PLAT_WIN
|
||||
#include <windows.h>
|
||||
#endif
|
@ -5,21 +5,26 @@
|
||||
// Copyright 2007 by Cristian Adam <cristian [dot] adam [at] gmx [dot] net>
|
||||
// based on the NSIS lexer
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -11,18 +11,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -9,18 +9,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,18 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "Platform.h"
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -72,7 +77,7 @@ static void ColouriseCsoundDoc(unsigned int startPos, int length, int initStyle,
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Determine if the current state should terminate.
|
||||
if (sc.state == SCE_CSOUND_OPERATOR) {
|
||||
if (!IsCsoundOperator(static_cast<char>(sc.ch))) {
|
||||
@ -119,7 +124,7 @@ static void ColouriseCsoundDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_CSOUND_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Determine if a new state should be entered.
|
||||
if (sc.state == SCE_CSOUND_DEFAULT) {
|
||||
if (sc.ch == ';'){
|
||||
@ -146,7 +151,7 @@ static void ColouriseCsoundDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
static void FoldCsoundInstruments(unsigned int startPos, int length, int /* initStyle */, WordList *[],
|
||||
static void FoldCsoundInstruments(unsigned int startPos, int length, int /* initStyle */, WordList *[],
|
||||
Accessor &styler) {
|
||||
unsigned int lengthDoc = startPos + length;
|
||||
int visibleChars = 0;
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -9,16 +9,20 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -198,7 +202,7 @@ static void FoldESCRIPTDoc(unsigned int startPos, int length, int initStyle, Wor
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
|
||||
|
||||
|
||||
if (foldComment && IsStreamCommentStyle(style)) {
|
||||
if (!IsStreamCommentStyle(stylePrev)) {
|
||||
levelCurrent++;
|
@ -7,19 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -4,24 +4,29 @@
|
||||
/** @file LexErlang.cxx
|
||||
** Lexer for Erlang.
|
||||
** Enhanced by Etienne 'Lenain' Girondel (lenaing@gmail.com)
|
||||
** Originally wrote by Peter-Henry Mander,
|
||||
** Originally wrote by Peter-Henry Mander,
|
||||
** based on Matlab lexer by José Fonseca.
|
||||
**/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -152,7 +157,7 @@ static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle,
|
||||
// Try to match documentation comment
|
||||
sc.GetCurrent(cur, sizeof(cur));
|
||||
|
||||
if (parse_state == COMMENT_DOC_MACRO
|
||||
if (parse_state == COMMENT_DOC_MACRO
|
||||
&& erlangDocMacro.InList(cur)) {
|
||||
sc.ChangeState(SCE_ERLANG_COMMENT_DOC_MACRO);
|
||||
while (sc.ch != '}' && !sc.atLineEnd)
|
||||
@ -340,7 +345,7 @@ static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle,
|
||||
case NUMERAL_BASE_VALUE : {
|
||||
if (!is_radix(radix_digits,sc.ch)) {
|
||||
radix_digits = 0;
|
||||
|
||||
|
||||
if (!isalnum(sc.ch))
|
||||
sc.ChangeState(SCE_ERLANG_NUMBER);
|
||||
|
||||
@ -380,7 +385,7 @@ static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle,
|
||||
/* Preprocessor --------------------------------------------------*/
|
||||
case PREPROCESSOR : {
|
||||
if (!IsAWordChar(sc.ch)) {
|
||||
|
||||
|
||||
sc.GetCurrent(cur, sizeof(cur));
|
||||
if (erlangPreproc.InList(cur)) {
|
||||
style = SCE_ERLANG_PREPROC;
|
||||
@ -421,7 +426,7 @@ static void ColouriseErlangDoc(unsigned int startPos, int length, int initStyle,
|
||||
} break;
|
||||
case SCE_ERLANG_OPERATOR : {
|
||||
if (sc.chPrev == '.') {
|
||||
if (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\'
|
||||
if (sc.ch == '*' || sc.ch == '/' || sc.ch == '\\'
|
||||
|| sc.ch == '^') {
|
||||
sc.ForwardSetState(SCE_ERLANG_DEFAULT);
|
||||
} else if (sc.ch == '\'') {
|
@ -10,19 +10,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
@ -7,19 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -130,7 +134,7 @@ static void ColouriseForthDoc(unsigned int startPos, int length, int initStyle,
|
||||
sc.SetState(SCE_FORTH_NUMBER);
|
||||
while(sc.More() && isascii(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))
|
||||
sc.Forward();
|
||||
} else if ( isascii(sc.ch) &&
|
||||
} else if ( isascii(sc.ch) &&
|
||||
(isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && isascii(sc.chNext) && isxdigit(sc.chNext)) )
|
||||
){
|
||||
sc.SetState(SCE_FORTH_NUMBER);
|
||||
@ -173,4 +177,4 @@ static const char * const forthWordLists[] = {
|
||||
|
||||
LexerModule lmForth(SCLEX_FORTH, ColouriseForthDoc, "forth", FoldForthDoc, forthWordLists);
|
||||
|
||||
|
||||
|
@ -8,18 +8,24 @@
|
||||
/***************************************/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
/***************************************/
|
||||
#include "Platform.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
/***************************************/
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -23,19 +23,23 @@ val SCE_GC_OPERATOR=9
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -7,19 +7,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -54,13 +57,6 @@ inline bool IsOperator(int ch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int MakeLowerCase(int ch) {
|
||||
if (ch < 'A' || ch > 'Z')
|
||||
return ch;
|
||||
else
|
||||
return ch - 'A' + 'a';
|
||||
}
|
||||
|
||||
static void GetTextSegment(Accessor &styler, unsigned int start, unsigned int end, char *s, size_t len) {
|
||||
size_t i = 0;
|
||||
for (; (i < end - start + 1) && (i < len-1); i++) {
|
||||
@ -889,6 +885,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
|
||||
else if ((state != SCE_H_ASPAT) &&
|
||||
!isPHPStringState(state) &&
|
||||
(state != SCE_HPHP_COMMENT) &&
|
||||
(state != SCE_HPHP_COMMENTLINE) &&
|
||||
(ch == '<') &&
|
||||
(chNext == '?') &&
|
||||
!IsScriptCommentState(state) ) {
|
@ -18,20 +18,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "PropSetSimple.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -7,20 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -7,19 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,18 +8,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -44,7 +48,7 @@ static inline bool isLispwordstart(char ch) {
|
||||
|
||||
|
||||
static void classifyWordLisp(unsigned int start, unsigned int end, WordList &keywords, WordList &keywords_kw, Accessor &styler) {
|
||||
PLATFORM_ASSERT(end >= start);
|
||||
assert(end >= start);
|
||||
char s[100];
|
||||
unsigned int i;
|
||||
bool digit_flag = true;
|
@ -7,19 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -9,19 +9,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
@ -9,19 +9,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -7,21 +7,26 @@
|
||||
// Copyright 2003 by Marius Gheorghe <mgheorghe@cabletest.com>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -66,7 +71,7 @@ static int GetLotLineState(std::string &line) {
|
||||
return SCE_LOT_ABORT;
|
||||
}
|
||||
else {
|
||||
return i ? SCE_LOT_PASS : SCE_LOT_DEFAULT;
|
||||
return i ? SCE_LOT_PASS : SCE_LOT_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,10 +140,10 @@ static void FoldLotDoc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
if (ch == '\r' && chNext == '\n') {
|
||||
// TO DO:
|
||||
// Should really get the state of the previous line from the styler
|
||||
int stylePrev = style;
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 2);
|
||||
|
||||
|
||||
switch (style) {
|
||||
/*
|
||||
case SCE_LOT_SET:
|
||||
@ -147,7 +152,7 @@ static void FoldLotDoc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
*/
|
||||
case SCE_LOT_FAIL:
|
||||
/*
|
||||
if (stylePrev != SCE_LOT_FAIL)
|
||||
if (stylePrev != SCE_LOT_FAIL)
|
||||
lev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;
|
||||
else
|
||||
lev = SC_FOLDLEVELBASE + 1;
|
||||
@ -156,7 +161,7 @@ static void FoldLotDoc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
break;
|
||||
|
||||
default:
|
||||
if (lineCurrent == 0 || stylePrev == SCE_LOT_FAIL)
|
||||
if (lineCurrent == 0 || stylePrev == SCE_LOT_FAIL)
|
||||
lev = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG;
|
||||
else
|
||||
lev = SC_FOLDLEVELBASE + 1;
|
||||
@ -166,7 +171,7 @@ static void FoldLotDoc(unsigned int startPos, int length, int, WordList *[], Acc
|
||||
break;
|
||||
}
|
||||
|
||||
if (lev != styler.LevelAt(lineCurrent))
|
||||
if (lev != styler.LevelAt(lineCurrent))
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
|
||||
lineCurrent++;
|
@ -7,18 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -2,31 +2,31 @@
|
||||
* LexMarkdown.cxx
|
||||
*
|
||||
* A simple Markdown lexer for scintilla.
|
||||
*
|
||||
*
|
||||
* Includes highlighting for some extra features from the
|
||||
* Pandoc implementation; strikeout, using '#.' as a default
|
||||
* Pandoc implementation; strikeout, using '#.' as a default
|
||||
* ordered list item marker, and delimited code blocks.
|
||||
*
|
||||
*
|
||||
* Limitations:
|
||||
*
|
||||
*
|
||||
* Standard indented code blocks are not highlighted at all,
|
||||
* as it would conflict with other indentation schemes. Use
|
||||
* as it would conflict with other indentation schemes. Use
|
||||
* delimited code blocks for blanket highlighting of an
|
||||
* entire code block. Embedded HTML is not highlighted either.
|
||||
* Blanket HTML highlighting has issues, because some Markdown
|
||||
* implementations allow Markdown markup inside of the HTML. Also,
|
||||
* there is a following blank line issue that can't be ignored,
|
||||
* explained in the next paragraph. Embedded HTML and code
|
||||
* blocks would be better supported with language specific
|
||||
* there is a following blank line issue that can't be ignored,
|
||||
* explained in the next paragraph. Embedded HTML and code
|
||||
* blocks would be better supported with language specific
|
||||
* highlighting.
|
||||
*
|
||||
*
|
||||
* The highlighting aims to accurately reflect correct syntax,
|
||||
* but a few restrictions are relaxed. Delimited code blocks are
|
||||
* highlighted, even if the line following the code block is not blank.
|
||||
* highlighted, even if the line following the code block is not blank.
|
||||
* Requiring a blank line after a block, breaks the highlighting
|
||||
* in certain cases, because of the way Scintilla ends up calling
|
||||
* the lexer.
|
||||
*
|
||||
*
|
||||
* Written by Jon Strait - jstrait@moonloop.net
|
||||
*
|
||||
* The License.txt file describes the conditions under which this
|
||||
@ -34,21 +34,24 @@
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -74,7 +77,7 @@ static bool FollowToLineEnd(const int ch, const int state, const unsigned int en
|
||||
else return false;
|
||||
}
|
||||
|
||||
// Set the state on text section from current to length characters,
|
||||
// Set the state on text section from current to length characters,
|
||||
// then set the rest until the newline to default, except for any characters matching token
|
||||
static void SetStateAndZoom(const int state, const int length, const int token, StyleContext &sc) {
|
||||
sc.SetState(state);
|
||||
@ -100,7 +103,7 @@ static void SetStateAndZoom(const int state, const int length, const int token,
|
||||
static bool HasPrevLineContent(StyleContext &sc) {
|
||||
int i = 0;
|
||||
// Go back to the previous newline
|
||||
while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i)))
|
||||
while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i)))
|
||||
;
|
||||
while (--i + sc.currentPos) {
|
||||
if (IsNewline(sc.GetRelative(i)))
|
||||
@ -116,12 +119,12 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
|
||||
unsigned int i = 0;
|
||||
while (++i) {
|
||||
c = sc.GetRelative(i);
|
||||
if (c == sc.ch)
|
||||
if (c == sc.ch)
|
||||
++count;
|
||||
// hit a terminating character
|
||||
else if (!IsASpaceOrTab(c) || sc.currentPos + i == endPos) {
|
||||
// Are we a valid HRULE
|
||||
if ((IsNewline(c) || sc.currentPos + i == endPos) &&
|
||||
if ((IsNewline(c) || sc.currentPos + i == endPos) &&
|
||||
count >= 3 && !HasPrevLineContent(sc)) {
|
||||
sc.SetState(SCE_MARKDOWN_HRULE);
|
||||
sc.Forward(i);
|
||||
@ -145,7 +148,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
// Useful in the corner case of having to start at the beginning file position
|
||||
// in the default state.
|
||||
bool freezeCursor = false;
|
||||
|
||||
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
while (sc.More()) {
|
||||
@ -154,18 +157,18 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
sc.Forward();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// A blockquotes resets the line semantics
|
||||
if (sc.state == SCE_MARKDOWN_BLOCKQUOTE)
|
||||
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
|
||||
|
||||
|
||||
// Conditional state-based actions
|
||||
if (sc.state == SCE_MARKDOWN_CODE2) {
|
||||
if (sc.Match("``") && sc.GetRelative(-2) != ' ') {
|
||||
sc.Forward(2);
|
||||
sc.SetState(SCE_MARKDOWN_DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (sc.state == SCE_MARKDOWN_CODE) {
|
||||
if (sc.ch == '`' && sc.chPrev != ' ')
|
||||
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
|
||||
@ -201,14 +204,14 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
sc.Forward(2);
|
||||
sc.SetState(SCE_MARKDOWN_DEFAULT);
|
||||
}
|
||||
}
|
||||
else if (sc.state == SCE_MARKDOWN_STRONG2) {
|
||||
if (sc.Match("__") && sc.chPrev != ' ') {
|
||||
}
|
||||
else if (sc.state == SCE_MARKDOWN_STRONG2) {
|
||||
if (sc.Match("__") && sc.chPrev != ' ') {
|
||||
sc.Forward(2);
|
||||
sc.SetState(SCE_MARKDOWN_DEFAULT);
|
||||
}
|
||||
}
|
||||
// Emphasis
|
||||
// Emphasis
|
||||
else if (sc.state == SCE_MARKDOWN_EM1) {
|
||||
if (sc.ch == '*' && sc.chPrev != ' ')
|
||||
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
|
||||
@ -281,7 +284,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
sc.SetState(SCE_MARKDOWN_PRECHAR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// The header lasts until the newline
|
||||
else if (sc.state == SCE_MARKDOWN_HEADER1 || sc.state == SCE_MARKDOWN_HEADER2 ||
|
||||
sc.state == SCE_MARKDOWN_HEADER3 || sc.state == SCE_MARKDOWN_HEADER4 ||
|
||||
@ -289,7 +292,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
if (IsNewline(sc.ch))
|
||||
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
|
||||
}
|
||||
|
||||
|
||||
// New state only within the initial whitespace
|
||||
if (sc.state == SCE_MARKDOWN_PRECHAR) {
|
||||
// Blockquote
|
||||
@ -300,8 +303,8 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
else if (!HasPrevLineContent(sc) && (sc.chPrev == '\t' || precharCount >= 4))
|
||||
sc.SetState(SCE_MARKDOWN_CODEBK);
|
||||
*/
|
||||
// HRule - Total of three or more hyphens, asterisks, or underscores
|
||||
// on a line by themselves
|
||||
// HRule - Total of three or more hyphens, asterisks, or underscores
|
||||
// on a line by themselves
|
||||
else if ((sc.ch == '-' || sc.ch == '*' || sc.ch == '_') && IsValidHrule(endPos, sc))
|
||||
;
|
||||
// Unordered list
|
||||
@ -314,7 +317,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
int digitCount = 0;
|
||||
while (IsADigit(sc.GetRelative(++digitCount)))
|
||||
;
|
||||
if (sc.GetRelative(digitCount) == '.' &&
|
||||
if (sc.GetRelative(digitCount) == '.' &&
|
||||
IsASpaceOrTab(sc.GetRelative(digitCount + 1))) {
|
||||
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
|
||||
sc.Forward(digitCount + 1);
|
||||
@ -332,7 +335,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
|
||||
else
|
||||
++precharCount;
|
||||
}
|
||||
|
||||
|
||||
// New state anywhere in doc
|
||||
if (sc.state == SCE_MARKDOWN_DEFAULT) {
|
||||
if (sc.atLineStart && sc.ch == '#') {
|
@ -12,19 +12,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -14,18 +14,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -326,11 +330,11 @@ static const char * const metapostWordListDesc[] = {
|
||||
static int classifyFoldPointMetapost(const char* s,WordList *keywordlists[]) {
|
||||
WordList& keywordsStart=*keywordlists[3];
|
||||
WordList& keywordsStop1=*keywordlists[4];
|
||||
|
||||
|
||||
if (keywordsStart.InList(s)) {return 1;}
|
||||
else if (keywordsStop1.InList(s)) {return -1;}
|
||||
return 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
static int ParseMetapostWord(unsigned int pos, Accessor &styler, char *word)
|
||||
@ -344,11 +348,11 @@ static int ParseMetapostWord(unsigned int pos, Accessor &styler, char *word)
|
||||
length++;
|
||||
ch=styler.SafeGetCharAt(pos+length);
|
||||
}
|
||||
word[length]=0;
|
||||
word[length]=0;
|
||||
return length;
|
||||
}
|
||||
|
||||
static void FoldMetapostDoc(unsigned int startPos, int length, int, WordList *keywordlists[], Accessor &styler)
|
||||
|
||||
static void FoldMetapostDoc(unsigned int startPos, int length, int, WordList *keywordlists[], Accessor &styler)
|
||||
{
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
unsigned int endPos = startPos+length;
|
||||
@ -357,9 +361,9 @@ static void FoldMetapostDoc(unsigned int startPos, int length, int, WordList *ke
|
||||
int levelPrev=styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
|
||||
int levelCurrent=levelPrev;
|
||||
char chNext=styler[startPos];
|
||||
|
||||
|
||||
char buffer[100]="";
|
||||
|
||||
|
||||
for (unsigned int i=startPos; i < endPos; i++) {
|
||||
char ch=chNext;
|
||||
chNext=styler.SafeGetCharAt(i+1);
|
||||
@ -371,7 +375,7 @@ static void FoldMetapostDoc(unsigned int startPos, int length, int, WordList *ke
|
||||
ParseMetapostWord(i, styler, buffer);
|
||||
levelCurrent += classifyFoldPointMetapost(buffer,keywordlists);
|
||||
}
|
||||
|
||||
|
||||
if (atEOL) {
|
||||
int lev = levelPrev;
|
||||
if (visibleChars == 0 && foldCompact)
|
@ -12,19 +12,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -113,12 +117,12 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
if (!IsAWordChar(sc.ch))
|
||||
{
|
||||
CheckForKeyword(sc, keywordlists);
|
||||
|
||||
|
||||
// Additional check for function keywords needed.
|
||||
// A function name must be followed by an opening parenthesis.
|
||||
if (sc.state == SCE_MYSQL_FUNCTION && sc.ch != '(')
|
||||
sc.ChangeState(SCE_MYSQL_DEFAULT);
|
||||
|
||||
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
@ -137,7 +141,7 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
if (keywordlists[4]->InList(&s[2]))
|
||||
sc.ChangeState(SCE_MYSQL_KNOWNSYSTEMVARIABLE);
|
||||
delete [] s;
|
||||
|
||||
|
||||
sc.SetState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
break;
|
||||
@ -232,7 +236,7 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
if (sc.Match('/', '*'))
|
||||
{
|
||||
sc.SetState(SCE_MYSQL_COMMENT);
|
||||
|
||||
|
||||
// Skip comment introducer and check for hidden command.
|
||||
sc.Forward(2);
|
||||
if (sc.ch == '!')
|
||||
@ -247,7 +251,7 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
// Special MySQL single line comment.
|
||||
sc.SetState(SCE_MYSQL_COMMENTLINE);
|
||||
sc.Forward(2);
|
||||
|
||||
|
||||
// Check the third character too. It must be a space or EOL.
|
||||
if (sc.ch != ' ' && sc.ch != '\n' && sc.ch != '\r')
|
||||
sc.ChangeState(SCE_MYSQL_OPERATOR);
|
||||
@ -258,7 +262,7 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Do a final check for keywords if we currently have an identifier, to highlight them
|
||||
// also at the end of a line.
|
||||
if (sc.state == SCE_MYSQL_IDENTIFIER)
|
||||
@ -270,7 +274,7 @@ static void ColouriseMySQLDoc(unsigned int startPos, int length, int initStyle,
|
||||
if (sc.state == SCE_MYSQL_FUNCTION && sc.ch != '(')
|
||||
sc.ChangeState(SCE_MYSQL_DEFAULT);
|
||||
}
|
||||
|
||||
|
||||
sc.Complete();
|
||||
}
|
||||
|
||||
@ -320,7 +324,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
|
||||
|
||||
bool endFound = false;
|
||||
bool whenFound = false;
|
||||
bool elseFound = false;
|
||||
@ -331,11 +335,11 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
|
||||
|
||||
char currentChar = nextChar;
|
||||
nextChar = styler.SafeGetCharAt(i + 1);
|
||||
bool atEOL = (currentChar == '\r' && nextChar != '\n') || (currentChar == '\n');
|
||||
|
||||
|
||||
switch (style)
|
||||
{
|
||||
case SCE_MYSQL_COMMENT:
|
||||
@ -357,7 +361,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
break;
|
||||
case SCE_MYSQL_COMMENTLINE:
|
||||
if (foldComment)
|
||||
{
|
||||
{
|
||||
// Not really a standard, but we add support for single line comments
|
||||
// with special curly braces syntax as foldable comments too.
|
||||
// MySQL needs -- comments to be followed by space or control char
|
||||
@ -400,14 +404,14 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
bool whileFound = MatchIgnoreCase(styler, i, "while");
|
||||
bool loopFound = MatchIgnoreCase(styler, i, "loop");
|
||||
bool repeatFound = MatchIgnoreCase(styler, i, "repeat");
|
||||
|
||||
|
||||
if (!foldOnlyBegin && endFound && (ifFound || whileFound || loopFound))
|
||||
{
|
||||
endFound = false;
|
||||
levelNext--;
|
||||
if (levelNext < SC_FOLDLEVELBASE)
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
|
||||
|
||||
// Note that "else" is special here. It may or may not be followed by an "if .. then",
|
||||
// but in any case the level stays the same. When followed by an "if .. then" the level
|
||||
// will be increased later, if not, then at eol.
|
||||
@ -461,7 +465,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Handle the case of a trailing end without an if / while etc, as in the case of a begin.
|
||||
if (endFound)
|
||||
{
|
||||
@ -470,7 +474,7 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
if (levelNext < SC_FOLDLEVELBASE)
|
||||
levelNext = SC_FOLDLEVELBASE;
|
||||
}
|
||||
|
||||
|
||||
if (atEOL)
|
||||
{
|
||||
if (elseFound)
|
||||
@ -487,14 +491,14 @@ static void FoldMySQLDoc(unsigned int startPos, int length, int initStyle, WordL
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
if (lev != styler.LevelAt(lineCurrent))
|
||||
styler.SetLevel(lineCurrent, lev);
|
||||
|
||||
|
||||
lineCurrent++;
|
||||
levelCurrent = levelNext;
|
||||
visibleChars = 0;
|
||||
endFound = false;
|
||||
whenFound = false;
|
||||
}
|
||||
|
||||
|
||||
if (!isspacechar(currentChar))
|
||||
visibleChars++;
|
||||
}
|
@ -9,19 +9,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -113,7 +117,7 @@ static int scanNumber(Accessor &styler, int pos) {
|
||||
if (ch == '_' || (ch >= '0' && ch <= '1')) ++pos;
|
||||
else break;
|
||||
}
|
||||
} else if (ch == '0' &&
|
||||
} else if (ch == '0' &&
|
||||
(ch2 == 'o' || ch2 == 'O' || ch2 == 'c' || ch2 == 'C')) {
|
||||
/* octal number: */
|
||||
pos += 2;
|
||||
@ -203,7 +207,7 @@ static void ColouriseNimrodDoc(unsigned int startPos, int length, int initStyle,
|
||||
case '#': {
|
||||
bool doccomment = (styler.SafeGetCharAt(pos+1) == '#');
|
||||
while (pos < max && !isNewLine(styler.SafeGetCharAt(pos, LF))) pos++;
|
||||
if (doccomment)
|
||||
if (doccomment)
|
||||
styler.ColourTo(pos, SCE_C_COMMENTLINEDOC);
|
||||
else
|
||||
styler.ColourTo(pos, SCE_P_COMMENTLINE);
|
||||
@ -280,7 +284,7 @@ static bool IsQuoteLine(int line, Accessor &styler) {
|
||||
}
|
||||
|
||||
|
||||
static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
int /*initStyle - unused*/,
|
||||
WordList *[], Accessor &styler) {
|
||||
const int maxPos = startPos + length;
|
||||
@ -311,7 +315,7 @@ static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
int prev_state = SCE_P_DEFAULT & 31;
|
||||
if (lineCurrent >= 1)
|
||||
prev_state = styler.StyleAt(startPos - 1) & 31;
|
||||
int prevQuote = foldQuotes && ((prev_state == SCE_P_TRIPLE) ||
|
||||
int prevQuote = foldQuotes && ((prev_state == SCE_P_TRIPLE) ||
|
||||
(prev_state == SCE_P_TRIPLEDOUBLE));
|
||||
int prevComment = 0;
|
||||
if (lineCurrent >= 1)
|
||||
@ -320,7 +324,7 @@ static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
// Process all characters to end of requested range or end of any triple quote
|
||||
// or comment that hangs over the end of the range. Cap processing in all cases
|
||||
// to end of document (in case of unclosed quote or comment at end).
|
||||
while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) ||
|
||||
while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) ||
|
||||
prevQuote || prevComment)) {
|
||||
|
||||
// Gather info
|
||||
@ -338,7 +342,7 @@ static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
const int quote_continue = (quote && prevQuote);
|
||||
const int comment = foldComment && IsCommentLine(lineCurrent, styler);
|
||||
const int comment_start = (comment && !prevComment && (lineNext <= docLines) &&
|
||||
IsCommentLine(lineNext, styler) &&
|
||||
IsCommentLine(lineNext, styler) &&
|
||||
(lev > SC_FOLDLEVELBASE));
|
||||
const int comment_continue = (comment && prevComment);
|
||||
if ((!quote || !prevQuote) && !comment)
|
||||
@ -377,8 +381,8 @@ static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
}
|
||||
|
||||
const int levelAfterComments = indentNext & SC_FOLDLEVELNUMBERMASK;
|
||||
const int levelBeforeComments =
|
||||
Platform::Maximum(indentCurrentLevel,levelAfterComments);
|
||||
const int levelBeforeComments =
|
||||
Maximum(indentCurrentLevel,levelAfterComments);
|
||||
|
||||
// Now set all the indent levels on the lines we skipped
|
||||
// Do this from end to start. Once we encounter one line
|
||||
@ -401,7 +405,7 @@ static void FoldNimrodDoc(unsigned int startPos, int length,
|
||||
|
||||
// Set fold header on non-quote/non-comment line
|
||||
if (!quote && !comment && !(indentCurrent & SC_FOLDLEVELWHITEFLAG) ) {
|
||||
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) <
|
||||
if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) <
|
||||
(indentNext & SC_FOLDLEVELNUMBERMASK))
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
}
|
@ -5,21 +5,26 @@
|
||||
// Copyright 2003 - 2005 by Angelo Mandato <angelo [at] spaceblue [dot] com>
|
||||
// Last Updated: 03/13/2005
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -6,18 +6,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -92,7 +96,7 @@ inline bool HandleString( unsigned int & cur, unsigned int one_too_much, Accesso
|
||||
inline bool HandleCommentBlock( unsigned int & cur, unsigned int one_too_much, Accessor & styler, bool could_fail )
|
||||
{
|
||||
char ch;
|
||||
|
||||
|
||||
if( could_fail )
|
||||
{
|
||||
cur++;
|
||||
@ -101,7 +105,7 @@ inline bool HandleCommentBlock( unsigned int & cur, unsigned int one_too_much, A
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );
|
||||
return false; // STOP
|
||||
}
|
||||
|
||||
|
||||
ch = styler.SafeGetCharAt( cur );
|
||||
if( ch != '*' )
|
||||
{
|
||||
@ -110,7 +114,7 @@ inline bool HandleCommentBlock( unsigned int & cur, unsigned int one_too_much, A
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Wait for comment close
|
||||
cur++;
|
||||
bool star_found = false;
|
||||
@ -121,7 +125,7 @@ inline bool HandleCommentBlock( unsigned int & cur, unsigned int one_too_much, A
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_COMMENT_BLOCK );
|
||||
return false; // STOP
|
||||
}
|
||||
|
||||
|
||||
ch = styler.SafeGetCharAt( cur );
|
||||
if( star_found )
|
||||
{
|
||||
@ -155,7 +159,7 @@ inline bool HandleCommentBlock( unsigned int & cur, unsigned int one_too_much, A
|
||||
inline bool HandleCommentLine( unsigned int & cur, unsigned int one_too_much, Accessor & styler, bool could_fail )
|
||||
{
|
||||
char ch;
|
||||
|
||||
|
||||
if( could_fail )
|
||||
{
|
||||
cur++;
|
||||
@ -164,7 +168,7 @@ inline bool HandleCommentLine( unsigned int & cur, unsigned int one_too_much, Ac
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );
|
||||
return false; // STOP
|
||||
}
|
||||
|
||||
|
||||
ch = styler.SafeGetCharAt( cur );
|
||||
if( ch != '-' )
|
||||
{
|
||||
@ -179,7 +183,7 @@ inline bool HandleCommentLine( unsigned int & cur, unsigned int one_too_much, Ac
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_DEFAULT );
|
||||
return false; // STOP
|
||||
}
|
||||
|
||||
|
||||
ch = styler.SafeGetCharAt( cur );
|
||||
if( ( ch != ' ' ) && ( ch != '\t' ) )
|
||||
{
|
||||
@ -224,7 +228,7 @@ inline bool HandleCommentLine( unsigned int & cur, unsigned int one_too_much, Ac
|
||||
{
|
||||
if( ch == '\015' )
|
||||
{
|
||||
fifteen_found = true;
|
||||
fifteen_found = true;
|
||||
}
|
||||
else if( ch == '\012' )
|
||||
{
|
||||
@ -259,7 +263,7 @@ inline bool HandleSpace( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_SPACE );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ch = styler.SafeGetCharAt( cur );
|
||||
switch( ch )
|
||||
{
|
||||
@ -269,7 +273,7 @@ inline bool HandleSpace( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
case '\012':
|
||||
cur++;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
styler.ColourTo( cur - 1, SCE_OPAL_SPACE );
|
||||
styler.StartSegment( cur );
|
||||
@ -314,7 +318,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
!( isascii( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break;
|
||||
|
||||
cur++;
|
||||
if( cur >= one_too_much )
|
||||
if( cur >= one_too_much )
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -323,7 +327,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
const int ide_len = cur - beg + 1;
|
||||
char * ide = new char[ ide_len ];
|
||||
getRange( beg, cur, styler, ide, ide_len );
|
||||
|
||||
|
||||
WordList & keywords = *keywordlists[ 0 ];
|
||||
WordList & classwords = *keywordlists[ 1 ];
|
||||
|
||||
@ -338,8 +342,8 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
}
|
||||
else
|
||||
{
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if( classwords.InList( ide ) ) // Sort
|
||||
@ -353,8 +357,8 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
}
|
||||
else
|
||||
{
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if( !strcmp( ide, "true" ) || !strcmp( ide, "false" ) ) // Bool const
|
||||
@ -368,8 +372,8 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
}
|
||||
else
|
||||
{
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else // Unknown keyword
|
||||
@ -384,7 +388,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
else
|
||||
{
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -400,7 +404,7 @@ inline bool HandleSkip( unsigned int & cur, unsigned int one_too_much, Accessor
|
||||
}
|
||||
else
|
||||
{
|
||||
styler.StartSegment( cur );
|
||||
styler.StartSegment( cur );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -444,11 +448,11 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle,
|
||||
if( !HandleString( cur, one_too_much, styler ) ) return;
|
||||
state = SCE_OPAL_DEFAULT;
|
||||
break;
|
||||
|
||||
|
||||
default: // SCE_OPAL_DEFAULT:
|
||||
{
|
||||
char ch = styler.SafeGetCharAt( cur );
|
||||
|
||||
|
||||
switch( ch )
|
||||
{
|
||||
// String
|
||||
@ -483,7 +487,7 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle,
|
||||
case '\012':
|
||||
if( !HandleSpace( cur, one_too_much, styler ) ) return;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
{
|
||||
// Integer
|
||||
@ -496,7 +500,7 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle,
|
||||
else if( isascii( ch ) && ( islower( ch ) || isupper( ch ) ) )
|
||||
{
|
||||
if( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Skip
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "CharClassify.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -35,19 +35,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -4,18 +4,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
@ -16,19 +16,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -8,19 +8,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
@ -11,20 +11,20 @@
|
||||
|
||||
A few words about features of the new completely rewritten LexPascal...
|
||||
|
||||
Generally speaking LexPascal tries to support all available Delphi features (up
|
||||
Generally speaking LexPascal tries to support all available Delphi features (up
|
||||
to Delphi 2009 at this time), including .NET specific features.
|
||||
|
||||
~ HIGHLIGHTING:
|
||||
|
||||
If you enable "lexer.pascal.smart.highlighting" property, some keywords will
|
||||
only be highlighted in appropriate context. As implemented those are keywords
|
||||
related to property and DLL exports declarations (similar to how Delphi IDE
|
||||
works).
|
||||
If you enable "lexer.pascal.smart.highlighting" property, some keywords will
|
||||
only be highlighted in appropriate context. As implemented those are keywords
|
||||
related to property and DLL exports declarations (similar to how Delphi IDE
|
||||
works).
|
||||
|
||||
For example, keywords "read" and "write" will only be highlighted if they are in
|
||||
For example, keywords "read" and "write" will only be highlighted if they are in
|
||||
property declaration:
|
||||
|
||||
property MyProperty: boolean read FMyProperty write FMyProperty;
|
||||
property MyProperty: boolean read FMyProperty write FMyProperty;
|
||||
|
||||
~ FOLDING:
|
||||
|
||||
@ -32,34 +32,34 @@ Folding is supported in the following cases:
|
||||
|
||||
- Folding of stream-like comments
|
||||
- Folding of groups of consecutive line comments
|
||||
- Folding of preprocessor blocks (the following preprocessor blocks are
|
||||
supported: IF / IFEND; IFDEF, IFNDEF, IFOPT / ENDIF and REGION / ENDREGION
|
||||
- Folding of preprocessor blocks (the following preprocessor blocks are
|
||||
supported: IF / IFEND; IFDEF, IFNDEF, IFOPT / ENDIF and REGION / ENDREGION
|
||||
blocks), including nesting of preprocessor blocks up to 255 levels
|
||||
- Folding of code blocks on appropriate keywords (the following code blocks are
|
||||
supported: "begin, asm, record, try, case / end" blocks, class & object
|
||||
- Folding of code blocks on appropriate keywords (the following code blocks are
|
||||
supported: "begin, asm, record, try, case / end" blocks, class & object
|
||||
declarations and interface declarations)
|
||||
|
||||
Remarks:
|
||||
|
||||
- Folding of code blocks tries to handle all special cases in which folding
|
||||
- Folding of code blocks tries to handle all special cases in which folding
|
||||
should not occur. As implemented those are:
|
||||
|
||||
1. Structure "record case / end" (there's only one "end" statement and "case" is
|
||||
1. Structure "record case / end" (there's only one "end" statement and "case" is
|
||||
ignored as fold point)
|
||||
2. Forward class declarations ("type TMyClass = class;") and object method
|
||||
declarations ("TNotifyEvent = procedure(Sender: TObject) of object;") are
|
||||
2. Forward class declarations ("type TMyClass = class;") and object method
|
||||
declarations ("TNotifyEvent = procedure(Sender: TObject) of object;") are
|
||||
ignored as fold points
|
||||
3. Simplified complete class declarations ("type TMyClass = class(TObject);")
|
||||
3. Simplified complete class declarations ("type TMyClass = class(TObject);")
|
||||
are ignored as fold points
|
||||
4. Every other situation when class keyword doesn't actually start class
|
||||
declaration ("class procedure", "class function", "class of", "class var",
|
||||
4. Every other situation when class keyword doesn't actually start class
|
||||
declaration ("class procedure", "class function", "class of", "class var",
|
||||
"class property" and "class operator")
|
||||
|
||||
- Folding of code blocks inside preprocessor blocks is disabled (any comments
|
||||
inside them will be folded fine) because there is no guarantee that complete
|
||||
code block will be contained inside folded preprocessor block in which case
|
||||
folded code block could end prematurely at the end of preprocessor block if
|
||||
there is no closing statement inside. This was done in order to properly process
|
||||
- Folding of code blocks inside preprocessor blocks is disabled (any comments
|
||||
inside them will be folded fine) because there is no guarantee that complete
|
||||
code block will be contained inside folded preprocessor block in which case
|
||||
folded code block could end prematurely at the end of preprocessor block if
|
||||
there is no closing statement inside. This was done in order to properly process
|
||||
document that may contain something like this:
|
||||
|
||||
type
|
||||
@ -76,52 +76,55 @@ type
|
||||
...
|
||||
end;
|
||||
|
||||
If class declarations were folded, then the second class declaration would end
|
||||
at "$ENDIF" statement, first class statement would end at "end;" statement and
|
||||
preprocessor "$IFDEF" block would go all the way to the end of document.
|
||||
However, having in mind all this, if you want to enable folding of code blocks
|
||||
inside preprocessor blocks, you can disable folding of preprocessor blocks by
|
||||
changing "fold.preprocessor" property, in which case everything inside them
|
||||
If class declarations were folded, then the second class declaration would end
|
||||
at "$ENDIF" statement, first class statement would end at "end;" statement and
|
||||
preprocessor "$IFDEF" block would go all the way to the end of document.
|
||||
However, having in mind all this, if you want to enable folding of code blocks
|
||||
inside preprocessor blocks, you can disable folding of preprocessor blocks by
|
||||
changing "fold.preprocessor" property, in which case everything inside them
|
||||
would be folded.
|
||||
|
||||
~ KEYWORDS:
|
||||
|
||||
The list of keywords that can be used in pascal.properties file (up to Delphi
|
||||
The list of keywords that can be used in pascal.properties file (up to Delphi
|
||||
2009):
|
||||
|
||||
- Keywords: absolute abstract and array as asm assembler automated begin case
|
||||
cdecl class const constructor deprecated destructor dispid dispinterface div do
|
||||
downto dynamic else end except export exports external far file final
|
||||
finalization finally for forward function goto if implementation in inherited
|
||||
initialization inline interface is label library message mod near nil not object
|
||||
of on or out overload override packed pascal platform private procedure program
|
||||
property protected public published raise record register reintroduce repeat
|
||||
resourcestring safecall sealed set shl shr static stdcall strict string then
|
||||
- Keywords: absolute abstract and array as asm assembler automated begin case
|
||||
cdecl class const constructor deprecated destructor dispid dispinterface div do
|
||||
downto dynamic else end except export exports external far file final
|
||||
finalization finally for forward function goto if implementation in inherited
|
||||
initialization inline interface is label library message mod near nil not object
|
||||
of on or out overload override packed pascal platform private procedure program
|
||||
property protected public published raise record register reintroduce repeat
|
||||
resourcestring safecall sealed set shl shr static stdcall strict string then
|
||||
threadvar to try type unit unsafe until uses var varargs virtual while with xor
|
||||
|
||||
- Keywords related to the "smart highlithing" feature: add default implements
|
||||
- Keywords related to the "smart highlithing" feature: add default implements
|
||||
index name nodefault read readonly remove stored write writeonly
|
||||
|
||||
- Keywords related to Delphi packages (in addition to all above): package
|
||||
- Keywords related to Delphi packages (in addition to all above): package
|
||||
contains requires
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -155,12 +158,12 @@ static void GetForwardRangeLowered(unsigned int start,
|
||||
}
|
||||
|
||||
enum {
|
||||
stateInAsm = 0x1000,
|
||||
stateInProperty = 0x2000,
|
||||
stateInExport = 0x4000,
|
||||
stateFoldInPreprocessor = 0x0100,
|
||||
stateFoldInRecord = 0x0200,
|
||||
stateFoldInPreprocessorLevelMask = 0x00FF,
|
||||
stateInAsm = 0x1000,
|
||||
stateInProperty = 0x2000,
|
||||
stateInExport = 0x4000,
|
||||
stateFoldInPreprocessor = 0x0100,
|
||||
stateFoldInRecord = 0x0200,
|
||||
stateFoldInPreprocessorLevelMask = 0x00FF,
|
||||
stateFoldMaskAll = 0x0FFF
|
||||
};
|
||||
|
||||
@ -190,11 +193,11 @@ static void ClassifyPascalWord(WordList *keywordlists[], StyleContext &sc, int &
|
||||
ignoreKeyword = true;
|
||||
} else if (!(curLineState & stateInExport) && strcmp(s, "name") == 0) {
|
||||
ignoreKeyword = true;
|
||||
} else if (!(curLineState & stateInProperty) &&
|
||||
(strcmp(s, "read") == 0 || strcmp(s, "write") == 0 ||
|
||||
strcmp(s, "default") == 0 || strcmp(s, "nodefault") == 0 ||
|
||||
strcmp(s, "stored") == 0 || strcmp(s, "implements") == 0 ||
|
||||
strcmp(s, "readonly") == 0 || strcmp(s, "writeonly") == 0 ||
|
||||
} else if (!(curLineState & stateInProperty) &&
|
||||
(strcmp(s, "read") == 0 || strcmp(s, "write") == 0 ||
|
||||
strcmp(s, "default") == 0 || strcmp(s, "nodefault") == 0 ||
|
||||
strcmp(s, "stored") == 0 || strcmp(s, "implements") == 0 ||
|
||||
strcmp(s, "readonly") == 0 || strcmp(s, "writeonly") == 0 ||
|
||||
strcmp(s, "add") == 0 || strcmp(s, "remove") == 0)) {
|
||||
ignoreKeyword = true;
|
||||
}
|
||||
@ -367,7 +370,7 @@ static void SetFoldInPreprocessorLevelFlag(int &lineFoldStateCurrent, unsigned i
|
||||
lineFoldStateCurrent |= nestLevel & stateFoldInPreprocessorLevelMask;
|
||||
}
|
||||
|
||||
static void ClassifyPascalPreprocessorFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,
|
||||
static void ClassifyPascalPreprocessorFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,
|
||||
unsigned int startPos, Accessor &styler) {
|
||||
CharacterSet setWord(CharacterSet::setAlpha);
|
||||
|
||||
@ -376,17 +379,17 @@ static void ClassifyPascalPreprocessorFoldPoint(int &levelCurrent, int &lineFold
|
||||
|
||||
unsigned int nestLevel = GetFoldInPreprocessorLevelFlag(lineFoldStateCurrent);
|
||||
|
||||
if (strcmp(s, "if") == 0 ||
|
||||
strcmp(s, "ifdef") == 0 ||
|
||||
strcmp(s, "ifndef") == 0 ||
|
||||
strcmp(s, "ifopt") == 0 ||
|
||||
if (strcmp(s, "if") == 0 ||
|
||||
strcmp(s, "ifdef") == 0 ||
|
||||
strcmp(s, "ifndef") == 0 ||
|
||||
strcmp(s, "ifopt") == 0 ||
|
||||
strcmp(s, "region") == 0) {
|
||||
nestLevel++;
|
||||
SetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);
|
||||
lineFoldStateCurrent |= stateFoldInPreprocessor;
|
||||
levelCurrent++;
|
||||
} else if (strcmp(s, "endif") == 0 ||
|
||||
strcmp(s, "ifend") == 0 ||
|
||||
} else if (strcmp(s, "endif") == 0 ||
|
||||
strcmp(s, "ifend") == 0 ||
|
||||
strcmp(s, "endregion") == 0) {
|
||||
nestLevel--;
|
||||
SetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel);
|
||||
@ -400,12 +403,12 @@ static void ClassifyPascalPreprocessorFoldPoint(int &levelCurrent, int &lineFold
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int SkipWhiteSpace(unsigned int currentPos, unsigned int endPos,
|
||||
static unsigned int SkipWhiteSpace(unsigned int currentPos, unsigned int endPos,
|
||||
Accessor &styler, bool includeChars = false) {
|
||||
CharacterSet setWord(CharacterSet::setAlphaNum, "_");
|
||||
unsigned int j = currentPos + 1;
|
||||
char ch = styler.SafeGetCharAt(j);
|
||||
while ((j < endPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' ||
|
||||
while ((j < endPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' ||
|
||||
IsStreamCommentStyle(styler.StyleAt(j)) || (includeChars && setWord.Contains(ch)))) {
|
||||
j++;
|
||||
ch = styler.SafeGetCharAt(j);
|
||||
@ -413,8 +416,8 @@ static unsigned int SkipWhiteSpace(unsigned int currentPos, unsigned int endPos,
|
||||
return j;
|
||||
}
|
||||
|
||||
static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,
|
||||
int startPos, unsigned int endPos,
|
||||
static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent,
|
||||
int startPos, unsigned int endPos,
|
||||
unsigned int lastStart, unsigned int currentPos, Accessor &styler) {
|
||||
char s[100];
|
||||
GetRangeLowered(lastStart, currentPos, styler, s, sizeof(s));
|
||||
@ -422,9 +425,9 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur
|
||||
if (strcmp(s, "record") == 0) {
|
||||
lineFoldStateCurrent |= stateFoldInRecord;
|
||||
levelCurrent++;
|
||||
} else if (strcmp(s, "begin") == 0 ||
|
||||
strcmp(s, "asm") == 0 ||
|
||||
strcmp(s, "try") == 0 ||
|
||||
} else if (strcmp(s, "begin") == 0 ||
|
||||
strcmp(s, "asm") == 0 ||
|
||||
strcmp(s, "try") == 0 ||
|
||||
(strcmp(s, "case") == 0 && !(lineFoldStateCurrent & stateFoldInRecord))) {
|
||||
levelCurrent++;
|
||||
} else if (strcmp(s, "class") == 0 || strcmp(s, "object") == 0) {
|
||||
@ -436,13 +439,13 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur
|
||||
CharacterSet setWord(CharacterSet::setAlphaNum, "_");
|
||||
|
||||
if (styler.SafeGetCharAt(j) == ';') {
|
||||
// Handle forward class declarations ("type TMyClass = class;")
|
||||
// Handle forward class declarations ("type TMyClass = class;")
|
||||
// and object method declarations ("TNotifyEvent = procedure(Sender: TObject) of object;")
|
||||
ignoreKeyword = true;
|
||||
} else if (strcmp(s, "class") == 0) {
|
||||
// "class" keyword has a few more special cases...
|
||||
if (styler.SafeGetCharAt(j) == '(') {
|
||||
// Handle simplified complete class declarations ("type TMyClass = class(TObject);")
|
||||
// Handle simplified complete class declarations ("type TMyClass = class(TObject);")
|
||||
j = SkipWhiteSpace(j, endPos, styler, true);
|
||||
if (j < endPos && styler.SafeGetCharAt(j) == ')') {
|
||||
j = SkipWhiteSpace(j, endPos, styler);
|
||||
@ -454,11 +457,11 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur
|
||||
char s2[11]; // Size of the longest possible keyword + one additional character + null
|
||||
GetForwardRangeLowered(j, setWord, styler, s2, sizeof(s2));
|
||||
|
||||
if (strcmp(s2, "procedure") == 0 ||
|
||||
strcmp(s2, "function") == 0 ||
|
||||
strcmp(s2, "of") == 0 ||
|
||||
strcmp(s2, "var") == 0 ||
|
||||
strcmp(s2, "property") == 0 ||
|
||||
if (strcmp(s2, "procedure") == 0 ||
|
||||
strcmp(s2, "function") == 0 ||
|
||||
strcmp(s2, "of") == 0 ||
|
||||
strcmp(s2, "var") == 0 ||
|
||||
strcmp(s2, "property") == 0 ||
|
||||
strcmp(s2, "operator") == 0) {
|
||||
ignoreKeyword = true;
|
||||
}
|
||||
@ -473,7 +476,7 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur
|
||||
bool ignoreKeyword = true;
|
||||
int j = lastStart - 1;
|
||||
char ch = styler.SafeGetCharAt(j);
|
||||
while ((j >= startPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' ||
|
||||
while ((j >= startPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' ||
|
||||
IsStreamCommentStyle(styler.StyleAt(j)))) {
|
||||
j--;
|
||||
ch = styler.SafeGetCharAt(j);
|
||||
@ -539,7 +542,7 @@ static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, Word
|
||||
if (foldPreprocessor) {
|
||||
if (style == SCE_PAS_PREPROCESSOR && ch == '{' && chNext == '$') {
|
||||
ClassifyPascalPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 2, styler);
|
||||
} else if (style == SCE_PAS_PREPROCESSOR2 && ch == '(' && chNext == '*'
|
||||
} else if (style == SCE_PAS_PREPROCESSOR2 && ch == '(' && chNext == '*'
|
||||
&& styler.SafeGetCharAt(i + 2) == '$') {
|
||||
ClassifyPascalPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 3, styler);
|
||||
}
|
@ -8,19 +8,22 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -1181,18 +1184,38 @@ static bool IsCommentLine(int line, Accessor &styler) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IsPackageLine(int line, Accessor &styler) {
|
||||
int pos = styler.LineStart(line);
|
||||
int style = styler.StyleAt(pos);
|
||||
if (style == SCE_PL_WORD && styler.Match(pos, "package")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int PodHeadingLevel(int pos, Accessor &styler) {
|
||||
int lvl = static_cast<unsigned char>(styler.SafeGetCharAt(pos + 5));
|
||||
if (lvl >= '1' && lvl <= '4') {
|
||||
return lvl - '0';
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define PERL_HEADFOLD_SHIFT 4
|
||||
#define PERL_HEADFOLD_MASK 0xF0
|
||||
|
||||
static void FoldPerlDoc(unsigned int startPos, int length, int, WordList *[],
|
||||
Accessor &styler) {
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
// Custom folding of POD and packages
|
||||
|
||||
// property fold.perl.pod
|
||||
// Enable folding Pod blocks when using the Perl lexer.
|
||||
// property fold.perl.pod
|
||||
// Enable folding Pod blocks when using the Perl lexer.
|
||||
bool foldPOD = styler.GetPropertyInt("fold.perl.pod", 1) != 0;
|
||||
|
||||
// property fold.perl.package
|
||||
// Enable folding packages when using the Perl lexer.
|
||||
// property fold.perl.package
|
||||
// Enable folding packages when using the Perl lexer.
|
||||
bool foldPackage = styler.GetPropertyInt("fold.perl.package", 1) != 0;
|
||||
|
||||
unsigned int endPos = startPos + length;
|
||||
@ -1207,7 +1230,7 @@ static void FoldPerlDoc(unsigned int startPos, int length, int, WordList *[],
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
// Used at end of line to determine if the line was a package definition
|
||||
bool isPackageLine = false;
|
||||
bool isPodHeading = false;
|
||||
int podHeading = 0;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
@ -1222,52 +1245,61 @@ static void FoldPerlDoc(unsigned int startPos, int length, int, WordList *[],
|
||||
&& IsCommentLine(lineCurrent + 1, styler))
|
||||
levelCurrent++;
|
||||
else if (IsCommentLine(lineCurrent - 1, styler)
|
||||
&& !IsCommentLine(lineCurrent+1, styler))
|
||||
&& !IsCommentLine(lineCurrent + 1, styler))
|
||||
levelCurrent--;
|
||||
}
|
||||
// {} [] block folding
|
||||
if (style == SCE_PL_OPERATOR) {
|
||||
if (ch == '{') {
|
||||
levelCurrent++;
|
||||
} else if (ch == '}') {
|
||||
levelCurrent--;
|
||||
}
|
||||
if (ch == '[') {
|
||||
levelCurrent++;
|
||||
} else if (ch == ']') {
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
// Custom POD folding
|
||||
// POD folding
|
||||
if (foldPOD && atLineStart) {
|
||||
int stylePrevCh = (i) ? styler.StyleAt(i - 1):SCE_PL_DEFAULT;
|
||||
if (style == SCE_PL_POD) {
|
||||
if (stylePrevCh != SCE_PL_POD && stylePrevCh != SCE_PL_POD_VERB)
|
||||
levelCurrent++;
|
||||
else if (styler.Match(i, "=cut"))
|
||||
levelCurrent--;
|
||||
levelCurrent = (levelCurrent & ~PERL_HEADFOLD_MASK) - 1;
|
||||
else if (styler.Match(i, "=head"))
|
||||
isPodHeading = true;
|
||||
podHeading = PodHeadingLevel(i, styler);
|
||||
} else if (style == SCE_PL_DATASECTION) {
|
||||
if (ch == '=' && isascii(chNext) && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE)
|
||||
levelCurrent++;
|
||||
else if (styler.Match(i, "=cut") && levelCurrent > SC_FOLDLEVELBASE)
|
||||
levelCurrent--;
|
||||
levelCurrent = (levelCurrent & ~PERL_HEADFOLD_MASK) - 1;
|
||||
else if (styler.Match(i, "=head"))
|
||||
isPodHeading = true;
|
||||
podHeading = PodHeadingLevel(i, styler);
|
||||
// if package used or unclosed brace, level > SC_FOLDLEVELBASE!
|
||||
// reset needed as level test is vs. SC_FOLDLEVELBASE
|
||||
else if (styler.Match(i, "__END__"))
|
||||
else if (stylePrevCh != SCE_PL_DATASECTION)
|
||||
levelCurrent = SC_FOLDLEVELBASE;
|
||||
}
|
||||
}
|
||||
// Custom package folding
|
||||
// package folding
|
||||
if (foldPackage && atLineStart) {
|
||||
if (style == SCE_PL_WORD && styler.Match(i, "package")) {
|
||||
if (IsPackageLine(lineCurrent, styler)
|
||||
&& !IsPackageLine(lineCurrent + 1, styler))
|
||||
isPackageLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (atEOL) {
|
||||
int lev = levelPrev;
|
||||
if (isPodHeading) {
|
||||
lev = levelPrev - 1;
|
||||
// POD headings occupy bits 7-4, leaving some breathing room for
|
||||
// non-standard practice -- POD sections stuck in blocks, etc.
|
||||
if (podHeading > 0) {
|
||||
levelCurrent = (lev & ~PERL_HEADFOLD_MASK) | (podHeading << PERL_HEADFOLD_SHIFT);
|
||||
lev = levelCurrent - 1;
|
||||
lev |= SC_FOLDLEVELHEADERFLAG;
|
||||
isPodHeading = false;
|
||||
podHeading = 0;
|
||||
}
|
||||
// Check if line was a package declaration
|
||||
// because packages need "special" treatment
|
@ -3,42 +3,46 @@
|
||||
// PowerPro utility, written by Bruce Switzer, is available from http://powerpro.webeddie.com
|
||||
// PowerPro lexer is written by Christopher Bean (cbean@cb-software.net)
|
||||
//
|
||||
// Lexer code heavily borrowed from:
|
||||
// Lexer code heavily borrowed from:
|
||||
// LexAU3.cxx by Jos van der Zande
|
||||
// LexCPP.cxx by Neil Hodgson
|
||||
// LexVB.cxx by Neil Hodgson
|
||||
//
|
||||
// Changes:
|
||||
// 2008-10-25 - Initial release
|
||||
// 2008-10-26 - Changed how <name> is hilighted in 'function <name>' so that
|
||||
// 2008-10-26 - Changed how <name> is hilighted in 'function <name>' so that
|
||||
// local isFunction = "" and local functions = "" don't get falsely highlighted
|
||||
// 2008-12-14 - Added bounds checking for szKeyword and szDo
|
||||
// - Replaced SetOfCharacters with CharacterSet
|
||||
// - Made sure that CharacterSet::Contains is passed only positive values
|
||||
// - Made sure that the return value of Accessor::SafeGetCharAt is positive before
|
||||
// - Made sure that the return value of Accessor::SafeGetCharAt is positive before
|
||||
// passsing to functions that require positive values like isspacechar()
|
||||
// - Removed unused visibleChars processing from ColourisePowerProDoc()
|
||||
// - Fixed bug with folding logic where line continuations didn't end where
|
||||
// - Fixed bug with folding logic where line continuations didn't end where
|
||||
// they were supposed to
|
||||
// - Moved all helper functions to the top of the file
|
||||
//
|
||||
// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
@ -72,13 +76,13 @@ static bool IsContinuationLine(unsigned int szLine, Accessor &styler)
|
||||
}
|
||||
|
||||
// Routine to find first none space on the current line and return its Style
|
||||
// needed for comment lines not starting on pos 1
|
||||
// needed for comment lines not starting on pos 1
|
||||
static int GetStyleFirstWord(unsigned int szLine, Accessor &styler)
|
||||
{
|
||||
int nsPos = styler.LineStart(szLine);
|
||||
int nePos = styler.LineStart(szLine+1) - 1;
|
||||
char ch = styler.SafeGetCharAt(nsPos);
|
||||
|
||||
|
||||
while (ch > 0 && isspacechar(ch) && nsPos < nePos)
|
||||
{
|
||||
nsPos++; // skip to next char
|
||||
@ -91,10 +95,10 @@ static int GetStyleFirstWord(unsigned int szLine, Accessor &styler)
|
||||
//returns true if there is a function to highlight
|
||||
//used to highlight <name> in 'function <name>'
|
||||
static bool HasFunction(Accessor &styler, unsigned int currentPos) {
|
||||
|
||||
|
||||
//check for presence of 'function '
|
||||
return (styler.SafeGetCharAt(currentPos) == ' '
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-1)) == 'n'
|
||||
return (styler.SafeGetCharAt(currentPos) == ' '
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-1)) == 'n'
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-2)) == 'o'
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-3)) == 'i'
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-4)) == 't'
|
||||
@ -103,7 +107,7 @@ static bool HasFunction(Accessor &styler, unsigned int currentPos) {
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-7)) == 'u'
|
||||
&& tolower(styler.SafeGetCharAt(currentPos-8)) == 'f'
|
||||
//only allow 'function ' to appear at the beginning of a line
|
||||
&& (styler.SafeGetCharAt(currentPos-9) == '\n'
|
||||
&& (styler.SafeGetCharAt(currentPos-9) == '\n'
|
||||
|| styler.SafeGetCharAt(currentPos-9) == '\r'
|
||||
|| (styler.SafeGetCharAt(currentPos -9, '\0')) == '\0') //is the first line
|
||||
);
|
||||
@ -116,22 +120,22 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2];
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
|
||||
//define the character sets
|
||||
|
||||
//define the character sets
|
||||
CharacterSet setWordStart(CharacterSet::setAlpha, "_@", 0x80, true);
|
||||
CharacterSet setWord(CharacterSet::setAlphaNum, "._", 0x80, true);
|
||||
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
char s_save[100]; //for last line highlighting
|
||||
|
||||
|
||||
for (; sc.More(); sc.Forward()) {
|
||||
|
||||
|
||||
// **********************************************
|
||||
// save the total current word for eof processing
|
||||
char s[100];
|
||||
sc.GetCurrentLowered(s, sizeof(s));
|
||||
|
||||
if ((sc.ch > 0) && setWord.Contains(sc.ch))
|
||||
|
||||
if ((sc.ch > 0) && setWord.Contains(sc.ch))
|
||||
{
|
||||
strcpy(s_save,s);
|
||||
int tp = strlen(s_save);
|
||||
@ -156,12 +160,12 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl
|
||||
case SCE_POWERPRO_OPERATOR:
|
||||
sc.SetState(SCE_POWERPRO_DEFAULT);
|
||||
break;
|
||||
|
||||
|
||||
case SCE_POWERPRO_NUMBER:
|
||||
|
||||
if (!IsADigit(sc.ch))
|
||||
sc.SetState(SCE_POWERPRO_DEFAULT);
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case SCE_POWERPRO_IDENTIFIER:
|
||||
@ -256,7 +260,7 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case SCE_POWERPRO_FUNCTION:
|
||||
if (sc.ch == '\r' || sc.ch == '\n' || sc.ch == ' ' || sc.ch == '(') {
|
||||
sc.SetState(SCE_POWERPRO_DEFAULT);
|
||||
@ -277,12 +281,12 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl
|
||||
sc.Forward();
|
||||
}
|
||||
} else if (HasFunction(styler, sc.currentPos)) { //highlight <name> in 'function <name>'
|
||||
sc.SetState(SCE_POWERPRO_FUNCTION);
|
||||
sc.SetState(SCE_POWERPRO_FUNCTION);
|
||||
} else if (sc.ch == '@' && sc.atLineStart) { //alternate function definition [label]
|
||||
sc.SetState(SCE_POWERPRO_FUNCTION);
|
||||
} else if ((sc.ch > 0) && (setWordStart.Contains(sc.ch) || (sc.ch == '?'))) {
|
||||
sc.SetState(SCE_POWERPRO_IDENTIFIER);
|
||||
} else if (sc.Match(";;+")) {
|
||||
} else if (sc.Match(";;+")) {
|
||||
sc.SetState(SCE_POWERPRO_LINECONTINUE);
|
||||
} else if (sc.Match('/', '*')) {
|
||||
sc.SetState(SCE_POWERPRO_COMMENTBLOCK);
|
||||
@ -304,7 +308,7 @@ static void ColourisePowerProDoc(unsigned int startPos, int length, int initStyl
|
||||
}
|
||||
|
||||
//*************************************
|
||||
// Colourize the last word correctly
|
||||
// Colourize the last word correctly
|
||||
//*************************************
|
||||
if (sc.state == SCE_POWERPRO_IDENTIFIER)
|
||||
{
|
||||
@ -345,7 +349,7 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldInComment = styler.GetPropertyInt("fold.comment") == 2;
|
||||
bool foldCompact = true;
|
||||
|
||||
|
||||
// Backtrack to previous line in case need to fix its fold status
|
||||
int lineCurrent = styler.GetLine(startPos);
|
||||
if (startPos > 0) {
|
||||
@ -355,10 +359,10 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
startPos = styler.LineStart(lineCurrent);
|
||||
}
|
||||
}
|
||||
// vars for style of previous/current/next lines
|
||||
// vars for style of previous/current/next lines
|
||||
int style = GetStyleFirstWord(lineCurrent,styler);
|
||||
int stylePrev = 0;
|
||||
|
||||
|
||||
// find the first previous line without continuation character at the end
|
||||
while ((lineCurrent > 0 && IsContinuationLine(lineCurrent,styler)) ||
|
||||
(lineCurrent > 1 && IsContinuationLine(lineCurrent-1,styler))) {
|
||||
@ -371,42 +375,42 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
// vars for getting first word to check for keywords
|
||||
bool FirstWordStart = false;
|
||||
bool FirstWordEnd = false;
|
||||
|
||||
|
||||
const unsigned int KEYWORD_MAX = 10;
|
||||
char szKeyword[KEYWORD_MAX]="";
|
||||
unsigned int szKeywordlen = 0;
|
||||
|
||||
|
||||
char szDo[3]="";
|
||||
int szDolen = 0;
|
||||
bool DoFoundLast = false;
|
||||
|
||||
|
||||
// var for indentlevel
|
||||
int levelCurrent = SC_FOLDLEVELBASE;
|
||||
if (lineCurrent > 0) {
|
||||
levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
|
||||
}
|
||||
int levelNext = levelCurrent;
|
||||
|
||||
|
||||
int visibleChars = 0;
|
||||
int functionCount = 0;
|
||||
|
||||
|
||||
char chNext = styler.SafeGetCharAt(startPos);
|
||||
char chPrev = '\0';
|
||||
char chPrevPrev = '\0';
|
||||
char chPrevPrevPrev = '\0';
|
||||
|
||||
|
||||
for (int i = startPos; i < endPos; i++) {
|
||||
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
|
||||
|
||||
if ((ch > 0) && setWord.Contains(ch)) {
|
||||
visibleChars++;
|
||||
}
|
||||
|
||||
|
||||
// get the syle for the current character neede to check in comment
|
||||
int stylech = styler.StyleAt(i);
|
||||
|
||||
|
||||
// get first word for the line for indent check max 9 characters
|
||||
if (FirstWordStart && (!(FirstWordEnd))) {
|
||||
if ((ch > 0) && !setWord.Contains(ch)) {
|
||||
@ -417,8 +421,8 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
szKeyword[szKeywordlen] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
// start the capture of the first word
|
||||
|
||||
// start the capture of the first word
|
||||
if (!(FirstWordStart)) {
|
||||
if ((ch > 0) && (setWord.Contains(ch) || setWordStart.Contains(ch) || ch == ';' || ch == '/')) {
|
||||
FirstWordStart = true;
|
||||
@ -433,7 +437,7 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
if (DoFoundLast) {
|
||||
if (DoFoundLast && (ch > 0) && setWord.Contains(ch)) {
|
||||
DoFoundLast = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// find out if the word "do" is the last on a "if" line
|
||||
if (FirstWordEnd && strcmp(szKeyword,"if") == 0) {
|
||||
@ -452,53 +456,53 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
}
|
||||
}
|
||||
|
||||
// End of Line found so process the information
|
||||
// End of Line found so process the information
|
||||
if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endPos)) {
|
||||
|
||||
|
||||
// **************************
|
||||
// Folding logic for Keywords
|
||||
// **************************
|
||||
|
||||
|
||||
// if a keyword is found on the current line and the line doesn't end with ;;+ (continuation)
|
||||
// and we are not inside a commentblock.
|
||||
if (szKeywordlen > 0 &&
|
||||
(!(chPrev == '+' && chPrevPrev == ';' && chPrevPrevPrev ==';')) &&
|
||||
if (szKeywordlen > 0 &&
|
||||
(!(chPrev == '+' && chPrevPrev == ';' && chPrevPrevPrev ==';')) &&
|
||||
((!(IsStreamCommentStyle(style)) || foldInComment)) ) {
|
||||
|
||||
|
||||
// only fold "if" last keyword is "then" (else its a one line if)
|
||||
if (strcmp(szKeyword,"if") == 0 && DoFoundLast) {
|
||||
levelNext++;
|
||||
}
|
||||
// create new fold for these words
|
||||
// create new fold for these words
|
||||
if (strcmp(szKeyword,"for") == 0) {
|
||||
levelNext++;
|
||||
}
|
||||
|
||||
|
||||
//handle folding for functions/labels
|
||||
//Note: Functions and labels don't have an explicit end like [end function]
|
||||
// 1. functions/labels end at the start of another function
|
||||
// 2. functions/labels end at the end of the file
|
||||
if ((strcmp(szKeyword,"function") == 0) || (szKeywordlen > 0 && szKeyword[0] == '@')) {
|
||||
if (isFoldingAll) { //if we're folding the whole document (recursivly by lua script)
|
||||
|
||||
|
||||
if (functionCount > 0) {
|
||||
levelCurrent--;
|
||||
} else {
|
||||
levelNext++;
|
||||
}
|
||||
functionCount++;
|
||||
|
||||
functionCount++;
|
||||
|
||||
} else { //if just folding a small piece (by clicking on the minus sign next to the word)
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// end the fold for these words before the current line
|
||||
if (strcmp(szKeyword,"endif") == 0 || strcmp(szKeyword,"endfor") == 0) {
|
||||
levelNext--;
|
||||
levelCurrent--;
|
||||
}
|
||||
// end the fold for these words before the current line and Start new fold
|
||||
// end the fold for these words before the current line and Start new fold
|
||||
if (strcmp(szKeyword,"else") == 0 || strcmp(szKeyword,"elseif") == 0 ) {
|
||||
levelCurrent--;
|
||||
}
|
||||
@ -513,16 +517,16 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
// Start of a comment block
|
||||
if (!(stylePrev==style) && IsStreamCommentStyle(styleNext) && styleNext==style) {
|
||||
levelNext++;
|
||||
}
|
||||
}
|
||||
// fold till the last line for normal comment lines
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
&& !(styleNext == SCE_POWERPRO_COMMENTLINE)
|
||||
&& stylePrev == SCE_POWERPRO_COMMENTLINE
|
||||
&& stylePrev == SCE_POWERPRO_COMMENTLINE
|
||||
&& style == SCE_POWERPRO_COMMENTLINE) {
|
||||
levelNext--;
|
||||
}
|
||||
// fold till the one but last line for Blockcomment lines
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
else if (IsStreamCommentStyle(stylePrev)
|
||||
&& !(styleNext == SCE_POWERPRO_COMMENTBLOCK)
|
||||
&& style == SCE_POWERPRO_COMMENTBLOCK) {
|
||||
levelNext--;
|
||||
@ -547,7 +551,7 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
style = styleNext;
|
||||
levelCurrent = levelNext;
|
||||
visibleChars = 0;
|
||||
|
||||
|
||||
// if the last characters are ;;+ then don't reset since the line continues on the next line.
|
||||
if (chPrev == '+' && chPrevPrev == ';' && chPrevPrevPrev == ';') {
|
||||
//do nothing
|
||||
@ -573,7 +577,7 @@ static void FoldPowerProDoc(unsigned int startPos, int length, int, WordList *[]
|
||||
}
|
||||
}
|
||||
|
||||
//close folds on the last line - without this a 'phantom'
|
||||
//close folds on the last line - without this a 'phantom'
|
||||
//fold can appear when an open fold is on the last line
|
||||
//this can occur because functions and labels don't have an explicit end
|
||||
if (lineCurrent >= lastLine) {
|
@ -7,19 +7,23 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#include "PropSet.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "KeyWords.h"
|
||||
#include "ILexer.h"
|
||||
#include "Scintilla.h"
|
||||
#include "SciLexer.h"
|
||||
|
||||
#include "PropSetSimple.h"
|
||||
#include "WordList.h"
|
||||
#include "LexAccessor.h"
|
||||
#include "Accessor.h"
|
||||
#include "StyleContext.h"
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
@ -35,6 +39,8 @@ static void ColourisePowerShellDoc(unsigned int startPos, int length, int initSt
|
||||
WordList &keywords = *keywordlists[0];
|
||||
WordList &keywords2 = *keywordlists[1];
|
||||
WordList &keywords3 = *keywordlists[2];
|
||||
WordList &keywords4 = *keywordlists[3];
|
||||
WordList &keywords5 = *keywordlists[4];
|
||||
|
||||
styler.StartAt(startPos);
|
||||
|
||||
@ -46,6 +52,10 @@ static void ColourisePowerShellDoc(unsigned int startPos, int length, int initSt
|
||||
if (sc.atLineEnd) {
|
||||
sc.SetState(SCE_POWERSHELL_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_POWERSHELL_COMMENTSTREAM) {
|
||||
if (sc.ch == '>' && sc.chPrev == '#') {
|
||||
sc.ForwardSetState(SCE_POWERSHELL_DEFAULT);
|
||||
}
|
||||
} else if (sc.state == SCE_POWERSHELL_STRING) {
|
||||
// This is a doubles quotes string
|
||||
if (sc.ch == '\"') {
|
||||
@ -79,6 +89,10 @@ static void ColourisePowerShellDoc(unsigned int startPos, int length, int initSt
|
||||
sc.ChangeState(SCE_POWERSHELL_CMDLET);
|
||||
} else if (keywords3.InList(s)) {
|
||||
sc.ChangeState(SCE_POWERSHELL_ALIAS);
|
||||
} else if (keywords4.InList(s)) {
|
||||
sc.ChangeState(SCE_POWERSHELL_FUNCTION);
|
||||
} else if (keywords5.InList(s)) {
|
||||
sc.ChangeState(SCE_POWERSHELL_USER1);
|
||||
}
|
||||
sc.SetState(SCE_POWERSHELL_DEFAULT);
|
||||
}
|
||||
@ -88,6 +102,8 @@ static void ColourisePowerShellDoc(unsigned int startPos, int length, int initSt
|
||||
if (sc.state == SCE_POWERSHELL_DEFAULT) {
|
||||
if (sc.ch == '#') {
|
||||
sc.SetState(SCE_POWERSHELL_COMMENT);
|
||||
} else if (sc.ch == '<' && sc.chNext == '#') {
|
||||
sc.SetState(SCE_POWERSHELL_COMMENTSTREAM);
|
||||
} else if (sc.ch == '\"') {
|
||||
sc.SetState(SCE_POWERSHELL_STRING);
|
||||
} else if (sc.ch == '\'') {
|
||||
@ -109,8 +125,9 @@ static void ColourisePowerShellDoc(unsigned int startPos, int length, int initSt
|
||||
// Store both the current line's fold level and the next lines in the
|
||||
// level store to make it easy to pick up with each increment
|
||||
// and to make it possible to fiddle the current level for "} else {".
|
||||
static void FoldPowerShellDoc(unsigned int startPos, int length, int,
|
||||
static void FoldPowerShellDoc(unsigned int startPos, int length, int initStyle,
|
||||
WordList *[], Accessor &styler) {
|
||||
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
|
||||
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
|
||||
bool foldAtElse = styler.GetPropertyInt("fold.at.else", 0) != 0;
|
||||
unsigned int endPos = startPos + length;
|
||||
@ -123,10 +140,12 @@ static void FoldPowerShellDoc(unsigned int startPos, int length, int,
|
||||
int levelNext = levelCurrent;
|
||||
char chNext = styler[startPos];
|
||||
int styleNext = styler.StyleAt(startPos);
|
||||
int style = initStyle;
|
||||
for (unsigned int i = startPos; i < endPos; i++) {
|
||||
char ch = chNext;
|
||||
chNext = styler.SafeGetCharAt(i + 1);
|
||||
int style = styleNext;
|
||||
int stylePrev = style;
|
||||
style = styleNext;
|
||||
styleNext = styler.StyleAt(i + 1);
|
||||
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
|
||||
if (style == SCE_POWERSHELL_OPERATOR) {
|
||||
@ -140,6 +159,12 @@ static void FoldPowerShellDoc(unsigned int startPos, int length, int,
|
||||
} else if (ch == '}') {
|
||||
levelNext--;
|
||||
}
|
||||
} else if (foldComment && style == SCE_POWERSHELL_COMMENTSTREAM) {
|
||||
if (stylePrev != SCE_POWERSHELL_COMMENTSTREAM) {
|
||||
levelNext++;
|
||||
} else if (styleNext != SCE_POWERSHELL_COMMENTSTREAM) {
|
||||
levelNext--;
|
||||
}
|
||||
}
|
||||
if (!IsASpace(ch))
|
||||
visibleChars++;
|
||||
@ -168,6 +193,8 @@ static const char * const powershellWordLists[] = {
|
||||
"Commands",
|
||||
"Cmdlets",
|
||||
"Aliases",
|
||||
"Functions",
|
||||
"User1",
|
||||
0
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user