Upgrade Scintilla from v4.2.0 to v4.4.6

Close #8900, close #9550
This commit is contained in:
Don HO 2021-02-21 05:53:09 +01:00
parent 41cfc7e1d1
commit d7819cf601
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
319 changed files with 20281 additions and 4708 deletions

View File

@ -3,6 +3,11 @@ README for building of Scintilla and SciTE
Scintilla can be built by itself.
To build SciTE, Scintilla must first be built.
Lexers can be either compiled into Scintilla or built separately into a Lexilla
shared library.
A separate Lexilla is the preferred option and will become the only supported
direction in Scintilla 5.0.
See lexilla/src/README for information on building Lexilla.
*** GTK+/Linux version ***
@ -46,6 +51,9 @@ A C++ 17 compiler is required.
Visual Studio 2017 is the development system used for most development
although Mingw-w64 7.1 is also supported.
There are versions of Scintilla with lexers (SciLexer.DLL) and without lexers
(Scintilla.DLL). Make builds both versions.
To build Scintilla, make in the scintilla/win32 directory
cd scintilla\win32
GCC: mingw32-make
@ -65,6 +73,9 @@ Mingw-w64 is known to work. Other compilers will probably not work.
Only Scintilla will build with GTK+ on Windows. SciTE will not work.
Make builds both a static library version of Scintilla with lexers (scintilla.a) and
a shared library without lexers (libscintilla.so or or libscintilla.dll).
To build Scintilla, make in the scintilla/gtk directory
cd scintilla\gtk
mingw32-make
@ -76,8 +87,16 @@ Xcode 9.2 or later may be used to build Scintilla on macOS.
There is no open source version of SciTE for macOS but there is a commercial
version available through the App Store.
To build Scintilla, run xcodebuild in the scintilla/cocoa/ScintillaFramework directory
There are versions of Scintilla.framework with lexers (ScintillaFramework) and
without lexers (Scintilla).
To build Scintilla, run xcodebuild in the scintilla/cocoa/ScintillaFramework or
scintilla/cocoa/Scintilla directory
cd cocoa/Scintilla
or
cd cocoa/ScintillaFramework
xcodebuild
*** Qt version ***

View File

@ -10,22 +10,18 @@
!IFDEF BOOSTPATH
!IFDEF BOOSTREGEXLIBPATH
SOBJS=\
$(SOBJS)\
SRC_OBJS=\
$(SRC_OBJS)\
$(DIR_O)\BoostRegexSearch.obj\
$(DIR_O)\UTF8DocumentIterator.obj
SCILEXOBJS=\
$(SCILEXOBJS)\
$(DIR_O)\BoostRegexSearch.obj\
$(DIR_O)\UTF8DocumentIterator.obj
LOBJS=\
$(LOBJS)\
LEX_OBJS=\
$(LEX_OBJS)\
$(DIR_O)\BoostRegexSearch.obj\
$(DIR_O)\UTF8DocumentIterator.obj
INCLUDEDIRS=$(INCLUDEDIRS) -I$(BOOSTPATH)
INCLUDES=$(INCLUDES) -I$(BOOSTPATH)
CXXFLAGS=$(CXXFLAGS) -DSCI_OWNREGEX
LDFLAGS=$(LDFLAGS) -LIBPATH:$(BOOSTREGEXLIBPATH)

View File

@ -1,7 +1,7 @@
/**
* Scintilla source code edit control
* InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with
* @file InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with
* ScintillaView.
*
* Mike Lischke <mlischke@sun.com>

View File

@ -1,7 +1,7 @@
/**
* Scintilla source code edit control
* InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with
* @file InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with
* ScintillaView.
*
* Mike Lischke <mlischke@sun.com>

View File

@ -2,6 +2,7 @@
/**
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
* @file PlatCocoa.h
*/
#ifndef PLATCOCOA_H

View File

@ -1,6 +1,6 @@
/**
* Scintilla source code edit control
* PlatCocoa.mm - implementation of platform facilities on MacOS X/Cocoa
* @file PlatCocoa.mm - implementation of platform facilities on MacOS X/Cocoa
*
* Written by Mike Lischke
* Based on PlatMacOSX.cxx
@ -27,13 +27,13 @@
#include <memory>
#include <numeric>
#include <dlfcn.h>
#include <sys/time.h>
#import <Foundation/NSGeometry.h>
#import "Platform.h"
#include "StringCopy.h"
#include "XPM.h"
#include "UniConversion.h"
@ -2132,14 +2132,51 @@ void Platform::Assert(const char *c, const char *file, int line) {
//----------------- DynamicLibrary -----------------------------------------------------------------
/**
* Implements the platform specific part of library loading.
*
* @param modulePath The path to the module to load.
* @return A library instance or nullptr if the module could not be found or another problem occurred.
* Platform-specific module loading and access.
* Uses POSIX calls dlopen, dlsym, dlclose.
*/
DynamicLibrary *DynamicLibrary::Load(const char * /* modulePath */) {
// Not implemented.
return nullptr;
class DynamicLibraryImpl : public DynamicLibrary {
protected:
void *m;
public:
explicit DynamicLibraryImpl(const char *modulePath) noexcept {
m = dlopen(modulePath, RTLD_LAZY);
}
// Deleted so DynamicLibraryImpl objects can not be copied.
DynamicLibraryImpl(const DynamicLibraryImpl&) = delete;
DynamicLibraryImpl(DynamicLibraryImpl&&) = delete;
DynamicLibraryImpl&operator=(const DynamicLibraryImpl&) = delete;
DynamicLibraryImpl&operator=(DynamicLibraryImpl&&) = delete;
~DynamicLibraryImpl() override {
if (m)
dlclose(m);
}
// Use dlsym to get a pointer to the relevant function.
Function FindFunction(const char *name) override {
if (m) {
return dlsym(m, name);
} else {
return nullptr;
}
}
bool IsValid() override {
return m != nullptr;
}
};
/**
* Implements the platform specific part of library loading.
*
* @param modulePath The path to the module to load.
* @return A library instance or nullptr if the module could not be found or another problem occurred.
*/
DynamicLibrary *DynamicLibrary::Load(const char *modulePath) {
return static_cast<DynamicLibrary *>(new DynamicLibraryImpl(modulePath));
}
//--------------------------------------------------------------------------------------------------

View File

@ -8,8 +8,8 @@
*
*/
#ifndef _QUARTZ_TEXT_LAYOUT_H
#define _QUARTZ_TEXT_LAYOUT_H
#ifndef QUARTZTEXTLAYOUT_H
#define QUARTZTEXTLAYOUT_H
#include <Cocoa/Cocoa.h>

View File

@ -5,8 +5,8 @@
*
*/
#ifndef _QUARTZ_TEXT_STYLE_H
#define _QUARTZ_TEXT_STYLE_H
#ifndef QUARTZTEXTSTYLE_H
#define QUARTZTEXTSTYLE_H
#include "QuartzTextStyleAttribute.h"

View File

@ -9,8 +9,8 @@
*/
#ifndef _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
#define _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
#ifndef QUARTZTEXTSTYLEATTRIBUTE_H
#define QUARTZTEXTSTYLEATTRIBUTE_H
class QuartzFont {
public:

View File

@ -0,0 +1,24 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.4.6</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 Neil Hodgson. All rights reserved.</string>
</dict>
</plist>

View File

@ -0,0 +1,813 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */; };
282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D424E2D55D00C84BA2 /* InfoBar.mm */; };
282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */; };
282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */; };
282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D724E2D55D00C84BA2 /* PlatCocoa.mm */; };
282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D824E2D55D00C84BA2 /* PlatCocoa.h */; };
282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */; };
282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DA24E2D55D00C84BA2 /* InfoBar.h */; };
282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */; };
282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DC24E2D55D00C84BA2 /* ScintillaView.mm */; };
282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */; };
282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DE24E2D55D00C84BA2 /* ScintillaView.h */; };
2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936EB24E2D58400C84BA2 /* DBCS.cxx */; };
2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */; };
2829373024E2D58800C84BA2 /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936ED24E2D58400C84BA2 /* CallTip.h */; };
2829373124E2D58800C84BA2 /* PositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EE24E2D58400C84BA2 /* PositionCache.h */; };
2829373224E2D58800C84BA2 /* KeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EF24E2D58400C84BA2 /* KeyMap.h */; };
2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F024E2D58400C84BA2 /* LineMarker.cxx */; };
2829373424E2D58800C84BA2 /* Catalogue.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F124E2D58400C84BA2 /* Catalogue.h */; };
2829373524E2D58800C84BA2 /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F224E2D58400C84BA2 /* Style.h */; };
2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F324E2D58400C84BA2 /* UniqueString.cxx */; };
2829373724E2D58800C84BA2 /* RunStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F424E2D58400C84BA2 /* RunStyles.h */; };
2829373824E2D58800C84BA2 /* RESearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F524E2D58400C84BA2 /* RESearch.h */; };
2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F624E2D58400C84BA2 /* Indicator.cxx */; };
2829373A24E2D58800C84BA2 /* MarginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F724E2D58400C84BA2 /* MarginView.h */; };
2829373B24E2D58800C84BA2 /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F824E2D58400C84BA2 /* Position.h */; };
2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F924E2D58400C84BA2 /* CaseFolder.cxx */; };
2829373D24E2D58800C84BA2 /* PerLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FA24E2D58400C84BA2 /* PerLine.h */; };
2829373E24E2D58800C84BA2 /* Indicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FB24E2D58400C84BA2 /* Indicator.h */; };
2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FC24E2D58400C84BA2 /* UniConversion.h */; };
2829374024E2D58800C84BA2 /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936FD24E2D58400C84BA2 /* XPM.cxx */; };
2829374124E2D58800C84BA2 /* CharClassify.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FE24E2D58400C84BA2 /* CharClassify.h */; };
2829374224E2D58800C84BA2 /* Decoration.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FF24E2D58400C84BA2 /* Decoration.h */; };
2829374324E2D58800C84BA2 /* ExternalLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370024E2D58400C84BA2 /* ExternalLexer.cxx */; };
2829374424E2D58800C84BA2 /* IntegerRectangle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370124E2D58500C84BA2 /* IntegerRectangle.h */; };
2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370224E2D58500C84BA2 /* PositionCache.cxx */; };
2829374624E2D58800C84BA2 /* Catalogue.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370324E2D58500C84BA2 /* Catalogue.cxx */; };
2829374724E2D58800C84BA2 /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370424E2D58500C84BA2 /* Style.cxx */; };
2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370524E2D58500C84BA2 /* RESearch.cxx */; };
2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370624E2D58500C84BA2 /* CallTip.cxx */; };
2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370724E2D58500C84BA2 /* ContractionState.h */; };
2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370824E2D58500C84BA2 /* Decoration.cxx */; };
2829374C24E2D58800C84BA2 /* DBCS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370924E2D58500C84BA2 /* DBCS.h */; };
2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370A24E2D58500C84BA2 /* AutoComplete.h */; };
2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370B24E2D58500C84BA2 /* KeyMap.cxx */; };
2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370C24E2D58500C84BA2 /* ViewStyle.h */; };
2829375024E2D58800C84BA2 /* Selection.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370D24E2D58500C84BA2 /* Selection.cxx */; };
2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370E24E2D58500C84BA2 /* ContractionState.cxx */; };
2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370F24E2D58500C84BA2 /* UniConversion.cxx */; };
2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371024E2D58500C84BA2 /* PerLine.cxx */; };
2829375424E2D58800C84BA2 /* SparseVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371124E2D58500C84BA2 /* SparseVector.h */; };
2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371224E2D58500C84BA2 /* EditModel.cxx */; };
2829375624E2D58800C84BA2 /* EditView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371324E2D58600C84BA2 /* EditView.h */; };
2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371424E2D58600C84BA2 /* CaseConvert.cxx */; };
2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371524E2D58600C84BA2 /* CharClassify.cxx */; };
2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371624E2D58600C84BA2 /* AutoComplete.cxx */; };
2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371724E2D58600C84BA2 /* ViewStyle.cxx */; };
2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371824E2D58600C84BA2 /* MarginView.cxx */; };
2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371924E2D58600C84BA2 /* CellBuffer.h */; };
2829375D24E2D58800C84BA2 /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371A24E2D58600C84BA2 /* Document.cxx */; };
2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371B24E2D58600C84BA2 /* LineMarker.h */; };
2829375F24E2D58800C84BA2 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371C24E2D58600C84BA2 /* Editor.h */; };
2829376024E2D58800C84BA2 /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371D24E2D58600C84BA2 /* XPM.h */; };
2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371E24E2D58600C84BA2 /* ScintillaBase.h */; };
2829376224E2D58800C84BA2 /* Partitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371F24E2D58700C84BA2 /* Partitioning.h */; };
2829376324E2D58800C84BA2 /* FontQuality.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372024E2D58700C84BA2 /* FontQuality.h */; };
2829376424E2D58800C84BA2 /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372124E2D58700C84BA2 /* SplitVector.h */; };
2829376524E2D58800C84BA2 /* UniqueString.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372224E2D58700C84BA2 /* UniqueString.h */; };
2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372324E2D58700C84BA2 /* CaseConvert.h */; };
2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372424E2D58700C84BA2 /* ScintillaBase.cxx */; };
2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372524E2D58700C84BA2 /* CaseFolder.h */; };
2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372624E2D58700C84BA2 /* CellBuffer.cxx */; };
2829376A24E2D58800C84BA2 /* EditModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372724E2D58700C84BA2 /* EditModel.h */; };
2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372824E2D58700C84BA2 /* Editor.cxx */; };
2829376C24E2D58800C84BA2 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372924E2D58700C84BA2 /* Selection.h */; };
2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372A24E2D58800C84BA2 /* RunStyles.cxx */; };
2829376E24E2D58800C84BA2 /* ExternalLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372B24E2D58800C84BA2 /* ExternalLexer.h */; };
2829376F24E2D58800C84BA2 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372C24E2D58800C84BA2 /* Document.h */; };
2829377024E2D58800C84BA2 /* EditView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372D24E2D58800C84BA2 /* EditView.cxx */; };
2829378D24E2D5C900C84BA2 /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377124E2D5C600C84BA2 /* PropSetSimple.h */; };
2829378E24E2D5C900C84BA2 /* OptionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377224E2D5C600C84BA2 /* OptionSet.h */; };
2829378F24E2D5C900C84BA2 /* PropSetSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377324E2D5C600C84BA2 /* PropSetSimple.cxx */; };
2829379024E2D5C900C84BA2 /* CharacterSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377424E2D5C600C84BA2 /* CharacterSet.cxx */; };
2829379124E2D5C900C84BA2 /* CharacterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377524E2D5C600C84BA2 /* CharacterSet.h */; };
2829379224E2D5C900C84BA2 /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377624E2D5C600C84BA2 /* CharacterCategory.h */; };
2829379324E2D5C900C84BA2 /* LexerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377724E2D5C600C84BA2 /* LexerBase.h */; };
2829379424E2D5C900C84BA2 /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377824E2D5C700C84BA2 /* SparseState.h */; };
2829379524E2D5C900C84BA2 /* LexerNoExceptions.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377924E2D5C700C84BA2 /* LexerNoExceptions.cxx */; };
2829379624E2D5C900C84BA2 /* Accessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377A24E2D5C700C84BA2 /* Accessor.h */; };
2829379724E2D5C900C84BA2 /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377B24E2D5C700C84BA2 /* WordList.h */; };
2829379824E2D5C900C84BA2 /* LexerBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377C24E2D5C700C84BA2 /* LexerBase.cxx */; };
2829379924E2D5C900C84BA2 /* LexerSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829377D24E2D5C700C84BA2 /* LexerSimple.h */; };
2829379A24E2D5C900C84BA2 /* LexerModule.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377E24E2D5C700C84BA2 /* LexerModule.cxx */; };
2829379B24E2D5C900C84BA2 /* DefaultLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829377F24E2D5C700C84BA2 /* DefaultLexer.cxx */; };
2829379C24E2D5C900C84BA2 /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378024E2D5C700C84BA2 /* SubStyles.h */; };
2829379D24E2D5C900C84BA2 /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378124E2D5C700C84BA2 /* StyleContext.h */; };
2829379E24E2D5C900C84BA2 /* WordList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829378224E2D5C700C84BA2 /* WordList.cxx */; };
2829379F24E2D5C900C84BA2 /* LexAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378324E2D5C800C84BA2 /* LexAccessor.h */; };
282937A024E2D5C900C84BA2 /* LexerNoExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378424E2D5C800C84BA2 /* LexerNoExceptions.h */; };
282937A124E2D5C900C84BA2 /* DefaultLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378524E2D5C800C84BA2 /* DefaultLexer.h */; };
282937A224E2D5C900C84BA2 /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829378624E2D5C800C84BA2 /* StyleContext.cxx */; };
282937A324E2D5C900C84BA2 /* Accessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829378724E2D5C800C84BA2 /* Accessor.cxx */; };
282937A424E2D5C900C84BA2 /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829378824E2D5C800C84BA2 /* CharacterCategory.cxx */; };
282937A524E2D5C900C84BA2 /* CatalogueModules.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378924E2D5C800C84BA2 /* CatalogueModules.h */; };
282937A624E2D5C900C84BA2 /* LexerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378A24E2D5C800C84BA2 /* LexerModule.h */; };
282937A724E2D5C900C84BA2 /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829378B24E2D5C800C84BA2 /* StringCopy.h */; };
282937A824E2D5C900C84BA2 /* LexerSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829378C24E2D5C800C84BA2 /* LexerSimple.cxx */; };
282937AA24E2D60E00C84BA2 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 282937A924E2D60E00C84BA2 /* res */; };
287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C69246F90240040E76F /* Cocoa.framework */; };
287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C6B246F90300040E76F /* QuartzCore.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = "<group>"; };
282936D424E2D55D00C84BA2 /* InfoBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InfoBar.mm; path = ../InfoBar.mm; sourceTree = "<group>"; };
282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = "<group>"; };
282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = "<group>"; };
282936D724E2D55D00C84BA2 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = "<group>"; };
282936D824E2D55D00C84BA2 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = "<group>"; };
282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBarCommunicator.h; path = ../InfoBarCommunicator.h; sourceTree = "<group>"; };
282936DA24E2D55D00C84BA2 /* InfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBar.h; path = ../InfoBar.h; sourceTree = "<group>"; };
282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; };
282936DC24E2D55D00C84BA2 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = "<group>"; };
282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = "<group>"; };
282936DE24E2D55D00C84BA2 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = "<group>"; };
282936EB24E2D58400C84BA2 /* DBCS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBCS.cxx; path = ../../src/DBCS.cxx; sourceTree = "<group>"; };
282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ElapsedPeriod.h; path = ../../src/ElapsedPeriod.h; sourceTree = "<group>"; };
282936ED24E2D58400C84BA2 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = "<group>"; };
282936EE24E2D58400C84BA2 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = "<group>"; };
282936EF24E2D58400C84BA2 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = "<group>"; };
282936F024E2D58400C84BA2 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = "<group>"; };
282936F124E2D58400C84BA2 /* Catalogue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Catalogue.h; path = ../../src/Catalogue.h; sourceTree = "<group>"; };
282936F224E2D58400C84BA2 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = "<group>"; };
282936F324E2D58400C84BA2 /* UniqueString.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniqueString.cxx; path = ../../src/UniqueString.cxx; sourceTree = "<group>"; };
282936F424E2D58400C84BA2 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = "<group>"; };
282936F524E2D58400C84BA2 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = "<group>"; };
282936F624E2D58400C84BA2 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = "<group>"; };
282936F724E2D58400C84BA2 /* MarginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MarginView.h; path = ../../src/MarginView.h; sourceTree = "<group>"; };
282936F824E2D58400C84BA2 /* Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Position.h; path = ../../src/Position.h; sourceTree = "<group>"; };
282936F924E2D58400C84BA2 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; };
282936FA24E2D58400C84BA2 /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = "<group>"; };
282936FB24E2D58400C84BA2 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = "<group>"; };
282936FC24E2D58400C84BA2 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = "<group>"; };
282936FD24E2D58400C84BA2 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = "<group>"; };
282936FE24E2D58400C84BA2 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = "<group>"; };
282936FF24E2D58400C84BA2 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = "<group>"; };
2829370024E2D58400C84BA2 /* ExternalLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalLexer.cxx; path = ../../src/ExternalLexer.cxx; sourceTree = "<group>"; };
2829370124E2D58500C84BA2 /* IntegerRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IntegerRectangle.h; path = ../../src/IntegerRectangle.h; sourceTree = "<group>"; };
2829370224E2D58500C84BA2 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = "<group>"; };
2829370324E2D58500C84BA2 /* Catalogue.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Catalogue.cxx; path = ../../src/Catalogue.cxx; sourceTree = "<group>"; };
2829370424E2D58500C84BA2 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = "<group>"; };
2829370524E2D58500C84BA2 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = "<group>"; };
2829370624E2D58500C84BA2 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = "<group>"; };
2829370724E2D58500C84BA2 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = "<group>"; };
2829370824E2D58500C84BA2 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = "<group>"; };
2829370924E2D58500C84BA2 /* DBCS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBCS.h; path = ../../src/DBCS.h; sourceTree = "<group>"; };
2829370A24E2D58500C84BA2 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = "<group>"; };
2829370B24E2D58500C84BA2 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = "<group>"; };
2829370C24E2D58500C84BA2 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = "<group>"; };
2829370D24E2D58500C84BA2 /* Selection.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Selection.cxx; path = ../../src/Selection.cxx; sourceTree = "<group>"; };
2829370E24E2D58500C84BA2 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = "<group>"; };
2829370F24E2D58500C84BA2 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = "<group>"; };
2829371024E2D58500C84BA2 /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = "<group>"; };
2829371124E2D58500C84BA2 /* SparseVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseVector.h; path = ../../src/SparseVector.h; sourceTree = "<group>"; };
2829371224E2D58500C84BA2 /* EditModel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditModel.cxx; path = ../../src/EditModel.cxx; sourceTree = "<group>"; };
2829371324E2D58600C84BA2 /* EditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditView.h; path = ../../src/EditView.h; sourceTree = "<group>"; };
2829371424E2D58600C84BA2 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; };
2829371524E2D58600C84BA2 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = "<group>"; };
2829371624E2D58600C84BA2 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = "<group>"; };
2829371724E2D58600C84BA2 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = "<group>"; };
2829371824E2D58600C84BA2 /* MarginView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MarginView.cxx; path = ../../src/MarginView.cxx; sourceTree = "<group>"; };
2829371924E2D58600C84BA2 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = "<group>"; };
2829371A24E2D58600C84BA2 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = "<group>"; };
2829371B24E2D58600C84BA2 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = "<group>"; };
2829371C24E2D58600C84BA2 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = "<group>"; };
2829371D24E2D58600C84BA2 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = "<group>"; };
2829371E24E2D58600C84BA2 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = "<group>"; };
2829371F24E2D58700C84BA2 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = "<group>"; };
2829372024E2D58700C84BA2 /* FontQuality.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FontQuality.h; path = ../../src/FontQuality.h; sourceTree = "<group>"; };
2829372124E2D58700C84BA2 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = "<group>"; };
2829372224E2D58700C84BA2 /* UniqueString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueString.h; path = ../../src/UniqueString.h; sourceTree = "<group>"; };
2829372324E2D58700C84BA2 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; };
2829372424E2D58700C84BA2 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = "<group>"; };
2829372524E2D58700C84BA2 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; };
2829372624E2D58700C84BA2 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = "<group>"; };
2829372724E2D58700C84BA2 /* EditModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditModel.h; path = ../../src/EditModel.h; sourceTree = "<group>"; };
2829372824E2D58700C84BA2 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = "<group>"; };
2829372924E2D58700C84BA2 /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = "<group>"; };
2829372A24E2D58800C84BA2 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = "<group>"; };
2829372B24E2D58800C84BA2 /* ExternalLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalLexer.h; path = ../../src/ExternalLexer.h; sourceTree = "<group>"; };
2829372C24E2D58800C84BA2 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = "<group>"; };
2829372D24E2D58800C84BA2 /* EditView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditView.cxx; path = ../../src/EditView.cxx; sourceTree = "<group>"; };
2829377124E2D5C600C84BA2 /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = "<group>"; };
2829377224E2D5C600C84BA2 /* OptionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionSet.h; path = ../../lexlib/OptionSet.h; sourceTree = "<group>"; };
2829377324E2D5C600C84BA2 /* PropSetSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSetSimple.cxx; path = ../../lexlib/PropSetSimple.cxx; sourceTree = "<group>"; };
2829377424E2D5C600C84BA2 /* CharacterSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterSet.cxx; path = ../../lexlib/CharacterSet.cxx; sourceTree = "<group>"; };
2829377524E2D5C600C84BA2 /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../lexlib/CharacterSet.h; sourceTree = "<group>"; };
2829377624E2D5C600C84BA2 /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = "<group>"; };
2829377724E2D5C600C84BA2 /* LexerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerBase.h; path = ../../lexlib/LexerBase.h; sourceTree = "<group>"; };
2829377824E2D5C700C84BA2 /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = "<group>"; };
2829377924E2D5C700C84BA2 /* LexerNoExceptions.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerNoExceptions.cxx; path = ../../lexlib/LexerNoExceptions.cxx; sourceTree = "<group>"; };
2829377A24E2D5C700C84BA2 /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../lexlib/Accessor.h; sourceTree = "<group>"; };
2829377B24E2D5C700C84BA2 /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = "<group>"; };
2829377C24E2D5C700C84BA2 /* LexerBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerBase.cxx; path = ../../lexlib/LexerBase.cxx; sourceTree = "<group>"; };
2829377D24E2D5C700C84BA2 /* LexerSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerSimple.h; path = ../../lexlib/LexerSimple.h; sourceTree = "<group>"; };
2829377E24E2D5C700C84BA2 /* LexerModule.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerModule.cxx; path = ../../lexlib/LexerModule.cxx; sourceTree = "<group>"; };
2829377F24E2D5C700C84BA2 /* DefaultLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultLexer.cxx; path = ../../lexlib/DefaultLexer.cxx; sourceTree = "<group>"; };
2829378024E2D5C700C84BA2 /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = "<group>"; };
2829378124E2D5C700C84BA2 /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = "<group>"; };
2829378224E2D5C700C84BA2 /* WordList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordList.cxx; path = ../../lexlib/WordList.cxx; sourceTree = "<group>"; };
2829378324E2D5C800C84BA2 /* LexAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexAccessor.h; path = ../../lexlib/LexAccessor.h; sourceTree = "<group>"; };
2829378424E2D5C800C84BA2 /* LexerNoExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerNoExceptions.h; path = ../../lexlib/LexerNoExceptions.h; sourceTree = "<group>"; };
2829378524E2D5C800C84BA2 /* DefaultLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultLexer.h; path = ../../lexlib/DefaultLexer.h; sourceTree = "<group>"; };
2829378624E2D5C800C84BA2 /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../lexlib/StyleContext.cxx; sourceTree = "<group>"; };
2829378724E2D5C800C84BA2 /* Accessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Accessor.cxx; path = ../../lexlib/Accessor.cxx; sourceTree = "<group>"; };
2829378824E2D5C800C84BA2 /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = "<group>"; };
2829378924E2D5C800C84BA2 /* CatalogueModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CatalogueModules.h; path = ../../lexlib/CatalogueModules.h; sourceTree = "<group>"; };
2829378A24E2D5C800C84BA2 /* LexerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerModule.h; path = ../../lexlib/LexerModule.h; sourceTree = "<group>"; };
2829378B24E2D5C800C84BA2 /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = "<group>"; };
2829378C24E2D5C800C84BA2 /* LexerSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerSimple.cxx; path = ../../lexlib/LexerSimple.cxx; sourceTree = "<group>"; };
282937A924E2D60E00C84BA2 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../res; sourceTree = "<group>"; };
282937AF24E2D80E00C84BA2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
287F3C41246F8DC70040E76F /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
287F3C69246F90240040E76F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
287F3C6B246F90300040E76F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
287F3E0F246F9AE50040E76F /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
287F3C3E246F8DC70040E76F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */,
287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
287F3C37246F8DC70040E76F = {
isa = PBXGroup;
children = (
287F3C4D246F8E4A0040E76F /* Backend */,
287F3C4E246F8E560040E76F /* Classes */,
287F3C4F246F8E6E0040E76F /* Resources */,
287F3C42246F8DC70040E76F /* Products */,
287F3C68246F90240040E76F /* Frameworks */,
);
sourceTree = "<group>";
};
287F3C42246F8DC70040E76F /* Products */ = {
isa = PBXGroup;
children = (
287F3C41246F8DC70040E76F /* Scintilla.framework */,
);
name = Products;
sourceTree = "<group>";
};
287F3C4D246F8E4A0040E76F /* Backend */ = {
isa = PBXGroup;
children = (
2829378724E2D5C800C84BA2 /* Accessor.cxx */,
2829377A24E2D5C700C84BA2 /* Accessor.h */,
2829371624E2D58600C84BA2 /* AutoComplete.cxx */,
2829370A24E2D58500C84BA2 /* AutoComplete.h */,
2829370624E2D58500C84BA2 /* CallTip.cxx */,
282936ED24E2D58400C84BA2 /* CallTip.h */,
2829371424E2D58600C84BA2 /* CaseConvert.cxx */,
2829372324E2D58700C84BA2 /* CaseConvert.h */,
282936F924E2D58400C84BA2 /* CaseFolder.cxx */,
2829372524E2D58700C84BA2 /* CaseFolder.h */,
2829370324E2D58500C84BA2 /* Catalogue.cxx */,
282936F124E2D58400C84BA2 /* Catalogue.h */,
2829378924E2D5C800C84BA2 /* CatalogueModules.h */,
2829372624E2D58700C84BA2 /* CellBuffer.cxx */,
2829371924E2D58600C84BA2 /* CellBuffer.h */,
2829378824E2D5C800C84BA2 /* CharacterCategory.cxx */,
2829377624E2D5C600C84BA2 /* CharacterCategory.h */,
2829377424E2D5C600C84BA2 /* CharacterSet.cxx */,
2829377524E2D5C600C84BA2 /* CharacterSet.h */,
2829371524E2D58600C84BA2 /* CharClassify.cxx */,
282936FE24E2D58400C84BA2 /* CharClassify.h */,
2829370E24E2D58500C84BA2 /* ContractionState.cxx */,
2829370724E2D58500C84BA2 /* ContractionState.h */,
282936EB24E2D58400C84BA2 /* DBCS.cxx */,
2829370924E2D58500C84BA2 /* DBCS.h */,
2829370824E2D58500C84BA2 /* Decoration.cxx */,
282936FF24E2D58400C84BA2 /* Decoration.h */,
2829377F24E2D5C700C84BA2 /* DefaultLexer.cxx */,
2829378524E2D5C800C84BA2 /* DefaultLexer.h */,
2829371A24E2D58600C84BA2 /* Document.cxx */,
2829372C24E2D58800C84BA2 /* Document.h */,
2829371224E2D58500C84BA2 /* EditModel.cxx */,
2829372724E2D58700C84BA2 /* EditModel.h */,
2829372824E2D58700C84BA2 /* Editor.cxx */,
2829371C24E2D58600C84BA2 /* Editor.h */,
2829372D24E2D58800C84BA2 /* EditView.cxx */,
2829371324E2D58600C84BA2 /* EditView.h */,
282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */,
2829370024E2D58400C84BA2 /* ExternalLexer.cxx */,
2829372B24E2D58800C84BA2 /* ExternalLexer.h */,
2829372024E2D58700C84BA2 /* FontQuality.h */,
282936F624E2D58400C84BA2 /* Indicator.cxx */,
282936FB24E2D58400C84BA2 /* Indicator.h */,
2829370124E2D58500C84BA2 /* IntegerRectangle.h */,
2829370B24E2D58500C84BA2 /* KeyMap.cxx */,
282936EF24E2D58400C84BA2 /* KeyMap.h */,
2829378324E2D5C800C84BA2 /* LexAccessor.h */,
2829377C24E2D5C700C84BA2 /* LexerBase.cxx */,
2829377724E2D5C600C84BA2 /* LexerBase.h */,
2829377E24E2D5C700C84BA2 /* LexerModule.cxx */,
2829378A24E2D5C800C84BA2 /* LexerModule.h */,
2829377924E2D5C700C84BA2 /* LexerNoExceptions.cxx */,
2829378424E2D5C800C84BA2 /* LexerNoExceptions.h */,
2829378C24E2D5C800C84BA2 /* LexerSimple.cxx */,
2829377D24E2D5C700C84BA2 /* LexerSimple.h */,
282936F024E2D58400C84BA2 /* LineMarker.cxx */,
2829371B24E2D58600C84BA2 /* LineMarker.h */,
2829371824E2D58600C84BA2 /* MarginView.cxx */,
282936F724E2D58400C84BA2 /* MarginView.h */,
2829377224E2D5C600C84BA2 /* OptionSet.h */,
2829371F24E2D58700C84BA2 /* Partitioning.h */,
2829371024E2D58500C84BA2 /* PerLine.cxx */,
282936FA24E2D58400C84BA2 /* PerLine.h */,
282936F824E2D58400C84BA2 /* Position.h */,
2829370224E2D58500C84BA2 /* PositionCache.cxx */,
282936EE24E2D58400C84BA2 /* PositionCache.h */,
2829377324E2D5C600C84BA2 /* PropSetSimple.cxx */,
2829377124E2D5C600C84BA2 /* PropSetSimple.h */,
2829370524E2D58500C84BA2 /* RESearch.cxx */,
282936F524E2D58400C84BA2 /* RESearch.h */,
2829372A24E2D58800C84BA2 /* RunStyles.cxx */,
282936F424E2D58400C84BA2 /* RunStyles.h */,
2829372424E2D58700C84BA2 /* ScintillaBase.cxx */,
2829371E24E2D58600C84BA2 /* ScintillaBase.h */,
2829370D24E2D58500C84BA2 /* Selection.cxx */,
2829372924E2D58700C84BA2 /* Selection.h */,
2829377824E2D5C700C84BA2 /* SparseState.h */,
2829371124E2D58500C84BA2 /* SparseVector.h */,
2829372124E2D58700C84BA2 /* SplitVector.h */,
2829378B24E2D5C800C84BA2 /* StringCopy.h */,
2829370424E2D58500C84BA2 /* Style.cxx */,
282936F224E2D58400C84BA2 /* Style.h */,
2829378624E2D5C800C84BA2 /* StyleContext.cxx */,
2829378124E2D5C700C84BA2 /* StyleContext.h */,
2829378024E2D5C700C84BA2 /* SubStyles.h */,
2829370F24E2D58500C84BA2 /* UniConversion.cxx */,
282936FC24E2D58400C84BA2 /* UniConversion.h */,
282936F324E2D58400C84BA2 /* UniqueString.cxx */,
2829372224E2D58700C84BA2 /* UniqueString.h */,
2829371724E2D58600C84BA2 /* ViewStyle.cxx */,
2829370C24E2D58500C84BA2 /* ViewStyle.h */,
2829378224E2D5C700C84BA2 /* WordList.cxx */,
2829377B24E2D5C700C84BA2 /* WordList.h */,
282936FD24E2D58400C84BA2 /* XPM.cxx */,
2829371D24E2D58600C84BA2 /* XPM.h */,
);
name = Backend;
sourceTree = "<group>";
};
287F3C4E246F8E560040E76F /* Classes */ = {
isa = PBXGroup;
children = (
282936DA24E2D55D00C84BA2 /* InfoBar.h */,
282936D424E2D55D00C84BA2 /* InfoBar.mm */,
282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */,
287F3E0F246F9AE50040E76F /* module.modulemap */,
282936D824E2D55D00C84BA2 /* PlatCocoa.h */,
282936D724E2D55D00C84BA2 /* PlatCocoa.mm */,
282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */,
282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */,
282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */,
282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */,
282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */,
282936DE24E2D55D00C84BA2 /* ScintillaView.h */,
282936DC24E2D55D00C84BA2 /* ScintillaView.mm */,
);
name = Classes;
sourceTree = "<group>";
};
287F3C4F246F8E6E0040E76F /* Resources */ = {
isa = PBXGroup;
children = (
282937AF24E2D80E00C84BA2 /* Info.plist */,
282937A924E2D60E00C84BA2 /* res */,
);
name = Resources;
sourceTree = "<group>";
};
287F3C68246F90240040E76F /* Frameworks */ = {
isa = PBXGroup;
children = (
287F3C6B246F90300040E76F /* QuartzCore.framework */,
287F3C69246F90240040E76F /* Cocoa.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
287F3C3C246F8DC70040E76F /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
2829374C24E2D58800C84BA2 /* DBCS.h in Headers */,
2829373024E2D58800C84BA2 /* CallTip.h in Headers */,
2829374224E2D58800C84BA2 /* Decoration.h in Headers */,
2829379924E2D5C900C84BA2 /* LexerSimple.h in Headers */,
2829375624E2D58800C84BA2 /* EditView.h in Headers */,
2829376E24E2D58800C84BA2 /* ExternalLexer.h in Headers */,
282937A124E2D5C900C84BA2 /* DefaultLexer.h in Headers */,
2829375424E2D58800C84BA2 /* SparseVector.h in Headers */,
2829373224E2D58800C84BA2 /* KeyMap.h in Headers */,
2829376324E2D58800C84BA2 /* FontQuality.h in Headers */,
2829373E24E2D58800C84BA2 /* Indicator.h in Headers */,
2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */,
2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */,
2829379624E2D5C900C84BA2 /* Accessor.h in Headers */,
2829373D24E2D58800C84BA2 /* PerLine.h in Headers */,
2829373724E2D58800C84BA2 /* RunStyles.h in Headers */,
282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */,
2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */,
2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */,
2829376524E2D58800C84BA2 /* UniqueString.h in Headers */,
2829375F24E2D58800C84BA2 /* Editor.h in Headers */,
2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */,
2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */,
282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */,
2829376A24E2D58800C84BA2 /* EditModel.h in Headers */,
282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */,
2829376F24E2D58800C84BA2 /* Document.h in Headers */,
282937A024E2D5C900C84BA2 /* LexerNoExceptions.h in Headers */,
2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */,
2829376024E2D58800C84BA2 /* XPM.h in Headers */,
2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */,
2829373424E2D58800C84BA2 /* Catalogue.h in Headers */,
2829379224E2D5C900C84BA2 /* CharacterCategory.h in Headers */,
2829373A24E2D58800C84BA2 /* MarginView.h in Headers */,
282937A524E2D5C900C84BA2 /* CatalogueModules.h in Headers */,
282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */,
2829378D24E2D5C900C84BA2 /* PropSetSimple.h in Headers */,
2829379D24E2D5C900C84BA2 /* StyleContext.h in Headers */,
282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */,
2829376224E2D58800C84BA2 /* Partitioning.h in Headers */,
282937A724E2D5C900C84BA2 /* StringCopy.h in Headers */,
2829376424E2D58800C84BA2 /* SplitVector.h in Headers */,
2829373B24E2D58800C84BA2 /* Position.h in Headers */,
282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */,
2829373524E2D58800C84BA2 /* Style.h in Headers */,
282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */,
2829376C24E2D58800C84BA2 /* Selection.h in Headers */,
2829379C24E2D5C900C84BA2 /* SubStyles.h in Headers */,
2829374424E2D58800C84BA2 /* IntegerRectangle.h in Headers */,
2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */,
2829373824E2D58800C84BA2 /* RESearch.h in Headers */,
282937A624E2D5C900C84BA2 /* LexerModule.h in Headers */,
282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */,
2829379424E2D5C900C84BA2 /* SparseState.h in Headers */,
2829379324E2D5C900C84BA2 /* LexerBase.h in Headers */,
2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */,
2829378E24E2D5C900C84BA2 /* OptionSet.h in Headers */,
2829379124E2D5C900C84BA2 /* CharacterSet.h in Headers */,
2829374124E2D58800C84BA2 /* CharClassify.h in Headers */,
2829373124E2D58800C84BA2 /* PositionCache.h in Headers */,
2829379724E2D5C900C84BA2 /* WordList.h in Headers */,
2829379F24E2D5C900C84BA2 /* LexAccessor.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
287F3C40246F8DC70040E76F /* Scintilla */ = {
isa = PBXNativeTarget;
buildConfigurationList = 287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget "Scintilla" */;
buildPhases = (
287F3C3C246F8DC70040E76F /* Headers */,
287F3C3F246F8DC70040E76F /* Resources */,
287F3C3D246F8DC70040E76F /* Sources */,
287F3C3E246F8DC70040E76F /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Scintilla;
productName = Scintilla;
productReference = 287F3C41246F8DC70040E76F /* Scintilla.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
287F3C38246F8DC70040E76F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Neil Hodgson";
TargetAttributes = {
287F3C40246F8DC70040E76F = {
CreatedOnToolsVersion = 11.4.1;
};
};
};
buildConfigurationList = 287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject "Scintilla" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 287F3C37246F8DC70040E76F;
productRefGroup = 287F3C42246F8DC70040E76F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
287F3C40246F8DC70040E76F /* Scintilla */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
287F3C3F246F8DC70040E76F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
282937AA24E2D60E00C84BA2 /* res in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
287F3C3D246F8DC70040E76F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2829375024E2D58800C84BA2 /* Selection.cxx in Sources */,
2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */,
282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */,
282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */,
2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */,
2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */,
2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */,
282937A224E2D5C900C84BA2 /* StyleContext.cxx in Sources */,
2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */,
2829379A24E2D5C900C84BA2 /* LexerModule.cxx in Sources */,
2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */,
2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */,
2829375D24E2D58800C84BA2 /* Document.cxx in Sources */,
2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */,
2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */,
2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */,
2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */,
2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */,
2829379E24E2D5C900C84BA2 /* WordList.cxx in Sources */,
2829374624E2D58800C84BA2 /* Catalogue.cxx in Sources */,
2829378F24E2D5C900C84BA2 /* PropSetSimple.cxx in Sources */,
2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */,
2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */,
2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */,
2829379B24E2D5C900C84BA2 /* DefaultLexer.cxx in Sources */,
2829379824E2D5C900C84BA2 /* LexerBase.cxx in Sources */,
2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */,
2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */,
2829377024E2D58800C84BA2 /* EditView.cxx in Sources */,
2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */,
2829374324E2D58800C84BA2 /* ExternalLexer.cxx in Sources */,
2829374724E2D58800C84BA2 /* Style.cxx in Sources */,
2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */,
282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */,
2829374024E2D58800C84BA2 /* XPM.cxx in Sources */,
2829379024E2D5C900C84BA2 /* CharacterSet.cxx in Sources */,
2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */,
282937A424E2D5C900C84BA2 /* CharacterCategory.cxx in Sources */,
2829379524E2D5C900C84BA2 /* LexerNoExceptions.cxx in Sources */,
2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */,
282937A324E2D5C900C84BA2 /* Accessor.cxx in Sources */,
282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */,
282937A824E2D5C900C84BA2 /* LexerSimple.cxx in Sources */,
2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */,
2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
287F3C47246F8DC70040E76F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4.4.6;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
287F3C48246F8DC70040E76F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 4.4.6;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
287F3C4A246F8DC70040E76F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_WARN_UNGUARDED_AVAILABILITY = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4.4.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = SCI_EMPTYCATALOGUE;
HEADER_SEARCH_PATHS = (
../../include,
../../src,
../../lexlib,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Debug;
};
287F3C4B246F8DC70040E76F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_WARN_UNGUARDED_AVAILABILITY = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 4.4.6;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = SCI_EMPTYCATALOGUE;
HEADER_SEARCH_PATHS = (
../../include,
../../src,
../../lexlib,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject "Scintilla" */ = {
isa = XCConfigurationList;
buildConfigurations = (
287F3C47246F8DC70040E76F /* Debug */,
287F3C48246F8DC70040E76F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget "Scintilla" */ = {
isa = XCConfigurationList;
buildConfigurations = (
287F3C4A246F8DC70040E76F /* Debug */,
287F3C4B246F8DC70040E76F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 287F3C38246F8DC70040E76F /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Scintilla.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,10 @@
framework module Scintilla {
umbrella header "ScintillaView.h"
module InfoBar {
header "InfoBar.h"
}
// ILexer.h is not included as Swift doesn't yet interoperate with C++
exclude header "ILexer.h"
export *
module * { export * }
}

View File

@ -27,11 +27,6 @@
#include "ILoader.h"
#include "ILexer.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "PropSetSimple.h"
#endif
#include "CharacterCategory.h"
#include "Position.h"
#include "UniqueString.h"

View File

@ -1,7 +1,7 @@
/**
* Scintilla source code edit control
* ScintillaCocoa.mm - Cocoa subclass of ScintillaBase
* @file ScintillaCocoa.mm - Cocoa subclass of ScintillaBase
*
* Written by Mike Lischke <mlischke@sun.com>
*
@ -423,7 +423,6 @@ ScintillaCocoa::~ScintillaCocoa() {
* Core initialization of the control. Everything that needs to be set up happens here.
*/
void ScintillaCocoa::Init() {
Scintilla_LinkLexers();
// Tell Scintilla not to buffer: Quartz buffers drawing for us.
WndProc(SCI_SETBUFFEREDDRAW, 0, 0);
@ -1598,15 +1597,15 @@ bool ScintillaCocoa::GetPasteboardData(NSPasteboard *board, SelectionText *selec
// Returns the target converted to UTF8.
// Return the length in bytes.
Sci::Position ScintillaCocoa::TargetAsUTF8(char *text) const {
const Sci::Position targetLength = targetEnd - targetStart;
const Sci::Position targetLength = targetRange.Length();
if (IsUnicodeMode()) {
if (text)
pdoc->GetCharRange(text, targetStart, targetLength);
pdoc->GetCharRange(text, targetRange.start.Position(), targetLength);
} else {
// Need to convert
const CFStringEncoding encoding = EncodingFromCharacterSet(IsUnicodeMode(),
vs.styles[STYLE_DEFAULT].characterSet);
const std::string s = RangeText(targetStart, targetEnd);
const std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());
CFStringRef cfsVal = CFStringFromString(s.c_str(), s.length(), encoding);
if (!cfsVal) {
return 0;

View File

@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<string>4.4.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.2.0</string>
<string>4.4.6</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>

View File

@ -234,6 +234,8 @@
FDC7442CAD70B9A67EF1639D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A95147A1AB7CADB00DAFE724 /* LexSAS.cxx */; };
AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = ADA64364A443F3E3F02D294E /* LexX12.cxx */; };
902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 362E48F5A7F79598CB0B037D /* LexDataflex.cxx */; };
4AA242EE8F0CCEA01AB59842 /* LexHollywood.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 96884184929F317E72FC1BE8 /* LexHollywood.cxx */; };
513A4B43B903344E142C441E /* LexRaku.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 48484CD7A1F20D09703376E5 /* LexRaku.cxx */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -471,6 +473,8 @@
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
ADA64364A443F3E3F02D294E /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = SOURCE_ROOT; };
362E48F5A7F79598CB0B037D /* LexDataflex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDataflex.cxx; path = ../../lexers/LexDataflex.cxx; sourceTree = SOURCE_ROOT; };
96884184929F317E72FC1BE8 /* LexHollywood.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHollywood.cxx; path = ../../lexers/LexHollywood.cxx; sourceTree = SOURCE_ROOT; };
48484CD7A1F20D09703376E5 /* LexRaku.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRaku.cxx; path = ../../lexers/LexRaku.cxx; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -613,6 +617,7 @@
114B6EDB11FA7526004FB6AB /* LexGui4Cli.cxx */,
114B6EDC11FA7526004FB6AB /* LexHaskell.cxx */,
28A067101A36B42600B4966A /* LexHex.cxx */,
96884184929F317E72FC1BE8 /* LexHollywood.cxx */,
114B6EDD11FA7526004FB6AB /* LexHTML.cxx */,
282E41F3B9E2BFEDD6A05BE7 /* LexIndent.cxx */,
114B6EDE11FA7526004FB6AB /* LexInno.cxx */,
@ -653,6 +658,7 @@
114B6EF711FA7526004FB6AB /* LexPS.cxx */,
114B6EF811FA7526004FB6AB /* LexPython.cxx */,
114B6EF911FA7526004FB6AB /* LexR.cxx */,
48484CD7A1F20D09703376E5 /* LexRaku.cxx */,
114B6EFA11FA7526004FB6AB /* LexRebol.cxx */,
28A7D6041995E47D0062D204 /* LexRegistry.cxx */,
114B6EFB11FA7526004FB6AB /* LexRuby.cxx */,
@ -1138,6 +1144,8 @@
00724A59981D34F11A3D162F /* LexCIL.cxx in Sources */,
AE894E1CB7328CAE5B2EF47E /* LexX12.cxx in Sources */,
902B40FE926FE48538B168F1 /* LexDataflex.cxx in Sources */,
4AA242EE8F0CCEA01AB59842 /* LexHollywood.cxx in Sources */,
513A4B43B903344E142C441E /* LexRaku.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -1204,7 +1212,10 @@
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_LEXER,
NDEBUG,
);
GCC_WARN_UNINITIALIZED_AUTOS = NO;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Scintilla.framework"
BlueprintName = "Scintilla"
ReferencedContainer = "container:ScintillaFramework.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableAddressSanitizer = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8DC2EF4F0486A6940098B216"
BuildableName = "Scintilla.framework"
BlueprintName = "Scintilla"
ReferencedContainer = "container:ScintillaFramework.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -1,6 +1,7 @@
/**
* Declaration of the native Cocoa View that serves as container for the scintilla parts.
* @file ScintillaView.h
*
* Created by Mike Lischke.
*

View File

@ -1,6 +1,7 @@
/**
* Implementation of the native Cocoa View that serves as container for the scintilla parts.
* @file ScintillaView.mm
*
* Created by Mike Lischke.
*

View File

@ -20,7 +20,7 @@ cd ../../..
# which can cause double build
echo Building Cocoa-native ScintillaFramework and ScintillaTest
for sdk in macosx10.9 macosx10.8 macosx10.7 macosx10.6 macosx10.5
for sdk in macosx10.15 macosx10.14
do
xcodebuild -showsdks | grep $sdk
if [ "$(xcodebuild -showsdks | grep $sdk)" != "" ]
@ -54,13 +54,13 @@ xcodebuild
cd ..
cd ScintillaEdit
python WidgetGen.py
python3 WidgetGen.py
qmake -spec macx-xcode
xcodebuild clean
xcodebuild
cd ..
cd ScintillaEditPy
python sepbuild.py
python2 sepbuild.py
cd ..
cd ../..

View File

@ -1 +1 @@
@del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog >NUL:
@del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.ipdb *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog >NUL:

View File

@ -113,7 +113,9 @@
</p>
<p>
The <a href="http://astyle.sourceforge.net/">AStyle</a> formatting
program with '-taOHUKk3 -M8' arguments formats code in much the right way although
program with '--style=attach --indent=force-tab=8 --keep-one-line-blocks
--pad-header --unpad-paren --pad-comma --indent-cases --align-pointer=name --pad-method-prefix
--pad-return-type --pad-param-type --align-method-colon --pad-method-colon=after' arguments formats code in much the right way although
there are a few bugs in AStyle.
</p>
<h3>
@ -132,7 +134,6 @@
Exceptions and templates may be used but, since Scintilla can be used from C as well as
C++, exceptions may not be thrown out of Scintilla and all exceptions should be caught
before returning from Scintilla.
Run-time type information adds to memory use so is turned off.
A 'Scintilla' name space is used. This helps with name clashes on OS X.
</p>
<p>

View File

@ -119,7 +119,7 @@
<h1>Scintilla Documentation</h1>
<p>Last edited 22 June 2019 NH</p>
<p>Last edited 9 September 2020 NH</p>
<p>There is <a class="jump" href="Design.html">an overview of the internal design of
Scintilla</a>.<br />
@ -131,6 +131,8 @@
Visual Basic</a>.<br />
<a class="jump" href="https://www.scintilla.org/bait.zip">Bait is a tiny sample using Scintilla
on GTK</a>.<br />
<a class="jump" href="https://www.scintilla.org/ScintillaTest.zip">ScintillaTest is a more complete
GTK sample which can be used to find bugs or prototype new features.</a><br />
<a class="jump" href="Lexer.txt">A detailed description of how to write a lexer, including a
discussion of folding</a>.<br />
<a class="jump" href="http://sphere.sourceforge.net/flik/docs/scintilla-container_lexer.html">
@ -266,6 +268,44 @@
</tbody>
</table>
<h2 class="provisional">Lexilla</h2>
<p>For Scintilla 5.0, lexers will be split off into a separate Lexilla library.
Scintilla will be responsible for the GUI and calling lexers with Lexilla providing the lexers.
To allow work towards this with Scintilla 4.x, the first stage is to allow building Lexilla but
also include the lexers in Scintilla.</p>
<p>Lexilla is built as both a shared library and static library and applications may choose to
link to one or the other.</p>
<p>To build Lexilla, in the lexilla/src directory, run make (for gcc or clang)<br />
<code>make</code><br />
or nmake for MSVC<br />
<code>nmake -f lexilla.mak</code><br />
</p>
<p>Lexilla follows the <a class="seealso" href="#SCI_LOADLEXERLIBRARY">external lexer protocol</a>
so can be loaded by applications that support this.
As the protocol only supports object lexers, an additional function <code>CreateLexer(const char *name)</code>
is exposed which will create a lexer object (ILexer5 *) for any object lexer or function lexer.
</p>
<p>Lexer libraries that provide the same functions as Lexilla may provide lexers for use by Scintilla,
augmenting or replacing those provided by Lexilla.
To allow initialisation of lexer libraries, a <code>SetLibraryProperty(const char *key, const char *value)</code>
may optionally be implemented. For example, a lexer library that uses XML based lexer definitions may
be provided with a directory to search for such definitions.
Lexer libraries should ignore any properties that they do not understand.
The set of properties supported by a lexer library is specified as a '\n' separated list of property names by
an optional <code>const char *GetLibraryPropertyNames()</code> function.
</p>
<p>A lexer created by Lexilla may be used in Scintilla by calling
<a class="seealso" href="#SCI_SETILEXER">SCI_SETILEXER</a>.</p>
<p>Lexilla and its contained lexers can be tested with the TestLexers program in lexilla/test.
Read lexilla/test/README for information on building and using TestLexers.</p>
<h2 id="MessageCategories">Contents</h2>
<table class="categories" summary="Message categories">
@ -427,6 +467,8 @@
<tr>
<td>&cir; <a class="toc" href="#BuildingScintilla">Building Scintilla</a></td>
<td>&cir; <a class="toc" href="#EndOfLineAnnotations">End of Line Annotations</a></td>
</tr>
</tbody>
</table>
@ -711,10 +753,15 @@ struct Sci_TextRange {
<code>SCI_SEARCHINTARGET</code> such as <code>SCFIND_MATCHCASE</code>,
<code>SCFIND_WHOLEWORD</code>, <code>SCFIND_WORDSTART</code>, and <code>SCFIND_REGEXP</code>
can be set with <code>SCI_SETSEARCHFLAGS</code>.</p>
<code><a class="message" href="#SCI_SETTARGETSTART">SCI_SETTARGETSTART(position start)</a><br />
<code>
<a class="message" href="#SCI_SETTARGETSTART">SCI_SETTARGETSTART(position start)</a><br />
<a class="message" href="#SCI_GETTARGETSTART">SCI_GETTARGETSTART &rarr; position</a><br />
<a class="message" href="#SCI_SETTARGETSTARTVIRTUALSPACE">SCI_SETTARGETSTARTVIRTUALSPACE(position space)</a><br />
<a class="message" href="#SCI_GETTARGETSTARTVIRTUALSPACE">SCI_GETTARGETSTARTVIRTUALSPACE &rarr; position</a><br />
<a class="message" href="#SCI_SETTARGETEND">SCI_SETTARGETEND(position end)</a><br />
<a class="message" href="#SCI_GETTARGETEND">SCI_GETTARGETEND &rarr; position</a><br />
<a class="message" href="#SCI_SETTARGETENDVIRTUALSPACE">SCI_SETTARGETENDVIRTUALSPACE(position space)</a><br />
<a class="message" href="#SCI_GETTARGETENDVIRTUALSPACE">SCI_GETTARGETENDVIRTUALSPACE &rarr; position</a><br />
<a class="message" href="#SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(position start, position end)</a><br />
<a class="message" href="#SCI_TARGETFROMSELECTION">SCI_TARGETFROMSELECTION</a><br />
<a class="message" href="#SCI_TARGETWHOLEDOCUMENT">SCI_TARGETWHOLEDOCUMENT</a><br />
@ -729,13 +776,22 @@ struct Sci_TextRange {
<p><b id="SCI_SETTARGETSTART">SCI_SETTARGETSTART(position start)</b><br />
<b id="SCI_GETTARGETSTART">SCI_GETTARGETSTART &rarr; position</b><br />
<b id="SCI_SETTARGETSTARTVIRTUALSPACE">SCI_SETTARGETSTARTVIRTUALSPACE(position space)</b><br />
<b id="SCI_GETTARGETSTARTVIRTUALSPACE">SCI_GETTARGETSTARTVIRTUALSPACE &rarr; position</b><br />
<b id="SCI_SETTARGETEND">SCI_SETTARGETEND(position end)</b><br />
<b id="SCI_GETTARGETEND">SCI_GETTARGETEND &rarr; position</b><br />
<b id="SCI_SETTARGETENDVIRTUALSPACE">SCI_SETTARGETENDVIRTUALSPACE(position space)</b><br />
<b id="SCI_GETTARGETENDVIRTUALSPACE">SCI_GETTARGETENDVIRTUALSPACE &rarr; position</b><br />
<b id="SCI_SETTARGETRANGE">SCI_SETTARGETRANGE(position start, position end)</b><br />
These functions set and return the start and end of the target. When searching
you can set start greater than end to find the last matching text in the
target rather than the first matching text. The target is also set by a successful
target rather than the first matching text.
Setting a target position with <code>SCI_SETTARGETSTART</code>, <code>SCI_SETTARGETEND</code>, or <code>SCI_SETTARGETRANGE</code>
sets the virtual space to 0.
The target is also set by a successful
<code>SCI_SEARCHINTARGET</code>.</p>
<p>The virtual space of the target range can be set and retrieved with the corresponding <code>...VIRTUALSPACE</code>
methods. This allows text to be inserted in virtual space more easily.</p>
<p><b id="SCI_TARGETFROMSELECTION">SCI_TARGETFROMSELECTION</b><br />
Set the target start and end to the start and end positions of the selection.</p>
@ -1639,8 +1695,10 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_GETSELECTIONNANCHORVIRTUALSPACE">SCI_GETSELECTIONNANCHORVIRTUALSPACE(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, position anchor)</a><br />
<a class="message" href="#SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_GETSELECTIONNSTARTVIRTUALSPACE">SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, position caret)</a><br />
<a class="message" href="#SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection) &rarr; position</a><br />
<a class="message" href="#SCI_GETSELECTIONNENDVIRTUALSPACE">SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) &rarr; position</a><br />
<br />
<a class="message" href="#SCI_SETRECTANGULARSELECTIONCARET">SCI_SETRECTANGULARSELECTIONCARET(position caret)</a><br />
@ -1790,9 +1848,12 @@ struct Sci_TextToFind {
<p>
<b id="SCI_SETSELECTIONNSTART">SCI_SETSELECTIONNSTART(int selection, position anchor)</b><br />
<b id="SCI_GETSELECTIONNSTART">SCI_GETSELECTIONNSTART(int selection) &rarr; position</b><br />
<b id="SCI_GETSELECTIONNSTARTVIRTUALSPACE">SCI_GETSELECTIONNSTARTVIRTUALSPACE(int selection) &rarr; position</b><br />
<b id="SCI_SETSELECTIONNEND">SCI_SETSELECTIONNEND(int selection, position caret)</b><br />
<b id="SCI_GETSELECTIONNEND">SCI_GETSELECTIONNEND(int selection) &rarr; position</b><br />
<b id="SCI_GETSELECTIONNENDVIRTUALSPACE">SCI_GETSELECTIONNENDVIRTUALSPACE(int selection) &rarr; position</b><br />
Set or query the start and end position of each already existing selection.
Query the virtual space at start and end of each selection.
Mostly of use to query each range for its text. The selection parameter is zero-based. </p>
<p>
@ -2292,6 +2353,7 @@ struct Sci_TextToFind {
<b id="SCI_GETWHITESPACESIZE">SCI_GETWHITESPACESIZE &rarr; int</b><br />
<code>SCI_SETWHITESPACESIZE</code> sets the size of the dots used for mark space characters.
The <code>SCI_GETWHITESPACESIZE</code> message retrieves the current size.
The value 0 is valid and makes the dots invisible.
</p>
<p><b id="SCI_SETTABDRAWMODE">SCI_SETTABDRAWMODE(int tabDrawMode)</b><br />
@ -3271,9 +3333,9 @@ struct Sci_TextToFind {
<p><b id="SCI_SETCARETWIDTH">SCI_SETCARETWIDTH(int pixelWidth)</b><br />
<b id="SCI_GETCARETWIDTH">SCI_GETCARETWIDTH &rarr; int</b><br />
The width of the line caret can be set with <code>SCI_SETCARETWIDTH</code> to a value of
0, 1, 2 or 3 pixels. The default width is 1 pixel. You can read back the current width with
<code>SCI_GETCARETWIDTH</code>. A width of 0 makes the caret invisible (added at version
1.50), similar to setting the caret style to CARETSTYLE_INVISIBLE (though not interchangeable).
between 0 and 20 pixels. The default width is 1 pixel. You can read back the current width with
<code>SCI_GETCARETWIDTH</code>. A width of 0 makes the caret invisible,
similar to setting the caret style to CARETSTYLE_INVISIBLE (though not interchangeable).
This setting only affects the width of the cursor when the cursor style is set to line caret
mode, it does not affect the width for a block caret.</p>
@ -3675,6 +3737,99 @@ struct Sci_TextToFind {
before <code>SCI_ANNOTATIONSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_ANNOTATIONSETSTYLEOFFSET</code>.
</p>
<h2 id="EndOfLineAnnotations">End of Line Annotations</h2>
<p>End of Line Annotations are read-only lines of text at the end of each line of editable text.
End of Line Annotations can be used to display an assembler version of code for debugging or to show diagnostic messages inline or to
line up different versions of text in a merge tool.</p>
<p>End of Line Annotations used to display an assembler version of code for debugging</p>
<p><img src="eolannotation.png" alt="End of Line Annotations used to display an assembler version of code for debugging" /></p>
<code>
<a class="message" href="#SCI_EOLANNOTATIONSETTEXT">SCI_EOLANNOTATIONSETTEXT(line line, const char *text)</a><br />
<a class="message" href="#SCI_EOLANNOTATIONGETTEXT">SCI_EOLANNOTATIONGETTEXT(line line, char *text) &rarr; int</a><br />
<a class="message" href="#SCI_EOLANNOTATIONSETSTYLE">SCI_EOLANNOTATIONSETSTYLE(line line, int style)</a><br />
<a class="message" href="#SCI_EOLANNOTATIONGETSTYLE">SCI_EOLANNOTATIONGETSTYLE(line line) &rarr; int</a><br />
<a class="message" href="#SCI_EOLANNOTATIONCLEARALL">SCI_EOLANNOTATIONCLEARALL</a><br />
<a class="message" href="#SCI_EOLANNOTATIONSETVISIBLE">SCI_EOLANNOTATIONSETVISIBLE(int visible)</a><br />
<a class="message" href="#SCI_EOLANNOTATIONGETVISIBLE">SCI_EOLANNOTATIONGETVISIBLE &rarr; int</a><br />
<a class="message" href="#SCI_EOLANNOTATIONSETSTYLEOFFSET">SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)</a><br />
<a class="message" href="#SCI_EOLANNOTATIONGETSTYLEOFFSET">SCI_EOLANNOTATIONGETSTYLEOFFSET &rarr; int</a><br />
</code>
<p>
<b id="SCI_EOLANNOTATIONSETTEXT">SCI_EOLANNOTATIONSETTEXT(line line, const char *text)</b><br />
<b id="SCI_EOLANNOTATIONGETTEXT">SCI_EOLANNOTATIONGETTEXT(line line, char *text) &rarr; int</b><br />
<b id="SCI_EOLANNOTATIONSETSTYLE">SCI_EOLANNOTATIONSETSTYLE(line line, int style)</b><br />
<b id="SCI_EOLANNOTATIONGETSTYLE">SCI_EOLANNOTATIONGETSTYLE(line line) &rarr; int</b><br />
<b id="SCI_EOLANNOTATIONCLEARALL">SCI_EOLANNOTATIONCLEARALL</b><br />
A different string may be set for each line with <code>SCI_EOLANNOTATIONSETTEXT</code>.
To clear end of line annotations call <code>SCI_EOLANNOTATIONSETTEXT</code> with a NULL pointer.
The whole of the text EOLANNOTATION on a line may be displayed in a particular style with
<code>SCI_EOLANNOTATIONSETSTYLE</code> or each character may be individually styled with
of the corresponding text byte similar to <code>SCI_SETSTYLINGEX</code>. The text must be set first as it
specifies how long the end of line annotation is so how many bytes of styling to read.
Setting an end of line annotation will cause a
<a class="message" href="#SC_MOD_CHANGEEOLANNOTATION"><code>SC_MOD_CHANGEEOLANNOTATION</code></a>
notification to be sent.
</p>
<p>
All the lines can be cleared of end of line annotations with <code>SCI_EOLANNOTATIONCLEARALL</code>
which is equivalent to clearing each line (setting to 0) and then deleting other memory used for this feature.
</p>
<p>
Only some style attributes are active in end of line annotations: font, size/sizeFractional, bold/weight, italics, fore, back, and characterSet.
</p>
<p>
<b id="SCI_EOLANNOTATIONSETVISIBLE">SCI_EOLANNOTATIONSETVISIBLE(int visible)</b><br />
<b id="SCI_EOLANNOTATIONGETVISIBLE">SCI_EOLANNOTATIONGETVISIBLE &rarr; int</b><br />
End of Line Annotations can be made visible in a view and there is a choice of display style when visible.
The two messages set and get the annotation display mode. The <code class="parameter">visible</code>
argument can be one of:</p>
<table class="standard" summary="End of Line Annotation visibility">
<tbody valign="top">
<tr>
<th align="left"><code>EOLANNOTATION_HIDDEN</code></th>
<td>0</td>
<td>End of Line Annotations are not displayed.</td>
</tr>
<tr>
<th align="left"><code>EOLANNOTATION_STANDARD</code></th>
<td>1</td>
<td>End of Line Annotations are drawn left justified with no adornment.</td>
</tr>
<tr>
<th align="left"><code>EOLANNOTATION_BOXED</code></th>
<td>2</td>
<td>End of Line Annotations are indented to match the text and are surrounded by a box.</td>
</tr>
</tbody>
</table>
<p>
<b id="SCI_EOLANNOTATIONSETSTYLEOFFSET">SCI_EOLANNOTATIONSETSTYLEOFFSET(int style)</b><br />
<b id="SCI_EOLANNOTATIONGETSTYLEOFFSET">SCI_EOLANNOTATIONGETSTYLEOFFSET &rarr; int</b><br />
End of Line Annotation styles may be completely separated from standard text styles by setting a style offset. For example,
<code>SCI_EOLANNOTATIONSETSTYLEOFFSET(512)</code> would allow the end of line annotation styles to be numbered from
512 up to 767 so they do not overlap styles set by lexers (or margins if margins offset is 256).
Each style number set with <code>SCI_EOLANNOTATIONSETSTYLE</code>
or <code>SCI_EOLANNOTATIONSETSTYLES</code> has the offset added before looking up the style.
</p>
<p>
Always call <a class="seealso" href="#SCI_ALLOCATEEXTENDEDSTYLES">SCI_ALLOCATEEXTENDEDSTYLES</a>
before <code>SCI_EOLANNOTATIONSETSTYLEOFFSET</code> and use the result as the argument to <code>SCI_EOLANNOTATIONSETSTYLEOFFSET</code>.
</p>
<h2 id="OtherSettings">Other settings</h2>
<code>
<a class="message" href="#SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool buffered)</a><br />
@ -3702,10 +3857,10 @@ struct Sci_TextToFind {
<code>SendMessage(hScintilla, WM_XXXX, WPARAM, LPARAM)</code> where <code>hScintilla</code> is
the handle to the Scintilla window you created as your editor.</p>
<p>While we are on the subject of forwarding messages in Windows, the top level window should
forward any <code>WM_SETTINGCHANGE</code> messages to Scintilla (this is currently used to
collect changes to mouse settings, but could be used for other user interface items in the
future).</p>
<p>On Windows, the top level window should forward any <code>WM_SETTINGCHANGE</code>,
<code>WM_SYSCOLORCHANGE</code>, and
<code>WM_DPICHANGED</code> messages to Scintilla as this allows Scintilla to respond to changes to
mouse settings, monitor resolution, colour scheme and similar system properties.</p>
<p><b id="SCI_SETBUFFEREDDRAW">SCI_SETBUFFEREDDRAW(bool buffered)</b><br />
<b id="SCI_GETBUFFEREDDRAW">SCI_GETBUFFEREDDRAW &rarr; bool</b><br />
@ -3861,6 +4016,7 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_BRACEHIGHLIGHTINDICATOR">SCI_BRACEHIGHLIGHTINDICATOR(bool useSetting, int indicator)</a><br />
<a class="message" href="#SCI_BRACEBADLIGHTINDICATOR">SCI_BRACEBADLIGHTINDICATOR(bool useSetting, int indicator)</a><br />
<a class="message" href="#SCI_BRACEMATCH">SCI_BRACEMATCH(position pos, int maxReStyle) &rarr; position</a><br />
<a class="message" href="#SCI_BRACEMATCHNEXT">SCI_BRACEMATCHNEXT(position pos, position startPos) &rarr; position</a><br />
</code>
<p><b id="SCI_BRACEHIGHLIGHT">SCI_BRACEHIGHLIGHT(position posA, position posB)</b><br />
@ -3896,6 +4052,10 @@ struct Sci_TextToFind {
<code class="parameter">maxReStyle</code> parameter must currently be 0 - it may be used in the future to limit
the length of brace searches.</p>
<p><b id="SCI_BRACEMATCHNEXT">SCI_BRACEMATCHNEXT(position pos, position startPos) &rarr; position</b><br />
Similar to <code>SCI_BRACEMATCH</code>, but matching starts at the explicit start position <code>startPos</code>
instead of the implicitly next position <code>pos &plusmn; 1</code>.</p>
<h2 id="TabsAndIndentationGuides">Tabs and Indentation Guides</h2>
<p>Indentation (the white space at the start of a line) is often used by programmers to clarify
@ -3912,8 +4072,11 @@ struct Sci_TextToFind {
inserting a tab at the current character position and backspace unindents the line rather than
deleting a character. Scintilla can also display indentation guides (vertical lines) to help
you to generate code.</p>
<code><a class="message" href="#SCI_SETTABWIDTH">SCI_SETTABWIDTH(int tabWidth)</a><br />
<code>
<a class="message" href="#SCI_SETTABWIDTH">SCI_SETTABWIDTH(int tabWidth)</a><br />
<a class="message" href="#SCI_GETTABWIDTH">SCI_GETTABWIDTH &rarr; int</a><br />
<a class="message" href="#SCI_SETTABMINIMUMWIDTH">SCI_SETTABMINIMUMWIDTH(int pixels)</a><br />
<a class="message" href="#SCI_GETTABMINIMUMWIDTH">SCI_GETTABMINIMUMWIDTH &rarr; int</a><br />
<a class="message" href="#SCI_CLEARTABSTOPS">SCI_CLEARTABSTOPS(line line)</a><br />
<a class="message" href="#SCI_ADDTABSTOP">SCI_ADDTABSTOP(line line, int x)</a><br />
<a class="message" href="#SCI_GETNEXTTABSTOP">SCI_GETNEXTTABSTOP(line line, int x) &rarr; int</a><br />
@ -3936,6 +4099,15 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_GETHIGHLIGHTGUIDE">SCI_GETHIGHLIGHTGUIDE &rarr; position</a><br />
</code>
<p><b id="SCI_SETTABMINIMUMWIDTH">SCI_SETTABMINIMUMWIDTH(int pixels)</b><br />
<b id="SCI_GETTABMINIMUMWIDTH">SCI_GETTABMINIMUMWIDTH &rarr; int</b><br />
<code>SCI_SETTABMINIMUMWIDTH</code> sets the minimum size of a tab in pixels to ensure that the tab
can be seen. The default value is 2. This is particularly useful with proportional fonts with fractional widths where
the character before the tab may end a fraction of a pixel before a tab stop, causing the tab to only be a fraction of
a pixel wide without this setting.
Where displaying a miniaturized version of the document, setting this to 0 may make the miniaturized
version lay out more like the normal size version.</p>
<p><b id="SCI_SETTABWIDTH">SCI_SETTABWIDTH(int tabWidth)</b><br />
<b id="SCI_GETTABWIDTH">SCI_GETTABWIDTH &rarr; int</b><br />
<code>SCI_SETTABWIDTH</code> sets the size of a tab as a multiple of the size of a space
@ -4083,8 +4255,10 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_MARKERGET">SCI_MARKERGET(line line) &rarr; int</a><br />
<a class="message" href="#SCI_MARKERNEXT">SCI_MARKERNEXT(line lineStart, int markerMask) &rarr; line</a><br />
<a class="message" href="#SCI_MARKERPREVIOUS">SCI_MARKERPREVIOUS(line lineStart, int markerMask) &rarr; line</a><br />
<a class="message" href="#SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; int</a><br />
<a class="message" href="#SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; line</a><br />
<a class="message" href="#SCI_MARKERDELETEHANDLE">SCI_MARKERDELETEHANDLE(int markerHandle)</a><br />
<a class="message" href="#SCI_MARKERHANDLEFROMLINE">SCI_MARKERHANDLEFROMLINE(line line, int which) &rarr; int</a><br />
<a class="message" href="#SCI_MARKERNUMBERFROMLINE">SCI_MARKERNUMBERFROMLINE(line line, int which) &rarr; int</a><br />
</code>
<p><b id="SCI_MARKERDEFINE">SCI_MARKERDEFINE(int markerNumber, int markerSymbol)</b><br />
@ -4341,7 +4515,7 @@ struct Sci_TextToFind {
message returns the line number of the first line that contains one of the markers in
<code class="parameter">markerMask</code> or -1 if no marker is found.</p>
<p><b id="SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; int</b><br />
<p><b id="SCI_MARKERLINEFROMHANDLE">SCI_MARKERLINEFROMHANDLE(int markerHandle) &rarr; line</b><br />
The <code class="parameter">markerHandle</code> argument is an identifier for a marker returned by <a
class="message" href="#SCI_MARKERADD"><code>SCI_MARKERADD</code></a>. This function searches
the document for the marker with this handle and returns the line number that contains it or -1
@ -4352,6 +4526,12 @@ struct Sci_TextToFind {
class="message" href="#SCI_MARKERADD"><code>SCI_MARKERADD</code></a>. This function searches
the document for the marker with this handle and deletes the marker if it is found.</p>
<p><b id="SCI_MARKERHANDLEFROMLINE">SCI_MARKERHANDLEFROMLINE(line line, int which) &rarr; int</b><br />
<b id="SCI_MARKERNUMBERFROMLINE">SCI_MARKERNUMBERFROMLINE(line line, int which) &rarr; int</b><br />
These messages returns the Nth marker handle or marker number in a given <code class="parameter">line</code>.
Handles are returned by <a class="message" href="#SCI_MARKERADD"><code>SCI_MARKERADD</code></a>.
If <code class="parameter">which</code> is greater or equal to the number of markers on a line, this returns -1;</p>
<h2 id="Indicators">Indicators</h2>
<p>Indicators are used to display additional information over the top of styling.
@ -4419,8 +4599,8 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_INDICATORCLEARRANGE">SCI_INDICATORCLEARRANGE(position start, position lengthClear)</a><br />
<a class="message" href="#SCI_INDICATORALLONFOR">SCI_INDICATORALLONFOR(position pos) &rarr; int</a><br />
<a class="message" href="#SCI_INDICATORVALUEAT">SCI_INDICATORVALUEAT(int indicator, position pos) &rarr; int</a><br />
<a class="message" href="#SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, position pos) &rarr; int</a><br />
<a class="message" href="#SCI_INDICATOREND">SCI_INDICATOREND(int indicator, position pos) &rarr; int</a><br />
<a class="message" href="#SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, position pos) &rarr; position</a><br />
<a class="message" href="#SCI_INDICATOREND">SCI_INDICATOREND(int indicator, position pos) &rarr; position</a><br />
<a class="message" href="#SCI_FINDINDICATORSHOW">SCI_FINDINDICATORSHOW(position start, position end)</a><br />
<a class="message" href="#SCI_FINDINDICATORFLASH">SCI_FINDINDICATORFLASH(position start, position end)</a><br />
@ -4742,8 +4922,8 @@ struct Sci_TextToFind {
</p>
<p>
<b id="SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, position pos) &rarr; int</b><br />
<b id="SCI_INDICATOREND">SCI_INDICATOREND(int indicator, position pos) &rarr; int</b><br />
<b id="SCI_INDICATORSTART">SCI_INDICATORSTART(int indicator, position pos) &rarr; position</b><br />
<b id="SCI_INDICATOREND">SCI_INDICATOREND(int indicator, position pos) &rarr; position</b><br />
Find the start or end of a range with one value from a position within the range.
Can be used to iterate through the document to discover all the indicator positions.
</p>
@ -5079,7 +5259,7 @@ struct Sci_TextToFind {
<a class="message" href="#SCI_CALLTIPACTIVE">SCI_CALLTIPACTIVE &rarr; bool</a><br />
<a class="message" href="#SCI_CALLTIPPOSSTART">SCI_CALLTIPPOSSTART &rarr; position</a><br />
<a class="message" href="#SCI_CALLTIPSETPOSSTART">SCI_CALLTIPSETPOSSTART(position posStart)</a><br />
<a class="message" href="#SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(int highlightStart, int
<a class="message" href="#SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(position highlightStart, position
highlightEnd)</a><br />
<a class="message" href="#SCI_CALLTIPSETBACK">SCI_CALLTIPSETBACK(colour back)</a><br />
<a class="message" href="#SCI_CALLTIPSETFORE">SCI_CALLTIPSETFORE(colour fore)</a><br />
@ -5118,7 +5298,7 @@ struct Sci_TextToFind {
This message returns or sets the value of the current position when <code>SCI_CALLTIPSHOW</code>
started to display the tip.</p>
<p><b id="SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(int highlightStart, int highlightEnd)</b><br />
<p><b id="SCI_CALLTIPSETHLT">SCI_CALLTIPSETHLT(position highlightStart, position highlightEnd)</b><br />
This sets the region of the call tips text to display in a highlighted style.
<code class="parameter">highlightStart</code> is the zero-based index into the string of the first character to
highlight and <code class="parameter">highlightEnd</code> is the index of the first character after the highlight.
@ -5489,6 +5669,12 @@ struct Sci_TextToFind {
If you are building a table, you might
want to use <code>SCMOD_NORM</code>, which has the value 0, to mean no modifiers.</p>
<p>On Win32, the numeric keypad with Alt pressed can be used to enter characters by number.
This can produce unexpected results in non-numlock mode when function keys are assigned so
potentially problematic keys are ignored. For example, setting
<code>SCMOD_ALT</code>,<code>SCK_UP</code> will only be active for the Up key on the
main cursor keys, not the numeric keypad.</p>
<p><b id="SCI_ASSIGNCMDKEY">SCI_ASSIGNCMDKEY(int <a class="jump"
href="#keyDefinition">keyDefinition</a>, int sciCommand)</b><br />
This assigns the given key definition to a Scintilla command identified by
@ -5732,17 +5918,16 @@ struct Sci_RangeToFormat {
<p><b id="SCI_SETPRINTWRAPMODE">SCI_SETPRINTWRAPMODE(int wrapMode)</b><br />
<b id="SCI_GETPRINTWRAPMODE">SCI_GETPRINTWRAPMODE &rarr; int</b><br />
These two functions get and set the printer wrap mode. <code class="parameter">wrapMode</code> can be
set to <code>SC_WRAP_NONE</code> (0), <code>SC_WRAP_WORD</code> (1) or
<code>SC_WRAP_CHAR</code> (2). The default is
set to <code>SC_WRAP_NONE</code> (0) or <code>SC_WRAP_WORD</code> (1).
The default is
<code>SC_WRAP_WORD</code>, which wraps printed output so that all characters fit
into the print rectangle. If you set <code>SC_WRAP_NONE</code>, each line of text
generates one line of output and the line is truncated if it is too long to fit
into the print area.<br />
<code>SC_WRAP_WORD</code> tries to wrap only between words as indicated by
white space or style changes although if a word is longer than a line, it will be wrapped before
the line end. <code>SC_WRAP_CHAR</code> is preferred to
<code>SC_WRAP_WORD</code> for Asian languages where there is no white space
between words.</p>
the line end. <br />
<code>SC_WRAP_CHAR</code> is not supported for printing.</p>
<h2 id="DirectAccess">Direct access</h2>
<code><a class="message" href="#SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION &rarr; pointer</a><br />
@ -6681,6 +6866,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<br />
<a class="message" href="#SCI_MULTIEDGEADDLINE">SCI_MULTIEDGEADDLINE(position column, colour edgeColour)</a><br />
<a class="message" href="#SCI_MULTIEDGECLEARALL">SCI_MULTIEDGECLEARALL</a><br />
<a class="message" href="#SCI_GETMULTIEDGECOLUMN">SCI_GETMULTIEDGECOLUMN(int which)</a>
<br />
</code>
<p><b id="SCI_SETEDGEMODE">SCI_SETEDGEMODE(int edgeMode)</b><br />
@ -6758,10 +6945,13 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<p><b id="SCI_MULTIEDGEADDLINE">SCI_MULTIEDGEADDLINE(position column,
<a class="jump" href="#colour">colour</a> edgeColour)</b><br />
<b id="SCI_MULTIEDGECLEARALL">SCI_MULTIEDGECLEARALL</b><br />
<b id="SCI_GETMULTIEDGECOLUMN">SCI_GETMULTIEDGECOLUMN(int which)</b><br />
<code>SCI_MULTIEDGEADDLINE</code> adds a new vertical edge to the view. The edge will be
displayed at the given column number. The resulting edge position depends on the metric
of a space character in <code>STYLE_DEFAULT</code>. All the edges can be cleared with
<code>SCI_MULTIEDGECLEARALL</code>.</p>
<code>SCI_MULTIEDGECLEARALL</code>. <code>SCI_GETMULTIEDGECOLUMN</code> returns the column of the
Nth vertical edge (indexed from 0). If <code class="parameter">which</code> is greater or equal
to the number of vertical edges, this returns -1.</p>
<h2 id="Accessibility">Accessibility</h2>
@ -6825,14 +7015,19 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
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 three
<p>If the symbol <code>SCI_EMPTYCATALOGUE</code> is defined when building
Scintilla, then no lexers are made available but other lexing support code may be present.</p>
<p>Scintilla also supports external lexers. These are DLLs (on Windows), .dylib modules (on macOS),
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>GetLexerFactory</code>. See <code>ExternalLexer.cxx</code> for more information.</p>
<a class="message" href="#SCI_SETLEXER">SCI_SETLEXER(int lexer)</a><br />
<a class="message" href="#SCI_GETLEXER">SCI_GETLEXER &rarr; int</a><br />
<a class="message" href="#SCI_SETLEXERLANGUAGE">SCI_SETLEXERLANGUAGE(&lt;unused&gt;, const char
*language)</a><br />
<a class="message" href="#SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE(&lt;unused&gt;, char *language) &rarr; int</a><br />
<a class="message" href="#SCI_SETILEXER">SCI_SETILEXER(&lt;unused&gt;, pointer ilexer)</a><br />
<a class="message" href="#SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, const char
*path)</a><br />
<a class="message" href="#SCI_COLOURISE">SCI_COLOURISE(position start, position end)</a><br />
@ -6883,14 +7078,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<code>Lex*.cxx</code> file and search for <code>LexerModule</code>. The third argument in the
<code>LexerModule</code> constructor is the name to use.</p>
<p>To test if your lexer assignment worked, use <a class="message"
<p class="provisional"><b id="SCI_SETILEXER">SCI_SETILEXER(&lt;unused&gt;, pointer ilexer)</b><br />
<code>SCI_SETILEXER</code> allows setting a lexer as an <code>ILexer5*</code>.
The lexer may be implemented by an application or a shared library such as Lexilla.</p>
<p>To test if your lexer assignment worked, use <a class="seealso"
href="#SCI_GETLEXER"><code>SCI_GETLEXER</code></a> before and after setting the new lexer to
see if the lexer number changed.</p>
<p><code>SCI_GETLEXERLANGUAGE</code> retrieves the name of the lexer.</p>
<p><b id="SCI_LOADLEXERLIBRARY">SCI_LOADLEXERLIBRARY(&lt;unused&gt;, const char *path)</b><br />
Load a lexer implemented in a shared library. This is a .so file on GTK/Linux or a .DLL file on Windows.
Load a lexer implemented in a shared library. This is a .so file on GTK/Linux, a .dylib file on macOS, or a .DLL file on Windows.
</p>
<p><b id="SCI_COLOURISE">SCI_COLOURISE(position start, position end)</b><br />
@ -7065,6 +7264,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
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 class="provisional">ILexer4 is extended with the provisional ILexer5 interface to support use of Lexilla.</p>
<p>A set of helper classes allows older lexers defined by functions to be used in Scintilla.</p>
<h4>ILexer4</h4>
@ -7099,6 +7300,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
<span class="S10">};</span><br />
</div>
<h4 class="provisional">ILexer5</h4>
<div class="highlighted">
<span><span class="S5">class</span><span class="S0"> </span>ILexer5<span class="S0"> </span><span class="S10">:</span><span class="S0"> </span><span class="S5">public</span><span class="S0"> </span>ILexer4<span class="S0"> </span><span class="S10">{</span><br />
<span class="S5">public</span><span class="S10">:</span><br />
<span class="S0">&nbsp; &nbsp; &nbsp; &nbsp; </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>GetName<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">&nbsp; &nbsp; &nbsp; &nbsp; </span><span class="S5">virtual</span><span class="S0"> </span><span class="S5">int</span><span class="S0"> </span>SCI_METHOD<span class="S0"> &nbsp;</span>GetIdentifier<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">&nbsp; &nbsp; &nbsp; &nbsp; </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>PropertyGet<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="S10">=</span><span class="S0"> </span><span class="S4">0</span><span class="S10">;</span><br />
<span class="S10">};</span><br />
<span class="S0"></span></span>
</div>
<p>
The types <code>Sci_Position</code> and <code>Sci_PositionU</code> are used for positions and line numbers in the document.
With Scintilla 4, 64-bit builds define these as 64-bit types to allow future implementation of documents larger than 2 GB.
@ -7146,6 +7359,15 @@ A set of common tags and conventions for combining them is <a class="jump" href
<code>DescriptionOfStyle</code> is an English description of the style like "<code>Function or method name definition</code>".
</p>
<p class="provisional"><code>GetName</code> and <code>GetIdentifier</code> may be called
to discover the identity of a lexer and be used to implement
<a class="seealso" href="#SCI_GETLEXERLANGUAGE">SCI_GETLEXERLANGUAGE</a> and
<a class="seealso" href="#SCI_GETLEXER">SCI_GETLEXER</a>.</p>
<p class="provisional"><code>PropertyGet</code> may be called
to discover the value of a property stored by a lexer and be used to implement
<a class="seealso" href="#SCI_GETPROPERTY">SCI_GETPROPERTY</a>.</p>
<h4>IDocument</h4>
<div class="highlighted">
@ -8555,7 +8777,7 @@ EM_SETTARGETDEVICE
<p>To change the set of lexers in Scintilla, add and remove lexer source files
(<code>Lex*.cxx</code>) from the <code>scintilla/lexers directory</code> and run the
<code>scripts/LexGen.py</code> script from the <code>scripts</code> directory to update the make files
and <code>Catalogue.cxx</code>. <code>LexGen.py</code> requires Python 2.5 or later. If you do
and <code>Catalogue.cxx</code>. <code>LexGen.py</code> requires Python 3.6 or later. If you do
not have access to Python, you can hand edit <code>Catalogue.cxx</code> in a simple-minded way,
following the patterns of other lexers. The important thing is to include
<code>LINK_LEXER(lmMyLexer);</code> to correspond with the <code>LexerModule

View File

@ -26,9 +26,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="https://www.scintilla.org/scintilla420.zip">
<font size="4"> <a href="https://www.scintilla.org/scintilla446.zip">
Windows</a>&nbsp;&nbsp;
<a href="https://www.scintilla.org/scintilla420.tgz">
<a href="https://www.scintilla.org/scintilla446.tgz">
GTK/Linux</a>&nbsp;&nbsp;
</font>
</td>
@ -42,7 +42,7 @@
containing very few restrictions.
</p>
<h3>
Release 4.2.0
Release 4.4.6
</h3>
<h4>
Source Code
@ -50,8 +50,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="https://www.scintilla.org/scintilla420.zip">zip format</a> (1.7M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/scintilla420.tgz">tgz format</a> (1.4M) commonly used on Linux and compatible operating systems</li>
<li><a href="https://www.scintilla.org/scintilla446.zip">zip format</a> (1.8M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/scintilla446.tgz">tgz format</a> (1.6M) 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>

View File

@ -111,8 +111,6 @@
<td>Willy Devaux</td>
<td>David Clain</td>
<td>Brendon Yenson</td>
</tr><tr>
<td>Philipp</td>
</tr><tr>
<td><a href="http://www.baanboard.com">Vamsi Potluru</a></td>
<td>Praveen Ambekar</td>
@ -534,17 +532,35 @@
<td>Henrik Hank</td>
<td>Luke Rasmussen</td>
</tr><tr>
<td>Philipp</td>
<td>maboroshin</td>
<td>Gokul Krishnan</td>
<td>John Horigan</td>
<td>jj5</td>
</tr><tr>
<td>jj5</td>
<td>Jad Altahan</td>
<td>Andrea Ricchi</td>
<td>Juarez Rudsatz</td>
<td>Wil van Antwerpen</td>
</tr><tr>
<td>Wil van Antwerpen</td>
<td>Hodong Kim</td>
<td>Michael Conrad</td>
<td>Dejan Budimir</td>
</tr><tr>
<td>Andreas Falkenhahn</td>
<td>Mark Reay</td>
<td>David Shuman</td>
<td>McLoo</td>
</tr><tr>
<td>Shmuel Zeigerman</td>
<td>Chris Graham</td>
<td>Hugues Larrive</td>
<td>Prakash Sahni</td>
</tr><tr>
<td>Michel Sauvard</td>
<td>uhf7</td>
<td>gnombat</td>
<td>Derek Brown</td>
</tr>
</table>
<p>
@ -556,6 +572,518 @@
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite446.zip">Release 4.4.6</a>
</h3>
<ul>
<li>
Released 1 December 2020.
</li>
<li>
Fix building with Xcode 12.
<a href="https://sourceforge.net/p/scintilla/bugs/2187/">Bug #2187</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite445.zip">Release 4.4.5</a>
</h3>
<ul>
<li>
Released 11 September 2020.
</li>
<li>
Lexilla interface supports setting initialisation properties on lexer libraries with
SetLibraryProperty and GetLibraryPropertyNames functions.
These are called by SciTE which will forward properties to lexer libraries that are prefixed with
"lexilla.context.".
</li>
<li>
Allow cross-building for GTK by choosing pkg-config.
<a href="https://sourceforge.net/p/scintilla/bugs/2189/">Bug #2189</a>.
</li>
<li>
On GTK, allow setting CPPFLAGS (and LDFLAGS for SciTE) to support hardening.
<a href="https://sourceforge.net/p/scintilla/bugs/2191/">Bug #2191</a>.
</li>
<li>
Changed SciTE's indent.auto mode to set tab size to indent size when file uses tabs for indentation.
<a href="https://sourceforge.net/p/scintilla/bugs/2198/">Bug #2198</a>.
</li>
<li>
Fix position of marker symbols for SC_MARGIN_RTEXT which were being moved based on
width of text.
</li>
<li>
Fixed bug on Win32 where cursor was flickering between hand and text over an
indicator with hover style.
<a href="https://sourceforge.net/p/scintilla/bugs/2170/">Bug #2170</a>.
</li>
<li>
Fixed bug where hovered indicator was not returning to non-hover
appearance when mouse moved out of window or into margin.
<a href="https://sourceforge.net/p/scintilla/bugs/2193/">Bug #2193</a>.
</li>
<li>
Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover
colour to the whole range.
<a href="https://sourceforge.net/p/scintilla/bugs/2199/">Bug #2199</a>.
</li>
<li>
Fixed bug where gradient indicators were not showing hovered appearance.
</li>
<li>
Fixed bug where layout caching was ineffective.
<a href="https://sourceforge.net/p/scintilla/bugs/2197/">Bug #2197</a>.
</li>
<li>
For SciTE, don't show the output pane for quiet jobs.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1365/">Feature #1365</a>.
</li>
<li>
Support command.quiet for SciTE on GTK.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1365/">Feature #1365</a>.
</li>
<li>
Fixed a bug in SciTE with stack balance when a syntax error in the Lua startup script
caused continuing failures to find functions after the syntax error was corrected.
<a href="https://sourceforge.net/p/scintilla/bugs/2176/">Bug #2176</a>.
</li>
<li>
Added method for iterating through multiple vertical edges: SCI_GETMULTIEDGECOLUMN.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1350/">Feature #1350</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite444.zip">Release 4.4.4</a>
</h3>
<ul>
<li>
Released 21 July 2020.
</li>
<li>
End of line annotations implemented.
<a href="https://sourceforge.net/p/scintilla/bugs/2141/">Bug #2141</a>.
</li>
<li>
Add SCI_BRACEMATCHNEXT API.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1368/">Feature #1368</a>.
</li>
<li>
The latex lexer supports lstlisting environment that is similar to verbatim.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1358/">Feature #1358</a>.
</li>
<li>
For SciTE on Linux, place liblexilla.so and libscintilla.so in /usr/lib/scite.
<a href="https://sourceforge.net/p/scintilla/bugs/2184/">Bug #2184</a>.
</li>
<li>
Round SCI_TEXTWIDTH instead of truncating as this may be more accurate when sizing application
elements to match text.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1355/">Feature #1355</a>.
</li>
<li>
Display DEL control character as visible "DEL" block like other control characters.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1369/">Feature #1369</a>.
</li>
<li>
Allow caret width to be up to 20 pixels.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1361/">Feature #1361</a>.
</li>
<li>
SciTE on Windows adds create.hidden.console option to stop console window flashing
when Lua script calls os.execute or io.popen.
</li>
<li>
Fix translucent rectangle drawing on Qt. When drawing a translucent selection, there were edge
artifacts as the calls used were drawing outlines over fill areas. Make bottom and right borders on
INDIC_ROUNDBOX be same intensity as top and left.
Replaced some deprecated Qt calls with currently supported calls.
</li>
<li>
Fix printing on Windows to use correct text size.
<a href="https://sourceforge.net/p/scintilla/bugs/2185/">Bug #2185</a>.
</li>
<li>
Fix bug on Win32 where calling WM_GETTEXT for more text than in document could return
less text than in document.
</li>
<li>
Fixed a bug in SciTE with Lua stack balance causing failure to find
functions after reloading script.
<a href="https://sourceforge.net/p/scintilla/bugs/2176/">Bug #2176</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite443.zip">Release 4.4.3</a>
</h3>
<ul>
<li>
Released 3 June 2020.
</li>
<li>
Fix syntax highlighting for SciTE on Windows by setting executable directory for loading Lexilla.
<a href="https://sourceforge.net/p/scintilla/bugs/2181/">Bug #2181</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite442.zip">Release 4.4.2</a>
</h3>
<ul>
<li>
Released 2 June 2020.
</li>
<li>
On Cocoa using Xcode changed Lexilla.dylib install path to @rpath as would otherwise try /usr/lib which
won't work for sandboxed applications.
</li>
<li>
On Cocoa using Xcode made work on old versions of macOS by specifying deployment target as 10.8
instead of 10.15.
</li>
<li>
On Win32 fix static linking of Lexilla by specifying calling convention in Lexilla.h.
</li>
<li>
SciTE now uses default shared library extension even when directory contains '.'.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite440.zip">Release 4.4.0</a>
</h3>
<ul>
<li>
Released 1 June 2020.
</li>
<li>
Added Xcode project files for Lexilla and Scintilla with no lexers (cocoa/Scintilla).
</li>
<li>
For GTK, build a shared library with no lexers libscintilla.so or libscintilla.dll.
</li>
<li>
Lexilla used as a shared library for most builds of SciTE except for the single file executable on Win32.
On GTK, Scintilla shared library used.
LexillaLibrary code can be copied out of SciTE for other applications that want to interface to Lexilla.
</li>
<li>
Constants in Scintilla.h can be disabled with SCI_DISABLE_AUTOGENERATED.
</li>
<li>
Implement per-monitor DPI Awareness on Win32 so both Scintilla and SciTE
will adapt to the display scale when moved between monitors.
Applications should forward WM_DPICHANGED to Scintilla.
<a href="https://sourceforge.net/p/scintilla/bugs/2171/">Bug #2171</a>,
<a href="https://sourceforge.net/p/scintilla/bugs/2063/">Bug #2063</a>.
</li>
<li>
Optimized performance when opening huge files.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1347/">Feature #1347</a>.
</li>
<li>
Add Appearance and Contrast properties to SciTE that allow customising visuals for dark mode and
high contrast modes.
</li>
<li>
Fixed bug in Batch lexer where a single character line with a single character line end continued
state onto the next line.
</li>
<li>
Added SCE_ERR_GCC_EXCERPT style for GCC 9 diagnostics in errorlist lexer.
</li>
<li>
Fixed buffer over-read bug with absolute references in MMIXAL lexer.
<a href="https://sourceforge.net/p/scintilla/bugs/2019/">Bug #2019</a>.
</li>
<li>
Fixed bug with GTK on recent Linux distributions where underscores were invisible.
<a href="https://sourceforge.net/p/scintilla/bugs/2173/">Bug #2173</a>.
</li>
<li>
Fixed GTK on Linux bug when pasting from closed application.
<a href="https://sourceforge.net/p/scintilla/bugs/2175/">Bug #2175</a>.
</li>
<li>
Fixed bug in SciTE with Lua stack balance.
<a href="https://sourceforge.net/p/scintilla/bugs/2176/">Bug #2176</a>.
</li>
<li>
For macOS, SciTE reverts to running python (2) due to python3 not being available in the sandbox.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite433.zip">Release 4.3.3</a>
</h3>
<ul>
<li>
Released 27 April 2020.
</li>
<li>
Added Visual Studio project files for Lexilla and Scintilla with no lexers.
</li>
<li>
Add methods for iterating through the marker handles and marker numbers on a line:
SCI_MARKERHANDLEFROMLINE and SCI_MARKERNUMBERFROMLINE.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1344/">Feature #1344</a>.
</li>
<li>
Assembler lexers asm and as can change comment character with lexer.as.comment.character property.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1314/">Feature #1314</a>.
</li>
<li>
Fix brace styling in Batch lexer so that brace matching works.
<a href="https://sourceforge.net/p/scintilla/bugs/1624/">Bug #1624</a>,
<a href="https://sourceforge.net/p/scintilla/bugs/1906/">Bug #1906</a>,
<a href="https://sourceforge.net/p/scintilla/bugs/1997/">Bug #1997</a>,
<a href="https://sourceforge.net/p/scintilla/bugs/2065/">Bug #2065</a>.
</li>
<li>
Change Perl lexer to style all line ends of comment lines in comment line style.
Previously, the last character was in default style which made the characters in
\r\n line ends have mismatching styles.
<a href="https://sourceforge.net/p/scintilla/bugs/2164/">Bug #2164</a>.
</li>
<li>
When a lexer has been set with SCI_SETILEXER, fix SCI_GETLEXER and avoid
sending SCN_STYLENEEDED notifications.
</li>
<li>
On Win32 fix handling Japanese IME input when both GCS_COMPSTR and
GCS_RESULTSTR set.
</li>
<li>
With Qt on Win32 add support for line copy format on clipboard, compatible with Visual Studio.
<a href="https://sourceforge.net/p/scintilla/bugs/2167/">Bug #2167</a>.
</li>
<li>
On Qt with default encoding (ISO 8859-1) fix bug where 'µ' (Micro Sign) case-insensitively matches '?'
<a href="https://sourceforge.net/p/scintilla/bugs/2168/">Bug #2168</a>.
</li>
<li>
On GTK with Wayland fix display of windowed IME.
<a href="https://sourceforge.net/p/scintilla/bugs/2149/">Bug #2149</a>.
</li>
<li>
For Python programs, SciTE defaults to running python3 on Unix and pyw on Windows which will run
the most recently installed Python in many cases.
Set the "python.command" property to override this.
Scripts distributed with Scintilla and SciTE are checked with Python 3 and may not work with Python 2.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite432.zip">Release 4.3.2</a>
</h3>
<ul>
<li>
Released 6 March 2020.
</li>
<li>
On Win32 fix new bug that treated all dropped text as rectangular.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite431.zip">Release 4.3.1</a>
</h3>
<ul>
<li>
Released 4 March 2020.
</li>
<li>
Add default argument for StyleContext::GetRelative.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1336/">Feature #1336</a>.
</li>
<li>
Fix drag and drop between different encodings on Win32 by always providing CF_UNICODETEXT only.
<a href="https://sourceforge.net/p/scintilla/bugs/2151/">Bug #2151</a>.
</li>
<li>
Automatically scroll while dragging text.
<a href="https://sourceforge.net/p/scintilla/feature-requests/497/">Feature #497</a>.
</li>
<li>
On Win32, the numeric keypad with Alt pressed can be used to enter characters by number.
This can produce unexpected results in non-numlock mode when function keys are assigned.
Potentially problematic keys like Alt+KeypadUp are now ignored.
<a href="https://sourceforge.net/p/scintilla/bugs/2152/">Bug #2152</a>.
</li>
<li>
Crash fixed with Direct2D on Win32 when updating driver.
<a href="https://sourceforge.net/p/scintilla/bugs/2138/">Bug #2138</a>.
</li>
<li>
For SciTE on Win32, fix crashes when Lua script closes application.
<a href="https://sourceforge.net/p/scintilla/bugs/2155/">Bug #2155</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite430.zip">Release 4.3.0</a>
</h3>
<ul>
<li>
Released 16 January 2020.
</li>
<li>
Lexers made available as Lexilla library.
TestLexers program with tests for Lexilla and lexers added in lexilla/test.
</li>
<li>
SCI_SETILEXER implemented to use lexers from Lexilla or other sources.
</li>
<li>
ILexer5 interface defined provisionally to support use of Lexilla.
The details of this interface may change before being stabilised in Scintilla 5.0.
</li>
<li>
SCI_LOADLEXERLIBRARY implemented on Cocoa.
</li>
<li>
Build Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available.
</li>
<li>
Lexer and folder added for Raku language.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1328/">Feature #1328</a>.
</li>
<li>
Don't clear clipboard before copying text with Qt.
<a href="https://sourceforge.net/p/scintilla/bugs/2147/">Bug #2147</a>.
</li>
<li>
On Win32, remove support for CF_TEXT clipboard format as Windows will convert to
CF_UNICODETEXT.
</li>
<li>
Improve IME behaviour on GTK.
Set candidate position for windowed IME.
Improve location of candidate window.
Prevent movement of candidate window while typing.
<a href="https://sourceforge.net/p/scintilla/bugs/2135/">Bug #2135</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite423.zip">Release 4.2.3</a>
</h3>
<ul>
<li>
Released 11 December 2019.
</li>
<li>
Fix failure in SciTE's Complete Symbol command.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite422.zip">Release 4.2.2</a>
</h3>
<ul>
<li>
Released 7 December 2019.
</li>
<li>
Move rather than grow selection when insertion at start.
<a href="https://sourceforge.net/p/scintilla/bugs/2140/">Bug #2140</a>.
</li>
<li>
Allow target to have virtual space.
Add methods for finding the virtual space at start and end of multiple selections.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1316/">Feature #1316</a>.
</li>
<li>
SciTE on Win32 adds mouse button "Forward" and "Backward" key definitions for use in
properties like user.shortcuts.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1317/">Feature #1317</a>.
</li>
<li>
Lexer and folder added for Hollywood language.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1324/">Feature #1324</a>.
</li>
<li>
HTML lexer treats custom tags from HTML5 as known tags. These contain "-" like "custom-tag".
<a href="https://sourceforge.net/p/scintilla/feature-requests/1299/">Feature #1299</a>.
</li>
<li>
HTML lexer fixes bug with some non-alphabetic characters in unknown tags.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1320/">Feature #1320</a>.
</li>
<li>
Fix bug in properties file lexer where long lines were only styled for the first 1024 characters.
<a href="https://sourceforge.net/p/scintilla/bugs/1933/">Bug #1933</a>.
</li>
<li>
Ruby lexer recognizes squiggly heredocs.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1326/">Feature #1326</a>.
</li>
<li>
Avoid unnecessary IME caret movement on Win32.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1304/">Feature #1304</a>.
</li>
<li>
Clear IME state when switching language on Win32.
<a href="https://sourceforge.net/p/scintilla/bugs/2137/">Bug #2137</a>.
</li>
<li>
Fixed drawing of translucent rounded rectangles on Win32 with Direct2D.
<a href="https://sourceforge.net/p/scintilla/bugs/2144/">Bug #2144</a>.
</li>
<li>
Setting rectangular selection made faster.
<a href="https://sourceforge.net/p/scintilla/bugs/2130/">Bug #2130</a>.
</li>
<li>
SciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite421.zip">Release 4.2.1</a>
</h3>
<ul>
<li>
Released 24 October 2019.
</li>
<li>
Add SCI_SETTABMINIMUMWIDTH to set the minimum width of tabs.
This allows minimaps or overviews to be layed out to match the full size editing view.
<a href="https://sourceforge.net/p/scintilla/bugs/2118/">Bug #2118</a>.
</li>
<li>
SciTE enables use of SCI_ commands in user.context.menu.
</li>
<li>
XML folder adds fold.xml.at.tag.open option to fold tags at the start of the tag "&lt;" instead of the end "&gt;".
<a href="https://sourceforge.net/p/scintilla/bugs/2128/">Bug #2128</a>.
</li>
<li>
Metapost lexer fixes crash with 'interface=none' comment.
<a href="https://sourceforge.net/p/scintilla/bugs/2129/">Bug #2129</a>.
</li>
<li>
Perl lexer supports indented here-docs.
<a href="https://sourceforge.net/p/scintilla/bugs/2121/">Bug #2121</a>.
</li>
<li>
Perl folder folds qw arrays.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1306/">Feature #1306</a>.
</li>
<li>
TCL folder can turn off whitespace flag by setting fold.compact property to 0.
<a href="https://sourceforge.net/p/scintilla/bugs/2131/">Bug #2131</a>.
</li>
<li>
Optimize setting up keyword lists in lexers.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1305/">Feature #1305</a>.
</li>
<li>
Updated case conversion and character categories to Unicode 12.1.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1315/">Feature #1315</a>.
</li>
<li>
On Win32, stop the IME candidate window moving unnecessarily and position it better.<br />
Stop candidate window overlapping composition text and taskbar.<br />
Position candidate window closer to composition text.<br />
Stop candidate window moving while typing.<br />
Align candidate window to target part of composition text.<br />
Stop Google IME on Windows 7 moving while typing.<br />
<a href="https://sourceforge.net/p/scintilla/bugs/2120/">Bug #2120</a>.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1300/">Feature #1300</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/scite420.zip">Release 4.2.0</a>
</h3>

View File

@ -127,6 +127,14 @@
<h3>
Projects using Scintilla
</h3>
<p>
<a href="https://www.javacardos.com/tools">JCIDE</a>
is an IDE designed specifically for the Java Card programming language.
</p>
<p>
<a href="http://www.microissuer.com/?p=176">Snooper</a>
is an IDE for the smart card industry.
</p>
<p>
<a href="https://github.com/martinrotter/textilosaurus">Textilosaurus</a>
is simple cross-platform UTF-8 text editor based on Qt and Scintilla.

View File

@ -7,6 +7,20 @@
<meta name="generator" content="SciTE" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#menu {
margin: 0;
padding: .5em 0;
list-style-type: none;
font-size: larger;
background: #CCCCCC;
}
#menu li {
margin: 0;
padding: 0 .5em;
display: inline;
}
</style>
<title>
Scintilla and SciTE To Do
</title>
@ -23,6 +37,10 @@
</td>
</tr>
</table>
<ul id="menu">
<li><a href="https://sourceforge.net/p/scintilla/bugs/">Bugs</a></li>
<li><a href="https://sourceforge.net/p/scintilla/feature-requests/">Feature Requests</a></li>
</ul>
<h2>
Bugs and To Do List
</h2>
@ -33,12 +51,6 @@
Issues can be reported on the <a href="https://sourceforge.net/p/scintilla/bugs/">Bug Tracker</a>
and features requested on the <a href="https://sourceforge.net/p/scintilla/feature-requests/">Feature Request Tracker</a>.
</p>
<h3>
Scintilla Bugs
</h3>
<p>
Automatic scrolling when text dragged near edge of window.
</p>
<h3>
Scintilla To Do
</h3>

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -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="20190705" />
<meta name="Date.Modified" content="20201201" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
#versionlist {
@ -56,8 +56,8 @@
GTK, and OS X</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3"> Release version 4.2.0<br />
Site last modified July 5 2019</font>
<font color="#FFCC99" size="3"> Release version 4.4.6<br />
Site last modified December 1 2020</font>
</td>
<td width="20%">
&nbsp;
@ -72,12 +72,13 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 4.2.0 adds new types to Scintilla.iface.</li>
<li>Version 4.1.7 is just to match a bug-fix release of SciTE and changes nothing in Scintilla.</li>
<li>Version 4.1.6 adds an X12 lexer and improves performance on huge files.</li>
<li>Version 4.1.5 removes special handling of non-0 wParam to WM_PAINT on Win32 and changes
clipboard operations on GTK to avoid flickering.</li>
<li>Version 4.1.4 makes calltips work on Qt and adds a lexer for .NET's Common Intermediate Language CIL.</li>
<li>Version 4.4.6 fixes building with Xcode 12.</li>
<li>Version 4.4.5 fixes bugs with indicators, margin text, and ineffective layout caching.</li>
<li>Version 4.4.4 implements end of line annotations.</li>
<li>Version 4.4.3 was released just to fix SciTE.</li>
<li>Version 4.4.2 fixes Lexilla build problems with Xcode and as a static library on Win32.</li>
<li>Version 4.4.0 builds Scintilla without lexers as a shared library for GTK,
and adds Xcode projects for Scintilla without lexers and Lexilla on macOS.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>

View File

@ -29,6 +29,11 @@ public:
iconvh = iconvhBad;
Open(charSetDestination, charSetSource, transliterations);
}
// Deleted so Converter objects can not be copied.
Converter(const Converter &) = delete;
Converter(Converter &&) = delete;
Converter &operator=(const Converter &) = delete;
Converter &operator=(Converter &&) = delete;
~Converter() {
Close();
}

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# DepGen.py - produce a make dependencies file for Scintilla
# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# Requires Python 2.7 or later
# Requires Python 3.6 or later
import sys
@ -10,7 +10,7 @@ sys.path.append("..")
from scripts import Dependencies
topComment = "# Created by DepGen.py. To recreate, run 'python DepGen.py'.\n"
topComment = "# Created by DepGen.py. To recreate, run DepGen.py.\n"
def Generate():
sources = ["../src/*.cxx", "../lexlib/*.cxx", "../lexers/*.cxx"]

View File

@ -27,7 +27,6 @@
#include "Scintilla.h"
#include "ScintillaWidget.h"
#include "StringCopy.h"
#include "IntegerRectangle.h"
#include "XPM.h"
#include "UniConversion.h"
@ -43,16 +42,16 @@ using namespace Scintilla;
namespace {
const double kPi = 3.14159265358979323846;
constexpr double kPi = 3.14159265358979323846;
// The Pango version guard for pango_units_from_double and pango_units_to_double
// is more complex than simply implementing these here.
int pangoUnitsFromDouble(double d) noexcept {
constexpr int pangoUnitsFromDouble(double d) noexcept {
return static_cast<int>(d * PANGO_SCALE + 0.5);
}
float floatFromPangoUnits(int pu) noexcept {
constexpr float floatFromPangoUnits(int pu) noexcept {
return static_cast<float>(pu) / PANGO_SCALE;
}
@ -81,6 +80,11 @@ public:
pfd = pfd_;
characterSet = characterSet_;
}
// Deleted so FontHandle objects can not be copied.
FontHandle(const FontHandle &) = delete;
FontHandle(FontHandle &&) = delete;
FontHandle &operator=(const FontHandle &) = delete;
FontHandle &operator=(FontHandle &&) = delete;
~FontHandle() {
if (pfd)
pango_font_description_free(pfd);
@ -104,7 +108,7 @@ FontHandle *FontHandle::CreateNewFont(const FontParameters &fp) {
}
// X has a 16 bit coordinate space, so stop drawing here to avoid wrapping
const int maxCoordinate = 32000;
constexpr int maxCoordinate = 32000;
FontHandle *PFont(const Font &f) noexcept {
return static_cast<FontHandle *>(f.GetID());
@ -146,6 +150,11 @@ class SurfaceImpl : public Surface {
void SetConverter(int characterSet_);
public:
SurfaceImpl() noexcept;
// Deleted so SurfaceImpl objects can not be copied.
SurfaceImpl(const SurfaceImpl&) = delete;
SurfaceImpl(SurfaceImpl&&) = delete;
SurfaceImpl&operator=(const SurfaceImpl&) = delete;
SurfaceImpl&operator=(SurfaceImpl&&) = delete;
~SurfaceImpl() override;
void Init(WindowID wid) override;
@ -174,7 +183,7 @@ public:
std::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;
void DrawTextBase(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore);
void DrawTextBase(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore);
void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override;
void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override;
void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) override;
@ -296,7 +305,7 @@ bool SurfaceImpl::Initialised() {
if (inited && context) {
if (cairo_status(context) == CAIRO_STATUS_SUCCESS) {
// Even when status is success, the target surface may have been
// finished whch may cause an assertion to fail crashing the application.
// finished which may cause an assertion to fail crashing the application.
// The cairo_surface_has_show_text_glyphs call checks the finished flag
// and when set, sets the status to CAIRO_STATUS_SURFACE_FINISHED
// which leads to warning messages instead of crashes.
@ -343,7 +352,8 @@ void SurfaceImpl::Init(SurfaceID sid, WindowID wid) {
void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID wid) {
PLATFORM_ASSERT(surface_);
Release();
SurfaceImpl *surfImpl = static_cast<SurfaceImpl *>(surface_);
SurfaceImpl *surfImpl = dynamic_cast<SurfaceImpl *>(surface_);
PLATFORM_ASSERT(surfImpl);
PLATFORM_ASSERT(wid);
context = cairo_reference(surfImpl->context);
pcontext = gtk_widget_create_pango_context(PWidget(wid));
@ -452,7 +462,7 @@ void SurfaceImpl::Polygon(Point *pts, size_t npts, ColourDesired fore,
void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) {
if (context) {
cairo_rectangle(context, rc.left + 0.5, rc.top + 0.5,
rc.right - rc.left - 1, rc.bottom - rc.top - 1);
rc.Width() - 1, rc.Height() - 1);
PenColour(back);
cairo_fill_preserve(context);
PenColour(fore);
@ -465,35 +475,19 @@ void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) {
if (context && (rc.left < maxCoordinate)) { // Protect against out of range
rc.left = std::round(rc.left);
rc.right = std::round(rc.right);
cairo_rectangle(context, rc.left, rc.top,
rc.right - rc.left, rc.bottom - rc.top);
cairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());
cairo_fill(context);
}
}
void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern) {
SurfaceImpl &surfi = static_cast<SurfaceImpl &>(surfacePattern);
const bool canDraw = surfi.psurf != nullptr;
if (canDraw) {
PLATFORM_ASSERT(context);
SurfaceImpl &surfi = dynamic_cast<SurfaceImpl &>(surfacePattern);
if (context && surfi.psurf) {
// Tile pattern over rectangle
// Currently assumes 8x8 pattern
const int widthPat = 8;
const int heightPat = 8;
const IntegerRectangle irc(rc);
for (int xTile = irc.left; xTile < irc.right; xTile += widthPat) {
const int widthx = (xTile + widthPat > irc.right) ? irc.right - xTile : widthPat;
for (int yTile = irc.top; yTile < irc.bottom; yTile += heightPat) {
const int heighty = (yTile + heightPat > irc.bottom) ? irc.bottom - yTile : heightPat;
cairo_set_source_surface(context, surfi.psurf, xTile, yTile);
cairo_rectangle(context, xTile, yTile, widthx, heighty);
cairo_fill(context);
}
}
} else {
// Something is wrong so try to show anyway
// Shows up black because colour not allocated
FillRectangle(rc, ColourDesired(0));
cairo_set_source_surface(context, surfi.psurf, rc.left, rc.top);
cairo_pattern_set_extend(cairo_get_source(context), CAIRO_EXTEND_REPEAT);
cairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());
cairo_fill(context);
}
}
@ -516,8 +510,8 @@ void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesi
}
}
static void PathRoundRectangle(cairo_t *context, double left, double top, double width, double height, int radius) noexcept {
const double degrees = kPi / 180.0;
static void PathRoundRectangle(cairo_t *context, double left, double top, double width, double height, double radius) noexcept {
constexpr double degrees = kPi / 180.0;
cairo_new_sub_path(context);
cairo_arc(context, left + width - radius, top + radius, radius, -90 * degrees, 0 * degrees);
@ -537,9 +531,9 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fi
cdFill.GetBlue() / 255.0,
alphaFill / 255.0);
if (cornerSize > 0)
PathRoundRectangle(context, rc.left + 1.0, rc.top + 1.0, rc.right - rc.left - 2.0, rc.bottom - rc.top - 2.0, cornerSize);
PathRoundRectangle(context, rc.left + 1.0, rc.top + 1.0, rc.Width() - 2.0, rc.Height() - 2.0, cornerSize);
else
cairo_rectangle(context, rc.left + 1.0, rc.top + 1.0, rc.right - rc.left - 2.0, rc.bottom - rc.top - 2.0);
cairo_rectangle(context, rc.left + 1.0, rc.top + 1.0, rc.Width() - 2.0, rc.Height() - 2.0);
cairo_fill(context);
const ColourDesired cdOutline(outline.AsInteger());
@ -549,9 +543,9 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fi
cdOutline.GetBlue() / 255.0,
alphaOutline / 255.0);
if (cornerSize > 0)
PathRoundRectangle(context, rc.left + 0.5, rc.top + 0.5, rc.right - rc.left - 1, rc.bottom - rc.top - 1, cornerSize);
PathRoundRectangle(context, rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1, cornerSize);
else
cairo_rectangle(context, rc.left + 0.5, rc.top + 0.5, rc.right - rc.left - 1, rc.bottom - rc.top - 1);
cairo_rectangle(context, rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1);
cairo_stroke(context);
}
}
@ -591,23 +585,18 @@ void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsi
rc.top += (rc.Height() - height) / 2;
rc.bottom = rc.top + height;
int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
const int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
const int ucs = stride * height;
std::vector<unsigned char> image(ucs);
for (int iy=0; iy<height; iy++) {
for (int ix=0; ix<width; ix++) {
unsigned char *pixel = &image[0] + iy*stride + ix * 4;
const unsigned char alpha = pixelsImage[3];
pixel[2] = (*pixelsImage++) * alpha / 255;
pixel[1] = (*pixelsImage++) * alpha / 255;
pixel[0] = (*pixelsImage++) * alpha / 255;
pixel[3] = *pixelsImage++;
}
for (ptrdiff_t iy=0; iy<height; iy++) {
unsigned char *pixel = &image[0] + iy*stride;
RGBAImage::BGRAFromRGBA(pixel, pixelsImage, width);
pixelsImage += RGBAImage::bytesPerPixel * width;
}
cairo_surface_t *psurfImage = cairo_image_surface_create_for_data(&image[0], CAIRO_FORMAT_ARGB32, width, height, stride);
cairo_set_source_surface(context, psurfImage, rc.left, rc.top);
cairo_rectangle(context, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
cairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());
cairo_fill(context);
cairo_surface_destroy(psurfImage);
@ -630,7 +619,7 @@ void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) {
PLATFORM_ASSERT(context);
cairo_set_source_surface(context, surfi.psurf,
rc.left - from.x, rc.top - from.y);
cairo_rectangle(context, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top);
cairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());
cairo_fill(context);
}
}
@ -642,7 +631,7 @@ std::unique_ptr<IScreenLineLayout> SurfaceImpl::Layout(const IScreenLine *) {
std::string UTF8FromLatin1(std::string_view text) {
std::string utfForm(text.length()*2 + 1, '\0');
size_t lenU = 0;
for (char ch : text) {
for (const char ch : text) {
const unsigned char uch = ch;
if (uch < 0x80) {
utfForm[lenU++] = uch;
@ -655,7 +644,9 @@ std::string UTF8FromLatin1(std::string_view text) {
return utfForm;
}
static std::string UTF8FromIconv(const Converter &conv, std::string_view text) {
namespace {
std::string UTF8FromIconv(const Converter &conv, std::string_view text) {
if (conv) {
std::string utfForm(text.length()*3+1, '\0');
char *pin = const_cast<char *>(text.data());
@ -675,9 +666,9 @@ static std::string UTF8FromIconv(const Converter &conv, std::string_view text) {
// Work out how many bytes are in a character by trying to convert using iconv,
// returning the first length that succeeds.
static size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t len) {
size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t len) noexcept {
for (size_t lenMB=1; (lenMB<4) && (lenMB <= len); lenMB++) {
char wcForm[2];
char wcForm[2] {};
char *pin = const_cast<char *>(s);
gsize inLeft = lenMB;
char *pout = wcForm;
@ -690,7 +681,9 @@ static size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t
return 1;
}
void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text,
}
void SurfaceImpl::DrawTextBase(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text,
ColourDesired fore) {
PenColour(fore);
if (context) {
@ -755,6 +748,12 @@ public:
iter = pango_layout_get_iter(layout);
pango_layout_iter_get_cluster_extents(iter, nullptr, &pos);
}
// Deleted so ClusterIterator objects can not be copied.
ClusterIterator(const ClusterIterator&) = delete;
ClusterIterator(ClusterIterator&&) = delete;
ClusterIterator&operator=(const ClusterIterator&) = delete;
ClusterIterator&operator=(ClusterIterator&&) = delete;
~ClusterIterator() {
pango_layout_iter_free(iter);
}
@ -821,7 +820,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, std::string_view text, XYPOSITION *
positions[i++] = iti.position - (places - place) * iti.distance / places;
positionsCalculated++;
}
clusterStart += UTF8BytesOfLead[static_cast<unsigned char>(utfForm.c_str()[clusterStart])];
clusterStart += UTF8BytesOfLead[static_cast<unsigned char>(utfForm[clusterStart])];
place++;
}
}
@ -885,7 +884,6 @@ XYPOSITION SurfaceImpl::WidthText(Font &font_, std::string_view text) {
if (PFont(font_)->pfd) {
std::string utfForm;
pango_layout_set_font_description(layout, PFont(font_)->pfd);
PangoRectangle pos;
if (et == UTF8) {
pango_layout_set_text(layout, text.data(), text.length());
} else {
@ -897,6 +895,7 @@ XYPOSITION SurfaceImpl::WidthText(Font &font_, std::string_view text) {
pango_layout_set_text(layout, utfForm.c_str(), utfForm.length());
}
PangoLayoutLine *pangoLine = pango_layout_get_line_readonly(layout, 0);
PangoRectangle pos {};
pango_layout_line_get_extents(pangoLine, nullptr, &pos);
return floatFromPangoUnits(pos.width);
}
@ -915,7 +914,7 @@ XYPOSITION SurfaceImpl::Ascent(Font &font_) {
if (PFont(font_)->pfd) {
PangoFontMetrics *metrics = pango_context_get_metrics(pcontext,
PFont(font_)->pfd, pango_context_get_language(pcontext));
ascent = std::floor(floatFromPangoUnits(
ascent = std::round(floatFromPangoUnits(
pango_font_metrics_get_ascent(metrics)));
pango_font_metrics_unref(metrics);
}
@ -931,7 +930,7 @@ XYPOSITION SurfaceImpl::Descent(Font &font_) {
if (PFont(font_)->pfd) {
PangoFontMetrics *metrics = pango_context_get_metrics(pcontext,
PFont(font_)->pfd, pango_context_get_language(pcontext));
const XYPOSITION descent = std::floor(floatFromPangoUnits(
const XYPOSITION descent = std::round(floatFromPangoUnits(
pango_font_metrics_get_descent(metrics)));
pango_font_metrics_unref(metrics);
return descent;
@ -953,7 +952,7 @@ XYPOSITION SurfaceImpl::AverageCharWidth(Font &font_) {
void SurfaceImpl::SetClip(PRectangle rc) {
PLATFORM_ASSERT(context);
cairo_rectangle(context, rc.left, rc.top, rc.right, rc.bottom);
cairo_rectangle(context, rc.left, rc.top, rc.Width(), rc.Height());
cairo_clip(context);
}
@ -1022,7 +1021,7 @@ void Window::SetPosition(PRectangle rc) {
namespace {
GdkRectangle MonitorRectangleForWidget(GtkWidget *wid) {
GdkRectangle MonitorRectangleForWidget(GtkWidget *wid) noexcept {
GdkWindow *wnd = WindowFromWidget(wid);
GdkRectangle rcScreen = GdkRectangle();
#if GTK_CHECK_VERSION(3,22,0)
@ -1147,7 +1146,7 @@ PRectangle Window::GetMonitorRect(Point pt) {
gdk_window_get_origin(WindowFromWidget(PWidget(wid)), &x_offset, &y_offset);
GdkRectangle rect;
GdkRectangle rect {};
#if GTK_CHECK_VERSION(3,22,0)
GdkDisplay *pdisplay = gtk_widget_get_display(PWidget(wid));
@ -1219,6 +1218,11 @@ public:
#endif
delegate(nullptr) {
}
// Deleted so ListBoxX objects can not be copied.
ListBoxX(const ListBoxX&) = delete;
ListBoxX(ListBoxX&&) = delete;
ListBoxX&operator=(const ListBoxX&) = delete;
ListBoxX&operator=(ListBoxX&&) = delete;
~ListBoxX() override {
if (pixhash) {
g_hash_table_foreach((GHashTable *) pixhash, list_image_free, nullptr);
@ -1371,13 +1375,13 @@ static gboolean ButtonRelease(GtkWidget *, GdkEventButton *ev, gpointer p) {
return FALSE;
}
/* Change the active color to the selected color so the listbox uses the color
/* Change the active colour to the selected colour so the listbox uses the colour
scheme that it would use if it had the focus. */
static void StyleSet(GtkWidget *w, GtkStyle *, void *) {
g_return_if_fail(w != nullptr);
/* Copy the selected color to active. Note that the modify calls will cause
/* Copy the selected colour to active. Note that the modify calls will cause
recursive calls to this function after the value is updated and w->style to
be set to a new object */
@ -1686,7 +1690,7 @@ void ListBoxX::Append(char *s, int type) {
list_image = static_cast<ListImage *>(g_hash_table_lookup((GHashTable *) pixhash,
GINT_TO_POINTER(type)));
}
GtkTreeIter iter;
GtkTreeIter iter {};
GtkListStore *store =
GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(list)));
gtk_list_store_append(GTK_LIST_STORE(store), &iter);
@ -1726,7 +1730,7 @@ int ListBoxX::Length() {
}
void ListBoxX::Select(int n) {
GtkTreeIter iter;
GtkTreeIter iter {};
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));
GtkTreeSelection *selection =
gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
@ -1781,8 +1785,8 @@ void ListBoxX::Select(int n) {
int ListBoxX::GetSelection() {
int index = -1;
GtkTreeIter iter;
GtkTreeModel *model;
GtkTreeIter iter {};
GtkTreeModel *model {};
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(list));
if (gtk_tree_selection_get_selected(selection, &model, &iter)) {
@ -1797,13 +1801,13 @@ int ListBoxX::GetSelection() {
}
int ListBoxX::Find(const char *prefix) {
GtkTreeIter iter;
GtkTreeIter iter {};
GtkTreeModel *model =
gtk_tree_view_get_model(GTK_TREE_VIEW(list));
bool valid = gtk_tree_model_get_iter_first(model, &iter) != FALSE;
int i = 0;
while (valid) {
gchar *s;
gchar *s = nullptr;
gtk_tree_model_get(model, &iter, TEXT_COLUMN, &s, -1);
if (s && (0 == strncmp(prefix, s, strlen(prefix)))) {
g_free(s);
@ -1818,7 +1822,7 @@ int ListBoxX::Find(const char *prefix) {
void ListBoxX::GetValue(int n, char *value, int len) {
char *text = nullptr;
GtkTreeIter iter;
GtkTreeIter iter {};
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(list));
const bool valid = gtk_tree_model_iter_nth_child(model, &iter, nullptr, n) != FALSE;
if (valid) {
@ -1918,7 +1922,7 @@ void Menu::Destroy() {
}
#if !GTK_CHECK_VERSION(3,22,0)
static void MenuPositionFunc(GtkMenu *, gint *x, gint *y, gboolean *, gpointer userData) {
static void MenuPositionFunc(GtkMenu *, gint *x, gint *y, gboolean *, gpointer userData) noexcept {
sptr_t intFromPointer = GPOINTER_TO_INT(userData);
*x = intFromPointer & 0xffff;
*y = intFromPointer >> 16;
@ -1958,7 +1962,11 @@ public:
explicit DynamicLibraryImpl(const char *modulePath) noexcept {
m = g_module_open(modulePath, G_MODULE_BIND_LAZY);
}
// Deleted so DynamicLibraryImpl objects can not be copied.
DynamicLibraryImpl(const DynamicLibraryImpl&) = delete;
DynamicLibraryImpl(DynamicLibraryImpl&&) = delete;
DynamicLibraryImpl&operator=(const DynamicLibraryImpl&) = delete;
DynamicLibraryImpl&operator=(DynamicLibraryImpl&&) = delete;
~DynamicLibraryImpl() override {
if (m != nullptr)
g_module_close(m);

View File

@ -42,14 +42,7 @@
#include "ILexer.h"
#include "Scintilla.h"
#include "ScintillaWidget.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#endif
#include "StringCopy.h"
#include "CharacterCategory.h"
#ifdef SCI_LEXER
#include "LexerModule.h"
#endif
#include "Position.h"
#include "UniqueString.h"
#include "SplitVector.h"
@ -78,10 +71,6 @@
#include "AutoComplete.h"
#include "ScintillaBase.h"
#ifdef SCI_LEXER
#include "ExternalLexer.h"
#endif
#include "ScintillaGTK.h"
#include "scintilla-marshal.h"
#include "ScintillaGTKAccessible.h"
@ -132,23 +121,18 @@ enum {
TARGET_URI
};
GdkAtom ScintillaGTK::atomUTF8 = nullptr;
GdkAtom ScintillaGTK::atomString = nullptr;
GdkAtom ScintillaGTK::atomUriList = nullptr;
GdkAtom ScintillaGTK::atomDROPFILES_DND = nullptr;
static const GtkTargetEntry clipboardCopyTargets[] = {
{ (gchar *) "UTF8_STRING", 0, TARGET_UTF8_STRING },
{ (gchar *) "STRING", 0, TARGET_STRING },
};
static const gint nClipboardCopyTargets = ELEMENTS(clipboardCopyTargets);
static constexpr gint nClipboardCopyTargets = std::size(clipboardCopyTargets);
static const GtkTargetEntry clipboardPasteTargets[] = {
{ (gchar *) "text/uri-list", 0, TARGET_URI },
{ (gchar *) "UTF8_STRING", 0, TARGET_UTF8_STRING },
{ (gchar *) "STRING", 0, TARGET_STRING },
};
static const gint nClipboardPasteTargets = ELEMENTS(clipboardPasteTargets);
static constexpr gint nClipboardPasteTargets = std::size(clipboardPasteTargets);
static const GdkDragAction actionCopyOrMove = static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE);
@ -156,7 +140,7 @@ static GtkWidget *PWidget(const Window &w) noexcept {
return static_cast<GtkWidget *>(w.GetID());
}
ScintillaGTK *ScintillaGTK::FromWidget(GtkWidget *widget) {
ScintillaGTK *ScintillaGTK::FromWidget(GtkWidget *widget) noexcept {
ScintillaObject *scio = SCINTILLA(widget);
return static_cast<ScintillaGTK *>(scio->pscin);
}
@ -170,8 +154,10 @@ ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) :
lastKey(0), rectangularSelectionModifier(SCMOD_CTRL),
parentClass(nullptr),
atomSought(nullptr),
preeditInitialized(false),
im_context(nullptr),
lastNonCommonScript(PANGO_SCRIPT_INVALID_CODE),
lastNonCommonScript(G_UNICODE_SCRIPT_INVALID_CODE),
lastWheelMouseTime(0),
lastWheelMouseDirection(0),
wheelMouseIntensity(0),
smoothScrollY(0),
@ -201,8 +187,6 @@ ScintillaGTK::ScintillaGTK(_ScintillaObject *sci_) :
#else
linesPerScroll = 4;
#endif
lastWheelMouseTime.tv_sec = 0;
lastWheelMouseTime.tv_usec = 0;
Init();
}
@ -219,7 +203,7 @@ ScintillaGTK::~ScintillaGTK() {
wPreedit.Destroy();
}
static void UnRefCursor(GdkCursor *cursor) {
static void UnRefCursor(GdkCursor *cursor) noexcept {
#if GTK_CHECK_VERSION(3,0,0)
g_object_unref(cursor);
#else
@ -270,6 +254,8 @@ void ScintillaGTK::RealizeThis(GtkWidget *widget) {
gdk_window_show(widget->window);
UnRefCursor(cursor);
#endif
preeditInitialized = false;
gtk_widget_realize(PWidget(wPreedit));
gtk_widget_realize(PWidget(wPreeditDraw));
@ -279,6 +265,7 @@ void ScintillaGTK::RealizeThis(GtkWidget *widget) {
g_signal_connect(G_OBJECT(im_context), "preedit_changed",
G_CALLBACK(PreeditChanged), this);
gtk_im_context_set_client_window(im_context, WindowFromWidget(widget));
GtkWidget *widtxt = PWidget(wText); // // No code inside the G_OBJECT macro
g_signal_connect_after(G_OBJECT(widtxt), "style_set",
G_CALLBACK(ScintillaGTK::StyleSetText), nullptr);
@ -344,7 +331,7 @@ void ScintillaGTK::UnRealize(GtkWidget *widget) {
sciThis->UnRealizeThis(widget);
}
static void MapWidget(GtkWidget *widget) {
static void MapWidget(GtkWidget *widget) noexcept {
if (widget &&
gtk_widget_get_visible(GTK_WIDGET(widget)) &&
!IS_WIDGET_MAPPED(widget)) {
@ -425,14 +412,19 @@ public:
gboolean validUTF8;
glong uniStrLen;
gunichar *uniStr;
PangoScript pscript;
GUnicodeScript pscript;
explicit PreEditString(GtkIMContext *im_context) {
explicit PreEditString(GtkIMContext *im_context) noexcept {
gtk_im_context_get_preedit_string(im_context, &str, &attrs, &cursor_pos);
validUTF8 = g_utf8_validate(str, strlen(str), nullptr);
uniStr = g_utf8_to_ucs4_fast(str, strlen(str), &uniStrLen);
pscript = pango_script_for_unichar(uniStr[0]);
pscript = g_unichar_get_script(uniStr[0]);
}
// Deleted so PreEditString objects can not be copied.
PreEditString(const PreEditString&) = delete;
PreEditString(PreEditString&&) = delete;
PreEditString&operator=(const PreEditString&) = delete;
PreEditString&operator=(PreEditString&&) = delete;
~PreEditString() {
g_free(str);
g_free(uniStr);
@ -445,18 +437,24 @@ public:
gint ScintillaGTK::FocusInThis(GtkWidget *) {
try {
SetFocusState(true);
if (im_context) {
gtk_im_context_focus_in(im_context);
PreEditString pes(im_context);
if (PWidget(wPreedit)) {
if (!preeditInitialized) {
GtkWidget *top = gtk_widget_get_toplevel(PWidget(wMain));
gtk_window_set_transient_for(GTK_WINDOW(PWidget(wPreedit)), GTK_WINDOW(top));
preeditInitialized = true;
}
if (strlen(pes.str) > 0) {
gtk_widget_show(PWidget(wPreedit));
} else {
gtk_widget_hide(PWidget(wPreedit));
}
}
gtk_im_context_focus_in(im_context);
}
} catch (...) {
errorStatus = SC_STATUS_FAILURE;
}
@ -537,7 +535,7 @@ void ScintillaGTK::SizeAllocate(GtkWidget *widget, GtkAllocation *allocation) {
}
void ScintillaGTK::Init() {
parentClass = reinterpret_cast<GtkWidgetClass *>(
parentClass = static_cast<GtkWidgetClass *>(
g_type_class_ref(gtk_container_get_type()));
gint maskSmooth = 0;
@ -752,16 +750,16 @@ std::string ConvertText(const char *s, size_t len, const char *charSetDest,
// Returns the target converted to UTF8.
// Return the length in bytes.
Sci::Position ScintillaGTK::TargetAsUTF8(char *text) const {
const Sci::Position targetLength = targetEnd - targetStart;
const Sci::Position targetLength = targetRange.Length();
if (IsUnicodeMode()) {
if (text) {
pdoc->GetCharRange(text, targetStart, targetLength);
pdoc->GetCharRange(text, targetRange.start.Position(), targetLength);
}
} else {
// Need to convert
const char *charSetBuffer = CharacterSetID();
if (*charSetBuffer) {
std::string s = RangeText(targetStart, targetEnd);
std::string s = RangeText(targetRange.start.Position(), targetRange.end.Position());
std::string tmputf = ConvertText(&s[0], targetLength, "UTF-8", charSetBuffer, false);
if (text) {
memcpy(text, tmputf.c_str(), tmputf.length());
@ -769,7 +767,7 @@ Sci::Position ScintillaGTK::TargetAsUTF8(char *text) const {
return tmputf.length();
} else {
if (text) {
pdoc->GetCharRange(text, targetStart, targetLength);
pdoc->GetCharRange(text, targetRange.start.Position(), targetLength);
}
}
}
@ -829,11 +827,6 @@ sptr_t ScintillaGTK::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam
case SCI_GETDIRECTPOINTER:
return reinterpret_cast<sptr_t>(this);
#ifdef SCI_LEXER
case SCI_LOADLEXERLIBRARY:
LexerManager::GetInstance()->Load(ConstCharPtrFromSPtr(lParam));
break;
#endif
case SCI_TARGETASUTF8:
return TargetAsUTF8(CharPtrFromSPtr(lParam));
@ -1202,6 +1195,11 @@ struct CaseMapper {
mapped = g_utf8_strdown(sUTF8.c_str(), sUTF8.length());
}
}
// Deleted so CaseMapper objects can not be copied.
CaseMapper(const CaseMapper&) = delete;
CaseMapper(CaseMapper&&) = delete;
CaseMapper&operator=(const CaseMapper&) = delete;
CaseMapper&operator=(CaseMapper&&) = delete;
~CaseMapper() {
g_free(mapped);
}
@ -1269,7 +1267,7 @@ namespace {
class SelectionReceiver : GObjectWatcher {
ScintillaGTK *sci;
void Destroyed() override {
void Destroyed() noexcept override {
sci = nullptr;
}
@ -1279,10 +1277,10 @@ public:
sci(sci_) {
}
static void ClipboardReceived(GtkClipboard *, GtkSelectionData *selection_data, gpointer data) {
static void ClipboardReceived(GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data) {
SelectionReceiver *self = static_cast<SelectionReceiver *>(data);
if (self->sci) {
self->sci->ReceivedClipboard(selection_data);
self->sci->ReceivedClipboard(clipboard, selection_data);
}
delete self;
}
@ -1322,9 +1320,8 @@ void ScintillaGTK::CreateCallTipWindow(PRectangle rc) {
G_CALLBACK(ScintillaGTK::PressCT), this);
gtk_widget_set_events(widcdrw,
GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
GtkWidget *top = gtk_widget_get_toplevel(static_cast<GtkWidget *>(wMain.GetID()));
gtk_window_set_transient_for(GTK_WINDOW(static_cast<GtkWidget *>(PWidget(ct.wCallTip))),
GTK_WINDOW(top));
GtkWidget *top = gtk_widget_get_toplevel(PWidget(wMain));
gtk_window_set_transient_for(GTK_WINDOW(PWidget(ct.wCallTip)), GTK_WINDOW(top));
}
const int width = static_cast<int>(rc.Width());
const int height = static_cast<int>(rc.Height());
@ -1375,10 +1372,14 @@ void ScintillaGTK::ClaimSelection() {
}
}
static const guchar *DataOfGSD(GtkSelectionData *sd) { return gtk_selection_data_get_data(sd); }
static gint LengthOfGSD(GtkSelectionData *sd) { return gtk_selection_data_get_length(sd); }
static GdkAtom TypeOfGSD(GtkSelectionData *sd) { return gtk_selection_data_get_data_type(sd); }
static GdkAtom SelectionOfGSD(GtkSelectionData *sd) { return gtk_selection_data_get_selection(sd); }
bool ScintillaGTK::IsStringAtom(GdkAtom type) {
return (type == GDK_TARGET_STRING) || (type == atomUTF8) || (type == atomUTF8Mime);
}
static const guchar *DataOfGSD(GtkSelectionData *sd) noexcept { return gtk_selection_data_get_data(sd); }
static gint LengthOfGSD(GtkSelectionData *sd) noexcept { return gtk_selection_data_get_length(sd); }
static GdkAtom TypeOfGSD(GtkSelectionData *sd) noexcept { return gtk_selection_data_get_data_type(sd); }
static GdkAtom SelectionOfGSD(GtkSelectionData *sd) noexcept { return gtk_selection_data_get_selection(sd); }
// Detect rectangular text, convert line ends to current mode, convert from or to UTF-8
void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText) {
@ -1387,7 +1388,7 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio
GdkAtom selectionTypeData = TypeOfGSD(selectionData);
// Return empty string if selection is not a string
if ((selectionTypeData != GDK_TARGET_STRING) && (selectionTypeData != atomUTF8)) {
if (!IsStringAtom(selectionTypeData)) {
selText.Clear();
return;
}
@ -1433,7 +1434,7 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio
}
}
void ScintillaGTK::InsertSelection(GtkSelectionData *selectionData) {
void ScintillaGTK::InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData) {
const gint length = gtk_selection_data_get_length(selectionData);
if (length >= 0) {
GdkAtom selection = gtk_selection_data_get_selection(selectionData);
@ -1448,6 +1449,15 @@ void ScintillaGTK::InsertSelection(GtkSelectionData *selectionData) {
InsertPasteShape(selText.Data(), selText.Length(),
selText.rectangular ? pasteRectangular : pasteStream);
EnsureCaretVisible();
} else {
GdkAtom target = gtk_selection_data_get_target(selectionData);
if (target == atomUTF8) {
// In case data is actually only stored as text/plain;charset=utf-8 not UTF8_STRING
gtk_clipboard_request_contents(clipBoard, atomUTF8Mime,
SelectionReceiver::ClipboardReceived,
new SelectionReceiver(this)
);
}
}
Redraw();
}
@ -1456,9 +1466,9 @@ GObject *ScintillaGTK::MainObject() const noexcept {
return G_OBJECT(PWidget(wMain));
}
void ScintillaGTK::ReceivedClipboard(GtkSelectionData *selection_data) noexcept {
void ScintillaGTK::ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept {
try {
InsertSelection(selection_data);
InsertSelection(clipBoard, selection_data);
} catch (...) {
errorStatus = SC_STATUS_FAILURE;
}
@ -1472,9 +1482,9 @@ void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) {
atomSought = atomString;
gtk_selection_convert(GTK_WIDGET(PWidget(wMain)),
SelectionOfGSD(selection_data), atomSought, GDK_CURRENT_TIME);
} else if ((LengthOfGSD(selection_data) > 0) &&
((TypeOfGSD(selection_data) == GDK_TARGET_STRING) || (TypeOfGSD(selection_data) == atomUTF8))) {
InsertSelection(selection_data);
} else if ((LengthOfGSD(selection_data) > 0) && IsStringAtom(TypeOfGSD(selection_data))) {
GtkClipboard *clipBoard = gtk_widget_get_clipboard(GTK_WIDGET(PWidget(wMain)), SelectionOfGSD(selection_data));
InsertSelection(clipBoard, selection_data);
}
}
// else fprintf(stderr, "Target non string %d %d\n", (int)(selection_data->type),
@ -1491,7 +1501,7 @@ void ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) {
std::vector<char> drop(data, data + LengthOfGSD(selection_data));
drop.push_back('\0');
NotifyURIDropped(&drop[0]);
} else if ((TypeOfGSD(selection_data) == GDK_TARGET_STRING) || (TypeOfGSD(selection_data) == atomUTF8)) {
} else if (IsStringAtom(TypeOfGSD(selection_data))) {
if (LengthOfGSD(selection_data) > 0) {
SelectionText selText;
GetGtkSelectionText(selection_data, selText);
@ -1535,7 +1545,7 @@ void ScintillaGTK::GetSelection(GtkSelectionData *selection_data, guint info, Se
// As I can not work out how to store data on the clipboard in multiple formats
// and need some way to mark the clipping as being stream or rectangular,
// the terminating \0 is included in the length for rectangular clippings.
// All other tested aplications behave benignly by ignoring the \0.
// All other tested applications behave benignly by ignoring the \0.
// The #if is here because on Windows cfColumnSelect clip entry is used
// instead as standard indicator of rectangularness (so no need to kludge)
const char *textData = text->Data();
@ -1685,7 +1695,7 @@ void ScintillaGTK::Resize(int width, int height) {
namespace {
void SetAdjustmentValue(GtkAdjustment *object, int value) {
void SetAdjustmentValue(GtkAdjustment *object, int value) noexcept {
GtkAdjustment *adjustment = GTK_ADJUSTMENT(object);
const int maxValue = static_cast<int>(
gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment));
@ -1752,7 +1762,7 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) {
if (event->button == 1) {
#if PLAT_GTK_MACOSX
const bool meta = ctrl;
// GDK reports the Command modifer key as GDK_MOD2_MASK for button events,
// GDK reports the Command modifier key as GDK_MOD2_MASK for button events,
// not GDK_META_MASK like in key events.
ctrl = (event->state & GDK_MOD2_MASK) != 0;
#else
@ -1781,7 +1791,7 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) {
} else {
#if PLAT_GTK_MACOSX
const bool meta = ctrl;
// GDK reports the Command modifer key as GDK_MOD2_MASK for button events,
// GDK reports the Command modifier key as GDK_MOD2_MASK for button events,
// not GDK_META_MASK like in key events.
ctrl = (event->state & GDK_MOD2_MASK) != 0;
#else
@ -1883,13 +1893,8 @@ gint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) {
cLineScroll = 4;
sciThis->wheelMouseIntensity = cLineScroll;
#else
int timeDelta = 1000000;
GTimeVal curTime;
g_get_current_time(&curTime);
if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec)
timeDelta = curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec;
else if (curTime.tv_sec == sciThis->lastWheelMouseTime.tv_sec + 1)
timeDelta = 1000000 + (curTime.tv_usec - sciThis->lastWheelMouseTime.tv_usec);
const gint64 curTime = g_get_monotonic_time();
const gint64 timeDelta = curTime - sciThis->lastWheelMouseTime;
if ((event->direction == sciThis->lastWheelMouseDirection) && (timeDelta < 250000)) {
if (sciThis->wheelMouseIntensity < 12)
sciThis->wheelMouseIntensity++;
@ -1900,11 +1905,11 @@ gint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) {
cLineScroll = 4;
sciThis->wheelMouseIntensity = cLineScroll;
}
sciThis->lastWheelMouseTime = curTime;
#endif
if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_LEFT) {
cLineScroll *= -1;
}
g_get_current_time(&sciThis->lastWheelMouseTime);
sciThis->lastWheelMouseDirection = event->direction;
// Note: Unpatched versions of win32gtk don't set the 'state' value so
@ -1955,7 +1960,7 @@ gint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) {
return FALSE;
int x = 0;
int y = 0;
GdkModifierType state;
GdkModifierType state {};
if (event->is_hint) {
#if GTK_CHECK_VERSION(3,0,0)
gdk_window_get_device_position(event->window,
@ -1983,7 +1988,7 @@ gint ScintillaGTK::Motion(GtkWidget *widget, GdkEventMotion *event) {
}
// Map the keypad keys to their equivalent functions
static int KeyTranslate(int keyIn) {
static int KeyTranslate(int keyIn) noexcept {
switch (keyIn) {
#if GTK_CHECK_VERSION(3,0,0)
case GDK_KEY_ISO_Left_Tab:
@ -2242,9 +2247,9 @@ gboolean ScintillaGTK::ExposePreedit(GtkWidget *widget, GdkEventExpose *ose, Sci
bool ScintillaGTK::KoreanIME() {
PreEditString pes(im_context);
if (pes.pscript != PANGO_SCRIPT_COMMON)
if (pes.pscript != G_UNICODE_SCRIPT_COMMON)
lastNonCommonScript = pes.pscript;
return lastNonCommonScript == PANGO_SCRIPT_HANGUL;
return lastNonCommonScript == G_UNICODE_SCRIPT_HANGUL;
}
void ScintillaGTK::MoveImeCarets(int pos) {
@ -2326,8 +2331,10 @@ void ScintillaGTK::SetCandidateWindowPos() {
// Composition box accompanies candidate box.
const Point pt = PointMainCaret();
GdkRectangle imeBox = {0}; // No need to set width
imeBox.x = static_cast<gint>(pt.x); // Only need positiion
imeBox.y = static_cast<gint>(pt.y) + vs.lineHeight; // underneath the first charater
imeBox.x = static_cast<gint>(pt.x);
imeBox.y = static_cast<gint>(pt.y + std::max(4, vs.lineHeight/4));
// prevent overlapping with current line
imeBox.height = vs.lineHeight;
gtk_im_context_set_cursor_location(im_context, &imeBox);
}
@ -2397,8 +2404,11 @@ void ScintillaGTK::PreeditChangedInlineThis() {
return;
}
if (initialCompose)
if (initialCompose) {
ClearBeforeTentativeStart();
}
SetCandidateWindowPos();
pdoc->TentativeStart(); // TentativeActive() from now on
std::vector<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str);
@ -2432,7 +2442,6 @@ void ScintillaGTK::PreeditChangedInlineThis() {
}
EnsureCaretVisible();
SetCandidateWindowPos();
ShowCaretAtCurrentPosition();
} catch (...) {
errorStatus = SC_STATUS_FAILURE;
@ -2443,6 +2452,8 @@ void ScintillaGTK::PreeditChangedWindowedThis() {
try {
PreEditString pes(im_context);
if (strlen(pes.str) > 0) {
SetCandidateWindowPos();
PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), pes.str);
pango_layout_set_attributes(layout, pes.attrs);
@ -3041,10 +3052,8 @@ GType scintilla_object_get_type() {
void ScintillaGTK::ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) {
Platform_Initialise();
#ifdef SCI_LEXER
Scintilla_LinkLexers();
#endif
atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE);
atomUTF8Mime = gdk_atom_intern("text/plain;charset=utf-8", FALSE);
atomString = GDK_SELECTION_TYPE_STRING;
atomUriList = gdk_atom_intern("text/uri-list", FALSE);
atomDROPFILES_DND = gdk_atom_intern("DROPFILES_DND", FALSE);

View File

@ -36,24 +36,26 @@ class ScintillaGTK : public ScintillaBase {
GtkWidgetClass *parentClass;
static GdkAtom atomUTF8;
static GdkAtom atomString;
static GdkAtom atomUriList;
static GdkAtom atomDROPFILES_DND;
static inline GdkAtom atomUTF8 {};
static inline GdkAtom atomUTF8Mime {};
static inline GdkAtom atomString {};
static inline GdkAtom atomUriList {};
static inline GdkAtom atomDROPFILES_DND {};
GdkAtom atomSought;
#if PLAT_GTK_WIN32
CLIPFORMAT cfColumnSelect;
#endif
bool preeditInitialized;
Window wPreedit;
Window wPreeditDraw;
GtkIMContext *im_context;
PangoScript lastNonCommonScript;
GUnicodeScript lastNonCommonScript;
// Wheel mouse support
unsigned int linesPerScroll;
GTimeVal lastWheelMouseTime;
gint64 lastWheelMouseTime;
gint lastWheelMouseDirection;
gint wheelMouseIntensity;
gdouble smoothScrollY;
@ -78,7 +80,7 @@ public:
ScintillaGTK &operator=(const ScintillaGTK &) = delete;
ScintillaGTK &operator=(ScintillaGTK &&) = delete;
virtual ~ScintillaGTK();
static ScintillaGTK *FromWidget(GtkWidget *widget);
static ScintillaGTK *FromWidget(GtkWidget *widget) noexcept;
static void ClassInit(OBJECT_CLASS *object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);
private:
void Init();
@ -132,11 +134,12 @@ private:
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
bool OwnPrimarySelection();
void ClaimSelection() override;
static bool IsStringAtom(GdkAtom type);
void GetGtkSelectionText(GtkSelectionData *selectionData, SelectionText &selText);
void InsertSelection(GtkSelectionData *selectionData);
void InsertSelection(GtkClipboard *clipBoard, GtkSelectionData *selectionData);
public: // Public for SelectionReceiver
GObject *MainObject() const noexcept;
void ReceivedClipboard(GtkSelectionData *selection_data) noexcept;
void ReceivedClipboard(GtkClipboard *clipBoard, GtkSelectionData *selection_data) noexcept;
private:
void ReceivedSelection(GtkSelectionData *selection_data);
void ReceivedDrop(GtkSelectionData *selection_data);
@ -274,6 +277,12 @@ public:
g_object_weak_ref(weakRef, WeakNotify, this);
}
// Deleted so GObjectWatcher objects can not be copied.
GObjectWatcher(const GObjectWatcher&) = delete;
GObjectWatcher(GObjectWatcher&&) = delete;
GObjectWatcher&operator=(const GObjectWatcher&) = delete;
GObjectWatcher&operator=(GObjectWatcher&&) = delete;
virtual ~GObjectWatcher() {
if (weakRef) {
g_object_weak_unref(weakRef, WeakNotify, this);

View File

@ -1,5 +1,5 @@
/* Scintilla source code edit control */
/* ScintillaGTKAccessible.c - GTK+ accessibility for ScintillaGTK */
/* ScintillaGTKAccessible.cxx - GTK+ accessibility for ScintillaGTK */
/* Copyright 2016 by Colomban Wendling <colomban@geany.org>
* The License.txt file describes the conditions under which this software may be distributed. */
@ -53,6 +53,7 @@
#include <cstddef>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <stdexcept>
@ -92,14 +93,7 @@
#include "ILexer.h"
#include "Scintilla.h"
#include "ScintillaWidget.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#endif
#include "StringCopy.h"
#include "CharacterCategory.h"
#ifdef SCI_LEXER
#include "LexerModule.h"
#endif
#include "Position.h"
#include "UniqueString.h"
#include "SplitVector.h"

View File

@ -191,4 +191,4 @@ public:
}
#endif /* SCINTILLAGTKACCESSIBLE_H */
#endif

View File

@ -1,11 +1,10 @@
# Created by DepGen.py. To recreate, run 'python DepGen.py'.
# Created by DepGen.py. To recreate, run DepGen.py.
PlatGTK.o: \
PlatGTK.cxx \
../include/Platform.h \
../include/Scintilla.h \
../include/Sci_Position.h \
../include/ScintillaWidget.h \
../lexlib/StringCopy.h \
../src/IntegerRectangle.h \
../src/XPM.h \
../src/UniConversion.h \
@ -18,10 +17,7 @@ ScintillaGTK.o: \
../include/ILexer.h \
../include/Scintilla.h \
../include/ScintillaWidget.h \
../include/SciLexer.h \
../lexlib/StringCopy.h \
../lexlib/CharacterCategory.h \
../lexlib/LexerModule.h \
../src/Position.h \
../src/UniqueString.h \
../src/SplitVector.h \
@ -49,7 +45,6 @@ ScintillaGTK.o: \
../src/Editor.h \
../src/AutoComplete.h \
../src/ScintillaBase.h \
../src/ExternalLexer.h \
ScintillaGTK.h \
scintilla-marshal.h \
ScintillaGTKAccessible.h \
@ -62,10 +57,7 @@ ScintillaGTKAccessible.o: \
../include/ILexer.h \
../include/Scintilla.h \
../include/ScintillaWidget.h \
../include/SciLexer.h \
../lexlib/StringCopy.h \
../lexlib/CharacterCategory.h \
../lexlib/LexerModule.h \
../src/Position.h \
../src/UniqueString.h \
../src/SplitVector.h \
@ -126,6 +118,7 @@ Catalogue.o: \
../include/Scintilla.h \
../include/SciLexer.h \
../lexlib/LexerModule.h \
../lexlib/CatalogueModules.h \
../src/Catalogue.h
CellBuffer.o: \
../src/CellBuffer.cxx \
@ -432,7 +425,8 @@ ScintillaBase.o: \
../src/EditView.h \
../src/Editor.h \
../src/AutoComplete.h \
../src/ScintillaBase.h
../src/ScintillaBase.h \
../src/ExternalLexer.h
Selection.o: \
../src/Selection.cxx \
../include/Platform.h \
@ -1121,6 +1115,19 @@ LexHex.o: \
../lexlib/StyleContext.h \
../lexlib/CharacterSet.h \
../lexlib/LexerModule.h
LexHollywood.o: \
../lexers/LexHollywood.cxx \
../include/ILexer.h \
../include/Sci_Position.h \
../include/Scintilla.h \
../include/SciLexer.h \
../lexlib/WordList.h \
../lexlib/LexAccessor.h \
../lexlib/StyleContext.h \
../lexlib/CharacterSet.h \
../lexlib/LexerModule.h \
../lexlib/OptionSet.h \
../lexlib/DefaultLexer.h
LexHTML.o: \
../lexers/LexHTML.cxx \
../include/ILexer.h \
@ -1620,6 +1627,20 @@ LexR.o: \
../lexlib/StyleContext.h \
../lexlib/CharacterSet.h \
../lexlib/LexerModule.h
LexRaku.o: \
../lexers/LexRaku.cxx \
../include/ILexer.h \
../include/Sci_Position.h \
../include/Scintilla.h \
../include/SciLexer.h \
../lexlib/WordList.h \
../lexlib/LexAccessor.h \
../lexlib/StyleContext.h \
../lexlib/CharacterSet.h \
../lexlib/CharacterCategory.h \
../lexlib/LexerModule.h \
../lexlib/OptionSet.h \
../lexlib/DefaultLexer.h
LexRebol.o: \
../lexers/LexRebol.cxx \
../include/ILexer.h \

View File

@ -1,124 +1,197 @@
# Make file for Scintilla on Linux or compatible OS
# Make file for Scintilla on Linux, macOS, or Windows
# @file makefile
# 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.
# This makefile assumes GCC 9.0+ is used and changes will be needed to use other compilers.
# Clang 9.0+ can be used with CLANG=1 on command line.
# Builds for GTK+ 2 and 3. GTK 3 requires GTK3=1 on command line.
# Also works with ming32-make on Windows.
.PHONY: static shared all clean analyze depend
.SUFFIXES: .cxx .c .o .h .a .list
srcdir ?= .
basedir = $(srcdir)/..
WARNINGS = -Wpedantic -Wall
ifdef CLANG
CXX = clang++
CXXWARNFLAGS = -Wall -pedantic -Wno-deprecated-register -Wno-missing-braces
CC = clang
WARNINGS += -Wno-deprecated-register
ifdef windir
# Turn off some warnings that occur when Clang is being used on Windows where it
# is including Microsoft headers.
# incompatible-ms-struct is because more complex structs are not quite the same as MSVC
WARNINGS += -Wno-incompatible-ms-struct
# language-extension-token is because of __int64 in glib-2.0 glibconfig.h
WARNINGS += -Wno-language-extension-token
# register may be used in glib
# This produces a warning since -Wno-register is not valid for C files but it still works
WARNINGS += -Wno-register
DEFINES += -D_CRT_SECURE_NO_DEPRECATE
endif
# Can choose aspect to sanitize: address and undefined can simply change SANITIZE but for
# thread also need to create Position Independent Executable -> search online documentation
SANITIZE = address
#SANITIZE = undefined
else
CXXWARNFLAGS = -Wall -pedantic
BASE_FLAGS += -fsanitize=$(SANITIZE)
endif
ARFLAGS = rc
RANLIB = touch
RANLIB ?= ranlib
PKG_CONFIG ?= pkg-config
ifdef GTK3
GTKVERSION=gtk+-3.0
else
GTKVERSION=gtk+-2.0
endif
GTK_VERSION = $(if $(GTK3),gtk+-3.0,gtk+-2.0)
# Environment variable windir always defined on Win32
ifndef windir
ifeq ($(shell uname),Darwin)
RANLIB = ranlib
endif
endif
# Enable Position Independent Code except on Windows where it is the default so the flag produces a warning
ifndef windir
PICFLAGS = -fPIC
BASE_FLAGS += -fPIC
endif
LDFLAGS += -dynamiclib
LDFLAGS += -shared
# Take care of changing Unix style '/' directory separator to '\' on Windows
normalize = $(if $(windir),$(subst /,\,$1),$1)
PYTHON = $(if $(windir),pyw,python3)
SHAREDEXTENSION = $(if $(windir),dll,so)
ifdef windir
CC = gcc
DEL = del /q
COMPLIB=$(srcdir)\..\bin\scintilla.a
LEXILLA = lexilla.dll
else
DEL = rm -f
COMPLIB=$(srcdir)/../bin/scintilla.a
LEXILLA = liblexilla.so
endif
COMPLIB=$(basedir)/bin/scintilla.a
COMPONENT=$(basedir)/bin/libscintilla.$(SHAREDEXTENSION)
vpath %.h $(srcdir) $(srcdir)/../src $(srcdir)/../include $(srcdir)/../lexlib
vpath %.h $(srcdir) $(basedir)/src $(basedir)/include $(basedir)/lexlib
vpath %.c $(srcdir)
vpath %.cxx $(srcdir) $(srcdir)/../src $(srcdir)/../lexlib $(srcdir)/../lexers
vpath %.cxx $(srcdir) $(basedir)/src $(basedir)/lexlib $(basedir)/lexers
INCLUDEDIRS=-I $(srcdir)/../include -I $(srcdir)/../src -I $(srcdir)/../lexlib
CXXBASEFLAGS=$(CXXWARNFLAGS) $(PICFLAGS) -DGTK -DSCI_LEXER $(INCLUDEDIRS)
ifdef NOTHREADS
THREADFLAGS=-DG_THREADS_IMPL_NONE
else
THREADFLAGS=
endif
INCLUDES=-I $(basedir)/include -I $(basedir)/src -I $(basedir)/lexlib
DEFINES += -DGTK -DSCI_LEXER
BASE_FLAGS += $(WARNINGS)
ifdef NO_CXX11_REGEX
REFLAGS=-DNO_CXX11_REGEX
DEFINES += -DNO_CXX11_REGEX
endif
ifdef DEBUG
ifdef CLANG
CTFLAGS=-DDEBUG -g -fsanitize=$(SANITIZE) $(CXXBASEFLAGS) $(THREADFLAGS)
else
CTFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
endif
else
CTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
endif
DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG)
BASE_FLAGS += $(if $(DEBUG),-g,-Os)
CXXTFLAGS:=--std=gnu++17 $(CTFLAGS) $(REFLAGS)
CXX_BASE_FLAGS =--std=c++17 $(BASE_FLAGS)
CXX_ALL_FLAGS =$(DEFINES) $(INCLUDES) $(CXX_BASE_FLAGS) $(CONFIG_FLAGS)
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
CONFIG_FLAGS:=$(shell $(PKG_CONFIG) --cflags $(GTK_VERSION))
CONFIGLIB:=$(shell $(PKG_CONFIG) --libs $(GTK_VERSION) gmodule-no-export-2.0)
MARSHALLER=scintilla-marshal.o
all: $(COMPLIB)
all: $(COMPLIB) $(COMPONENT) $(LEXILLA)
static: $(COMPLIB)
shared: $(COMPONENT)
$(LEXILLA):
$(MAKE) --directory=../lexilla/src
clean:
$(DEL) *.o $(COMPLIB) *.plist
$(DEL) *.o $(call normalize,$(COMPLIB)) $(call normalize,$(COMPONENT)) *.plist
.cxx.o:
$(CXX) $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) -c $<
.c.o:
$(CC) $(CONFIGFLAGS) $(CTFLAGS) $(CFLAGS) -w -c $<
%.o: %.cxx
$(CXX) $(CPPFLAGS) $(CXX_ALL_FLAGS) $(CXXFLAGS) -c $<
%.o: %.c
$(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(BASE_FLAGS) $(CFLAGS) -w -c $<
GLIB_GENMARSHAL = glib-genmarshal
GLIB_GENMARSHAL_FLAGS = --prefix=scintilla_marshal
.list.h:
%.h: %.list
$(GLIB_GENMARSHAL) --header $(GLIB_GENMARSHAL_FLAGS) $< > $@
.list.c:
%.c: %.list
$(GLIB_GENMARSHAL) --body $(GLIB_GENMARSHAL_FLAGS) $< > $@
LEXOBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard $(srcdir)/../lexers/Lex*.cxx)))))
analyze:
clang --analyze $(CONFIGFLAGS) $(CXXTFLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(srcdir)/../src/*.cxx $(srcdir)/../lexlib/*.cxx $(srcdir)/../lexers/*.cxx
clang --analyze $(DEFINES) $(INCLUDES) $(CONFIG_FLAGS) $(CXX_BASE_FLAGS) $(CXXFLAGS) $(srcdir)/*.cxx $(basedir)/src/*.cxx $(basedir)/lexlib/*.cxx $(basedir)/lexers/*.cxx
depend deps.mak:
python DepGen.py
$(PYTHON) DepGen.py
$(COMPLIB): Accessor.o CharacterSet.o DefaultLexer.o LexerBase.o LexerModule.o LexerSimple.o StyleContext.o WordList.o \
CharClassify.o Decoration.o Document.o PerLine.o Catalogue.o CallTip.o CaseConvert.o CaseFolder.o \
ScintillaBase.o ContractionState.o EditModel.o Editor.o EditView.o ExternalLexer.o MarginView.o \
PropSetSimple.o PlatGTK.o \
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o ScintillaGTKAccessible.o CellBuffer.o CharacterCategory.o ViewStyle.o \
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o UniqueString.o XPM.o \
$(MARSHALLER) $(LEXOBJS)
LEX_OBJS:=$(addsuffix .o,$(basename $(sort $(notdir $(wildcard $(basedir)/lexers/Lex*.cxx)))))
# Required for base Scintilla
SRC_OBJS = \
AutoComplete.o \
CallTip.o \
CaseConvert.o \
CaseFolder.o \
CellBuffer.o \
CharacterCategory.o \
CharacterSet.o \
CharClassify.o \
ContractionState.o \
DBCS.o \
Decoration.o \
Document.o \
EditModel.o \
Editor.o \
EditView.o \
Indicator.o \
KeyMap.o \
LineMarker.o \
MarginView.o \
PerLine.o \
PositionCache.o \
RESearch.o \
RunStyles.o \
Selection.o \
Style.o \
UniConversion.o \
UniqueString.o \
ViewStyle.o \
XPM.o
# Required by lexers
LEXLIB_OBJS = \
Accessor.o \
Catalogue.o \
DefaultLexer.o \
ExternalLexer.o \
LexerBase.o \
LexerModule.o \
LexerSimple.o \
PropSetSimple.o \
StyleContext.o \
WordList.o
LEXLIBL_OBJS = $(LEXLIB_OBJS) CatalogueL.o
LEXLIBS_OBJS = $(LEXLIB_OBJS) Catalogue.o
GTK_OBJS = \
ScintillaBase.o \
PlatGTK.o \
ScintillaGTK.o \
ScintillaGTKAccessible.o
$(COMPLIB): $(SRC_OBJS) $(LEXLIBL_OBJS) $(GTK_OBJS) $(MARSHALLER) $(LEX_OBJS)
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
$(COMPONENT): $(SRC_OBJS) $(LEXLIBS_OBJS) $(GTK_OBJS) $(MARSHALLER)
$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ $(CONFIGLIB)
Catalogue.o: Catalogue.cxx
$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -D SCI_LEXER -D SCI_EMPTYCATALOGUE -c $< -o $@
CatalogueL.o: Catalogue.cxx
$(CXX) $(CXX_ALL_FLAGS) $(CXXFLAGS) -D SCI_LEXER -c $< -o $@
# Automatically generate header dependencies with "make deps"
include deps.mak

View File

@ -42,7 +42,7 @@ public:
virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0;
};
enum { lvRelease4=2 };
enum { lvRelease4=2, lvRelease5=3 };
class ILexer4 {
public:
@ -73,6 +73,13 @@ public:
virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;
};
class ILexer5 : public ILexer4 {
public:
virtual const char * SCI_METHOD GetName() = 0;
virtual int SCI_METHOD GetIdentifier() = 0;
virtual const char * SCI_METHOD PropertyGet(const char *key) = 0;
};
}
#endif

View File

@ -104,19 +104,19 @@ public:
constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) {
}
static Point FromInts(int x_, int y_) noexcept {
static constexpr Point FromInts(int x_, int y_) noexcept {
return Point(static_cast<XYPOSITION>(x_), static_cast<XYPOSITION>(y_));
}
bool operator!=(Point other) const noexcept {
constexpr bool operator!=(Point other) const noexcept {
return (x != other.x) || (y != other.y);
}
Point operator+(Point other) const noexcept {
constexpr Point operator+(Point other) const noexcept {
return Point(x + other.x, y + other.y);
}
Point operator-(Point other) const noexcept {
constexpr Point operator-(Point other) const noexcept {
return Point(x - other.x, y - other.y);
}
@ -139,31 +139,31 @@ public:
left(left_), top(top_), right(right_), bottom(bottom_) {
}
static PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {
static constexpr PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept {
return PRectangle(static_cast<XYPOSITION>(left_), static_cast<XYPOSITION>(top_),
static_cast<XYPOSITION>(right_), static_cast<XYPOSITION>(bottom_));
}
// Other automatically defined methods (assignment, copy constructor, destructor) are fine
bool operator==(const PRectangle &rc) const noexcept {
constexpr bool operator==(const PRectangle &rc) const noexcept {
return (rc.left == left) && (rc.right == right) &&
(rc.top == top) && (rc.bottom == bottom);
}
bool Contains(Point pt) const noexcept {
constexpr bool Contains(Point pt) const noexcept {
return (pt.x >= left) && (pt.x <= right) &&
(pt.y >= top) && (pt.y <= bottom);
}
bool ContainsWholePixel(Point pt) const noexcept {
constexpr bool ContainsWholePixel(Point pt) const noexcept {
// Does the rectangle contain all of the pixel to left/below the point
return (pt.x >= left) && ((pt.x+1) <= right) &&
(pt.y >= top) && ((pt.y+1) <= bottom);
}
bool Contains(PRectangle rc) const noexcept {
constexpr bool Contains(PRectangle rc) const noexcept {
return (rc.left >= left) && (rc.right <= right) &&
(rc.top >= top) && (rc.bottom <= bottom);
}
bool Intersects(PRectangle other) const noexcept {
constexpr bool Intersects(PRectangle other) const noexcept {
return (right > other.left) && (left < other.right) &&
(bottom > other.top) && (top < other.bottom);
}
@ -173,9 +173,9 @@ public:
right += xDelta;
bottom += yDelta;
}
XYPOSITION Width() const noexcept { return right - left; }
XYPOSITION Height() const noexcept { return bottom - top; }
bool Empty() const noexcept {
constexpr XYPOSITION Width() const noexcept { return right - left; }
constexpr XYPOSITION Height() const noexcept { return bottom - top; }
constexpr bool Empty() const noexcept {
return (Height() <= 0) || (Width() <= 0);
}
};
@ -187,40 +187,40 @@ constexpr const float componentMaximum = 255.0f;
class ColourDesired {
int co;
public:
explicit ColourDesired(int co_=0) noexcept : co(co_) {
constexpr explicit ColourDesired(int co_=0) noexcept : co(co_) {
}
ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept :
constexpr ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept :
co(red | (green << 8) | (blue << 16)) {
}
bool operator==(const ColourDesired &other) const noexcept {
constexpr bool operator==(const ColourDesired &other) const noexcept {
return co == other.co;
}
int AsInteger() const noexcept {
constexpr int AsInteger() const noexcept {
return co;
}
// Red, green and blue values as bytes 0..255
unsigned char GetRed() const noexcept {
constexpr unsigned char GetRed() const noexcept {
return co & 0xff;
}
unsigned char GetGreen() const noexcept {
constexpr unsigned char GetGreen() const noexcept {
return (co >> 8) & 0xff;
}
unsigned char GetBlue() const noexcept {
constexpr unsigned char GetBlue() const noexcept {
return (co >> 16) & 0xff;
}
// Red, green and blue values as float 0..1.0
float GetRedComponent() const noexcept {
constexpr float GetRedComponent() const noexcept {
return GetRed() / componentMaximum;
}
float GetGreenComponent() const noexcept {
constexpr float GetGreenComponent() const noexcept {
return GetGreen() / componentMaximum;
}
float GetBlueComponent() const noexcept {
constexpr float GetBlueComponent() const noexcept {
return GetBlue() / componentMaximum;
}
};
@ -230,34 +230,34 @@ public:
*/
class ColourAlpha : public ColourDesired {
public:
explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) {
constexpr explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) {
}
ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept :
constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue) noexcept :
ColourDesired(red | (green << 8) | (blue << 16)) {
}
ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept :
constexpr ColourAlpha(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) noexcept :
ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) {
}
ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept :
constexpr ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept :
ColourDesired(cd.AsInteger() | (alpha << 24)) {
}
ColourDesired GetColour() const noexcept {
constexpr ColourDesired GetColour() const noexcept {
return ColourDesired(AsInteger() & 0xffffff);
}
unsigned char GetAlpha() const noexcept {
constexpr unsigned char GetAlpha() const noexcept {
return (AsInteger() >> 24) & 0xff;
}
float GetAlphaComponent() const noexcept {
constexpr float GetAlphaComponent() const noexcept {
return GetAlpha() / componentMaximum;
}
ColourAlpha MixedWith(ColourAlpha other) const noexcept {
constexpr ColourAlpha MixedWith(ColourAlpha other) const noexcept {
const unsigned int red = (GetRed() + other.GetRed()) / 2;
const unsigned int green = (GetGreen() + other.GetGreen()) / 2;
const unsigned int blue = (GetBlue() + other.GetBlue()) / 2;

View File

@ -142,12 +142,15 @@
#define SCLEX_CIL 127
#define SCLEX_X12 128
#define SCLEX_DATAFLEX 129
#define SCLEX_HOLLYWOOD 130
#define SCLEX_RAKU 131
#define SCLEX_SEARCHRESULT 150
#define SCLEX_OBJC 151
#define SCLEX_USER 152
#define SCLEX_AUTOMATIC 1000
//For All lexer
#define SCE_UNIVERSAL_FOUND_STYLE 31
#define SCE_UNIVERSAL_FOUND_STYLE_SMART 29
@ -257,6 +260,7 @@
#define SCE_USER_MASK_NESTING_OPERATORS2 0x2000000
#define SCE_USER_MASK_NESTING_NUMBERS 0x4000000
#define SCE_P_DEFAULT 0
#define SCE_P_COMMENTLINE 1
#define SCE_P_NUMBER 2
@ -639,6 +643,7 @@
#define SCE_ERR_GCC_INCLUDED_FROM 22
#define SCE_ERR_ESCSEQ 23
#define SCE_ERR_ESCSEQ_UNKNOWN 24
#define SCE_ERR_GCC_EXCERPT 25
#define SCE_ERR_ES_BLACK 40
#define SCE_ERR_ES_RED 41
#define SCE_ERR_ES_GREEN 42
@ -2036,6 +2041,50 @@
#define SCE_DF_SCOPEWORD 12
#define SCE_DF_OPERATOR 13
#define SCE_DF_ICODE 14
#define SCE_HOLLYWOOD_DEFAULT 0
#define SCE_HOLLYWOOD_COMMENT 1
#define SCE_HOLLYWOOD_COMMENTBLOCK 2
#define SCE_HOLLYWOOD_NUMBER 3
#define SCE_HOLLYWOOD_KEYWORD 4
#define SCE_HOLLYWOOD_STDAPI 5
#define SCE_HOLLYWOOD_PLUGINAPI 6
#define SCE_HOLLYWOOD_PLUGINMETHOD 7
#define SCE_HOLLYWOOD_STRING 8
#define SCE_HOLLYWOOD_STRINGBLOCK 9
#define SCE_HOLLYWOOD_PREPROCESSOR 10
#define SCE_HOLLYWOOD_OPERATOR 11
#define SCE_HOLLYWOOD_IDENTIFIER 12
#define SCE_HOLLYWOOD_CONSTANT 13
#define SCE_HOLLYWOOD_HEXNUMBER 14
#define SCE_RAKU_DEFAULT 0
#define SCE_RAKU_ERROR 1
#define SCE_RAKU_COMMENTLINE 2
#define SCE_RAKU_COMMENTEMBED 3
#define SCE_RAKU_POD 4
#define SCE_RAKU_CHARACTER 5
#define SCE_RAKU_HEREDOC_Q 6
#define SCE_RAKU_HEREDOC_QQ 7
#define SCE_RAKU_STRING 8
#define SCE_RAKU_STRING_Q 9
#define SCE_RAKU_STRING_QQ 10
#define SCE_RAKU_STRING_Q_LANG 11
#define SCE_RAKU_STRING_VAR 12
#define SCE_RAKU_REGEX 13
#define SCE_RAKU_REGEX_VAR 14
#define SCE_RAKU_ADVERB 15
#define SCE_RAKU_NUMBER 16
#define SCE_RAKU_PREPROCESSOR 17
#define SCE_RAKU_OPERATOR 18
#define SCE_RAKU_WORD 19
#define SCE_RAKU_FUNCTION 20
#define SCE_RAKU_IDENTIFIER 21
#define SCE_RAKU_TYPEDEF 22
#define SCE_RAKU_MU 23
#define SCE_RAKU_POSITIONAL 24
#define SCE_RAKU_ASSOCIATIVE 25
#define SCE_RAKU_CALLABLE 26
#define SCE_RAKU_GRAMMAR 27
#define SCE_RAKU_CLASS 28
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
#endif

View File

@ -38,6 +38,8 @@ typedef intptr_t sptr_t;
typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
#ifndef SCI_DISABLE_AUTOGENERATED
/* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
#define INVALID_POSITION -1
#define SCI_START 2000
@ -63,6 +65,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_CANREDO 2016
#define SCI_MARKERLINEFROMHANDLE 2017
#define SCI_MARKERDELETEHANDLE 2018
#define SCI_MARKERHANDLEFROMLINE 2732
#define SCI_MARKERNUMBERFROMLINE 2733
#define SCI_GETUNDOCOLLECTION 2019
#define SCWS_INVISIBLE 0
#define SCWS_VISIBLEALWAYS 1
@ -93,6 +97,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETBUFFEREDDRAW 2035
#define SCI_SETTABWIDTH 2036
#define SCI_GETTABWIDTH 2121
#define SCI_SETTABMINIMUMWIDTH 2724
#define SCI_GETTABMINIMUMWIDTH 2725
#define SCI_CLEARTABSTOPS 2675
#define SCI_ADDTABSTOP 2676
#define SCI_GETNEXTTABSTOP 2677
@ -102,6 +108,13 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_IME_INLINE 1
#define SCI_GETIMEINTERACTION 2678
#define SCI_SETIMEINTERACTION 2679
#define SC_ALPHA_TRANSPARENT 0
#define SC_ALPHA_OPAQUE 255
#define SC_ALPHA_NOALPHA 256
#define SC_CURSORNORMAL -1
#define SC_CURSORARROW 2
#define SC_CURSORWAIT 4
#define SC_CURSORREVERSEARROW 7
#define MARKER_MAX 31
#define SC_MARK_CIRCLE 0
#define SC_MARK_ROUNDRECT 1
@ -450,8 +463,12 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETCARETWIDTH 2189
#define SCI_SETTARGETSTART 2190
#define SCI_GETTARGETSTART 2191
#define SCI_SETTARGETSTARTVIRTUALSPACE 2728
#define SCI_GETTARGETSTARTVIRTUALSPACE 2729
#define SCI_SETTARGETEND 2192
#define SCI_GETTARGETEND 2193
#define SCI_SETTARGETENDVIRTUALSPACE 2730
#define SCI_GETTARGETENDVIRTUALSPACE 2731
#define SCI_SETTARGETRANGE 2686
#define SCI_GETTARGETTEXT 2687
#define SCI_TARGETFROMSELECTION 2287
@ -669,6 +686,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_BRACEBADLIGHT 2352
#define SCI_BRACEBADLIGHTINDICATOR 2499
#define SCI_BRACEMATCH 2353
#define SCI_BRACEMATCHNEXT 2369
#define SCI_GETVIEWEOL 2355
#define SCI_SETVIEWEOL 2356
#define SCI_GETDOCPOINTER 2357
@ -686,6 +704,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETEDGECOLOUR 2365
#define SCI_MULTIEDGEADDLINE 2694
#define SCI_MULTIEDGECLEARALL 2695
#define SCI_GETMULTIEDGECOLUMN 2749
#define SCI_SEARCHANCHOR 2366
#define SCI_SEARCHNEXT 2367
#define SCI_SEARCHPREV 2368
@ -720,10 +739,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETMOUSEDOWNCAPTURES 2385
#define SCI_SETMOUSEWHEELCAPTURES 2696
#define SCI_GETMOUSEWHEELCAPTURES 2697
#define SC_CURSORNORMAL -1
#define SC_CURSORARROW 2
#define SC_CURSORWAIT 4
#define SC_CURSORREVERSEARROW 7
#define SCI_SETCURSOR 2386
#define SCI_GETCURSOR 2387
#define SCI_SETCONTROLCHARSYMBOL 2388
@ -818,18 +833,15 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETLENGTHFORENCODE 2448
#define SCI_ENCODEDFROMUTF8 2449
#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_GETCARETSTICKY 2457
#define SCI_SETCARETSTICKY 2458
#define SCI_TOGGLECARETSTICKY 2459
#define SCI_SETPASTECONVERTENDINGS 2467
#define SCI_GETPASTECONVERTENDINGS 2468
#define SCI_SELECTIONDUPLICATE 2469
#define SC_ALPHA_TRANSPARENT 0
#define SC_ALPHA_OPAQUE 255
#define SC_ALPHA_NOALPHA 256
#define SCI_SETCARETLINEBACKALPHA 2470
#define SCI_GETCARETLINEBACKALPHA 2471
#define CARETSTYLE_INVISIBLE 0
@ -930,7 +942,9 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_GETSELECTIONNANCHORVIRTUALSPACE 2583
#define SCI_SETSELECTIONNSTART 2584
#define SCI_GETSELECTIONNSTART 2585
#define SCI_GETSELECTIONNSTARTVIRTUALSPACE 2726
#define SCI_SETSELECTIONNEND 2586
#define SCI_GETSELECTIONNENDVIRTUALSPACE 2727
#define SCI_GETSELECTIONNEND 2587
#define SCI_SETRECTANGULARSELECTIONCARET 2588
#define SCI_GETRECTANGULARSELECTIONCARET 2589
@ -994,6 +1008,18 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_SETREPRESENTATION 2665
#define SCI_GETREPRESENTATION 2666
#define SCI_CLEARREPRESENTATION 2667
#define SCI_EOLANNOTATIONSETTEXT 2740
#define SCI_EOLANNOTATIONGETTEXT 2741
#define SCI_EOLANNOTATIONSETSTYLE 2742
#define SCI_EOLANNOTATIONGETSTYLE 2743
#define SCI_EOLANNOTATIONCLEARALL 2744
#define EOLANNOTATION_HIDDEN 0
#define EOLANNOTATION_STANDARD 1
#define EOLANNOTATION_BOXED 2
#define SCI_EOLANNOTATIONSETVISIBLE 2745
#define SCI_EOLANNOTATIONGETVISIBLE 2746
#define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747
#define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748
#define SCI_STARTRECORD 3001
#define SCI_STOPRECORD 3002
#define SCI_SETLEXER 4001
@ -1031,6 +1057,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SCI_NAMEOFSTYLE 4030
#define SCI_TAGSOFSTYLE 4031
#define SCI_DESCRIPTIONOFSTYLE 4032
#define SCI_SETILEXER 4033
#define SC_MOD_NONE 0x0
#define SC_MOD_INSERTTEXT 0x1
#define SC_MOD_DELETETEXT 0x2
@ -1054,7 +1081,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_MOD_LEXERSTATE 0x80000
#define SC_MOD_INSERTCHECK 0x100000
#define SC_MOD_CHANGETABSTOPS 0x200000
#define SC_MODEVENTMASKALL 0x3FFFFF
#define SC_MOD_CHANGEEOLANNOTATION 0x400000
#define SC_MODEVENTMASKALL 0x7FFFFF
#define SC_SEARCHRESULT_LINEBUFFERMAXLENGTH 2048
#define SC_UPDATE_CONTENT 0x1
#define SC_UPDATE_SELECTION 0x2
@ -1150,6 +1178,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
#endif
/* These structures are defined to be exactly the same shape as the Win32
* CHARRANGE, TEXTRANGE, FINDTEXTEX, FORMATRANGE, and NMHDR structs.
* So older code that treats Scintilla as a RichEdit will work. */

View File

@ -151,11 +151,17 @@ fun position GetStyledText=2015(, textrange tr)
fun bool CanRedo=2016(,)
# Retrieve the line number at which a particular marker is located.
fun int MarkerLineFromHandle=2017(int markerHandle,)
fun line MarkerLineFromHandle=2017(int markerHandle,)
# Delete a marker.
fun void MarkerDeleteHandle=2018(int markerHandle,)
# Retrieve marker handles of a line
fun int MarkerHandleFromLine=2732(line line, int which)
# Retrieve marker number of a marker handle
fun int MarkerNumberFromLine=2733(line line, int which)
# Is undo history being collected?
get bool GetUndoCollection=2019(,)
@ -252,6 +258,12 @@ set void SetTabWidth=2036(int tabWidth,)
# Retrieve the visible size of a tab.
get int GetTabWidth=2121(,)
# Set the minimum visual width of a tab.
set void SetTabMinimumWidth=2724(int pixels,)
# Get the minimum visual width of a tab.
get int GetTabMinimumWidth=2725(,)
# Clear explicit tabstops on a line.
fun void ClearTabStops=2675(line line,)
@ -276,9 +288,24 @@ val SC_IME_INLINE=1
# Is the IME displayed in a window or inline?
get IMEInteraction GetIMEInteraction=2678(,)
# Choose to display the the IME in a winow or inline.
# Choose to display the IME in a window or inline.
set void SetIMEInteraction=2679(IMEInteraction imeInteraction,)
enu Alpha=SC_ALPHA_
val SC_ALPHA_TRANSPARENT=0
val SC_ALPHA_OPAQUE=255
val SC_ALPHA_NOALPHA=256
ali SC_ALPHA_NOALPHA=NO_ALPHA
enu CursorShape=SC_CURSOR
val SC_CURSORNORMAL=-1
val SC_CURSORARROW=2
val SC_CURSORWAIT=4
val SC_CURSORREVERSEARROW=7
ali SC_CURSORREVERSEARROW=REVERSE_ARROW
enu MarkerSymbol=SC_MARK_
val MARKER_MAX=31
val SC_MARK_CIRCLE=0
@ -376,7 +403,7 @@ set void MarkerSetBack=2042(int markerNumber, colour back)
# Set the background colour used for a particular marker number when its folding block is selected.
set void MarkerSetBackSelected=2292(int markerNumber, colour back)
# Enable/disable highlight for current folding bloc (smallest one that contains the caret)
# Enable/disable highlight for current folding block (smallest one that contains the caret)
fun void MarkerEnableHighlight=2293(bool enabled,)
# Add a marker to a line, returning an ID which can be used to find or delete the marker.
@ -1202,6 +1229,12 @@ set void SetTargetStart=2190(position start,)
# Get the position that starts the target.
get position GetTargetStart=2191(,)
# Sets the virtual space of the target start
set void SetTargetStartVirtualSpace=2728(position space,)
# Get the virtual space of the target start
get position GetTargetStartVirtualSpace=2729(,)
# Sets the position that ends the target which is used for updating the
# document without affecting the scroll position.
set void SetTargetEnd=2192(position end,)
@ -1209,6 +1242,12 @@ set void SetTargetEnd=2192(position end,)
# Get the position that ends the target.
get position GetTargetEnd=2193(,)
# Sets the virtual space of the target end
set void SetTargetEndVirtualSpace=2730(position space,)
# Get the virtual space of the target end
get position GetTargetEndVirtualSpace=2731(,)
# Sets both the start and end of the target in one call.
fun void SetTargetRange=2686(position start, position end)
@ -1261,7 +1300,7 @@ fun position CallTipPosStart=2203(,)
set void CallTipSetPosStart=2214(position posStart,)
# Highlight a segment of the definition.
fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd)
fun void CallTipSetHlt=2204(position highlightStart, position highlightEnd)
# Set the background colour for the call tip.
set void CallTipSetBack=2205(colour back,)
@ -1837,6 +1876,9 @@ fun void BraceBadLightIndicator=2499(bool useSetting, int indicator)
# The maxReStyle must be 0 for now. It may be defined in a future release.
fun position BraceMatch=2353(position pos, int maxReStyle)
# Similar to BraceMatch, but matching starts at the explicit start position.
fun position BraceMatchNext=2369(position pos, position startPos)
# Are the end of line characters visible?
get bool GetViewEOL=2355(,)
@ -1886,6 +1928,9 @@ fun void MultiEdgeAddLine=2694(position column, colour edgeColour)
# Clear all vertical edges.
fun void MultiEdgeClearAll=2695(,)
# Get multi edge positions.
get position GetMultiEdgeColumn=2749(int which,)
# Sets the current caret position to be the search anchor.
fun void SearchAnchor=2366(,)
@ -1973,14 +2018,6 @@ set void SetMouseWheelCaptures=2696(bool captures,)
# Get whether mouse wheel can be active outside the window.
get bool GetMouseWheelCaptures=2697(,)
enu CursorShape=SC_CURSOR
val SC_CURSORNORMAL=-1
val SC_CURSORARROW=2
val SC_CURSORWAIT=4
val SC_CURSORREVERSEARROW=7
ali SC_CURSORREVERSEARROW=REVERSE_ARROW
# Sets the cursor to one of the SC_CURSOR* values.
set void SetCursor=2386(CursorShape cursorType,)
# Get cursor type.
@ -2007,6 +2044,7 @@ fun void WordPartRightExtend=2393(,)
enu VisiblePolicy=VISIBLE_
val VISIBLE_SLOP=0x01
val VISIBLE_STRICT=0x04
# Set the way the display area is determined when a particular line
# is to be moved to by Find, FindNext, GotoLine, etc.
fun void SetVisiblePolicy=2394(VisiblePolicy visiblePolicy, int visibleSlop)
@ -2093,10 +2131,13 @@ get bool GetHotspotSingleLine=2497(,)
# Move caret down one paragraph (delimited by empty lines).
fun void ParaDown=2413(,)
# Extend selection down one paragraph (delimited by empty lines).
fun void ParaDownExtend=2414(,)
# Move caret up one paragraph (delimited by empty lines).
fun void ParaUp=2415(,)
# Extend selection up one paragraph (delimited by empty lines).
fun void ParaUpExtend=2416(,)
@ -2283,12 +2324,6 @@ fun position EncodedFromUTF8=2449(string utf8, stringresult encoded)
# multi-byte characters. If beyond end of line, return line end position.
fun position FindColumn=2456(line line, position column)
# Can the caret preferred x position only be changed by explicit movement commands?
get CaretSticky GetCaretSticky=2457(,)
# Stop the caret preferred x position changing when the user types.
set void SetCaretSticky=2458(CaretSticky useCaretStickyBehaviour,)
enu CaretSticky=SC_CARETSTICKY_
val SC_CARETSTICKY_OFF=0
val SC_CARETSTICKY_ON=1
@ -2296,6 +2331,12 @@ val SC_CARETSTICKY_WHITESPACE=2
ali SC_CARETSTICKY_WHITESPACE=WHITE_SPACE
# Can the caret preferred x position only be changed by explicit movement commands?
get CaretSticky GetCaretSticky=2457(,)
# Stop the caret preferred x position changing when the user types.
set void SetCaretSticky=2458(CaretSticky useCaretStickyBehaviour,)
# Switch between sticky and non-sticky: meant to be bound to a key.
fun void ToggleCaretSticky=2459(,)
@ -2308,13 +2349,6 @@ get bool GetPasteConvertEndings=2468(,)
# Duplicate the selection. If selection empty duplicate the line containing the caret.
fun void SelectionDuplicate=2469(,)
enu Alpha=SC_ALPHA_
val SC_ALPHA_TRANSPARENT=0
val SC_ALPHA_OPAQUE=255
val SC_ALPHA_NOALPHA=256
ali SC_ALPHA_NOALPHA=NO_ALPHA
# Set background alpha of the caret line.
set void SetCaretLineBackAlpha=2470(Alpha alpha,)
@ -2361,10 +2395,10 @@ fun int IndicatorAllOnFor=2506(position pos,)
fun int IndicatorValueAt=2507(int indicator, position pos)
# Where does a particular indicator start?
fun int IndicatorStart=2508(int indicator, position pos)
fun position IndicatorStart=2508(int indicator, position pos)
# Where does a particular indicator end?
fun int IndicatorEnd=2509(int indicator, position pos)
fun position IndicatorEnd=2509(int indicator, position pos)
# Set number of entries in position cache
set void SetPositionCache=2514(int size,)
@ -2572,18 +2606,25 @@ get int GetMainSelection=2575(,)
# Set the caret position of the nth selection.
set void SetSelectionNCaret=2576(int selection, position caret)
# Return the caret position of the nth selection.
get position GetSelectionNCaret=2577(int selection,)
# Set the anchor position of the nth selection.
set void SetSelectionNAnchor=2578(int selection, position anchor)
# Return the anchor position of the nth selection.
get position GetSelectionNAnchor=2579(int selection,)
# Set the virtual space of the caret of the nth selection.
set void SetSelectionNCaretVirtualSpace=2580(int selection, position space)
# Return the virtual space of the caret of the nth selection.
get position GetSelectionNCaretVirtualSpace=2581(int selection,)
# Set the virtual space of the anchor of the nth selection.
set void SetSelectionNAnchorVirtualSpace=2582(int selection, position space)
# Return the virtual space of the anchor of the nth selection.
get position GetSelectionNAnchorVirtualSpace=2583(int selection,)
@ -2593,26 +2634,39 @@ set void SetSelectionNStart=2584(int selection, position anchor)
# Returns the position at the start of the selection.
get position GetSelectionNStart=2585(int selection,)
# Returns the virtual space at the start of the selection.
get position GetSelectionNStartVirtualSpace=2726(int selection,)
# Sets the position that ends the selection - this becomes the currentPosition.
set void SetSelectionNEnd=2586(int selection, position caret)
# Returns the virtual space at the end of the selection.
get position GetSelectionNEndVirtualSpace=2727(int selection,)
# Returns the position at the end of the selection.
get position GetSelectionNEnd=2587(int selection,)
# Set the caret position of the rectangular selection.
set void SetRectangularSelectionCaret=2588(position caret,)
# Return the caret position of the rectangular selection.
get position GetRectangularSelectionCaret=2589(,)
# Set the anchor position of the rectangular selection.
set void SetRectangularSelectionAnchor=2590(position anchor,)
# Return the anchor position of the rectangular selection.
get position GetRectangularSelectionAnchor=2591(,)
# Set the virtual space of the caret of the rectangular selection.
set void SetRectangularSelectionCaretVirtualSpace=2592(position space,)
# Return the virtual space of the caret of the rectangular selection.
get position GetRectangularSelectionCaretVirtualSpace=2593(,)
# Set the virtual space of the anchor of the rectangular selection.
set void SetRectangularSelectionAnchorVirtualSpace=2594(position space,)
# Return the virtual space of the anchor of the rectangular selection.
get position GetRectangularSelectionAnchorVirtualSpace=2595(,)
@ -2628,6 +2682,7 @@ ali SCVS_NOWRAPLINESTART=NO_WRAP_LINE_START
# Set options for virtual space behaviour.
set void SetVirtualSpaceOptions=2596(VirtualSpace virtualSpaceOptions,)
# Return options for virtual space behaviour.
get VirtualSpace GetVirtualSpaceOptions=2597(,)
@ -2788,6 +2843,38 @@ get int GetRepresentation=2666(string encodedCharacter, stringresult representat
# Remove a character representation.
fun void ClearRepresentation=2667(string encodedCharacter,)
# Set the end of line annotation text for a line
set void EOLAnnotationSetText=2740(line line, string text)
# Get the end of line annotation text for a line
get int EOLAnnotationGetText=2741(line line, stringresult text)
# Set the style number for the end of line annotations for a line
set void EOLAnnotationSetStyle=2742(line line, int style)
# Get the style number for the end of line annotations for a line
get int EOLAnnotationGetStyle=2743(line line,)
# Clear the end of annotations from all lines
fun void EOLAnnotationClearAll=2744(,)
enu EOLAnnotationVisible=EOLANNOTATION_
val EOLANNOTATION_HIDDEN=0
val EOLANNOTATION_STANDARD=1
val EOLANNOTATION_BOXED=2
# Set the visibility for the end of line annotations for a view
set void EOLAnnotationSetVisible=2745(EOLAnnotationVisible visible,)
# Get the visibility for the end of line annotations for a view
get EOLAnnotationVisible EOLAnnotationGetVisible=2746(,)
# Get the start of the range of style numbers used for end of line annotations
set void EOLAnnotationSetStyleOffset=2747(int style,)
# Get the start of the range of style numbers used for end of line annotations
get int EOLAnnotationGetStyleOffset=2748(,)
# Start notifying the container of all key presses and commands.
fun void StartRecord=3001(,)
@ -2907,6 +2994,9 @@ fun int TagsOfStyle=4031(int style, stringresult tags)
# Result is NUL-terminated.
fun int DescriptionOfStyle=4032(int style, stringresult description)
# Set the lexer from an ILexer*.
set void SetILexer=4033(, pointer ilexer)
# 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.
@ -2935,7 +3025,8 @@ val SC_MOD_CONTAINER=0x40000
val SC_MOD_LEXERSTATE=0x80000
val SC_MOD_INSERTCHECK=0x100000
val SC_MOD_CHANGETABSTOPS=0x200000
val SC_MODEVENTMASKALL=0x3FFFFF
val SC_MOD_CHANGEEOLANNOTATION=0x400000
val SC_MODEVENTMASKALL=0x7FFFFF
ali SC_MOD_INSERTTEXT=INSERT_TEXT
ali SC_MOD_DELETETEXT=DELETE_TEXT
@ -2955,6 +3046,7 @@ ali SC_MOD_CHANGEANNOTATION=CHANGE_ANNOTATION
ali SC_MOD_LEXERSTATE=LEXER_STATE
ali SC_MOD_INSERTCHECK=INSERT_CHECK
ali SC_MOD_CHANGETABSTOPS=CHANGE_TAB_STOPS
ali SC_MOD_CHANGEEOLANNOTATION=CHANGE_E_O_L_ANNOTATION
ali SC_MODEVENTMASKALL=EVENT_MASK_ALL
enu Update=SC_UPDATE_
@ -3157,6 +3249,8 @@ val SCLEX_NIM=126
val SCLEX_CIL=127
val SCLEX_X12=128
val SCLEX_DATAFLEX=129
val SCLEX_HOLLYWOOD=130
val SCLEX_RAKU=131
# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
# value assigned in sequence from SCLEX_AUTOMATIC+1.
@ -3583,6 +3677,7 @@ val SCE_ERR_VALUE=21
val SCE_ERR_GCC_INCLUDED_FROM=22
val SCE_ERR_ESCSEQ=23
val SCE_ERR_ESCSEQ_UNKNOWN=24
val SCE_ERR_GCC_EXCERPT=25
val SCE_ERR_ES_BLACK=40
val SCE_ERR_ES_RED=41
val SCE_ERR_ES_GREEN=42
@ -5110,7 +5205,7 @@ val SCE_SAS_MACRO_KEYWORD=12
val SCE_SAS_BLOCK_KEYWORD=13
val SCE_SAS_MACRO_FUNCTION=14
val SCE_SAS_STATEMENT=15
# Lexical states for SCLEX_NIM
# Lexical states for SCLEX_NIM
lex Nim=SCLEX_NIM SCE_NIM_
val SCE_NIM_DEFAULT=0
val SCE_NIM_COMMENT=1
@ -5170,6 +5265,54 @@ val SCE_DF_STRINGEOL=11
val SCE_DF_SCOPEWORD=12
val SCE_DF_OPERATOR=13
val SCE_DF_ICODE=14
# Lexical states for SCLEX_HOLLYWOOD
lex Hollywood=SCLEX_HOLLYWOOD SCE_HOLLYWOOD_
val SCE_HOLLYWOOD_DEFAULT=0
val SCE_HOLLYWOOD_COMMENT=1
val SCE_HOLLYWOOD_COMMENTBLOCK=2
val SCE_HOLLYWOOD_NUMBER=3
val SCE_HOLLYWOOD_KEYWORD=4
val SCE_HOLLYWOOD_STDAPI=5
val SCE_HOLLYWOOD_PLUGINAPI=6
val SCE_HOLLYWOOD_PLUGINMETHOD=7
val SCE_HOLLYWOOD_STRING=8
val SCE_HOLLYWOOD_STRINGBLOCK=9
val SCE_HOLLYWOOD_PREPROCESSOR=10
val SCE_HOLLYWOOD_OPERATOR=11
val SCE_HOLLYWOOD_IDENTIFIER=12
val SCE_HOLLYWOOD_CONSTANT=13
val SCE_HOLLYWOOD_HEXNUMBER=14
# Lexical states for SCLEX_RAKU
lex Raku=SCLEX_RAKU SCE_RAKU_
val SCE_RAKU_DEFAULT=0
val SCE_RAKU_ERROR=1
val SCE_RAKU_COMMENTLINE=2
val SCE_RAKU_COMMENTEMBED=3
val SCE_RAKU_POD=4
val SCE_RAKU_CHARACTER=5
val SCE_RAKU_HEREDOC_Q=6
val SCE_RAKU_HEREDOC_QQ=7
val SCE_RAKU_STRING=8
val SCE_RAKU_STRING_Q=9
val SCE_RAKU_STRING_QQ=10
val SCE_RAKU_STRING_Q_LANG=11
val SCE_RAKU_STRING_VAR=12
val SCE_RAKU_REGEX=13
val SCE_RAKU_REGEX_VAR=14
val SCE_RAKU_ADVERB=15
val SCE_RAKU_NUMBER=16
val SCE_RAKU_PREPROCESSOR=17
val SCE_RAKU_OPERATOR=18
val SCE_RAKU_WORD=19
val SCE_RAKU_FUNCTION=20
val SCE_RAKU_IDENTIFIER=21
val SCE_RAKU_TYPEDEF=22
val SCE_RAKU_MU=23
val SCE_RAKU_POSITIONAL=24
val SCE_RAKU_ASSOCIATIVE=25
val SCE_RAKU_CALLABLE=26
val SCE_RAKU_GRAMMAR=27
val SCE_RAKU_CLASS=28
# Events

View File

@ -1,4 +1,5 @@
// Scintilla source code edit control
// @file LexASY.cxx
//Author: instanton (email: soft_share<at>126<dot>com)
// The License.txt file describes the conditions under which this software may be distributed.

View File

@ -1,5 +1,5 @@
// Scintilla source code edit control
/** @file LexABAQUS.cxx
/** @file LexAbaqus.cxx
** Lexer for ABAQUS. Based on the lexer for APDL by Hadar Raz.
** By Sergio Lucato.
** Sort of completely rewritten by Gertjan Kloosterman

View File

@ -80,6 +80,7 @@ struct OptionsAsm {
std::string foldExplicitEnd;
bool foldExplicitAnywhere;
bool foldCompact;
std::string commentChar;
OptionsAsm() {
delimiter = "";
fold = false;
@ -90,6 +91,7 @@ struct OptionsAsm {
foldExplicitEnd = "";
foldExplicitAnywhere = false;
foldCompact = true;
commentChar = "";
}
};
@ -134,6 +136,9 @@ struct OptionSetAsm : public OptionSet<OptionsAsm> {
DefineProperty("fold.compact", &OptionsAsm::foldCompact);
DefineProperty("lexer.as.comment.character", &OptionsAsm::commentChar,
"Overrides the default comment character (which is ';' for asm and '#' for as).");
DefineWordListSets(asmWordListDesc);
}
};
@ -151,7 +156,7 @@ class LexerAsm : public DefaultLexer {
OptionSetAsm osAsm;
int commentChar;
public:
LexerAsm(int commentChar_) {
LexerAsm(const char *languageName_, int language_, int commentChar_) : DefaultLexer(languageName_, language_) {
commentChar = commentChar_;
}
virtual ~LexerAsm() {
@ -160,7 +165,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osAsm.PropertyNames();
@ -172,6 +177,9 @@ public:
return osAsm.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osAsm.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osAsm.DescribeWordListSets();
}
@ -183,12 +191,12 @@ public:
return 0;
}
static ILexer4 *LexerFactoryAsm() {
return new LexerAsm(';');
static ILexer5 *LexerFactoryAsm() {
return new LexerAsm("asm", SCLEX_ASM, ';');
}
static ILexer4 *LexerFactoryAs() {
return new LexerAsm('#');
static ILexer5 *LexerFactoryAs() {
return new LexerAsm("as", SCLEX_AS, '#');
}
};
@ -242,6 +250,9 @@ Sci_Position SCI_METHOD LexerAsm::WordListSet(int n, const char *wl) {
void SCI_METHOD LexerAsm::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
LexAccessor styler(pAccess);
const char commentCharacter = options.commentChar.empty() ?
commentChar : options.commentChar.front();
// Do not leak onto next line
if (initStyle == SCE_ASM_STRINGEOL)
initStyle = SCE_ASM_DEFAULT;
@ -347,7 +358,7 @@ void SCI_METHOD LexerAsm::Lex(Sci_PositionU startPos, Sci_Position length, int i
// Determine if a new state should be entered.
if (sc.state == SCE_ASM_DEFAULT) {
if (sc.ch == commentChar){
if (sc.ch == commentCharacter) {
sc.SetState(SCE_ASM_COMMENT);
} else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) {
sc.SetState(SCE_ASM_NUMBER);

View File

@ -393,14 +393,14 @@ class LexerBaan : public DefaultLexer {
OptionsBaan options;
OptionSetBaan osBaan;
public:
LexerBaan() {
LexerBaan() : DefaultLexer("baan", SCLEX_BAAN) {
}
virtual ~LexerBaan() {
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
@ -421,6 +421,10 @@ public:
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osBaan.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osBaan.DescribeWordListSets();
}
@ -435,7 +439,7 @@ public:
return NULL;
}
static ILexer4 * LexerFactoryBaan() {
static ILexer5 * LexerFactoryBaan() {
return new LexerBaan();
}
};

View File

@ -201,7 +201,7 @@ class LexerBash : public DefaultLexer {
SubStyles subStyles;
public:
LexerBash() :
DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)),
DefaultLexer("bash", SCLEX_BASH, lexicalClasses, ELEMENTS(lexicalClasses)),
subStyles(styleSubable, 0x80, 0x40, 0) {
}
virtual ~LexerBash() {
@ -210,7 +210,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osBash.PropertyNames();
@ -222,6 +222,9 @@ public:
return osBash.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char* key) override {
return osBash.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osBash.DescribeWordListSets();
}
@ -262,7 +265,7 @@ public:
return styleSubable;
}
static ILexer4 *LexerFactoryBash() {
static ILexer5 *LexerFactoryBash() {
return new LexerBash();
}
};

View File

@ -232,7 +232,9 @@ class LexerBasic : public DefaultLexer {
OptionsBasic options;
OptionSetBasic osBasic;
public:
LexerBasic(char comment_char_, int (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) :
LexerBasic(const char *languageName_, int language_, char comment_char_,
int (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) :
DefaultLexer(languageName_, language_),
comment_char(comment_char_),
CheckFoldPoint(CheckFoldPoint_),
osBasic(wordListDescriptions) {
@ -243,7 +245,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osBasic.PropertyNames();
@ -255,6 +257,9 @@ public:
return osBasic.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osBasic.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osBasic.DescribeWordListSets();
}
@ -265,14 +270,14 @@ public:
void * SCI_METHOD PrivateCall(int, void *) override {
return 0;
}
static ILexer4 *LexerFactoryBlitzBasic() {
return new LexerBasic(';', CheckBlitzFoldPoint, blitzbasicWordListDesc);
static ILexer5 *LexerFactoryBlitzBasic() {
return new LexerBasic("blitzbasic", SCLEX_BLITZBASIC, ';', CheckBlitzFoldPoint, blitzbasicWordListDesc);
}
static ILexer4 *LexerFactoryPureBasic() {
return new LexerBasic(';', CheckPureFoldPoint, purebasicWordListDesc);
static ILexer5 *LexerFactoryPureBasic() {
return new LexerBasic("purebasic", SCLEX_PUREBASIC, ';', CheckPureFoldPoint, purebasicWordListDesc);
}
static ILexer4 *LexerFactoryFreeBasic() {
return new LexerBasic('\'', CheckFreeFoldPoint, freebasicWordListDesc );
static ILexer5 *LexerFactoryFreeBasic() {
return new LexerBasic("freebasic", SCLEX_FREEBASIC, '\'', CheckFreeFoldPoint, freebasicWordListDesc );
}
};

View File

@ -41,7 +41,8 @@ static inline bool AtEOL(Accessor &styler, Sci_PositionU i) {
// Tests for BATCH Operators
static bool IsBOperator(char ch) {
return (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') ||
(ch == '|') || (ch == '?') || (ch == '*');
(ch == '|') || (ch == '?') || (ch == '*')||
(ch == '&') || (ch == '(') || (ch == ')');
}
// Tests for BATCH Separators
@ -50,413 +51,35 @@ static bool IsBSeparator(char ch) {
(ch == '\"') || (ch == '\'') || (ch == '/');
}
static void ColouriseBatchLine(
char *lineBuffer,
Sci_PositionU lengthLine,
Sci_PositionU startLine,
Sci_PositionU endPos,
WordList *keywordlists[],
Accessor &styler) {
Sci_PositionU offset = 0; // Line Buffer Offset
Sci_PositionU cmdLoc; // External Command / Program Location
char wordBuffer[81]; // Word Buffer - large to catch long paths
Sci_PositionU wbl; // Word Buffer Length
Sci_PositionU wbo; // Word Buffer Offset - also Special Keyword Buffer Length
WordList &keywords = *keywordlists[0]; // Internal Commands
WordList &keywords2 = *keywordlists[1]; // External Commands (optional)
// CHOICE, ECHO, GOTO, PROMPT and SET have Default Text that may contain Regular Keywords
// Toggling Regular Keyword Checking off improves readability
// Other Regular Keywords and External Commands / Programs might also benefit from toggling
// Need a more robust algorithm to properly toggle Regular Keyword Checking
bool continueProcessing = true; // Used to toggle Regular Keyword Checking
// Special Keywords are those that allow certain characters without whitespace after the command
// Examples are: cd. cd\ md. rd. dir| dir> echo: echo. path=
// Special Keyword Buffer used to determine if the first n characters is a Keyword
char sKeywordBuffer[10]; // Special Keyword Buffer
bool sKeywordFound; // Exit Special Keyword for-loop if found
// Skip initial spaces
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
// Tests for escape character
static bool IsEscaped(char* wordStr, Sci_PositionU pos) {
bool isQoted=false;
while (pos>0){
pos--;
if (wordStr[pos]=='^')
isQoted=!isQoted;
else
break;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
// Set External Command / Program Location
cmdLoc = offset;
return isQoted;
}
// Check for Fake Label (Comment) or Real Label - return if found
if (lineBuffer[offset] == ':') {
if (lineBuffer[offset + 1] == ':') {
// Colorize Fake Label (Comment) - :: is similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm
styler.ColourTo(endPos, SCE_BAT_COMMENT);
} else {
// Colorize Real Label
styler.ColourTo(endPos, SCE_BAT_LABEL);
// Tests for quote character
static bool textQuoted(char *lineBuffer, Sci_PositionU endPos) {
char strBuffer[1024];
strncpy(strBuffer, lineBuffer, endPos);
strBuffer[endPos] = '\0';
char *pQuote;
pQuote = strchr(strBuffer, '"');
bool CurrentStatus = false;
while (pQuote != NULL)
{
if (!IsEscaped(strBuffer, pQuote - strBuffer)) {
CurrentStatus = !CurrentStatus;
}
return;
// Check for Drive Change (Drive Change is internal command) - return if found
} else if ((IsAlphabetic(lineBuffer[offset])) &&
(lineBuffer[offset + 1] == ':') &&
((isspacechar(lineBuffer[offset + 2])) ||
(((lineBuffer[offset + 2] == '\\')) &&
(isspacechar(lineBuffer[offset + 3]))))) {
// Colorize Regular Keyword
styler.ColourTo(endPos, SCE_BAT_WORD);
return;
pQuote = strchr(pQuote + 1, '"');
}
// Check for Hide Command (@ECHO OFF/ON)
if (lineBuffer[offset] == '@') {
styler.ColourTo(startLine + offset, SCE_BAT_HIDE);
offset++;
}
// Skip next spaces
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
}
// Read remainder of line word-at-a-time or remainder-of-word-at-a-time
while (offset < lengthLine) {
if (offset > startLine) {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Copy word from Line Buffer into Word Buffer
wbl = 0;
for (; offset < lengthLine && wbl < 80 &&
!isspacechar(lineBuffer[offset]); wbl++, offset++) {
wordBuffer[wbl] = static_cast<char>(tolower(lineBuffer[offset]));
}
wordBuffer[wbl] = '\0';
wbo = 0;
// Check for Comment - return if found
if (CompareCaseInsensitive(wordBuffer, "rem") == 0) {
styler.ColourTo(endPos, SCE_BAT_COMMENT);
return;
}
// Check for Separator
if (IsBSeparator(wordBuffer[0])) {
// Check for External Command / Program
if ((cmdLoc == offset - wbl) &&
((wordBuffer[0] == ':') ||
(wordBuffer[0] == '\\') ||
(wordBuffer[0] == '.'))) {
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
// Colorize External Command / Program
if (!keywords2) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else if (keywords2.InList(wordBuffer)) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else {
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Reset External Command / Program Location
cmdLoc = offset;
} else {
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Check for Regular Keyword in list
} else if ((keywords.InList(wordBuffer)) &&
(continueProcessing)) {
// ECHO, GOTO, PROMPT and SET require no further Regular Keyword Checking
if ((CompareCaseInsensitive(wordBuffer, "echo") == 0) ||
(CompareCaseInsensitive(wordBuffer, "goto") == 0) ||
(CompareCaseInsensitive(wordBuffer, "prompt") == 0) ||
(CompareCaseInsensitive(wordBuffer, "set") == 0)) {
continueProcessing = false;
}
// Identify External Command / Program Location for ERRORLEVEL, and EXIST
if ((CompareCaseInsensitive(wordBuffer, "errorlevel") == 0) ||
(CompareCaseInsensitive(wordBuffer, "exist") == 0)) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip comparison
while ((cmdLoc < lengthLine) &&
(!isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Identify External Command / Program Location for CALL, DO, LOADHIGH and LH
} else if ((CompareCaseInsensitive(wordBuffer, "call") == 0) ||
(CompareCaseInsensitive(wordBuffer, "do") == 0) ||
(CompareCaseInsensitive(wordBuffer, "loadhigh") == 0) ||
(CompareCaseInsensitive(wordBuffer, "lh") == 0)) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
}
// Colorize Regular keyword
styler.ColourTo(startLine + offset - 1, SCE_BAT_WORD);
// No need to Reset Offset
// Check for Special Keyword in list, External Command / Program, or Default Text
} else if ((wordBuffer[0] != '%') &&
(wordBuffer[0] != '!') &&
(!IsBOperator(wordBuffer[0])) &&
(continueProcessing)) {
// Check for Special Keyword
// Affected Commands are in Length range 2-6
// Good that ERRORLEVEL, EXIST, CALL, DO, LOADHIGH, and LH are unaffected
sKeywordFound = false;
for (Sci_PositionU keywordLength = 2; keywordLength < wbl && keywordLength < 7 && !sKeywordFound; keywordLength++) {
wbo = 0;
// Copy Keyword Length from Word Buffer into Special Keyword Buffer
for (; wbo < keywordLength; wbo++) {
sKeywordBuffer[wbo] = static_cast<char>(wordBuffer[wbo]);
}
sKeywordBuffer[wbo] = '\0';
// Check for Special Keyword in list
if ((keywords.InList(sKeywordBuffer)) &&
((IsBOperator(wordBuffer[wbo])) ||
(IsBSeparator(wordBuffer[wbo])))) {
sKeywordFound = true;
// ECHO requires no further Regular Keyword Checking
if (CompareCaseInsensitive(sKeywordBuffer, "echo") == 0) {
continueProcessing = false;
}
// Colorize Special Keyword as Regular Keyword
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_WORD);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
}
// Check for External Command / Program or Default Text
if (!sKeywordFound) {
wbo = 0;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
(wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))) {
wbo++;
}
// Reset External Command / Program Location
cmdLoc = offset - (wbl - wbo);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// CHOICE requires no further Regular Keyword Checking
if (CompareCaseInsensitive(wordBuffer, "choice") == 0) {
continueProcessing = false;
}
// Check for START (and its switches) - What follows is External Command \ Program
if (CompareCaseInsensitive(wordBuffer, "start") == 0) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Reset External Command / Program Location if command switch detected
if (lineBuffer[cmdLoc] == '/') {
// Skip command switch
while ((cmdLoc < lengthLine) &&
(!isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
}
}
// Colorize External Command / Program
if (!keywords2) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else if (keywords2.InList(wordBuffer)) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else {
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// No need to Reset Offset
// Check for Default Text
} else {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
(wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))) {
wbo++;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
}
// Check for Argument (%n), Environment Variable (%x...%) or Local Variable (%%a)
} else if (wordBuffer[0] == '%') {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
wbo++;
// Search to end of word for second % (can be a long path)
while ((wbo < wbl) &&
(wordBuffer[wbo] != '%') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))) {
wbo++;
}
// Check for Argument (%n) or (%*)
if (((Is0To9(wordBuffer[1])) || (wordBuffer[1] == '*')) &&
(wordBuffer[wbo] != '%')) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - 2);
}
// Colorize Argument
styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - 2);
// Check for Expanded Argument (%~...) / Variable (%%~...)
} else if (((wbl > 1) && (wordBuffer[1] == '~')) ||
((wbl > 2) && (wordBuffer[1] == '%') && (wordBuffer[2] == '~'))) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Expanded Argument / Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// Check for Environment Variable (%x...%)
} else if ((wordBuffer[1] != '%') &&
(wordBuffer[wbo] == '%')) {
wbo++;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Environment Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// Check for Local Variable (%%a)
} else if (
(wbl > 2) &&
(wordBuffer[1] == '%') &&
(wordBuffer[2] != '%') &&
(!IsBOperator(wordBuffer[2])) &&
(!IsBSeparator(wordBuffer[2]))) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - 3);
}
// Colorize Local Variable
styler.ColourTo(startLine + offset - 1 - (wbl - 3), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - 3);
}
// Check for Environment Variable (!x...!)
} else if (wordBuffer[0] == '!') {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
wbo++;
// Search to end of word for second ! (can be a long path)
while ((wbo < wbl) &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))) {
wbo++;
}
if (wordBuffer[wbo] == '!') {
wbo++;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Environment Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
// Check for Operator
} else if (IsBOperator(wordBuffer[0])) {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
// Check for Comparison Operator
if ((wordBuffer[0] == '=') && (wordBuffer[1] == '=')) {
// Identify External Command / Program Location for IF
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Colorize Comparison Operator
styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_OPERATOR);
// Reset Offset to re-process remainder of word
offset -= (wbl - 2);
// Check for Pipe Operator
} else if (wordBuffer[0] == '|') {
// Reset External Command / Program Location
cmdLoc = offset - wbl + 1;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Colorize Pipe Operator
styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
// Check for Other Operator
} else {
// Check for > Operator
if (wordBuffer[0] == '>') {
// Turn Keyword and External Command / Program checking back on
continueProcessing = true;
}
// Colorize Other Operator
styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
}
// Check for Default Text
} else {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
(wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))) {
wbo++;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
// Skip next spaces - nothing happens if Offset was Reset
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
}
}
// Colorize Default Text for remainder of line - currently not lexed
styler.ColourTo(endPos, SCE_BAT_DEFAULT);
return CurrentStatus;
}
static void ColouriseBatchDoc(
@ -465,6 +88,23 @@ static void ColouriseBatchDoc(
int /*initStyle*/,
WordList *keywordlists[],
Accessor &styler) {
// Always backtracks to the start of a line that is not a continuation
// of the previous line
if (startPos > 0) {
Sci_Position ln = styler.GetLine(startPos); // Current line number
while (startPos > 0) {
ln--;
if ((styler.SafeGetCharAt(startPos-3) == '^' && styler.SafeGetCharAt(startPos-2) == '\r' && styler.SafeGetCharAt(startPos-1) == '\n')
|| styler.SafeGetCharAt(startPos-2) == '^') { // handle '^' line continuation
// When the line continuation is found,
// set the Start Position to the Start of the previous line
length+=startPos-styler.LineStart(ln);
startPos=styler.LineStart(ln);
}
else
break;
}
}
char lineBuffer[1024];
@ -472,21 +112,459 @@ static void ColouriseBatchDoc(
styler.StartSegment(startPos);
Sci_PositionU linePos = 0;
Sci_PositionU startLine = startPos;
bool continueProcessing = true; // Used to toggle Regular Keyword Checking
bool isNotAssigned=false; // Used to flag Assignment in Set operation
for (Sci_PositionU i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {
// End of line (or of line buffer) met, colourise it
if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1) || (i==startPos + length-1)) {
// End of line (or of line buffer) (or End of Last Line) met, colourise it
lineBuffer[linePos] = '\0';
ColouriseBatchLine(lineBuffer, linePos, startLine, i, keywordlists, styler);
Sci_PositionU lengthLine=linePos;
Sci_PositionU endPos=i;
Sci_PositionU offset = 0; // Line Buffer Offset
Sci_PositionU cmdLoc; // External Command / Program Location
char wordBuffer[81]; // Word Buffer - large to catch long paths
Sci_PositionU wbl; // Word Buffer Length
Sci_PositionU wbo; // Word Buffer Offset - also Special Keyword Buffer Length
WordList &keywords = *keywordlists[0]; // Internal Commands
WordList &keywords2 = *keywordlists[1]; // External Commands (optional)
// CHOICE, ECHO, GOTO, PROMPT and SET have Default Text that may contain Regular Keywords
// Toggling Regular Keyword Checking off improves readability
// Other Regular Keywords and External Commands / Programs might also benefit from toggling
// Need a more robust algorithm to properly toggle Regular Keyword Checking
bool stopLineProcessing=false; // Used to stop line processing if Comment or Drive Change found
// Special Keywords are those that allow certain characters without whitespace after the command
// Examples are: cd. cd\ md. rd. dir| dir> echo: echo. path=
// Special Keyword Buffer used to determine if the first n characters is a Keyword
char sKeywordBuffer[10]; // Special Keyword Buffer
bool sKeywordFound; // Exit Special Keyword for-loop if found
// Skip initial spaces
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
// Set External Command / Program Location
cmdLoc = offset;
// Check for Fake Label (Comment) or Real Label - return if found
if (lineBuffer[offset] == ':') {
if (lineBuffer[offset + 1] == ':') {
// Colorize Fake Label (Comment) - :: is similar to REM, see http://content.techweb.com/winmag/columns/explorer/2000/21.htm
styler.ColourTo(endPos, SCE_BAT_COMMENT);
} else {
// Colorize Real Label
styler.ColourTo(endPos, SCE_BAT_LABEL);
}
stopLineProcessing=true;
// Check for Drive Change (Drive Change is internal command) - return if found
} else if ((IsAlphabetic(lineBuffer[offset])) &&
(lineBuffer[offset + 1] == ':') &&
((isspacechar(lineBuffer[offset + 2])) ||
(((lineBuffer[offset + 2] == '\\')) &&
(isspacechar(lineBuffer[offset + 3]))))) {
// Colorize Regular Keyword
styler.ColourTo(endPos, SCE_BAT_WORD);
stopLineProcessing=true;
}
// Check for Hide Command (@ECHO OFF/ON)
if (lineBuffer[offset] == '@') {
styler.ColourTo(startLine + offset, SCE_BAT_HIDE);
offset++;
}
// Skip next spaces
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
}
// Read remainder of line word-at-a-time or remainder-of-word-at-a-time
while (offset < lengthLine && !stopLineProcessing) {
if (offset > startLine) {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Copy word from Line Buffer into Word Buffer
wbl = 0;
for (; offset < lengthLine && wbl < 80 &&
!isspacechar(lineBuffer[offset]); wbl++, offset++) {
wordBuffer[wbl] = static_cast<char>(tolower(lineBuffer[offset]));
}
wordBuffer[wbl] = '\0';
wbo = 0;
// Check for Comment - return if found
if ((CompareCaseInsensitive(wordBuffer, "rem") == 0) && continueProcessing) {
styler.ColourTo(endPos, SCE_BAT_COMMENT);
break;
}
// Check for Separator
if (IsBSeparator(wordBuffer[0])) {
// Check for External Command / Program
if ((cmdLoc == offset - wbl) &&
((wordBuffer[0] == ':') ||
(wordBuffer[0] == '\\') ||
(wordBuffer[0] == '.'))) {
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
// Colorize External Command / Program
if (!keywords2) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else if (keywords2.InList(wordBuffer)) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else {
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Reset External Command / Program Location
cmdLoc = offset;
} else {
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
// Colorize Default Text
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// Check for Regular Keyword in list
} else if ((keywords.InList(wordBuffer)) &&
(continueProcessing)) {
// ECHO, GOTO, PROMPT and SET require no further Regular Keyword Checking
if ((CompareCaseInsensitive(wordBuffer, "echo") == 0) ||
(CompareCaseInsensitive(wordBuffer, "goto") == 0) ||
(CompareCaseInsensitive(wordBuffer, "prompt") == 0)) {
continueProcessing = false;
}
// SET requires additional processing for the assignment operator
if (CompareCaseInsensitive(wordBuffer, "set") == 0) {
continueProcessing = false;
isNotAssigned=true;
}
// Identify External Command / Program Location for ERRORLEVEL, and EXIST
if ((CompareCaseInsensitive(wordBuffer, "errorlevel") == 0) ||
(CompareCaseInsensitive(wordBuffer, "exist") == 0)) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip comparison
while ((cmdLoc < lengthLine) &&
(!isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Identify External Command / Program Location for CALL, DO, LOADHIGH and LH
} else if ((CompareCaseInsensitive(wordBuffer, "call") == 0) ||
(CompareCaseInsensitive(wordBuffer, "do") == 0) ||
(CompareCaseInsensitive(wordBuffer, "loadhigh") == 0) ||
(CompareCaseInsensitive(wordBuffer, "lh") == 0)) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
}
// Colorize Regular keyword
styler.ColourTo(startLine + offset - 1, SCE_BAT_WORD);
// No need to Reset Offset
// Check for Special Keyword in list, External Command / Program, or Default Text
} else if ((wordBuffer[0] != '%') &&
(wordBuffer[0] != '!') &&
(!IsBOperator(wordBuffer[0])) &&
(continueProcessing)) {
// Check for Special Keyword
// Affected Commands are in Length range 2-6
// Good that ERRORLEVEL, EXIST, CALL, DO, LOADHIGH, and LH are unaffected
sKeywordFound = false;
for (Sci_PositionU keywordLength = 2; keywordLength < wbl && keywordLength < 7 && !sKeywordFound; keywordLength++) {
wbo = 0;
// Copy Keyword Length from Word Buffer into Special Keyword Buffer
for (; wbo < keywordLength; wbo++) {
sKeywordBuffer[wbo] = static_cast<char>(wordBuffer[wbo]);
}
sKeywordBuffer[wbo] = '\0';
// Check for Special Keyword in list
if ((keywords.InList(sKeywordBuffer)) &&
((IsBOperator(wordBuffer[wbo])) ||
(IsBSeparator(wordBuffer[wbo])))) {
sKeywordFound = true;
// ECHO requires no further Regular Keyword Checking
if (CompareCaseInsensitive(sKeywordBuffer, "echo") == 0) {
continueProcessing = false;
}
// Colorize Special Keyword as Regular Keyword
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_WORD);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
}
// Check for External Command / Program or Default Text
if (!sKeywordFound) {
wbo = 0;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
(((wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))))) {
wbo++;
}
// Reset External Command / Program Location
cmdLoc = offset - (wbl - wbo);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// CHOICE requires no further Regular Keyword Checking
if (CompareCaseInsensitive(wordBuffer, "choice") == 0) {
continueProcessing = false;
}
// Check for START (and its switches) - What follows is External Command \ Program
if (CompareCaseInsensitive(wordBuffer, "start") == 0) {
// Reset External Command / Program Location
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Reset External Command / Program Location if command switch detected
if (lineBuffer[cmdLoc] == '/') {
// Skip command switch
while ((cmdLoc < lengthLine) &&
(!isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
}
}
// Colorize External Command / Program
if (!keywords2) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else if (keywords2.InList(wordBuffer)) {
styler.ColourTo(startLine + offset - 1, SCE_BAT_COMMAND);
} else {
styler.ColourTo(startLine + offset - 1, SCE_BAT_DEFAULT);
}
// No need to Reset Offset
// Check for Default Text
} else {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
(((wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo]))))) {
wbo++;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
}
// Check for Argument (%n), Environment Variable (%x...%) or Local Variable (%%a)
} else if (wordBuffer[0] == '%') {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
wbo++;
// Search to end of word for second % (can be a long path)
while ((wbo < wbl) &&
(wordBuffer[wbo] != '%')) {
wbo++;
}
// Check for Argument (%n) or (%*)
if (((Is0To9(wordBuffer[1])) || (wordBuffer[1] == '*')) &&
(wordBuffer[wbo] != '%')) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - 2);
}
// Colorize Argument
styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - 2);
// Check for Expanded Argument (%~...) / Variable (%%~...)
} else if (((wbl > 1) && (wordBuffer[1] == '~')) ||
((wbl > 2) && (wordBuffer[1] == '%') && (wordBuffer[2] == '~'))) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Expanded Argument / Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// Check for Environment Variable (%x...%)
} else if ((wordBuffer[1] != '%') &&
(wordBuffer[wbo] == '%')) {
wbo++;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Environment Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
// Check for Local Variable (%%a)
} else if (
(wbl > 2) &&
(wordBuffer[1] == '%') &&
(wordBuffer[2] != '%') &&
(!IsBOperator(wordBuffer[2])) &&
(!IsBSeparator(wordBuffer[2]))) {
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - 3);
}
// Colorize Local Variable
styler.ColourTo(startLine + offset - 1 - (wbl - 3), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - 3);
}
// Check for Environment Variable (!x...!)
} else if (wordBuffer[0] == '!') {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
wbo++;
// Search to end of word for second ! (can be a long path)
while ((wbo < wbl) &&
(wordBuffer[wbo] != '!')) {
wbo++;
}
if (wordBuffer[wbo] == '!') {
wbo++;
// Check for External Command / Program
if (cmdLoc == offset - wbl) {
cmdLoc = offset - (wbl - wbo);
}
// Colorize Environment Variable
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
// Check for Operator
} else if (IsBOperator(wordBuffer[0])) {
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - wbl, SCE_BAT_DEFAULT);
// Check for Comparison Operator
if ((wordBuffer[0] == '=') && (wordBuffer[1] == '=')) {
// Identify External Command / Program Location for IF
cmdLoc = offset;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Colorize Comparison Operator
if (continueProcessing)
styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_OPERATOR);
else
styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - 2);
// Check for Pipe Operator
} else if ((wordBuffer[0] == '|') &&
!(IsEscaped(lineBuffer,offset - wbl + wbo) || textQuoted(lineBuffer, offset - wbl) )) {
// Reset External Command / Program Location
cmdLoc = offset - wbl + 1;
// Skip next spaces
while ((cmdLoc < lengthLine) &&
(isspacechar(lineBuffer[cmdLoc]))) {
cmdLoc++;
}
// Colorize Pipe Operator
styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
continueProcessing = true;
// Check for Other Operator
} else {
// Check for Operators: >, |, &
if (((wordBuffer[0] == '>')||
(wordBuffer[0] == ')')||
(wordBuffer[0] == '(')||
(wordBuffer[0] == '&' )) &&
!(!continueProcessing && (IsEscaped(lineBuffer,offset - wbl + wbo)
|| textQuoted(lineBuffer, offset - wbl) ))){
// Turn Keyword and External Command / Program checking back on
continueProcessing = true;
isNotAssigned=false;
}
// Colorize Other Operators
// Do not Colorize Paranthesis, quoted text and escaped operators
if (((wordBuffer[0] != ')') && (wordBuffer[0] != '(')
&& !textQuoted(lineBuffer, offset - wbl) && !IsEscaped(lineBuffer,offset - wbl + wbo))
&& !((wordBuffer[0] == '=') && !isNotAssigned ))
styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_OPERATOR);
else
styler.ColourTo(startLine + offset - 1 - (wbl - 1), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - 1);
if ((wordBuffer[0] == '=') && isNotAssigned ){
isNotAssigned=false;
}
}
// Check for Default Text
} else {
// Read up to %, Operator or Separator
while ((wbo < wbl) &&
((wordBuffer[wbo] != '%') &&
(wordBuffer[wbo] != '!') &&
(!IsBOperator(wordBuffer[wbo])) &&
(!IsBSeparator(wordBuffer[wbo])))) {
wbo++;
}
// Colorize Default Text
styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT);
// Reset Offset to re-process remainder of word
offset -= (wbl - wbo);
}
// Skip next spaces - nothing happens if Offset was Reset
while ((offset < lengthLine) && (isspacechar(lineBuffer[offset]))) {
offset++;
}
}
// Colorize Default Text for remainder of line - currently not lexed
styler.ColourTo(endPos, SCE_BAT_DEFAULT);
// handle line continuation for SET and ECHO commands except the last line
if (!continueProcessing && (i<startPos + length-1)) {
if (linePos==1 || (linePos==2 && lineBuffer[1]=='\r')) // empty line on Unix and Mac or on Windows
continueProcessing=true;
else {
Sci_PositionU lineContinuationPos;
if ((linePos>2) && lineBuffer[linePos-2]=='\r') // Windows EOL
lineContinuationPos=linePos-3;
else
lineContinuationPos=linePos-2; // Unix or Mac EOL
// Reset continueProcessing if line continuation was not found
if ((lineBuffer[lineContinuationPos]!='^')
|| IsEscaped(lineBuffer, lineContinuationPos)
|| textQuoted(lineBuffer, lineContinuationPos))
continueProcessing=true;
}
}
linePos = 0;
startLine = i + 1;
}
}
if (linePos > 0) { // Last line does not have ending characters
lineBuffer[linePos] = '\0';
ColouriseBatchLine(lineBuffer, linePos, startLine, startPos + length - 1,
keywordlists, styler);
}
}
static const char *const batchWordListDesc[] = {

View File

@ -114,7 +114,7 @@ class LexerCIL : public DefaultLexer {
OptionSetCIL osCIL;
public:
LexerCIL() : DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)) { }
LexerCIL() : DefaultLexer("cil", SCLEX_CIL, lexicalClasses, ELEMENTS(lexicalClasses)) { }
virtual ~LexerCIL() { }
@ -123,7 +123,7 @@ public:
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
@ -140,6 +140,10 @@ public:
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char* key) override {
return osCIL.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osCIL.DescribeWordListSets();
}
@ -161,7 +165,7 @@ public:
return style;
}
static ILexer4 *LexerFactoryCIL() {
static ILexer5 *LexerFactoryCIL() {
return new LexerCIL();
}
};

View File

@ -1,5 +1,5 @@
// Scintilla source code edit control
/** @file LexClw.cxx
/** @file LexCLW.cxx
** Lexer for Clarion.
** 2004/12/17 Updated Lexer
**/

View File

@ -6,12 +6,9 @@
// Copyright 1998-2005 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <utility>
#include <string>
@ -144,10 +141,10 @@ BracketPair FindBracketPair(std::vector<std::string> &tokens) {
void highlightTaskMarker(StyleContext &sc, LexAccessor &styler,
int activity, const WordList &markerList, bool caseSensitive){
if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) {
const int lengthMarker = 50;
constexpr Sci_PositionU lengthMarker = 50;
char marker[lengthMarker+1] = "";
const Sci_Position currPos = sc.currentPos;
int i = 0;
const Sci_PositionU currPos = sc.currentPos;
Sci_PositionU i = 0;
while (i < lengthMarker) {
const char ch = styler.SafeGetCharAt(currPos + i);
if (IsASpace(ch) || isoperator(ch)) {
@ -166,18 +163,14 @@ void highlightTaskMarker(StyleContext &sc, LexAccessor &styler,
}
}
struct EscapeSequence {
int digitsLeft;
CharacterSet setHexDigits;
CharacterSet setOctDigits;
CharacterSet setNoneNumeric;
CharacterSet *escapeSetValid;
EscapeSequence() {
digitsLeft = 0;
escapeSetValid = nullptr;
setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef");
setOctDigits = CharacterSet(CharacterSet::setNone, "01234567");
}
class EscapeSequence {
const CharacterSet setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef");
const CharacterSet setOctDigits = CharacterSet(CharacterSet::setNone, "01234567");
const CharacterSet setNoneNumeric;
const CharacterSet *escapeSetValid = nullptr;
int digitsLeft = 0;
public:
EscapeSequence() = default;
void resetEscapeState(int nextChar) {
digitsLeft = 0;
escapeSetValid = &setNoneNumeric;
@ -198,6 +191,9 @@ struct EscapeSequence {
bool atEscapeEnd(int currChar) const {
return (digitsLeft <= 0) || !escapeSetValid->Contains(currChar);
}
void consumeDigit() noexcept {
digitsLeft--;
}
};
std::string GetRestOfLine(LexAccessor &styler, Sci_Position start, bool allowSpace) {
@ -245,7 +241,7 @@ struct PPDefinition {
}
};
const int inactiveFlag = 0x40;
constexpr int inactiveFlag = 0x40;
class LinePPState {
// Track the state of preprocessor conditionals to allow showing active and inactive
@ -318,7 +314,7 @@ public:
class PPStates {
std::vector<LinePPState> vlls;
public:
LinePPState ForLine(Sci_Position line) const {
LinePPState ForLine(Sci_Position line) const noexcept {
if ((line > 0) && (vlls.size() > static_cast<size_t>(line))) {
return vlls[line];
} else {
@ -501,7 +497,7 @@ const int sizeLexicalClasses = static_cast<int>(std::size(lexicalClasses));
}
class LexerCPP : public ILexer4 {
class LexerCPP : public ILexer5 {
bool caseSensitive;
CharacterSet setWord;
CharacterSet setNegationOp;
@ -564,7 +560,7 @@ public:
delete this;
}
int SCI_METHOD Version() const noexcept override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osCPP.PropertyNames();
@ -674,10 +670,19 @@ public:
return "";
}
static ILexer4 *LexerFactoryCPP() {
// ILexer5 methods
const char * SCI_METHOD GetName() override {
return caseSensitive ? "cpp" : "cppnocase";
}
int SCI_METHOD GetIdentifier() override {
return caseSensitive ? SCLEX_CPP : SCLEX_CPPNOCASE;
}
const char * SCI_METHOD PropertyGet(const char *key) override;
static ILexer5 *LexerFactoryCPP() {
return new LexerCPP(true);
}
static ILexer4 *LexerFactoryCPPInsensitive() {
static ILexer5 *LexerFactoryCPPInsensitive() {
return new LexerCPP(false);
}
constexpr static int MaskActive(int style) noexcept {
@ -701,6 +706,10 @@ Sci_Position SCI_METHOD LexerCPP::PropertySet(const char *key, const char *val)
return -1;
}
const char * SCI_METHOD LexerCPP::PropertyGet(const char *key) {
return osCPP.PropertyGet(key);
}
Sci_Position SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) {
WordList *wordListN = nullptr;
switch (n) {
@ -822,7 +831,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
ppDefineHistory.clear();
std::vector<PPDefinition>::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(),
[lineCurrent](const PPDefinition &p) { return p.line >= lineCurrent; });
[lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; });
if (itInvalid != ppDefineHistory.end()) {
ppDefineHistory.erase(itInvalid, ppDefineHistory.end());
definitionsChanged = true;
@ -1097,7 +1106,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
}
break;
case SCE_C_ESCAPESEQUENCE:
escapeSeq.digitsLeft--;
escapeSeq.consumeDigit();
if (!escapeSeq.atEscapeEnd(sc.ch)) {
break;
}
@ -1149,9 +1158,9 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
case SCE_C_REGEX:
if (sc.atLineStart) {
sc.SetState(SCE_C_DEFAULT|activitySet);
} else if (! inRERange && sc.ch == '/') {
} else if (!inRERange && sc.ch == '/') {
sc.Forward();
while ((sc.ch < 0x80) && islower(sc.ch))
while (IsLowerCase(sc.ch))
sc.Forward(); // gobble regex flags
sc.SetState(SCE_C_DEFAULT|activitySet);
} else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) {
@ -1577,7 +1586,7 @@ void LexerCPP::EvaluateTokens(std::vector<std::string> &tokens, const SymbolTabl
}
// Evaluate identifiers
const size_t maxIterations = 100;
constexpr size_t maxIterations = 100;
size_t iterations = 0; // Limit number of iterations in case there is a recursive macro.
for (size_t i = 0; (i<tokens.size()) && (iterations < maxIterations);) {
iterations++;

View File

@ -157,6 +157,7 @@ class LexerD : public DefaultLexer {
OptionSetD osD;
public:
LexerD(bool caseSensitive_) :
DefaultLexer("D", SCLEX_D),
caseSensitive(caseSensitive_) {
}
virtual ~LexerD() {
@ -165,7 +166,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osD.PropertyNames();
@ -177,6 +178,9 @@ public:
return osD.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osD.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osD.DescribeWordListSets();
}
@ -188,10 +192,10 @@ public:
return 0;
}
static ILexer4 *LexerFactoryD() {
static ILexer5 *LexerFactoryD() {
return new LexerD(true);
}
static ILexer4 *LexerFactoryDInsensitive() {
static ILexer5 *LexerFactoryDInsensitive() {
return new LexerD(false);
}
};

View File

@ -56,7 +56,7 @@ class LexerDMIS : public DefaultLexer
virtual ~LexerDMIS(void);
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
@ -79,13 +79,17 @@ class LexerDMIS : public DefaultLexer
return -1;
}
const char * SCI_METHOD PropertyGet(const char *) override {
return NULL;
}
Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;
void * SCI_METHOD PrivateCall(int, void *) override {
return NULL;
}
static ILexer4 *LexerFactoryDMIS() {
static ILexer5 *LexerFactoryDMIS() {
return new LexerDMIS;
}
@ -129,7 +133,7 @@ void SCI_METHOD LexerDMIS::InitWordListSets(void)
}
LexerDMIS::LexerDMIS(void) {
LexerDMIS::LexerDMIS(void) : DefaultLexer("DMIS", SCLEX_DMIS) {
this->InitWordListSets();
this->m_majorWords.Clear();

View File

@ -1,4 +1,5 @@
// Scintilla Lexer for EDIFACT
// @file LexEDIFACT.cxx
// Written by Iain Clarke, IMCSoft & Inobiz AB.
// EDIFACT documented here: https://www.unece.org/cefact/edifact/welcome.html
// and more readably here: https://en.wikipedia.org/wiki/EDIFACT
@ -12,6 +13,8 @@
#include <cstring>
#include <cctype>
#include <string>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
@ -28,13 +31,13 @@ public:
LexerEDIFACT();
virtual ~LexerEDIFACT() {} // virtual destructor, as we inherit from ILexer
static ILexer4 *Factory() {
static ILexer5 *Factory() {
return new LexerEDIFACT;
}
int SCI_METHOD Version() const override
{
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override
{
@ -72,6 +75,21 @@ public:
}
return -1;
}
const char * SCI_METHOD PropertyGet(const char *key) override
{
m_lastPropertyValue = "";
if (!strcmp(key, "fold"))
{
m_lastPropertyValue = m_bFold ? "1" : "0";
}
if (!strcmp(key, "lexer.edifact.highlight.un.all")) // GetProperty
{
m_lastPropertyValue = m_bHighlightAllUN ? "1" : "0";
}
return m_lastPropertyValue.c_str();
}
const char * SCI_METHOD DescribeWordListSets() override
{
return NULL;
@ -104,6 +122,8 @@ protected:
char m_chDecimal;
char m_chRelease;
char m_chSegment;
std::string m_lastPropertyValue;
};
LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact");
@ -114,7 +134,7 @@ LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact");
///////////////////////////////////////////////////////////////////////////////
LexerEDIFACT::LexerEDIFACT()
LexerEDIFACT::LexerEDIFACT() : DefaultLexer("edifact", SCLEX_EDIFACT)
{
m_bFold = false;
m_bHighlightAllUN = false;

View File

@ -1,5 +1,5 @@
// Scintilla source code edit control
/** @file LexESCRIPT.cxx
/** @file LexEScript.cxx
** Lexer for ESCRIPT
**/
// Copyright 2003 by Patrizio Bekerle (patrizio@bekerle.com)

View File

@ -12,6 +12,8 @@
#include <assert.h>
#include <ctype.h>
#include <string>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
@ -48,6 +50,19 @@ inline bool AtEOL(Accessor &styler, Sci_PositionU i) {
((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n'));
}
bool IsGccExcerpt(const char *s) noexcept {
while (*s) {
if (s[0] == ' ' && s[1] == '|' && (s[2] == ' ' || s[2] == '+')) {
return true;
}
if (!(s[0] == ' ' || s[0] == '+' || Is0To9(s[0]))) {
return false;
}
s++;
}
return true;
}
int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci_Position &startValue) {
if (lineBuffer[0] == '>') {
// Command or return status
@ -132,6 +147,11 @@ int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci
// Microsoft linker warning:
// {<object> : } warning LNK9999
return SCE_ERR_MS;
} else if (IsGccExcerpt(lineBuffer)) {
// GCC code excerpt and pointer to issue
// 73 | GTimeVal last_popdown;
// | ^~~~~~~~~~~~
return SCE_ERR_GCC_EXCERPT;
} else {
// Look for one of the following formats:
// GCC: <filename>:<line>:<message>
@ -301,17 +321,17 @@ int StyleFromSequence(const char *seq) noexcept {
}
void ColouriseErrorListLine(
char *lineBuffer,
Sci_PositionU lengthLine,
const std::string &lineBuffer,
Sci_PositionU endPos,
Accessor &styler,
bool valueSeparate,
bool escapeSequences) {
Sci_Position startValue = -1;
const int style = RecogniseErrorListLine(lineBuffer, lengthLine, startValue);
if (escapeSequences && strstr(lineBuffer, CSI)) {
const Sci_PositionU lengthLine = lineBuffer.length();
const int style = RecogniseErrorListLine(lineBuffer.c_str(), lengthLine, startValue);
if (escapeSequences && strstr(lineBuffer.c_str(), CSI)) {
const Sci_Position startPos = endPos - lengthLine;
const char *linePortion = lineBuffer;
const char *linePortion = lineBuffer.c_str();
Sci_Position startPortion = startPos;
int portionStyle = style;
while (const char *startSeq = strstr(linePortion, CSI)) {
@ -352,10 +372,9 @@ void ColouriseErrorListLine(
}
void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {
char lineBuffer[10000];
std::string lineBuffer;
styler.StartAt(startPos);
styler.StartSegment(startPos);
Sci_PositionU linePos = 0;
// property lexer.errorlist.value.separate
// For lines in the output pane that are matches from Find in Files or GCC-style
@ -369,17 +388,15 @@ void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, Wor
const bool escapeSequences = styler.GetPropertyInt("lexer.errorlist.escape.sequences") != 0;
for (Sci_PositionU i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {
// End of line (or of line buffer) met, colourise it
lineBuffer[linePos] = '\0';
ColouriseErrorListLine(lineBuffer, linePos, i, styler, valueSeparate, escapeSequences);
linePos = 0;
lineBuffer.push_back(styler[i]);
if (AtEOL(styler, i)) {
// End of line met, colourise it
ColouriseErrorListLine(lineBuffer, i, styler, valueSeparate, escapeSequences);
lineBuffer.clear();
}
}
if (linePos > 0) { // Last line does not have ending characters
lineBuffer[linePos] = '\0';
ColouriseErrorListLine(lineBuffer, linePos, startPos + length - 1, styler, valueSeparate, escapeSequences);
if (!lineBuffer.empty()) { // Last line does not have ending characters
ColouriseErrorListLine(lineBuffer, startPos + length - 1, styler, valueSeparate, escapeSequences);
}
}

View File

@ -1,5 +1,5 @@
// Scintilla source code edit control
/** @file LexFlagShip.cxx
/** @file LexFlagship.cxx
** Lexer for Harbour and FlagShip.
** (Syntactically compatible to other xBase dialects, like Clipper, dBase, Clip, FoxPro etc.)
**/

View File

@ -1,5 +1,6 @@
// Scintilla source code edit control
// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
// @file LexGui4Cli.cxx
/*
This is the Lexer for Gui4Cli, included in SciLexer.dll
- by d. Keletsekis, 2/10/2003

View File

@ -266,14 +266,30 @@ void classifyAttribHTML(Sci_PositionU start, Sci_PositionU end, const WordList &
styler.ColourTo(end, chAttr);
}
// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-core-concepts
bool isHTMLCustomElement(const std::string &tag) {
// check valid HTML custom element name: starts with an ASCII lower alpha and contains hyphen.
// IsUpperOrLowerCase() is used for `html.tags.case.sensitive=1`.
if (tag.length() < 2 || !IsUpperOrLowerCase(tag[0])) {
return false;
}
if (tag.find('-') == std::string::npos) {
return false;
}
return true;
}
int classifyTagHTML(Sci_PositionU start, Sci_PositionU end,
const WordList &keywords, Accessor &styler, bool &tagDontFold,
bool caseSensitive, bool isXml, bool allowScripts,
const std::set<std::string> &nonFoldingTags) {
std::string tag;
// Copy after the '<'
// Copy after the '<' and stop before ' '
for (Sci_PositionU cPos = start; cPos <= end; cPos++) {
const char ch = styler[cPos];
if (IsASpace(ch)) {
break;
}
if ((ch != '<') && (ch != '/')) {
tag.push_back(caseSensitive ? ch : MakeLowerCase(ch));
}
@ -288,8 +304,12 @@ int classifyTagHTML(Sci_PositionU start, Sci_PositionU end,
chAttr = SCE_H_SGML_DEFAULT;
} else if (!keywords || keywords.InList(tag.c_str())) {
chAttr = SCE_H_TAG;
} else if (!isXml && isHTMLCustomElement(tag)) {
chAttr = SCE_H_TAG;
}
if (chAttr != SCE_H_TAGUNKNOWN) {
styler.ColourTo(end, chAttr);
}
styler.ColourTo(end, chAttr);
if (chAttr == SCE_H_TAG) {
if (allowScripts && (tag == "script")) {
// check to see if this is a self-closing tag by sniffing ahead
@ -562,6 +582,7 @@ struct OptionsHTML {
bool foldCompact = true;
bool foldComment = false;
bool foldHeredoc = false;
bool foldXmlAtTagOpen = false;
OptionsHTML() noexcept {
}
};
@ -626,6 +647,10 @@ struct OptionSetHTML : public OptionSet<OptionsHTML> {
"Allow folding for heredocs in scripts embedded in HTML. "
"The default is off.");
DefineProperty("fold.xml.at.tag.open", &OptionsHTML::foldXmlAtTagOpen,
"Enable folding for XML at the start of open tag. "
"The default is off.");
DefineWordListSets(isPHPScript_ ? phpscriptWordListDesc : htmlWordListDesc);
}
};
@ -821,6 +846,7 @@ const char *tagsThatDoNotFold[] = {
};
}
class LexerHTML : public DefaultLexer {
bool isXml;
bool isPHPScript;
@ -835,7 +861,10 @@ class LexerHTML : public DefaultLexer {
std::set<std::string> nonFoldingTags;
public:
explicit LexerHTML(bool isXml_, bool isPHPScript_) :
DefaultLexer(isXml_ ? lexicalClassesHTML : lexicalClassesXML,
DefaultLexer(
isXml_ ? "xml" : (isPHPScript_ ? "phpscript" : "hypertext"),
isXml_ ? SCLEX_XML : (isPHPScript_ ? SCLEX_PHPSCRIPT : SCLEX_HTML),
isXml_ ? lexicalClassesHTML : lexicalClassesXML,
isXml_ ? std::size(lexicalClassesHTML) : std::size(lexicalClassesXML)),
isXml(isXml_),
isPHPScript(isPHPScript_),
@ -857,6 +886,9 @@ public:
return osHTML.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osHTML.PropertyGet(key);
}
const char *SCI_METHOD DescribeWordListSets() override {
return osHTML.DescribeWordListSets();
}
@ -864,13 +896,13 @@ public:
void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
// No Fold as all folding performs in Lex.
static ILexer4 *LexerFactoryHTML() {
static ILexer5 *LexerFactoryHTML() {
return new LexerHTML(false, false);
}
static ILexer4 *LexerFactoryXML() {
static ILexer5 *LexerFactoryXML() {
return new LexerHTML(true, false);
}
static ILexer4 *LexerFactoryPHPScript() {
static ILexer5 *LexerFactoryPHPScript() {
return new LexerHTML(false, true);
}
};
@ -991,6 +1023,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
const bool foldCompact = options.foldCompact;
const bool foldComment = fold && options.foldComment;
const bool foldHeredoc = fold && options.foldHeredoc;
const bool foldXmlAtTagOpen = isXml && fold && options.foldXmlAtTagOpen;
const bool caseSensitive = options.caseSensitive;
const bool allowScripts = options.allowScripts;
const bool isMako = options.isMako;
@ -1206,6 +1239,9 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
i += 2;
visibleChars += 2;
tagClosing = true;
if (foldXmlAtTagOpen) {
levelCurrent--;
}
continue;
}
}
@ -1531,6 +1567,12 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
// in HTML, fold on tag open and unfold on tag close
tagOpened = true;
tagClosing = (chNext == '/');
if (foldXmlAtTagOpen && !(chNext == '/' || chNext == '?' || chNext == '!' || chNext == '-' || chNext == '%')) {
levelCurrent++;
}
if (foldXmlAtTagOpen && chNext == '/') {
levelCurrent--;
}
styler.ColourTo(i - 1, StateToPrint);
if (chNext != '!')
state = SCE_H_TAGUNKNOWN;
@ -1727,7 +1769,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
state = SCE_H_DEFAULT;
}
tagOpened = false;
if (!tagDontFold) {
if (!(foldXmlAtTagOpen || tagDontFold)) {
if (tagClosing) {
levelCurrent--;
} else {
@ -1746,6 +1788,9 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
ch = chNext;
state = SCE_H_DEFAULT;
tagOpened = false;
if (foldXmlAtTagOpen) {
levelCurrent--;
}
} else {
if (eClass != SCE_H_TAGUNKNOWN) {
if (eClass == SCE_H_SGML_DEFAULT) {
@ -1775,7 +1820,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
state = SCE_H_DEFAULT;
}
tagOpened = false;
if (!tagDontFold) {
if (!(foldXmlAtTagOpen || tagDontFold)) {
if (tagClosing) {
levelCurrent--;
} else {
@ -1801,7 +1846,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
state = SCE_H_DEFAULT;
}
tagOpened = false;
if (!tagDontFold) {
if (!(foldXmlAtTagOpen || tagDontFold)) {
if (tagClosing) {
levelCurrent--;
} else {
@ -1825,6 +1870,9 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int
ch = chNext;
state = SCE_H_DEFAULT;
tagOpened = false;
if (foldXmlAtTagOpen) {
levelCurrent--;
}
} else if (ch == '?' && chNext == '>') {
styler.ColourTo(i - 1, StateToPrint);
styler.ColourTo(i + 1, SCE_H_XMLEND);

View File

@ -390,7 +390,8 @@ class LexerHaskell : public DefaultLexer {
public:
LexerHaskell(bool literate_)
: literate(literate_)
: DefaultLexer(literate_ ? "literatehaskell" : "haskell", literate_ ? SCLEX_LITERATEHASKELL : SCLEX_HASKELL)
, literate(literate_)
, firstImportLine(-1)
, firstImportIndent(0)
{}
@ -401,7 +402,7 @@ public:
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
@ -418,6 +419,10 @@ public:
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osHaskell.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osHaskell.DescribeWordListSets();
}
@ -432,11 +437,11 @@ public:
return 0;
}
static ILexer4 *LexerFactoryHaskell() {
static ILexer5 *LexerFactoryHaskell() {
return new LexerHaskell(false);
}
static ILexer4 *LexerFactoryLiterateHaskell() {
static ILexer5 *LexerFactoryLiterateHaskell() {
return new LexerHaskell(true);
}
};

View File

@ -0,0 +1,516 @@
// Scintilla source code edit control
/** @file LexHollywood.cxx
** Lexer for Hollywood
** Written by Andreas Falkenhahn, based on the BlitzBasic/PureBasic/Lua lexers
** Thanks to Nicholai Benalal
** For more information on Hollywood, see http://www.hollywood-mal.com/
** Mail me (andreas <at> airsoftsoftwair <dot> de) for any bugs.
** This code is subject to the same license terms as the rest of the Scintilla project:
** The License.txt file describes the conditions under which this software may be distributed.
**/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <string>
#include <map>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "WordList.h"
#include "LexAccessor.h"
#include "StyleContext.h"
#include "CharacterSet.h"
#include "LexerModule.h"
#include "OptionSet.h"
#include "DefaultLexer.h"
using namespace Scintilla;
/* Bits:
* 1 - whitespace
* 2 - operator
* 4 - identifier
* 8 - decimal digit
* 16 - hex digit
* 32 - bin digit
* 64 - letter
*/
static int character_classification[128] =
{
0, // NUL ($0)
0, // SOH ($1)
0, // STX ($2)
0, // ETX ($3)
0, // EOT ($4)
0, // ENQ ($5)
0, // ACK ($6)
0, // BEL ($7)
0, // BS ($8)
1, // HT ($9)
1, // LF ($A)
0, // VT ($B)
0, // FF ($C)
1, // CR ($D)
0, // SO ($E)
0, // SI ($F)
0, // DLE ($10)
0, // DC1 ($11)
0, // DC2 ($12)
0, // DC3 ($13)
0, // DC4 ($14)
0, // NAK ($15)
0, // SYN ($16)
0, // ETB ($17)
0, // CAN ($18)
0, // EM ($19)
0, // SUB ($1A)
0, // ESC ($1B)
0, // FS ($1C)
0, // GS ($1D)
0, // RS ($1E)
0, // US ($1F)
1, // space ($20)
4, // ! ($21)
0, // " ($22)
0, // # ($23)
4, // $ ($24)
2, // % ($25)
2, // & ($26)
2, // ' ($27)
2, // ( ($28)
2, // ) ($29)
2, // * ($2A)
2, // + ($2B)
2, // , ($2C)
2, // - ($2D)
// NB: we treat "." as an identifier although it is also an operator and a decimal digit
// the reason why we treat it as an identifier is to support syntax highlighting for
// plugin commands which always use a "." in their names, e.g. pdf.OpenDocument();
// we handle the decimal digit case manually below so that 3.1415 and .123 is styled correctly
// the collateral damage of treating "." as an identifier is that "." is never styled
// SCE_HOLLYWOOD_OPERATOR
4, // . ($2E)
2, // / ($2F)
28, // 0 ($30)
28, // 1 ($31)
28, // 2 ($32)
28, // 3 ($33)
28, // 4 ($34)
28, // 5 ($35)
28, // 6 ($36)
28, // 7 ($37)
28, // 8 ($38)
28, // 9 ($39)
2, // : ($3A)
2, // ; ($3B)
2, // < ($3C)
2, // = ($3D)
2, // > ($3E)
2, // ? ($3F)
0, // @ ($40)
84, // A ($41)
84, // B ($42)
84, // C ($43)
84, // D ($44)
84, // E ($45)
84, // F ($46)
68, // G ($47)
68, // H ($48)
68, // I ($49)
68, // J ($4A)
68, // K ($4B)
68, // L ($4C)
68, // M ($4D)
68, // N ($4E)
68, // O ($4F)
68, // P ($50)
68, // Q ($51)
68, // R ($52)
68, // S ($53)
68, // T ($54)
68, // U ($55)
68, // V ($56)
68, // W ($57)
68, // X ($58)
68, // Y ($59)
68, // Z ($5A)
2, // [ ($5B)
2, // \ ($5C)
2, // ] ($5D)
2, // ^ ($5E)
68, // _ ($5F)
2, // ` ($60)
84, // a ($61)
84, // b ($62)
84, // c ($63)
84, // d ($64)
84, // e ($65)
84, // f ($66)
68, // g ($67)
68, // h ($68)
68, // i ($69)
68, // j ($6A)
68, // k ($6B)
68, // l ($6C)
68, // m ($6D)
68, // n ($6E)
68, // o ($6F)
68, // p ($70)
68, // q ($71)
68, // r ($72)
68, // s ($73)
68, // t ($74)
68, // u ($75)
68, // v ($76)
68, // w ($77)
68, // x ($78)
68, // y ($79)
68, // z ($7A)
2, // { ($7B)
2, // | ($7C)
2, // } ($7D)
2, // ~ ($7E)
0, // &#127; ($7F)
};
static bool IsSpace(int c) {
return c < 128 && (character_classification[c] & 1);
}
static bool IsOperator(int c) {
return c < 128 && (character_classification[c] & 2);
}
static bool IsIdentifier(int c) {
return c < 128 && (character_classification[c] & 4);
}
static bool IsDigit(int c) {
return c < 128 && (character_classification[c] & 8);
}
static bool IsHexDigit(int c) {
return c < 128 && (character_classification[c] & 16);
}
static int LowerCase(int c)
{
if (c >= 'A' && c <= 'Z')
return 'a' + c - 'A';
return c;
}
static int CheckHollywoodFoldPoint(char const *token) {
if (!strcmp(token, "function")) {
return 1;
}
if (!strcmp(token, "endfunction")) {
return -1;
}
return 0;
}
// An individual named option for use in an OptionSet
// Options used for LexerHollywood
struct OptionsHollywood {
bool fold;
bool foldCompact;
OptionsHollywood() {
fold = false;
foldCompact = false;
}
};
static const char * const hollywoodWordListDesc[] = {
"Hollywood keywords",
"Hollywood standard API functions",
"Hollywood plugin API functions",
"Hollywood plugin methods",
0
};
struct OptionSetHollywood : public OptionSet<OptionsHollywood> {
OptionSetHollywood(const char * const wordListDescriptions[]) {
DefineProperty("fold", &OptionsHollywood::fold);
DefineProperty("fold.compact", &OptionsHollywood::foldCompact);
DefineWordListSets(wordListDescriptions);
}
};
class LexerHollywood : public DefaultLexer {
int (*CheckFoldPoint)(char const *);
WordList keywordlists[4];
OptionsHollywood options;
OptionSetHollywood osHollywood;
public:
LexerHollywood(int (*CheckFoldPoint_)(char const *), const char * const wordListDescriptions[]) :
DefaultLexer("hollywood", SCLEX_HOLLYWOOD),
CheckFoldPoint(CheckFoldPoint_),
osHollywood(wordListDescriptions) {
}
virtual ~LexerHollywood() {
}
void SCI_METHOD Release() override {
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osHollywood.PropertyNames();
}
int SCI_METHOD PropertyType(const char *name) override {
return osHollywood.PropertyType(name);
}
const char * SCI_METHOD DescribeProperty(const char *name) override {
return osHollywood.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char* key) override {
return osHollywood.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osHollywood.DescribeWordListSets();
}
Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override;
void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
void * SCI_METHOD PrivateCall(int, void *) override {
return 0;
}
static ILexer5 *LexerFactoryHollywood() {
return new LexerHollywood(CheckHollywoodFoldPoint, hollywoodWordListDesc);
}
};
Sci_Position SCI_METHOD LexerHollywood::PropertySet(const char *key, const char *val) {
if (osHollywood.PropertySet(&options, key, val)) {
return 0;
}
return -1;
}
Sci_Position SCI_METHOD LexerHollywood::WordListSet(int n, const char *wl) {
WordList *wordListN = 0;
switch (n) {
case 0:
wordListN = &keywordlists[0];
break;
case 1:
wordListN = &keywordlists[1];
break;
case 2:
wordListN = &keywordlists[2];
break;
case 3:
wordListN = &keywordlists[3];
break;
}
Sci_Position firstModification = -1;
if (wordListN) {
WordList wlNew;
wlNew.Set(wl);
if (*wordListN != wlNew) {
wordListN->Set(wl);
firstModification = 0;
}
}
return firstModification;
}
void SCI_METHOD LexerHollywood::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
LexAccessor styler(pAccess);
styler.StartAt(startPos);
bool inString = false;
StyleContext sc(startPos, length, initStyle, styler);
// Can't use sc.More() here else we miss the last character
for (; ; sc.Forward())
{
if (sc.atLineStart) inString = false;
if (sc.ch == '\"' && sc.chPrev != '\\') inString = !inString;
if (sc.state == SCE_HOLLYWOOD_IDENTIFIER) {
if (!IsIdentifier(sc.ch)) {
char s[100];
int kstates[4] = {
SCE_HOLLYWOOD_KEYWORD,
SCE_HOLLYWOOD_STDAPI,
SCE_HOLLYWOOD_PLUGINAPI,
SCE_HOLLYWOOD_PLUGINMETHOD,
};
sc.GetCurrentLowered(s, sizeof(s));
for (int i = 0; i < 4; i++) {
if (keywordlists[i].InList(s)) {
sc.ChangeState(kstates[i]);
}
}
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
}
} else if (sc.state == SCE_HOLLYWOOD_OPERATOR) {
// always reset to default on operators because otherwise
// comments won't be recognized in sequences like "+/* Hello*/"
// --> "+/*" would be recognized as a sequence of operators
// if (!IsOperator(sc.ch)) sc.SetState(SCE_HOLLYWOOD_DEFAULT);
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
} else if (sc.state == SCE_HOLLYWOOD_PREPROCESSOR) {
if (!IsIdentifier(sc.ch))
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
} else if (sc.state == SCE_HOLLYWOOD_CONSTANT) {
if (!IsIdentifier(sc.ch))
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
} else if (sc.state == SCE_HOLLYWOOD_NUMBER) {
if (!IsDigit(sc.ch) && sc.ch != '.')
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
} else if (sc.state == SCE_HOLLYWOOD_HEXNUMBER) {
if (!IsHexDigit(sc.ch))
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
} else if (sc.state == SCE_HOLLYWOOD_STRING) {
if (sc.ch == '"') {
sc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);
}
if (sc.atLineEnd) {
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
}
} else if (sc.state == SCE_HOLLYWOOD_COMMENT) {
if (sc.atLineEnd) {
sc.SetState(SCE_HOLLYWOOD_DEFAULT);
}
} else if (sc.state == SCE_HOLLYWOOD_COMMENTBLOCK) {
if (sc.Match("*/") && !inString) {
sc.Forward();
sc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);
}
} else if (sc.state == SCE_HOLLYWOOD_STRINGBLOCK) {
if (sc.Match("]]") && !inString) {
sc.Forward();
sc.ForwardSetState(SCE_HOLLYWOOD_DEFAULT);
}
}
if (sc.state == SCE_HOLLYWOOD_DEFAULT) {
if (sc.Match(';')) {
sc.SetState(SCE_HOLLYWOOD_COMMENT);
} else if (sc.Match("/*")) {
sc.SetState(SCE_HOLLYWOOD_COMMENTBLOCK);
sc.Forward();
} else if (sc.Match("[[")) {
sc.SetState(SCE_HOLLYWOOD_STRINGBLOCK);
sc.Forward();
} else if (sc.Match('"')) {
sc.SetState(SCE_HOLLYWOOD_STRING);
} else if (sc.Match('$')) {
sc.SetState(SCE_HOLLYWOOD_HEXNUMBER);
} else if (sc.Match("0x") || sc.Match("0X")) { // must be before IsDigit() because of 0x
sc.SetState(SCE_HOLLYWOOD_HEXNUMBER);
sc.Forward();
} else if (sc.ch == '.' && (sc.chNext >= '0' && sc.chNext <= '9')) { // ".1234" style numbers
sc.SetState(SCE_HOLLYWOOD_NUMBER);
sc.Forward();
} else if (IsDigit(sc.ch)) {
sc.SetState(SCE_HOLLYWOOD_NUMBER);
} else if (sc.Match('#')) {
sc.SetState(SCE_HOLLYWOOD_CONSTANT);
} else if (sc.Match('@')) {
sc.SetState(SCE_HOLLYWOOD_PREPROCESSOR);
} else if (IsOperator(sc.ch)) {
sc.SetState(SCE_HOLLYWOOD_OPERATOR);
} else if (IsIdentifier(sc.ch)) {
sc.SetState(SCE_HOLLYWOOD_IDENTIFIER);
}
}
if (!sc.More())
break;
}
sc.Complete();
}
void SCI_METHOD LexerHollywood::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) {
if (!options.fold)
return;
LexAccessor styler(pAccess);
Sci_PositionU lengthDoc = startPos + length;
int visibleChars = 0;
Sci_Position lineCurrent = styler.GetLine(startPos);
int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
char chNext = styler[startPos];
int styleNext = styler.StyleAt(startPos);
int done = 0;
char word[256];
int wordlen = 0;
for (Sci_PositionU i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
int style = styleNext;
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
if (!done) {
if (wordlen) { // are we scanning a token already?
word[wordlen] = static_cast<char>(LowerCase(ch));
if (!IsIdentifier(ch)) { // done with token
word[wordlen] = '\0';
levelCurrent += CheckFoldPoint(word);
done = 1;
} else if (wordlen < 255) {
wordlen++;
}
} else { // start scanning at first non-whitespace character
if (!IsSpace(ch)) {
if (style != SCE_HOLLYWOOD_COMMENTBLOCK && IsIdentifier(ch)) {
word[0] = static_cast<char>(LowerCase(ch));
wordlen = 1;
} else // done with this line
done = 1;
}
}
}
if (atEOL) {
int lev = levelPrev;
if (visibleChars == 0 && options.foldCompact) {
lev |= SC_FOLDLEVELWHITEFLAG;
}
if ((levelCurrent > levelPrev) && (visibleChars > 0)) {
lev |= SC_FOLDLEVELHEADERFLAG;
}
if (lev != styler.LevelAt(lineCurrent)) {
styler.SetLevel(lineCurrent, lev);
}
lineCurrent++;
levelPrev = levelCurrent;
visibleChars = 0;
done = 0;
wordlen = 0;
}
if (!IsSpace(ch)) {
visibleChars++;
}
}
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK;
styler.SetLevel(lineCurrent, levelPrev | flagsNext);
}
LexerModule lmHollywood(SCLEX_HOLLYWOOD, LexerHollywood::LexerFactoryHollywood, "hollywood", hollywoodWordListDesc);

View File

@ -201,6 +201,7 @@ class LexerJSON : public DefaultLexer {
public:
LexerJSON() :
DefaultLexer("json", SCLEX_JSON),
setOperators(CharacterSet::setNone, "[{}]:,"),
setURL(CharacterSet::setAlphaNum, "-._~:/?#[]@!$&'()*+,),="),
setKeywordJSONLD(CharacterSet::setAlpha, ":@"),
@ -208,7 +209,7 @@ class LexerJSON : public DefaultLexer {
}
virtual ~LexerJSON() {}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
delete this;
@ -228,6 +229,9 @@ class LexerJSON : public DefaultLexer {
}
return -1;
}
const char * SCI_METHOD PropertyGet(const char *key) override {
return optSetJSON.PropertyGet(key);
}
Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override {
WordList *wordListN = 0;
switch (n) {
@ -252,7 +256,7 @@ class LexerJSON : public DefaultLexer {
void *SCI_METHOD PrivateCall(int, void *) override {
return 0;
}
static ILexer4 *LexerFactoryJSON() {
static ILexer5 *LexerFactoryJSON() {
return new LexerJSON;
}
const char *SCI_METHOD DescribeWordListSets() override {

View File

@ -84,11 +84,19 @@ private:
saves.resize(numLines + 128);
}
public:
static ILexer4 *LexerFactoryLaTeX() {
static ILexer5 *LexerFactoryLaTeX() {
return new LexerLaTeX();
}
void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
// ILexer5 methods
const char * SCI_METHOD GetName() override {
return "latex";
}
int SCI_METHOD GetIdentifier() override {
return SCLEX_LATEX;
}
};
static bool latexIsSpecial(int ch) {
@ -297,6 +305,8 @@ void SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int
latexStateReset(mode, state);
if (latexLastWordIs(i, styler, "{verbatim}")) {
state = SCE_L_VERBATIM;
} else if (latexLastWordIs(i, styler, "{lstlisting}")) {
state = SCE_L_VERBATIM;
} else if (latexLastWordIs(i, styler, "{comment}")) {
state = SCE_L_COMMENT2;
} else if (latexLastWordIs(i, styler, "{math}") && mode == 0) {
@ -445,6 +455,9 @@ void SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int
if (latexLastWordIs(match, styler, "{verbatim}")) {
styler.ColourTo(i - 1, state);
state = SCE_L_COMMAND;
} else if (latexLastWordIs(match, styler, "{lstlisting}")) {
styler.ColourTo(i - 1, state);
state = SCE_L_COMMAND;
}
}
}

View File

@ -33,7 +33,7 @@ static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == ':' || ch == '_');
}
inline bool isMMIXALOperator(char ch) {
static inline bool isMMIXALOperator(char ch) {
if (IsASCII(ch) && isalnum(ch))
return false;
if (ch == '+' || ch == '-' || ch == '|' || ch == '^' ||
@ -85,8 +85,6 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int
} else if (sc.state == SCE_MMIXAL_NUMBER) { // NUMBER
if (!isdigit(sc.ch)) {
if (IsAWordChar(sc.ch)) {
char s[100];
sc.GetCurrent(s, sizeof(s));
sc.ChangeState(SCE_MMIXAL_REF);
sc.SetState(SCE_MMIXAL_REF);
} else {
@ -99,12 +97,11 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int
}
} else if (sc.state == SCE_MMIXAL_REF) { // REF
if (!IsAWordChar(sc.ch) ) {
char s[100];
sc.GetCurrent(s, sizeof(s));
char s0[100];
sc.GetCurrent(s0, sizeof(s0));
const char *s = s0;
if (*s == ':') { // ignore base prefix for match
for (size_t i = 0; i != sizeof(s); ++i) {
*(s+i) = *(s+i+1);
}
++s;
}
if (special_register.InList(s)) {
sc.ChangeState(SCE_MMIXAL_REGISTER);
@ -154,9 +151,7 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int
if (sc.state == SCE_MMIXAL_OPCODE_POST || // OPCODE_POST
sc.state == SCE_MMIXAL_OPERANDS) { // OPERANDS
if (sc.state == SCE_MMIXAL_OPERANDS && isspace(sc.ch)) {
if (!sc.atLineEnd) {
sc.SetState(SCE_MMIXAL_COMMENT);
}
sc.SetState(SCE_MMIXAL_COMMENT);
} else if (isdigit(sc.ch)) {
sc.SetState(SCE_MMIXAL_NUMBER);
} else if (IsAWordChar(sc.ch) || sc.Match('@')) {

View File

@ -82,7 +82,7 @@ static inline bool IsAlNumSym(int ch) {
* \param startPos Where to start scanning
* \param length Where to scan to
* \param initStyle The style at the initial point, not used in this folder
* \param keywordslists The keywordslists, currently, number 5 is used
* \param keywordlists The keywordslists, currently, number 5 is used
* \param styler The styler
*/
static void ColouriseMagikDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
@ -328,7 +328,7 @@ static const char * const magikWordListDesc[] = {
*
* \param keywordslist The list of keywords that are scanned, they should only
* contain the start keywords, not the end keywords
* \param The actual keyword
* \param keyword The actual keyword
* \return 1 if it is a folding start-keyword, -1 if it is a folding end-keyword
* 0 otherwise
*/

View File

@ -1,6 +1,6 @@
// Scintilla source code edit control
// File: LexMetapost.cxx - general context conformant metapost coloring scheme
// @file LexMetapost.cxx - general context conformant metapost coloring scheme
// Author: Hans Hagen - PRAGMA ADE - Hasselt NL - www.pragma-ade.com
// Version: September 28, 2003
// Modified by instanton: July 10, 2007
@ -177,7 +177,8 @@ static void ColouriseMETAPOSTDoc(
}
WordList &keywords = *keywordlists[0] ;
WordList &keywords2 = *keywordlists[extraInterface-1] ;
WordList kwEmpty;
WordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty;
StyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ;

View File

@ -225,7 +225,7 @@ class LexerNim : public DefaultLexer {
public:
LexerNim() :
DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)),
DefaultLexer("nim", SCLEX_NIM, lexicalClasses, ELEMENTS(lexicalClasses)),
setWord(CharacterSet::setAlphaNum, "_", 0x80, true) { }
virtual ~LexerNim() { }
@ -235,7 +235,7 @@ public:
}
int SCI_METHOD Version() const noexcept override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
@ -252,6 +252,10 @@ public:
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char* key) override {
return osNim.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osNim.DescribeWordListSets();
}
@ -273,7 +277,7 @@ public:
return style;
}
static ILexer4 *LexerFactoryNim() {
static ILexer5 *LexerFactoryNim() {
return new LexerNim();
}
};

View File

@ -1,4 +1,5 @@
// Copyright (c) 1990-2007, Scientific Toolworks, Inc.
// @file LexPLM.cxx
// Author: Jason Haslam
// The License.txt file describes the conditions under which this software may be distributed.

View File

@ -37,6 +37,8 @@ using namespace Scintilla;
// Following a << you specify a string to terminate the quoted material, and
// all lines following the current line down to the terminating string are
// the value of the item.
// Prefixing the terminating string with a "~" specifies that you want to
// use "Indented Here-docs" (see below).
// * The terminating string may be either an identifier (a word), or some
// quoted text.
// * If quoted, the type of quotes you use determines the treatment of the
@ -48,6 +50,18 @@ using namespace Scintilla;
// (This is deprecated, -w warns of this syntax)
// * The terminating string must appear by itself (unquoted and
// with no surrounding whitespace) on the terminating line.
//
// Indented Here-docs
// ------------------
// The here-doc modifier "~" allows you to indent your here-docs to
// make the code more readable.
// The delimiter is used to determine the exact whitespace to remove
// from the beginning of each line. All lines must have at least the
// same starting whitespace (except lines only containing a newline)
// or perl will croak. Tabs and spaces can be mixed, but are matched
// exactly. One tab will not be equal to 8 spaces!
// Additional beginning whitespace (beyond what preceded the
// delimiter) will be preserved.
#define HERE_DELIM_MAX 256 // maximum length of HERE doc delimiter
@ -409,6 +423,7 @@ class LexerPerl : public DefaultLexer {
OptionSetPerl osPerl;
public:
LexerPerl() :
DefaultLexer("perl", SCLEX_PERL),
setWordStart(CharacterSet::setAlpha, "_", 0x80, true),
setWord(CharacterSet::setAlphaNum, "_", 0x80, true),
setSpecialVar(CharacterSet::setNone, "\"$;<>&`'+,./\\%:=~!?@[]"),
@ -420,7 +435,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char *SCI_METHOD PropertyNames() override {
return osPerl.PropertyNames();
@ -432,6 +447,9 @@ public:
return osPerl.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osPerl.PropertyGet(key);
}
const char *SCI_METHOD DescribeWordListSets() override {
return osPerl.DescribeWordListSets();
}
@ -443,7 +461,7 @@ public:
return 0;
}
static ILexer4 *LexerFactoryPerl() {
static ILexer5 *LexerFactoryPerl() {
return new LexerPerl();
}
int InputSymbolScan(StyleContext &sc);
@ -619,12 +637,14 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int
// 2: here doc text (lines after the delimiter)
int Quote; // the char after '<<'
bool Quoted; // true if Quote in ('\'','"','`')
bool StripIndent; // true if '<<~' requested to strip leading whitespace
int DelimiterLength; // strlen(Delimiter)
char Delimiter[HERE_DELIM_MAX]; // the Delimiter
HereDocCls() {
State = 0;
Quote = 0;
Quoted = false;
StripIndent = false;
DelimiterLength = 0;
Delimiter[0] = '\0';
}
@ -885,7 +905,7 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int
sc.SetState(SCE_PL_DEFAULT);
break;
case SCE_PL_COMMENTLINE:
if (sc.atLineEnd) {
if (sc.atLineStart) {
sc.SetState(SCE_PL_DEFAULT);
}
break;
@ -896,8 +916,14 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int
HereDoc.State = 1; // pre-init HERE doc class
HereDoc.Quote = sc.chNext;
HereDoc.Quoted = false;
HereDoc.StripIndent = false;
HereDoc.DelimiterLength = 0;
HereDoc.Delimiter[HereDoc.DelimiterLength] = '\0';
if (delim_ch == '~') { // was actually '<<~'
sc.Forward();
HereDoc.StripIndent = true;
HereDoc.Quote = delim_ch = sc.chNext;
}
if (IsASpaceOrTab(delim_ch)) {
// skip whitespace; legal only for quoted delimiters
Sci_PositionU i = sc.currentPos + 1;
@ -964,6 +990,11 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int
case SCE_PL_HERE_QX:
// also implies HereDoc.State == 2
sc.Complete();
if (HereDoc.StripIndent) {
// skip whitespace
while (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)
sc.Forward();
}
if (HereDoc.DelimiterLength == 0 || sc.Match(HereDoc.Delimiter)) {
int c = sc.GetRelative(HereDoc.DelimiterLength);
if (c == '\r' || c == '\n') { // peek first, do not consume match
@ -1701,6 +1732,12 @@ void SCI_METHOD LexerPerl::Fold(Sci_PositionU startPos, Sci_Position length, int
} else if (ch == ']') {
levelCurrent--;
}
} else if (style == SCE_PL_STRING_QW) {
// qw
if (stylePrevCh != style)
levelCurrent++;
else if (styleNext != style)
levelCurrent--;
}
// POD folding
if (options.foldPOD && atLineStart) {

View File

@ -136,6 +136,7 @@ class LexerABL : public DefaultLexer {
OptionSetABL osABL;
public:
LexerABL() :
DefaultLexer("abl", SCLEX_PROGRESS),
setWord(CharacterSet::setAlphaNum, "_", 0x80, true),
setNegationOp(CharacterSet::setNone, "!"),
setArithmethicOp(CharacterSet::setNone, "+-/*%"),
@ -148,7 +149,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osABL.PropertyNames();
@ -160,6 +161,9 @@ public:
return osABL.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override ;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osABL.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osABL.DescribeWordListSets();
@ -174,7 +178,7 @@ public:
int SCI_METHOD LineEndTypesSupported() override {
return SC_LINE_END_TYPE_DEFAULT;
}
static ILexer4 *LexerFactoryABL() {
static ILexer5 *LexerFactoryABL() {
return new LexerABL();
}
};

View File

@ -12,6 +12,8 @@
#include <assert.h>
#include <ctype.h>
#include <string>
#include "ILexer.h"
#include "Scintilla.h"
#include "SciLexer.h"
@ -79,10 +81,9 @@ static void ColourisePropsLine(
}
static void ColourisePropsDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
std::string lineBuffer;
styler.StartAt(startPos);
styler.StartSegment(startPos);
Sci_PositionU linePos = 0;
Sci_PositionU startLine = startPos;
// property lexer.props.allow.initial.spaces
@ -92,17 +93,16 @@ static void ColourisePropsDoc(Sci_PositionU startPos, Sci_Position length, int,
const bool allowInitialSpaces = styler.GetPropertyInt("lexer.props.allow.initial.spaces", 1) != 0;
for (Sci_PositionU i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {
lineBuffer.push_back(styler[i]);
if (AtEOL(styler, i)) {
// End of line (or of line buffer) met, colourise it
lineBuffer[linePos] = '\0';
ColourisePropsLine(lineBuffer, linePos, startLine, i, styler, allowInitialSpaces);
linePos = 0;
ColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, i, styler, allowInitialSpaces);
lineBuffer.clear();
startLine = i + 1;
}
}
if (linePos > 0) { // Last line does not have ending characters
ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length - 1, styler, allowInitialSpaces);
if (lineBuffer.length() > 0) { // Last line does not have ending characters
ColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, startPos + length - 1, styler, allowInitialSpaces);
}
}

View File

@ -5,12 +5,9 @@
// Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <string>
#include <vector>
@ -65,20 +62,20 @@ enum kwType { kwOther, kwClass, kwDef, kwImport, kwCDef, kwCTypeName, kwCPDef };
enum literalsAllowed { litNone = 0, litU = 1, litB = 2, litF = 4 };
const int indicatorWhitespace = 1;
constexpr int indicatorWhitespace = 1;
bool IsPyComment(Accessor &styler, Sci_Position pos, Sci_Position len) {
return len > 0 && styler[pos] == '#';
}
bool IsPyStringTypeChar(int ch, literalsAllowed allowed) {
bool IsPyStringTypeChar(int ch, literalsAllowed allowed) noexcept {
return
((allowed & litB) && (ch == 'b' || ch == 'B')) ||
((allowed & litU) && (ch == 'u' || ch == 'U')) ||
((allowed & litF) && (ch == 'f' || ch == 'F'));
}
bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) {
bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) noexcept {
if (ch == '\'' || ch == '"')
return true;
if (IsPyStringTypeChar(ch, allowed)) {
@ -93,22 +90,22 @@ bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) {
return false;
}
bool IsPyFStringState(int st) {
bool IsPyFStringState(int st) noexcept {
return ((st == SCE_P_FCHARACTER) || (st == SCE_P_FSTRING) ||
(st == SCE_P_FTRIPLE) || (st == SCE_P_FTRIPLEDOUBLE));
}
bool IsPySingleQuoteStringState(int st) {
bool IsPySingleQuoteStringState(int st) noexcept {
return ((st == SCE_P_CHARACTER) || (st == SCE_P_STRING) ||
(st == SCE_P_FCHARACTER) || (st == SCE_P_FSTRING));
}
bool IsPyTripleQuoteStringState(int st) {
bool IsPyTripleQuoteStringState(int st) noexcept {
return ((st == SCE_P_TRIPLE) || (st == SCE_P_TRIPLEDOUBLE) ||
(st == SCE_P_FTRIPLE) || (st == SCE_P_FTRIPLEDOUBLE));
}
char GetPyStringQuoteChar(int st) {
char GetPyStringQuoteChar(int st) noexcept {
if ((st == SCE_P_CHARACTER) || (st == SCE_P_FCHARACTER) ||
(st == SCE_P_TRIPLE) || (st == SCE_P_FTRIPLE))
return '\'';
@ -126,7 +123,7 @@ void PushStateToStack(int state, std::vector<SingleFStringExpState> &stack, Sing
currentFStringExp = &stack.back();
}
int PopFromStateStack(std::vector<SingleFStringExpState> &stack, SingleFStringExpState *&currentFStringExp) {
int PopFromStateStack(std::vector<SingleFStringExpState> &stack, SingleFStringExpState *&currentFStringExp) noexcept {
int state = 0;
if (!stack.empty()) {
@ -135,7 +132,7 @@ int PopFromStateStack(std::vector<SingleFStringExpState> &stack, SingleFStringEx
}
if (stack.empty()) {
currentFStringExp = NULL;
currentFStringExp = nullptr;
} else {
currentFStringExp = &stack.back();
}
@ -186,30 +183,30 @@ int GetPyStringState(Accessor &styler, Sci_Position i, Sci_PositionU *nextIndex,
}
inline bool IsAWordChar(int ch, bool unicodeIdentifiers) {
if (ch < 0x80)
return (isalnum(ch) || ch == '.' || ch == '_');
if (IsASCII(ch))
return (IsAlphaNumeric(ch) || ch == '.' || ch == '_');
if (!unicodeIdentifiers)
return false;
// Python uses the XID_Continue set from unicode data
// Python uses the XID_Continue set from Unicode data
return IsXidContinue(ch);
}
inline bool IsAWordStart(int ch, bool unicodeIdentifiers) {
if (ch < 0x80)
return (isalpha(ch) || ch == '_');
if (IsASCII(ch))
return (IsUpperOrLowerCase(ch) || ch == '_');
if (!unicodeIdentifiers)
return false;
// Python uses the XID_Start set from unicode data
// Python uses the XID_Start set from Unicode data
return IsXidStart(ch);
}
static bool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) {
Sci_Position line = styler.GetLine(pos);
Sci_Position start_pos = styler.LineStart(line);
bool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) {
const Sci_Position line = styler.GetLine(pos);
const Sci_Position start_pos = styler.LineStart(line);
for (Sci_Position i = start_pos; i < pos; i++) {
const char ch = styler[i];
if (!(ch == ' ' || ch == '\t'))
@ -246,7 +243,7 @@ struct OptionsPython {
unicodeIdentifiers = true;
}
literalsAllowed AllowedLiterals() const {
literalsAllowed AllowedLiterals() const noexcept {
literalsAllowed allowedLiterals = stringsU ? litU : litNone;
if (stringsB)
allowedLiterals = static_cast<literalsAllowed>(allowedLiterals | litB);
@ -256,10 +253,10 @@ struct OptionsPython {
}
};
static const char *const pythonWordListDesc[] = {
const char *const pythonWordListDesc[] = {
"Keywords",
"Highlighted identifiers",
0
nullptr
};
struct OptionSetPython : public OptionSet<OptionsPython> {
@ -300,7 +297,7 @@ struct OptionSetPython : public OptionSet<OptionsPython> {
DefineProperty("fold.compact", &OptionsPython::foldCompact);
DefineProperty("lexer.python.unicode.identifiers", &OptionsPython::unicodeIdentifiers,
"Set to 0 to not recognise Python 3 unicode identifiers.");
"Set to 0 to not recognise Python 3 Unicode identifiers.");
DefineWordListSets(pythonWordListDesc);
}
@ -344,7 +341,7 @@ class LexerPython : public DefaultLexer {
std::map<Sci_Position, std::vector<SingleFStringExpState> > ftripleStateAtEol;
public:
explicit LexerPython() :
DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)),
DefaultLexer("python", SCLEX_PYTHON, lexicalClasses, ELEMENTS(lexicalClasses)),
subStyles(styleSubable, 0x80, 0x40, 0) {
}
~LexerPython() override {
@ -353,7 +350,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char *SCI_METHOD PropertyNames() override {
return osPython.PropertyNames();
@ -365,6 +362,9 @@ public:
return osPython.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osPython.PropertyGet(key);
}
const char *SCI_METHOD DescribeWordListSets() override {
return osPython.DescribeWordListSets();
}
@ -373,7 +373,7 @@ public:
void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override;
void *SCI_METHOD PrivateCall(int, void *) override {
return 0;
return nullptr;
}
int SCI_METHOD LineEndTypesSupported() override {
@ -409,7 +409,7 @@ public:
return styleSubable;
}
static ILexer4 *LexerFactoryPython() {
static ILexer5 *LexerFactoryPython() {
return new LexerPython();
}
@ -425,7 +425,7 @@ Sci_Position SCI_METHOD LexerPython::PropertySet(const char *key, const char *va
}
Sci_Position SCI_METHOD LexerPython::WordListSet(int n, const char *wl) {
WordList *wordListN = 0;
WordList *wordListN = nullptr;
switch (n) {
case 0:
wordListN = &keywords;
@ -489,12 +489,12 @@ void LexerPython::ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpS
}
void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
Accessor styler(pAccess, NULL);
Accessor styler(pAccess, nullptr);
// Track whether in f-string expression; vector is used for a stack to
// handle nested f-strings such as f"""{f'''{f"{f'{1}'}"}'''}"""
std::vector<SingleFStringExpState> fstringStateStack;
SingleFStringExpState *currentFStringExp = NULL;
SingleFStringExpState *currentFStringExp = nullptr;
const Sci_Position endPos = startPos + length;
@ -505,7 +505,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in
lineCurrent--;
// Look for backslash-continued lines
while (lineCurrent > 0) {
Sci_Position eolPos = styler.LineStart(lineCurrent) - 1;
const Sci_Position eolPos = styler.LineStart(lineCurrent) - 1;
const int eolStyle = styler.StyleAt(eolPos);
if (eolStyle == SCE_P_STRING
|| eolStyle == SCE_P_CHARACTER
@ -625,7 +625,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in
// We don't want to highlight keywords2
// that are used as a sub-identifier,
// i.e. not open in "foo.open".
Sci_Position pos = styler.GetStartSegment() - 1;
const Sci_Position pos = styler.GetStartSegment() - 1;
if (pos < 0 || (styler.SafeGetCharAt(pos, '\0') != '.'))
style = SCE_P_WORD2;
} else {
@ -767,7 +767,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in
}
// If in f-string expression, check for }, :, ! to resume f-string state or update nesting count
if (currentFStringExp != NULL && !IsPySingleQuoteStringState(sc.state) && !IsPyTripleQuoteStringState(sc.state)) {
if (currentFStringExp && !IsPySingleQuoteStringState(sc.state) && !IsPyTripleQuoteStringState(sc.state)) {
if (currentFStringExp->nestingCount == 0 && (sc.ch == '}' || sc.ch == ':' || (sc.ch == '!' && sc.chNext != '='))) {
sc.SetState(PopFromStateStack(fstringStateStack, currentFStringExp));
} else {
@ -798,7 +798,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in
base_n_number = false;
sc.SetState(SCE_P_NUMBER);
}
} else if ((IsASCII(sc.ch) && isoperator(static_cast<char>(sc.ch))) || sc.ch == '`') {
} else if (isoperator(sc.ch) || sc.ch == '`') {
sc.SetState(SCE_P_OPERATOR);
} else if (sc.ch == '#') {
sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE);
@ -823,7 +823,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in
}
static bool IsCommentLine(Sci_Position line, Accessor &styler) {
Sci_Position pos = styler.LineStart(line);
const Sci_Position pos = styler.LineStart(line);
const Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
for (Sci_Position i = pos; i < eol_pos; i++) {
const char ch = styler[i];
@ -845,7 +845,7 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
if (!options.fold)
return;
Accessor styler(pAccess, NULL);
Accessor styler(pAccess, nullptr);
const Sci_Position maxPos = startPos + length;
const Sci_Position maxLines = (maxPos == styler.Length()) ? styler.GetLine(maxPos) : styler.GetLine(maxPos - 1); // Requested last line
@ -857,10 +857,10 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
// at least one line in all cases)
int spaceFlags = 0;
Sci_Position lineCurrent = styler.GetLine(startPos);
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);
int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);
while (lineCurrent > 0) {
lineCurrent--;
indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL);
indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr);
if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) &&
(!IsCommentLine(lineCurrent, styler)) &&
(!IsQuoteLine(lineCurrent, styler)))
@ -887,8 +887,8 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
int quote = false;
if (lineNext <= docLines) {
// Information about next line is only available if not at end of document
indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
Sci_Position lookAtPos = (styler.LineStart(lineNext) == styler.Length()) ? styler.Length() - 1 : styler.LineStart(lineNext);
indentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);
const Sci_Position lookAtPos = (styler.LineStart(lineNext) == styler.Length()) ? styler.Length() - 1 : styler.LineStart(lineNext);
const int style = styler.StyleAt(lookAtPos) & 31;
quote = options.foldQuotes && IsPyTripleQuoteStringState(style);
}
@ -926,7 +926,7 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
}
lineNext++;
indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL);
indentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr);
}
const int levelAfterComments = ((lineNext < docLines) ? indentNext & SC_FOLDLEVELNUMBERMASK : minCommentLevel);
@ -941,13 +941,13 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
int skipLevel = levelAfterComments;
while (--skipLine > lineCurrent) {
const int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL);
const int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, nullptr);
if (options.foldCompact) {
if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments)
skipLevel = levelBeforeComments;
int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;
const int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG;
styler.SetLevel(skipLine, skipLevel | whiteFlag);
} else {

View File

@ -1,5 +1,5 @@
// Scintilla source code edit control
/** @file Lexr.cxx
/** @file LexR.cxx
** Lexer for R, S, SPlus Statistics Program (Heavily derived from CPP Lexer).
**
**/

1605
scintilla/lexers/LexRaku.cxx Normal file

File diff suppressed because it is too large Load Diff

View File

@ -161,10 +161,10 @@ class LexerRegistry : public DefaultLexer {
}
public:
LexerRegistry() {}
LexerRegistry() : DefaultLexer("registry", SCLEX_REGISTRY) {}
virtual ~LexerRegistry() {}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
delete this;
@ -184,13 +184,17 @@ public:
}
return -1;
}
const char * SCI_METHOD PropertyGet(const char *key) override {
return optSetRegistry.PropertyGet(key);
}
Sci_Position SCI_METHOD WordListSet(int, const char *) override {
return -1;
}
void *SCI_METHOD PrivateCall(int, void *) override {
return 0;
}
static ILexer4 *LexerFactoryRegistry() {
static ILexer5 *LexerFactoryRegistry() {
return new LexerRegistry;
}
const char *SCI_METHOD DescribeWordListSets() override {

View File

@ -562,7 +562,7 @@ static bool sureThisIsNotHeredoc(Sci_Position lt2StartPos,
bool allow_indent;
Sci_Position target_start, target_end;
// From this point on no more styling, since we're looking ahead
if (styler[j] == '-') {
if (styler[j] == '-' || styler[j] == '~') {
allow_indent = true;
j++;
} else {
@ -888,7 +888,7 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init
chNext = chNext2;
styler.ColourTo(i, SCE_RB_OPERATOR);
if (!(strchr("\"\'`_-", chNext2) || isSafeAlpha(chNext2))) {
if (!(strchr("\"\'`_-~", chNext2) || isSafeAlpha(chNext2))) {
// It's definitely not a here-doc,
// based on Ruby's lexer/parser in the
// heredoc_identifier routine.
@ -1234,7 +1234,7 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init
if (HereDoc.State == 0) { // '<<' encountered
HereDoc.State = 1;
HereDoc.DelimiterLength = 0;
if (ch == '-') {
if (ch == '-' || ch == '~') {
HereDoc.CanBeIndented = true;
advance_char(i, ch, chNext, chNext2); // pass by ref
} else {

View File

@ -120,13 +120,15 @@ class LexerRust : public DefaultLexer {
OptionsRust options;
OptionSetRust osRust;
public:
LexerRust() : DefaultLexer("rust", SCLEX_RUST) {
}
virtual ~LexerRust() {
}
void SCI_METHOD Release() override {
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osRust.PropertyNames();
@ -138,6 +140,9 @@ public:
return osRust.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osRust.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osRust.DescribeWordListSets();
}
@ -147,7 +152,7 @@ public:
void * SCI_METHOD PrivateCall(int, void *) override {
return 0;
}
static ILexer4 *LexerFactoryRust() {
static ILexer5 *LexerFactoryRust() {
return new LexerRust();
}
};

View File

@ -303,12 +303,12 @@ struct OptionSetSQL : public OptionSet<OptionsSQL> {
class LexerSQL : public DefaultLexer {
public :
LexerSQL() {}
LexerSQL() : DefaultLexer("sql", SCLEX_SQL) {}
virtual ~LexerSQL() {}
int SCI_METHOD Version () const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
@ -334,6 +334,10 @@ public :
return -1;
}
const char * SCI_METHOD PropertyGet(const char *key) override {
return osSQL.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osSQL.DescribeWordListSets();
}
@ -346,7 +350,7 @@ public :
return 0;
}
static ILexer4 *LexerFactorySQL() {
static ILexer5 *LexerFactorySQL() {
return new LexerSQL();
}
private:

View File

@ -1,6 +1,6 @@
// Scintilla source code edit control
/** @file LexTAL.cxx
** Lexer for TAL
/** @file LexTACL.cxx
** Lexer for TACL
** Based on LexPascal.cxx
** Written by Laurent le Tynevez
** Updated by Simon Steele <s.steele@pnotepad.org> September 2002

View File

@ -45,7 +45,8 @@ static inline bool IsANumberChar(int ch) {
static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , WordList *keywordlists[], Accessor &styler) {
#define isComment(s) (s==SCE_TCL_COMMENT || s==SCE_TCL_COMMENTLINE || s==SCE_TCL_COMMENT_BOX || s==SCE_TCL_BLOCK_COMMENT)
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
const bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
bool commentLevel = false;
bool subBrace = false; // substitution begin with a brace ${.....}
enum tLineState {LS_DEFAULT, LS_OPEN_COMMENT, LS_OPEN_DOUBLE_QUOTE, LS_COMMENT_BOX, LS_MASK_STATE = 0xf,
@ -199,7 +200,7 @@ next:
}
}
int flag = 0;
if (!visibleChars)
if (!visibleChars && foldCompact)
flag = SC_FOLDLEVELWHITEFLAG;
if (currentLevel > previousLevel)
flag = SC_FOLDLEVELHEADERFLAG;

View File

@ -1,6 +1,6 @@
// Scintilla source code edit control
// File: LexTeX.cxx - general context conformant tex coloring scheme
// @file LexTeX.cxx - general context conformant tex coloring scheme
// Author: Hans Hagen - PRAGMA ADE - Hasselt NL - www.pragma-ade.com
// Version: September 28, 2003

View File

@ -252,8 +252,8 @@ static void FoldNoBoxVHDLDoc(
if(lineCurrent > 0)
levelCurrent = styler.LevelAt(lineCurrent-1) >> 16;
//int levelMinCurrent = levelCurrent;
int levelMinCurrentElse = levelCurrent; //< Used for folding at 'else'
int levelMinCurrentBegin = levelCurrent; //< Used for folding at 'begin'
int levelMinCurrentElse = levelCurrent; ///< Used for folding at 'else'
int levelMinCurrentBegin = levelCurrent; ///< Used for folding at 'begin'
int levelNext = levelCurrent;
/***************************************/

View File

@ -216,12 +216,13 @@ class LexerVerilog : public DefaultLexer {
public:
LexerVerilog() :
DefaultLexer("verilog", SCLEX_VERILOG),
setWord(CharacterSet::setAlphaNum, "._", 0x80, true),
subStyles(styleSubable, 0x80, 0x40, activeFlag) {
}
virtual ~LexerVerilog() {}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override {
delete this;
@ -238,6 +239,9 @@ public:
Sci_Position SCI_METHOD PropertySet(const char* key, const char* val) override {
return osVerilog.PropertySet(&options, key, val);
}
const char * SCI_METHOD PropertyGet(const char *key) override {
return osVerilog.PropertyGet(key);
}
const char* SCI_METHOD DescribeWordListSets() override {
return osVerilog.DescribeWordListSets();
}
@ -279,7 +283,7 @@ public:
const char * SCI_METHOD GetSubStyleBases() override {
return styleSubable;
}
static ILexer4* LexerFactoryVerilog() {
static ILexer5* LexerFactoryVerilog() {
return new LexerVerilog();
}
static int MaskActive(int style) {

View File

@ -71,7 +71,7 @@ class LexerVisualProlog : public DefaultLexer {
OptionsVisualProlog options;
OptionSetVisualProlog osVisualProlog;
public:
LexerVisualProlog() {
LexerVisualProlog() : DefaultLexer("visualprolog", SCLEX_VISUALPROLOG) {
}
virtual ~LexerVisualProlog() {
}
@ -79,7 +79,7 @@ public:
delete this;
}
int SCI_METHOD Version() const override {
return lvRelease4;
return lvRelease5;
}
const char * SCI_METHOD PropertyNames() override {
return osVisualProlog.PropertyNames();
@ -91,6 +91,9 @@ public:
return osVisualProlog.DescribeProperty(name);
}
Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override;
const char * SCI_METHOD PropertyGet(const char *key) override {
return osVisualProlog.PropertyGet(key);
}
const char * SCI_METHOD DescribeWordListSets() override {
return osVisualProlog.DescribeWordListSets();
}
@ -102,7 +105,7 @@ public:
return 0;
}
static ILexer4 *LexerFactoryVisualProlog() {
static ILexer5 *LexerFactoryVisualProlog() {
return new LexerVisualProlog();
}
};

View File

@ -1,4 +1,5 @@
// Scintilla Lexer for X12
// @file LexX12.cxx
// Written by Iain Clarke, IMCSoft & Inobiz AB.
// X12 official documentation is behind a paywall, but there's a description of the syntax here:
// http://www.rawlinsecconsulting.com/x12tutorial/x12syn.html
@ -29,13 +30,13 @@ public:
LexerX12();
virtual ~LexerX12() {} // virtual destructor, as we inherit from ILexer
static ILexer4 *Factory() {
static ILexer5 *Factory() {
return new LexerX12;
}
int SCI_METHOD Version() const override
{
return lvRelease4;
return lvRelease5;
}
void SCI_METHOD Release() override
{
@ -66,6 +67,9 @@ public:
}
return -1;
}
const char * SCI_METHOD PropertyGet(const char *) override {
return "";
}
const char * SCI_METHOD DescribeWordListSets() override
{
return NULL;
@ -108,7 +112,7 @@ LexerModule lmX12(SCLEX_X12, LexerX12::Factory, "x12");
///////////////////////////////////////////////////////////////////////////////
LexerX12::LexerX12()
LexerX12::LexerX12() : DefaultLexer("x12", SCLEX_X12)
{
m_bFold = false;
m_chSegment[0] = m_chSegment[1] = m_chSegment[2] = m_chElement = m_chSubElement = 0;

View File

@ -0,0 +1,134 @@
#!/usr/bin/env python3
# LexillaGen.py - implemented 2019 by Neil Hodgson neilh@scintilla.org
# Released to the public domain.
# Regenerate the Lexilla source files that list all the lexers.
# Should be run whenever a new lexer is added or removed.
# Requires Python 3.6 or later
# Files are regenerated in place with templates stored in comments.
# The format of generation comments is documented in FileGenerator.py.
import os, pathlib, sys, uuid
thisPath = pathlib.Path(__file__).resolve()
sys.path.append(str(thisPath.parent.parent.parent / "scripts"))
from FileGenerator import Regenerate, UpdateLineInFile, \
ReplaceREInFile, UpdateLineInPlistFile, ReadFileAsList, UpdateFileFromLines, \
FindSectionInList
import ScintillaData
sys.path.append(str(thisPath.parent.parent / "src"))
import DepGen
# RegenerateXcodeProject and assiciated functions is copied from scintilla/scripts/LexGen.py
# Last 24 digits of UUID, used for item IDs in Xcode
def uid24():
return str(uuid.uuid4()).replace("-", "").upper()[-24:]
def ciLexerKey(a):
return a.split()[2].lower()
"""
11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11F35FDA12AEFAF100F0236D /* LexA68k.cxx */; };
11F35FDA12AEFAF100F0236D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = SOURCE_ROOT; };
11F35FDA12AEFAF100F0236D /* LexA68k.cxx */,
11F35FDB12AEFAF100F0236D /* LexA68k.cxx in Sources */,
"""
def RegenerateXcodeProject(path, lexers, lexerReferences):
# Build 4 blocks for insertion:
# Each markers contains a unique section start, an optional wait string, and a section end
markersPBXBuildFile = ["Begin PBXBuildFile section", "", "End PBXBuildFile section"]
sectionPBXBuildFile = []
markersPBXFileReference = ["Begin PBXFileReference section", "", "End PBXFileReference section"]
sectionPBXFileReference = []
markersLexers = ["/* Lexers */ =", "children", ");"]
sectionLexers = []
markersPBXSourcesBuildPhase = ["Begin PBXSourcesBuildPhase section", "files", ");"]
sectionPBXSourcesBuildPhase = []
for lexer in lexers:
if lexer not in lexerReferences:
uid1 = uid24()
uid2 = uid24()
print("Lexer", lexer, "is not in Xcode project. Use IDs", uid1, uid2)
lexerReferences[lexer] = [uid1, uid2]
linePBXBuildFile = "\t\t{} /* {}.cxx in Sources */ = {{isa = PBXBuildFile; fileRef = {} /* {}.cxx */; }};".format(uid1, lexer, uid2, lexer)
linePBXFileReference = "\t\t{} /* {}.cxx */ = {{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = {}.cxx; path = ../../lexers/{}.cxx; sourceTree = SOURCE_ROOT; }};".format(uid2, lexer, lexer, lexer)
lineLexers = "\t\t\t\t{} /* {}.cxx */,".format(uid2, lexer)
linePBXSourcesBuildPhase = "\t\t\t\t{} /* {}.cxx in Sources */,".format(uid1, lexer)
sectionPBXBuildFile.append(linePBXBuildFile)
sectionPBXFileReference.append(linePBXFileReference)
sectionLexers.append(lineLexers)
sectionPBXSourcesBuildPhase.append(linePBXSourcesBuildPhase)
lines = ReadFileAsList(path)
sli = FindSectionInList(lines, markersPBXBuildFile)
lines[sli.stop:sli.stop] = sectionPBXBuildFile
sli = FindSectionInList(lines, markersPBXFileReference)
lines[sli.stop:sli.stop] = sectionPBXFileReference
sli = FindSectionInList(lines, markersLexers)
# This section is shown in the project outline so sort it to make it easier to navigate.
allLexers = sorted(lines[sli.start:sli.stop] + sectionLexers, key=ciLexerKey)
lines[sli] = allLexers
sli = FindSectionInList(lines, markersPBXSourcesBuildPhase)
lines[sli.stop:sli.stop] = sectionPBXSourcesBuildPhase
UpdateFileFromLines(path, lines, "\n")
def RegenerateAll(rootDirectory):
root = pathlib.Path(rootDirectory)
scintillaBase = root.resolve()
sci = ScintillaData.ScintillaData(scintillaBase)
lexillaDir = scintillaBase / "lexilla"
srcDir = lexillaDir / "src"
Regenerate(srcDir / "Lexilla.cxx", "//", sci.lexerModules)
Regenerate(srcDir / "lexilla.mak", "#", sci.lexFiles)
# Discover version information
version = (lexillaDir / "version.txt").read_text().strip()
versionDotted = version[0] + '.' + version[1] + '.' + version[2]
versionCommad = versionDotted.replace(".", ", ") + ', 0'
rcPath = srcDir / "LexillaVersion.rc"
UpdateLineInFile(rcPath, "#define VERSION_LEXILLA",
"#define VERSION_LEXILLA \"" + versionDotted + "\"")
UpdateLineInFile(rcPath, "#define VERSION_WORDS",
"#define VERSION_WORDS " + versionCommad)
lexillaXcode = lexillaDir / "src" / "Lexilla"
lexillaXcodeProject = lexillaXcode / "Lexilla.xcodeproj" / "project.pbxproj"
lexerReferences = ScintillaData.FindLexersInXcode(lexillaXcodeProject)
UpdateLineInPlistFile(lexillaXcode / "Info.plist",
"CFBundleShortVersionString", versionDotted)
ReplaceREInFile(lexillaXcodeProject, "CURRENT_PROJECT_VERSION = [0-9.]+;",
f'CURRENT_PROJECT_VERSION = {versionDotted};')
RegenerateXcodeProject(lexillaXcodeProject, sci.lexFiles, lexerReferences)
currentDirectory = pathlib.Path.cwd()
os.chdir(srcDir)
DepGen.Generate()
os.chdir(currentDirectory)
if __name__=="__main__":
RegenerateAll(pathlib.Path(__file__).resolve().parent.parent.parent)

View File

@ -0,0 +1,7 @@
rem Test lexers
rem build lexilla.dll and TestLexers.exe then run TestLexers.exe
cd ../src
make
cd ../test
make
make test

View File

@ -0,0 +1,7 @@
# Test lexers
# build lexilla.so and TestLexers then run TestLexers
cd ../src
make
cd ../test
make
make test

View File

@ -0,0 +1,40 @@
#!/usr/bin/env python3
# DepGen.py - produce a make dependencies file for Scintilla
# Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# Requires Python 3.6 or later
import os, sys
sys.path.append(os.path.join("..", ".."))
from scripts import Dependencies
topComment = "# Created by DepGen.py. To recreate, run DepGen.py.\n"
def Generate():
scintilla = os.path.join("..", "..")
lexilla = os.path.join(scintilla, "lexilla")
sources = [
os.path.join(lexilla, "src", "Lexilla.cxx"),
os.path.join(scintilla, "lexlib", "*.cxx"),
os.path.join(scintilla, "lexers", "*.cxx")]
includes = [
os.path.join(scintilla, "include"),
os.path.join(scintilla, "src"),
os.path.join(scintilla, "lexlib")]
# Create the dependencies file for g++
deps = Dependencies.FindDependencies(sources, includes, ".o", "../lexilla/")
Dependencies.UpdateDependencies(os.path.join(lexilla, "src", "deps.mak"), deps, topComment)
# Create the dependencies file for MSVC
# Place the objects in $(DIR_O) and change extension from ".o" to ".obj"
deps = [["$(DIR_O)/"+Dependencies.PathStem(obj)+".obj", headers] for obj, headers in deps]
Dependencies.UpdateDependencies(os.path.join(lexilla, "src", "nmdeps.mak"), deps, topComment)
if __name__ == "__main__":
Generate()

View File

@ -0,0 +1,340 @@
// Scintilla source code edit control
/** @file Lexilla.cxx
** Lexer infrastructure.
** Provides entry points to shared library.
**/
// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstring>
#include <vector>
#if _WIN32
#define EXPORT_FUNCTION __declspec(dllexport)
#define CALLING_CONVENTION __stdcall
#else
#define EXPORT_FUNCTION __attribute__((visibility("default")))
#define CALLING_CONVENTION
#endif
#include "ILexer.h"
#include "LexerModule.h"
#include "CatalogueModules.h"
using namespace Scintilla;
//++Autogenerated -- run lexilla/scripts/LexillaGen.py to regenerate
//**\(extern LexerModule \*;\n\)
extern LexerModule lmA68k;
extern LexerModule lmAbaqus;
extern LexerModule lmAda;
extern LexerModule lmAPDL;
extern LexerModule lmAs;
extern LexerModule lmAsm;
extern LexerModule lmAsn1;
extern LexerModule lmASY;
extern LexerModule lmAU3;
extern LexerModule lmAVE;
extern LexerModule lmAVS;
extern LexerModule lmBaan;
extern LexerModule lmBash;
extern LexerModule lmBatch;
extern LexerModule lmBibTeX;
extern LexerModule lmBlitzBasic;
extern LexerModule lmBullant;
extern LexerModule lmCaml;
extern LexerModule lmCIL;
extern LexerModule lmClw;
extern LexerModule lmClwNoCase;
extern LexerModule lmCmake;
extern LexerModule lmCOBOL;
extern LexerModule lmCoffeeScript;
extern LexerModule lmConf;
extern LexerModule lmCPP;
extern LexerModule lmCPPNoCase;
extern LexerModule lmCsound;
extern LexerModule lmCss;
extern LexerModule lmD;
extern LexerModule lmDataflex;
extern LexerModule lmDiff;
extern LexerModule lmDMAP;
extern LexerModule lmDMIS;
extern LexerModule lmECL;
extern LexerModule lmEDIFACT;
extern LexerModule lmEiffel;
extern LexerModule lmEiffelkw;
extern LexerModule lmErlang;
extern LexerModule lmErrorList;
extern LexerModule lmESCRIPT;
extern LexerModule lmF77;
extern LexerModule lmFlagShip;
extern LexerModule lmForth;
extern LexerModule lmFortran;
extern LexerModule lmFreeBasic;
extern LexerModule lmGAP;
extern LexerModule lmGui4Cli;
extern LexerModule lmHaskell;
extern LexerModule lmHollywood;
extern LexerModule lmHTML;
extern LexerModule lmIHex;
extern LexerModule lmIndent;
extern LexerModule lmInno;
extern LexerModule lmJSON;
extern LexerModule lmKix;
extern LexerModule lmKVIrc;
extern LexerModule lmLatex;
extern LexerModule lmLISP;
extern LexerModule lmLiterateHaskell;
extern LexerModule lmLot;
extern LexerModule lmLout;
extern LexerModule lmLua;
extern LexerModule lmMagikSF;
extern LexerModule lmMake;
extern LexerModule lmMarkdown;
extern LexerModule lmMatlab;
extern LexerModule lmMaxima;
extern LexerModule lmMETAPOST;
extern LexerModule lmMMIXAL;
extern LexerModule lmModula;
extern LexerModule lmMSSQL;
extern LexerModule lmMySQL;
extern LexerModule lmNim;
extern LexerModule lmNimrod;
extern LexerModule lmNncrontab;
extern LexerModule lmNsis;
extern LexerModule lmNull;
extern LexerModule lmOctave;
extern LexerModule lmOpal;
extern LexerModule lmOScript;
extern LexerModule lmPascal;
extern LexerModule lmPB;
extern LexerModule lmPerl;
extern LexerModule lmPHPSCRIPT;
extern LexerModule lmPLM;
extern LexerModule lmPO;
extern LexerModule lmPOV;
extern LexerModule lmPowerPro;
extern LexerModule lmPowerShell;
extern LexerModule lmProgress;
extern LexerModule lmProps;
extern LexerModule lmPS;
extern LexerModule lmPureBasic;
extern LexerModule lmPython;
extern LexerModule lmR;
extern LexerModule lmRaku;
extern LexerModule lmREBOL;
extern LexerModule lmRegistry;
extern LexerModule lmRuby;
extern LexerModule lmRust;
extern LexerModule lmSAS;
extern LexerModule lmScriptol;
extern LexerModule lmSmalltalk;
extern LexerModule lmSML;
extern LexerModule lmSorc;
extern LexerModule lmSpecman;
extern LexerModule lmSpice;
extern LexerModule lmSQL;
extern LexerModule lmSrec;
extern LexerModule lmStata;
extern LexerModule lmSTTXT;
extern LexerModule lmTACL;
extern LexerModule lmTADS3;
extern LexerModule lmTAL;
extern LexerModule lmTCL;
extern LexerModule lmTCMD;
extern LexerModule lmTEHex;
extern LexerModule lmTeX;
extern LexerModule lmTxt2tags;
extern LexerModule lmVB;
extern LexerModule lmVBScript;
extern LexerModule lmVerilog;
extern LexerModule lmVHDL;
extern LexerModule lmVisualProlog;
extern LexerModule lmX12;
extern LexerModule lmXML;
extern LexerModule lmYAML;
//--Autogenerated -- end of automatically generated section
namespace {
CatalogueModules catalogueLexilla;
void AddEachLexer() {
if (catalogueLexilla.Count() > 0) {
return;
}
//++Autogenerated -- run scripts/LexGen.py to regenerate
//**\(\tcatalogueLexilla.AddLexerModule(&\*);\n\)
catalogueLexilla.AddLexerModule(&lmA68k);
catalogueLexilla.AddLexerModule(&lmAbaqus);
catalogueLexilla.AddLexerModule(&lmAda);
catalogueLexilla.AddLexerModule(&lmAPDL);
catalogueLexilla.AddLexerModule(&lmAs);
catalogueLexilla.AddLexerModule(&lmAsm);
catalogueLexilla.AddLexerModule(&lmAsn1);
catalogueLexilla.AddLexerModule(&lmASY);
catalogueLexilla.AddLexerModule(&lmAU3);
catalogueLexilla.AddLexerModule(&lmAVE);
catalogueLexilla.AddLexerModule(&lmAVS);
catalogueLexilla.AddLexerModule(&lmBaan);
catalogueLexilla.AddLexerModule(&lmBash);
catalogueLexilla.AddLexerModule(&lmBatch);
catalogueLexilla.AddLexerModule(&lmBibTeX);
catalogueLexilla.AddLexerModule(&lmBlitzBasic);
catalogueLexilla.AddLexerModule(&lmBullant);
catalogueLexilla.AddLexerModule(&lmCaml);
catalogueLexilla.AddLexerModule(&lmCIL);
catalogueLexilla.AddLexerModule(&lmClw);
catalogueLexilla.AddLexerModule(&lmClwNoCase);
catalogueLexilla.AddLexerModule(&lmCmake);
catalogueLexilla.AddLexerModule(&lmCOBOL);
catalogueLexilla.AddLexerModule(&lmCoffeeScript);
catalogueLexilla.AddLexerModule(&lmConf);
catalogueLexilla.AddLexerModule(&lmCPP);
catalogueLexilla.AddLexerModule(&lmCPPNoCase);
catalogueLexilla.AddLexerModule(&lmCsound);
catalogueLexilla.AddLexerModule(&lmCss);
catalogueLexilla.AddLexerModule(&lmD);
catalogueLexilla.AddLexerModule(&lmDataflex);
catalogueLexilla.AddLexerModule(&lmDiff);
catalogueLexilla.AddLexerModule(&lmDMAP);
catalogueLexilla.AddLexerModule(&lmDMIS);
catalogueLexilla.AddLexerModule(&lmECL);
catalogueLexilla.AddLexerModule(&lmEDIFACT);
catalogueLexilla.AddLexerModule(&lmEiffel);
catalogueLexilla.AddLexerModule(&lmEiffelkw);
catalogueLexilla.AddLexerModule(&lmErlang);
catalogueLexilla.AddLexerModule(&lmErrorList);
catalogueLexilla.AddLexerModule(&lmESCRIPT);
catalogueLexilla.AddLexerModule(&lmF77);
catalogueLexilla.AddLexerModule(&lmFlagShip);
catalogueLexilla.AddLexerModule(&lmForth);
catalogueLexilla.AddLexerModule(&lmFortran);
catalogueLexilla.AddLexerModule(&lmFreeBasic);
catalogueLexilla.AddLexerModule(&lmGAP);
catalogueLexilla.AddLexerModule(&lmGui4Cli);
catalogueLexilla.AddLexerModule(&lmHaskell);
catalogueLexilla.AddLexerModule(&lmHollywood);
catalogueLexilla.AddLexerModule(&lmHTML);
catalogueLexilla.AddLexerModule(&lmIHex);
catalogueLexilla.AddLexerModule(&lmIndent);
catalogueLexilla.AddLexerModule(&lmInno);
catalogueLexilla.AddLexerModule(&lmJSON);
catalogueLexilla.AddLexerModule(&lmKix);
catalogueLexilla.AddLexerModule(&lmKVIrc);
catalogueLexilla.AddLexerModule(&lmLatex);
catalogueLexilla.AddLexerModule(&lmLISP);
catalogueLexilla.AddLexerModule(&lmLiterateHaskell);
catalogueLexilla.AddLexerModule(&lmLot);
catalogueLexilla.AddLexerModule(&lmLout);
catalogueLexilla.AddLexerModule(&lmLua);
catalogueLexilla.AddLexerModule(&lmMagikSF);
catalogueLexilla.AddLexerModule(&lmMake);
catalogueLexilla.AddLexerModule(&lmMarkdown);
catalogueLexilla.AddLexerModule(&lmMatlab);
catalogueLexilla.AddLexerModule(&lmMaxima);
catalogueLexilla.AddLexerModule(&lmMETAPOST);
catalogueLexilla.AddLexerModule(&lmMMIXAL);
catalogueLexilla.AddLexerModule(&lmModula);
catalogueLexilla.AddLexerModule(&lmMSSQL);
catalogueLexilla.AddLexerModule(&lmMySQL);
catalogueLexilla.AddLexerModule(&lmNim);
catalogueLexilla.AddLexerModule(&lmNimrod);
catalogueLexilla.AddLexerModule(&lmNncrontab);
catalogueLexilla.AddLexerModule(&lmNsis);
catalogueLexilla.AddLexerModule(&lmNull);
catalogueLexilla.AddLexerModule(&lmOctave);
catalogueLexilla.AddLexerModule(&lmOpal);
catalogueLexilla.AddLexerModule(&lmOScript);
catalogueLexilla.AddLexerModule(&lmPascal);
catalogueLexilla.AddLexerModule(&lmPB);
catalogueLexilla.AddLexerModule(&lmPerl);
catalogueLexilla.AddLexerModule(&lmPHPSCRIPT);
catalogueLexilla.AddLexerModule(&lmPLM);
catalogueLexilla.AddLexerModule(&lmPO);
catalogueLexilla.AddLexerModule(&lmPOV);
catalogueLexilla.AddLexerModule(&lmPowerPro);
catalogueLexilla.AddLexerModule(&lmPowerShell);
catalogueLexilla.AddLexerModule(&lmProgress);
catalogueLexilla.AddLexerModule(&lmProps);
catalogueLexilla.AddLexerModule(&lmPS);
catalogueLexilla.AddLexerModule(&lmPureBasic);
catalogueLexilla.AddLexerModule(&lmPython);
catalogueLexilla.AddLexerModule(&lmR);
catalogueLexilla.AddLexerModule(&lmRaku);
catalogueLexilla.AddLexerModule(&lmREBOL);
catalogueLexilla.AddLexerModule(&lmRegistry);
catalogueLexilla.AddLexerModule(&lmRuby);
catalogueLexilla.AddLexerModule(&lmRust);
catalogueLexilla.AddLexerModule(&lmSAS);
catalogueLexilla.AddLexerModule(&lmScriptol);
catalogueLexilla.AddLexerModule(&lmSmalltalk);
catalogueLexilla.AddLexerModule(&lmSML);
catalogueLexilla.AddLexerModule(&lmSorc);
catalogueLexilla.AddLexerModule(&lmSpecman);
catalogueLexilla.AddLexerModule(&lmSpice);
catalogueLexilla.AddLexerModule(&lmSQL);
catalogueLexilla.AddLexerModule(&lmSrec);
catalogueLexilla.AddLexerModule(&lmStata);
catalogueLexilla.AddLexerModule(&lmSTTXT);
catalogueLexilla.AddLexerModule(&lmTACL);
catalogueLexilla.AddLexerModule(&lmTADS3);
catalogueLexilla.AddLexerModule(&lmTAL);
catalogueLexilla.AddLexerModule(&lmTCL);
catalogueLexilla.AddLexerModule(&lmTCMD);
catalogueLexilla.AddLexerModule(&lmTEHex);
catalogueLexilla.AddLexerModule(&lmTeX);
catalogueLexilla.AddLexerModule(&lmTxt2tags);
catalogueLexilla.AddLexerModule(&lmVB);
catalogueLexilla.AddLexerModule(&lmVBScript);
catalogueLexilla.AddLexerModule(&lmVerilog);
catalogueLexilla.AddLexerModule(&lmVHDL);
catalogueLexilla.AddLexerModule(&lmVisualProlog);
catalogueLexilla.AddLexerModule(&lmX12);
catalogueLexilla.AddLexerModule(&lmXML);
catalogueLexilla.AddLexerModule(&lmYAML);
//--Autogenerated -- end of automatically generated section
}
}
extern "C" {
EXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() {
AddEachLexer();
return catalogueLexilla.Count();
}
EXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) {
AddEachLexer();
*name = 0;
const char *lexerName = catalogueLexilla.Name(index);
if (static_cast<size_t>(buflength) > strlen(lexerName)) {
strcpy(name, lexerName);
}
}
EXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) {
AddEachLexer();
return catalogueLexilla.Factory(index);
}
EXPORT_FUNCTION ILexer5 * CALLING_CONVENTION CreateLexer(const char *name) {
AddEachLexer();
for (unsigned int i = 0; i < catalogueLexilla.Count(); i++) {
const char *lexerName = catalogueLexilla.Name(i);
if (0 == strcmp(lexerName, name)) {
return catalogueLexilla.Create(i);
}
}
return nullptr;
}
}

View File

@ -0,0 +1,5 @@
EXPORTS
GetLexerCount
GetLexerName
GetLexerFactory
CreateLexer

View File

@ -0,0 +1,19 @@
// Scintilla source code edit control
/** @file Lexilla.h
** Lexer infrastructure.
** Declare functions in Lexilla library.
**/
// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#if _WIN32
#define LEXILLA_CALLING_CONVENTION __stdcall
#else
#define LEXILLA_CALLING_CONVENTION
#endif
extern "C" {
Scintilla::ILexer5 * LEXILLA_CALLING_CONVENTION CreateLexer(const char *name);
}

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Lexilla</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>WIN32;SCI_LEXER;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\include;..\src;..\..\lexlib;</AdditionalIncludeDirectories>
<BrowseInformation>true</BrowseInformation>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<MinimalRebuild>false</MinimalRebuild>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>gdi32.lib;imm32.lib;ole32.lib;oleaut32.lib;msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\lexers\*.cxx" />
<ClCompile Include="..\..\lexlib\*.cxx" />
<ClCompile Include="..\src\Lexilla.cxx" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\SciLexer.h" />
<ClInclude Include="..\src\*.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\src\LexillaVersion.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More