From 9957b3d2d7cd16a482dc2f5775e209d8d0d8e3dd Mon Sep 17 00:00:00 2001 From: Lu Zhen Date: Fri, 19 Jan 2024 10:48:17 +0800 Subject: [PATCH 001/300] refactor: optimize cxx plugin Log: Change-Id: Ife58a254c0754c34248d3b3840c8b014550f5259 --- src/plugins/cxx/CMakeLists.txt | 130 ++++++------------ .../cmakebuildergenerator.cpp | 0 .../cmakebuildergenerator.h | 0 .../project/{mainframe => }/cbp/cbpparser.cpp | 0 .../project/{mainframe => }/cbp/cbpparser.h | 0 .../cmake/project/{mainframe => }/cmake.qrc | 0 .../{mainframe => }/cmakeasynparse.cpp | 0 .../project/{mainframe => }/cmakeasynparse.h | 0 .../{mainframe => }/cmakeitemkeeper.cpp | 0 .../project/{mainframe => }/cmakeitemkeeper.h | 0 .../{mainframe => }/cmakeprojectgenerator.cpp | 8 +- .../{mainframe => }/cmakeprojectgenerator.h | 0 .../icons/project_executable_20px.svg | 0 .../cxx/cmake/project/projectcmake.cpp | 47 ------- src/plugins/cxx/cmake/project/projectcmake.h | 20 --- .../bulidCfgWidget/buildpropertypage.cpp} | 22 +-- .../bulidCfgWidget/buildpropertypage.h} | 6 +- .../bulidCfgWidget}/stepspane.cpp | 0 .../bulidCfgWidget}/stepspane.h | 0 .../configWidget}/configpropertywidget.cpp | 1 - .../configWidget}/configpropertywidget.h | 0 .../configWidget}/configureprojpane.cpp | 4 +- .../configWidget}/configureprojpane.h | 0 .../{mainframe => }/properties/configutil.cpp | 4 +- .../{mainframe => }/properties/configutil.h | 0 .../properties/environmentwidget.cpp | 0 .../properties/environmentwidget.h | 0 .../runCfgWidget}/runconfigpane.cpp | 0 .../runCfgWidget}/runconfigpane.h | 0 .../runCfgWidget}/runpropertywidget.cpp | 0 .../runCfgWidget}/runpropertywidget.h | 0 .../properties/targetsmanager.cpp | 2 +- .../properties/targetsmanager.h | 0 .../transceiver/projectcmakereceiver.cpp | 4 +- src/plugins/cxx/cxxplugin.cpp | 6 +- src/services/project/projectinfo.h | 12 ++ 36 files changed, 82 insertions(+), 184 deletions(-) rename src/plugins/cxx/cmake/builder/{mainframe => generator}/cmakebuildergenerator.cpp (100%) rename src/plugins/cxx/cmake/builder/{mainframe => generator}/cmakebuildergenerator.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cbp/cbpparser.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cbp/cbpparser.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmake.qrc (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeasynparse.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeasynparse.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeitemkeeper.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeitemkeeper.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeprojectgenerator.cpp (98%) rename src/plugins/cxx/cmake/project/{mainframe => }/cmakeprojectgenerator.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/icons/project_executable_20px.svg (100%) delete mode 100644 src/plugins/cxx/cmake/project/projectcmake.cpp delete mode 100644 src/plugins/cxx/cmake/project/projectcmake.h rename src/plugins/cxx/cmake/project/{mainframe/properties/buildpropertywidget.cpp => properties/bulidCfgWidget/buildpropertypage.cpp} (95%) rename src/plugins/cxx/cmake/project/{mainframe/properties/buildpropertywidget.h => properties/bulidCfgWidget/buildpropertypage.h} (84%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/bulidCfgWidget}/stepspane.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/bulidCfgWidget}/stepspane.h (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/configWidget}/configpropertywidget.cpp (97%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/configWidget}/configpropertywidget.h (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/configWidget}/configureprojpane.cpp (98%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/configWidget}/configureprojpane.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/configutil.cpp (98%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/configutil.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/environmentwidget.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/environmentwidget.h (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/runCfgWidget}/runconfigpane.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/runCfgWidget}/runconfigpane.h (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/runCfgWidget}/runpropertywidget.cpp (100%) rename src/plugins/cxx/cmake/project/{mainframe/properties => properties/runCfgWidget}/runpropertywidget.h (100%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/targetsmanager.cpp (99%) rename src/plugins/cxx/cmake/project/{mainframe => }/properties/targetsmanager.h (100%) diff --git a/src/plugins/cxx/CMakeLists.txt b/src/plugins/cxx/CMakeLists.txt index 85374cc5b..fe7aa61af 100644 --- a/src/plugins/cxx/CMakeLists.txt +++ b/src/plugins/cxx/CMakeLists.txt @@ -3,96 +3,51 @@ cmake_minimum_required(VERSION 3.0.2) project(plugin-cxx) find_package(Qt5 COMPONENTS Xml REQUIRED) +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/") +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties") -set(CXX_CPP - cmake/cmakegenerator.cpp - cmake/cmakebuild.cpp - cmake/cmakedebug.cpp - ninja/ninjagenerator.cpp - ninja/ninjabuild.cpp - ninja/ninjadebug.cpp - cmake/builder/mainframe/cmakebuildergenerator.cpp - cmake/builder/parser/cmakeparser.cpp - cmake/builder/parser/ansifilterparser.cpp - cmake/builder/parser/gnumakeparser.cpp - cmake/builder/parser/gccparser.cpp - cmake/builder/parser/ldparser.cpp - cmake/project/mainframe/cmakeasynparse.cpp - cmake/project/mainframe/cmakeitemkeeper.cpp - cmake/project/mainframe/cmakeprojectgenerator.cpp - cmake/project/mainframe/properties/environmentwidget.cpp - cmake/project/mainframe/properties/stepspane.cpp - cmake/project/mainframe/properties/targetsmanager.cpp - cmake/project/mainframe/properties/runconfigpane.cpp - cmake/project/mainframe/properties/configureprojpane.cpp - cmake/project/mainframe/properties/buildpropertywidget.cpp - cmake/project/mainframe/properties/runpropertywidget.cpp - cmake/project/mainframe/properties/configpropertywidget.cpp - cmake/project/mainframe/properties/configutil.cpp - cmake/project/mainframe/cbp/cbpparser.cpp - cmake/project/transceiver/projectcmakereceiver.cpp - cmake/option/kitsmanagerwidget.cpp - cmake/option/optioncmakegenerator.cpp - cmake/option/cmakeoptionwidget.cpp - cmake/option/kitmanager.cpp - cmake/option/kit.cpp - cmake/option/persistentsettings.cpp - ninja/builder/mainframe/ninjabuildergenerator.cpp - ninja/builder/parser/ninjaparser.cpp - ninja/project/ninjaasynparse.cpp - ninja/project/ninjaprojectgenerator.cpp - ninja/option/ninjawidget.cpp - ninja/option/ninjaoptionwidget.cpp - ninja/option/optionninjagenerator.cpp - cxxplugin.cpp - cxxplugin.json - ) - -set(CXX_H - cmake/cmakegenerator.h - cmake/cmakebuild.h - cmake/cmakedebug.h - ninja/ninjagenerator.h - ninja/ninjabuild.h - ninja/ninjadebug.h - cmake/builder/mainframe/cmakebuildergenerator.h - cmake/builder/parser/cmakeparser.h - cmake/builder/parser/ansifilterparser.h - cmake/builder/parser/gnumakeparser.h - cmake/builder/parser/gccparser.h - cmake/builder/parser/ldparser.h - cmake/project/mainframe/cmakeasynparse.h - cmake/project/mainframe/cmakeitemkeeper.h - cmake/project/mainframe/cmakeprojectgenerator.h - cmake/project/mainframe/properties/environmentwidget.h - cmake/project/mainframe/properties/stepspane.h - cmake/project/mainframe/properties/targetsmanager.h - cmake/project/mainframe/properties/runconfigpane.h - cmake/project/mainframe/properties/configureprojpane.h - cmake/project/mainframe/properties/buildpropertywidget.h - cmake/project/mainframe/properties/runpropertywidget.h - cmake/project/mainframe/properties/configpropertywidget.h - cmake/project/mainframe/properties/configutil.h - cmake/project/mainframe/cbp/cbpparser.h - cmake/project/transceiver/projectcmakereceiver.h - cmake/option/kitsmanagerwidget.h - cmake/option/optioncmakegenerator.h - cmake/option/cmakeoptionwidget.h - cmake/option/kitmanager.h - cmake/option/kit.h - cmake/option/persistentsettings.h - ninja/builder/mainframe/ninjabuildergenerator.h - ninja/builder/parser/ninjaparser.h - ninja/project/ninjaasynparse.h - ninja/project/ninjaprojectgenerator.h - ninja/option/ninjawidget.h - ninja/option/ninjaoptionwidget.h - ninja/option/optionninjagenerator.h - cxxplugin.h +FILE(GLOB PROJECT_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/builder/mainframe/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/builder/mainframe/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/project/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/project/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/option/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/option/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/ninja/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/parser/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/parser/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/generator/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/builder/generator/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/configWidget/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/configWidget/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/bulidCfgWidget/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/bulidCfgWidget/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/runCfgWidget/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/properties/runCfgWidget/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/cbp/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/cbp/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/transceiver/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/project/transceiver/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/option/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/option/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.json" ) set(CXX_QRC - cmake/project/mainframe/cmake.qrc + cmake/project/cmake.qrc ninja/project/ninja.qrc ) @@ -100,8 +55,7 @@ set(QT_THEME) add_library(${PROJECT_NAME} SHARED - ${CXX_CPP} - ${CXX_H} + ${PROJECT_FILES} ${QT_THEME} ${CXX_QRC} ) diff --git a/src/plugins/cxx/cmake/builder/mainframe/cmakebuildergenerator.cpp b/src/plugins/cxx/cmake/builder/generator/cmakebuildergenerator.cpp similarity index 100% rename from src/plugins/cxx/cmake/builder/mainframe/cmakebuildergenerator.cpp rename to src/plugins/cxx/cmake/builder/generator/cmakebuildergenerator.cpp diff --git a/src/plugins/cxx/cmake/builder/mainframe/cmakebuildergenerator.h b/src/plugins/cxx/cmake/builder/generator/cmakebuildergenerator.h similarity index 100% rename from src/plugins/cxx/cmake/builder/mainframe/cmakebuildergenerator.h rename to src/plugins/cxx/cmake/builder/generator/cmakebuildergenerator.h diff --git a/src/plugins/cxx/cmake/project/mainframe/cbp/cbpparser.cpp b/src/plugins/cxx/cmake/project/cbp/cbpparser.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cbp/cbpparser.cpp rename to src/plugins/cxx/cmake/project/cbp/cbpparser.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/cbp/cbpparser.h b/src/plugins/cxx/cmake/project/cbp/cbpparser.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cbp/cbpparser.h rename to src/plugins/cxx/cmake/project/cbp/cbpparser.h diff --git a/src/plugins/cxx/cmake/project/mainframe/cmake.qrc b/src/plugins/cxx/cmake/project/cmake.qrc similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmake.qrc rename to src/plugins/cxx/cmake/project/cmake.qrc diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeasynparse.cpp b/src/plugins/cxx/cmake/project/cmakeasynparse.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmakeasynparse.cpp rename to src/plugins/cxx/cmake/project/cmakeasynparse.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeasynparse.h b/src/plugins/cxx/cmake/project/cmakeasynparse.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmakeasynparse.h rename to src/plugins/cxx/cmake/project/cmakeasynparse.h diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeitemkeeper.cpp b/src/plugins/cxx/cmake/project/cmakeitemkeeper.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmakeitemkeeper.cpp rename to src/plugins/cxx/cmake/project/cmakeitemkeeper.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeitemkeeper.h b/src/plugins/cxx/cmake/project/cmakeitemkeeper.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmakeitemkeeper.h rename to src/plugins/cxx/cmake/project/cmakeitemkeeper.h diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeprojectgenerator.cpp b/src/plugins/cxx/cmake/project/cmakeprojectgenerator.cpp similarity index 98% rename from src/plugins/cxx/cmake/project/mainframe/cmakeprojectgenerator.cpp rename to src/plugins/cxx/cmake/project/cmakeprojectgenerator.cpp index e2de6e220..02db59012 100644 --- a/src/plugins/cxx/cmake/project/mainframe/cmakeprojectgenerator.cpp +++ b/src/plugins/cxx/cmake/project/cmakeprojectgenerator.cpp @@ -6,9 +6,9 @@ #include "cmakeasynparse.h" #include "cmakeitemkeeper.h" #include "cmake/project/transceiver/projectcmakereceiver.h" -#include "properties/buildpropertywidget.h" -#include "properties/runpropertywidget.h" -#include "properties/configpropertywidget.h" +#include "properties/bulidCfgWidget/buildpropertypage.h" +#include "properties/runCfgWidget/runpropertywidget.h" +#include "properties/configWidget/configpropertywidget.h" #include "properties/configutil.h" #include "properties/targetsmanager.h" #include "services/builder/builderservice.h" @@ -410,7 +410,7 @@ void CmakeProjectGenerator::actionProperties(const dpfservice::ProjectInfo &info { PropertiesDialog dlg; - BuildPropertyWidget *buildWidget = new BuildPropertyWidget(info); + BuildPropertyPage *buildWidget = new BuildPropertyPage(info); RunPropertyWidget *runWidget = new RunPropertyWidget(info, item); dlg.insertPropertyPanel(tr("Build"), buildWidget); diff --git a/src/plugins/cxx/cmake/project/mainframe/cmakeprojectgenerator.h b/src/plugins/cxx/cmake/project/cmakeprojectgenerator.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/cmakeprojectgenerator.h rename to src/plugins/cxx/cmake/project/cmakeprojectgenerator.h diff --git a/src/plugins/cxx/cmake/project/mainframe/icons/project_executable_20px.svg b/src/plugins/cxx/cmake/project/icons/project_executable_20px.svg similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/icons/project_executable_20px.svg rename to src/plugins/cxx/cmake/project/icons/project_executable_20px.svg diff --git a/src/plugins/cxx/cmake/project/projectcmake.cpp b/src/plugins/cxx/cmake/project/projectcmake.cpp deleted file mode 100644 index ca3c8e034..000000000 --- a/src/plugins/cxx/cmake/project/projectcmake.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "projectcmake.h" -#include "mainframe/cmakegenerator.h" -#include "mainframe/properties/targetsmanager.h" - -#include "base/abstractmenu.h" -#include "base/abstractaction.h" -#include "base/abstractcentral.h" - -#include "services/window/windowservice.h" -#include "services/project/projectservice.h" - -#include -#include - -using namespace dpfservice; - -void ProjectCMake::initialize() -{ -} - -bool ProjectCMake::start() -{ - qInfo() << __FUNCTION__; - - auto &ctx = dpfInstance.serviceContext(); - ProjectService *projectService = ctx.service(ProjectService::name()); - if (projectService) { - QString errorString; - projectService->implGenerator(CmakeGenerator::toolKitName(), &errorString); - } - - if (projectService && !projectService->getActiveTarget) { - using namespace std::placeholders; - projectService->getActiveTarget = std::bind(&TargetsManager::getActivedTargetByTargetType, TargetsManager::instance(), _1); - } - - return true; -} - -dpf::Plugin::ShutdownFlag ProjectCMake::stop() -{ - return Sync; -} diff --git a/src/plugins/cxx/cmake/project/projectcmake.h b/src/plugins/cxx/cmake/project/projectcmake.h deleted file mode 100644 index 6cc53fb11..000000000 --- a/src/plugins/cxx/cmake/project/projectcmake.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef PROJECTCMAKE_H -#define PROJECTCMAKE_H - -#include - -class ProjectCMake : public dpf::Plugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.deepin.plugin.unioncode" FILE "projectcmake.json") -public: - virtual void initialize() override; - virtual bool start() override; - virtual dpf::Plugin::ShutdownFlag stop() override; -}; - -#endif // PROJECTCMAKE_H diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.cpp b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.cpp similarity index 95% rename from src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.cpp rename to src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.cpp index 6aa3df6a0..36dd931de 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.cpp +++ b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.cpp @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -#include "buildpropertywidget.h" +#include "buildpropertypage.h" #include "common/common.h" #include "environmentwidget.h" @@ -110,7 +110,7 @@ void DetailPropertyWidget::getValues(BuildConfigure &configure) class BuildPropertyWidgetPrivate { - friend class BuildPropertyWidget; + friend class BuildPropertyPage; DComboBox *configureComboBox{nullptr}; DLineEdit *outputDirEdit{nullptr}; @@ -122,7 +122,7 @@ class BuildPropertyWidgetPrivate {StepType::Build, dpfservice::TargetType::kBuildTarget}}; }; -BuildPropertyWidget::BuildPropertyWidget(const dpfservice::ProjectInfo &projectInfo, QWidget *parent) +BuildPropertyPage::BuildPropertyPage(const dpfservice::ProjectInfo &projectInfo, QWidget *parent) : PageWidget(parent) , d(new BuildPropertyWidgetPrivate()) { @@ -131,16 +131,16 @@ BuildPropertyWidget::BuildPropertyWidget(const dpfservice::ProjectInfo &projectI initData(projectInfo); QObject::connect(TargetsManager::instance(), &TargetsManager::initialized, - this, &BuildPropertyWidget::updateDetail); + this, &BuildPropertyPage::updateDetail); } -BuildPropertyWidget::~BuildPropertyWidget() +BuildPropertyPage::~BuildPropertyPage() { if (d) delete d; } -void BuildPropertyWidget::setupOverviewUI() +void BuildPropertyPage::setupOverviewUI() { QVBoxLayout *vLayout = new QVBoxLayout(); ConfigureWidget *buildCfgWidget = new ConfigureWidget(this); @@ -216,7 +216,7 @@ void BuildPropertyWidget::setupOverviewUI() buildCfgWidget->addWidget(d->stackWidget); } -void BuildPropertyWidget::initData(const dpfservice::ProjectInfo &projectInfo) +void BuildPropertyPage::initData(const dpfservice::ProjectInfo &projectInfo) { d->configureComboBox->clear(); @@ -258,7 +258,7 @@ void BuildPropertyWidget::initData(const dpfservice::ProjectInfo &projectInfo) } -void BuildPropertyWidget::updateDetail() +void BuildPropertyPage::updateDetail() { ConfigureParam *param = ConfigUtil::instance()->getConfigureParamPointer(); @@ -284,7 +284,7 @@ void BuildPropertyWidget::updateDetail() } } -void BuildPropertyWidget::initRunConfig(const QString &workDirectory, RunConfigure &runConfigure) +void BuildPropertyPage::initRunConfig(const QString &workDirectory, RunConfigure &runConfigure) { Q_UNUSED(workDirectory) @@ -308,12 +308,12 @@ void BuildPropertyWidget::initRunConfig(const QString &workDirectory, RunConfigu } } -void BuildPropertyWidget::readConfig() +void BuildPropertyPage::readConfig() { } -void BuildPropertyWidget::saveConfig() +void BuildPropertyPage::saveConfig() { ConfigureParam *param = ConfigUtil::instance()->getConfigureParamPointer(); auto iter = param->buildConfigures.begin(); diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.h b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.h similarity index 84% rename from src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.h rename to src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.h index 8b0c07464..6dcf57ebb 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/buildpropertywidget.h +++ b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/buildpropertypage.h @@ -26,12 +26,12 @@ class DetailPropertyWidget : public ConfigureWidget }; class BuildPropertyWidgetPrivate; -class BuildPropertyWidget : public PageWidget +class BuildPropertyPage : public PageWidget { Q_OBJECT public: - explicit BuildPropertyWidget(const dpfservice::ProjectInfo &projectInfo, QWidget *parent = nullptr); - virtual ~BuildPropertyWidget() override; + explicit BuildPropertyPage(const dpfservice::ProjectInfo &projectInfo, QWidget *parent = nullptr); + virtual ~BuildPropertyPage() override; void readConfig() override; void saveConfig() override; diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/stepspane.cpp b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/stepspane.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/stepspane.cpp rename to src/plugins/cxx/cmake/project/properties/bulidCfgWidget/stepspane.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/stepspane.h b/src/plugins/cxx/cmake/project/properties/bulidCfgWidget/stepspane.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/stepspane.h rename to src/plugins/cxx/cmake/project/properties/bulidCfgWidget/stepspane.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configpropertywidget.cpp b/src/plugins/cxx/cmake/project/properties/configWidget/configpropertywidget.cpp similarity index 97% rename from src/plugins/cxx/cmake/project/mainframe/properties/configpropertywidget.cpp rename to src/plugins/cxx/cmake/project/properties/configWidget/configpropertywidget.cpp index 08b82f528..9e59045bd 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/configpropertywidget.cpp +++ b/src/plugins/cxx/cmake/project/properties/configWidget/configpropertywidget.cpp @@ -20,7 +20,6 @@ DWIDGET_USE_NAMESPACE class ConfigPropertyWidgetPrivate { friend class ConfigPropertyWidget; - ConfigureWidget *configureProjWidget{nullptr}; ConfigureProjPane *configureProjPane{nullptr}; }; diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configpropertywidget.h b/src/plugins/cxx/cmake/project/properties/configWidget/configpropertywidget.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/configpropertywidget.h rename to src/plugins/cxx/cmake/project/properties/configWidget/configpropertywidget.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configureprojpane.cpp b/src/plugins/cxx/cmake/project/properties/configWidget/configureprojpane.cpp similarity index 98% rename from src/plugins/cxx/cmake/project/mainframe/properties/configureprojpane.cpp rename to src/plugins/cxx/cmake/project/properties/configWidget/configureprojpane.cpp index 310e04256..b9ecbd06f 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/configureprojpane.cpp +++ b/src/plugins/cxx/cmake/project/properties/configWidget/configureprojpane.cpp @@ -4,8 +4,8 @@ #include "configureprojpane.h" -#include "cmake/project/mainframe/cmakeasynparse.h" -#include "cmake/project/mainframe/cmakeprojectgenerator.h" +#include "cmakeasynparse.h" +#include "cmakeprojectgenerator.h" #include "services/option/optionmanager.h" diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configureprojpane.h b/src/plugins/cxx/cmake/project/properties/configWidget/configureprojpane.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/configureprojpane.h rename to src/plugins/cxx/cmake/project/properties/configWidget/configureprojpane.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configutil.cpp b/src/plugins/cxx/cmake/project/properties/configutil.cpp similarity index 98% rename from src/plugins/cxx/cmake/project/mainframe/properties/configutil.cpp rename to src/plugins/cxx/cmake/project/properties/configutil.cpp index 602c85187..fbfd90582 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/configutil.cpp +++ b/src/plugins/cxx/cmake/project/properties/configutil.cpp @@ -3,8 +3,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "configutil.h" -#include "cmake/project/mainframe/cmakeasynparse.h" -#include "cmake/project/mainframe/cmakeprojectgenerator.h" +#include "cmakeasynparse.h" +#include "cmakeprojectgenerator.h" #include "targetsmanager.h" #include "services/option/optionmanager.h" diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/configutil.h b/src/plugins/cxx/cmake/project/properties/configutil.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/configutil.h rename to src/plugins/cxx/cmake/project/properties/configutil.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/environmentwidget.cpp b/src/plugins/cxx/cmake/project/properties/environmentwidget.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/environmentwidget.cpp rename to src/plugins/cxx/cmake/project/properties/environmentwidget.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/environmentwidget.h b/src/plugins/cxx/cmake/project/properties/environmentwidget.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/environmentwidget.h rename to src/plugins/cxx/cmake/project/properties/environmentwidget.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/runconfigpane.cpp b/src/plugins/cxx/cmake/project/properties/runCfgWidget/runconfigpane.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/runconfigpane.cpp rename to src/plugins/cxx/cmake/project/properties/runCfgWidget/runconfigpane.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/runconfigpane.h b/src/plugins/cxx/cmake/project/properties/runCfgWidget/runconfigpane.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/runconfigpane.h rename to src/plugins/cxx/cmake/project/properties/runCfgWidget/runconfigpane.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/runpropertywidget.cpp b/src/plugins/cxx/cmake/project/properties/runCfgWidget/runpropertywidget.cpp similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/runpropertywidget.cpp rename to src/plugins/cxx/cmake/project/properties/runCfgWidget/runpropertywidget.cpp diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/runpropertywidget.h b/src/plugins/cxx/cmake/project/properties/runCfgWidget/runpropertywidget.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/runpropertywidget.h rename to src/plugins/cxx/cmake/project/properties/runCfgWidget/runpropertywidget.h diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/targetsmanager.cpp b/src/plugins/cxx/cmake/project/properties/targetsmanager.cpp similarity index 99% rename from src/plugins/cxx/cmake/project/mainframe/properties/targetsmanager.cpp rename to src/plugins/cxx/cmake/project/properties/targetsmanager.cpp index 1b92fa112..d33b86a50 100644 --- a/src/plugins/cxx/cmake/project/mainframe/properties/targetsmanager.cpp +++ b/src/plugins/cxx/cmake/project/properties/targetsmanager.cpp @@ -4,7 +4,7 @@ #include "targetsmanager.h" #include "services/project/projectservice.h" -#include "cmake/project/mainframe/cbp/cbpparser.h" +#include "cbp/cbpparser.h" //static const char *kProjectFile = ".cproject"; static const char *kProjectFile = ".cbp"; diff --git a/src/plugins/cxx/cmake/project/mainframe/properties/targetsmanager.h b/src/plugins/cxx/cmake/project/properties/targetsmanager.h similarity index 100% rename from src/plugins/cxx/cmake/project/mainframe/properties/targetsmanager.h rename to src/plugins/cxx/cmake/project/properties/targetsmanager.h diff --git a/src/plugins/cxx/cmake/project/transceiver/projectcmakereceiver.cpp b/src/plugins/cxx/cmake/project/transceiver/projectcmakereceiver.cpp index b17c59100..06f7b471b 100644 --- a/src/plugins/cxx/cmake/project/transceiver/projectcmakereceiver.cpp +++ b/src/plugins/cxx/cmake/project/transceiver/projectcmakereceiver.cpp @@ -3,8 +3,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "projectcmakereceiver.h" -#include "cmake/project/mainframe/cmakeprojectgenerator.h" -#include "cmake/project/mainframe/properties/targetsmanager.h" +#include "cmakeprojectgenerator.h" +#include "targetsmanager.h" #include "services/project/projectinfo.h" #include "services/project/projectservice.h" diff --git a/src/plugins/cxx/cxxplugin.cpp b/src/plugins/cxx/cxxplugin.cpp index e18df2523..e2ca8dae4 100644 --- a/src/plugins/cxx/cxxplugin.cpp +++ b/src/plugins/cxx/cxxplugin.cpp @@ -6,10 +6,10 @@ #include "cmake/cmakegenerator.h" #include "ninja/ninjagenerator.h" -#include "cmake/builder/mainframe/cmakebuildergenerator.h" +#include "cmake/builder/generator/cmakebuildergenerator.h" #include "cmake/option/optioncmakegenerator.h" -#include "cmake/project/mainframe/properties/targetsmanager.h" -#include "cmake/project/mainframe/cmakeprojectgenerator.h" +#include "targetsmanager.h" +#include "cmakeprojectgenerator.h" #include "ninja/project/ninjaprojectgenerator.h" #include "ninja/builder/mainframe/ninjabuildergenerator.h" #include "ninja/option/optionninjagenerator.h" diff --git a/src/services/project/projectinfo.h b/src/services/project/projectinfo.h index 66feb4cac..183b59690 100644 --- a/src/services/project/projectinfo.h +++ b/src/services/project/projectinfo.h @@ -106,6 +106,18 @@ class ProjectInfo return false; } + friend QDataStream &operator<<(QDataStream &stream, ProjectInfo &projInfo) + { + stream << projInfo.data; + return stream; + } + + friend QDataStream &operator>>(QDataStream &stream, ProjectInfo &projInfo) + { + stream >> projInfo.data; + return stream; + } + private: QVariantHash data; }; From a70197f9bda9d559912b4010e3698bffbde17241 Mon Sep 17 00:00:00 2001 From: liuzhangjian Date: Wed, 17 Jan 2024 17:26:54 +0800 Subject: [PATCH 002/300] refactor: Refactoring the editor 1.Code refactoring 2.Optimized interaction logic Log: Code refactoring --- src/base/CMakeLists.txt | 2 + src/base/abstracteditormenu.cpp | 85 ++ src/base/abstracteditormenu.h | 41 + src/plugins/codeeditor/CMakeLists.txt | 97 +- src/plugins/codeeditor/codeeditor.cpp | 65 +- src/plugins/codeeditor/codeeditor.h | 2 +- src/plugins/codeeditor/codeeditor.qrc | 2 +- .../codeeditor/codelens/codelenstree.cpp | 3 +- src/plugins/codeeditor/gui/private/tabbar_p.h | 37 + .../codeeditor/gui/private/tabwidget_p.h | 41 + .../codeeditor/gui/private/texteditor_p.cpp | 198 ++++ .../codeeditor/gui/private/texteditor_p.h | 65 ++ .../gui/private/workspacewidget_p.h | 37 + src/plugins/codeeditor/gui/tabbar.cpp | 200 ++++ src/plugins/codeeditor/gui/tabbar.h | 47 + src/plugins/codeeditor/gui/tabwidget.cpp | 259 +++++ src/plugins/codeeditor/gui/tabwidget.h | 50 + src/plugins/codeeditor/gui/texteditor.cpp | 309 +++++ src/plugins/codeeditor/gui/texteditor.h | 71 ++ .../codeeditor/gui/workspacewidget.cpp | 192 ++++ src/plugins/codeeditor/gui/workspacewidget.h | 27 + .../codeeditor/mainframe/texteditkeeper.cpp | 238 ++-- .../codeeditor/mainframe/texteditkeeper.h | 98 +- .../manager/private/texteditormanager_p.h | 21 + .../codeeditor/manager/texteditormanager.cpp | 55 + .../codeeditor/manager/texteditormanager.h | 31 + .../codeeditor/menu/texteditormarginmenu.cpp | 40 + .../codeeditor/menu/texteditormarginmenu.h | 24 + .../codeeditor/menu/texteditormenu.cpp | 103 ++ src/plugins/codeeditor/menu/texteditormenu.h | 32 + .../language/cmake/stylelspcmake.cpp | 13 - .../language/cmake/stylelspcmake.h | 20 - .../language/cmake/stylescicmake.cpp | 48 - .../language/cmake/stylescicmake.h | 20 - .../language/cmake/texteditcmake.cpp | 65 -- .../language/cmake/texteditcmake.h | 26 - .../language/cpp/stylelspcpp.cpp | 122 -- .../language/cpp/stylelspcpp.h | 19 - .../language/cpp/stylescicpp.cpp | 132 --- .../language/cpp/stylescicpp.h | 22 - .../language/cpp/texteditcpp.cpp | 63 -- .../language/cpp/texteditcpp.h | 26 - .../language/java/stylelspjava.cpp | 117 -- .../language/java/stylelspjava.h | 19 - .../language/java/stylescijava.cpp | 122 -- .../language/java/stylescijava.h | 23 - .../language/java/texteditjava.cpp | 64 -- .../language/java/texteditjava.h | 26 - .../language/js/stylelspjs.cpp | 105 -- .../language/js/stylelspjs.h | 19 - .../language/js/stylescijs.cpp | 69 -- .../language/js/stylescijs.h | 22 - .../language/js/texteditjs.cpp | 65 -- .../language/js/texteditjs.h | 26 - .../language/python/stylelsppython.cpp | 120 -- .../language/python/stylelsppython.h | 19 - .../language/python/stylescipython.cpp | 132 --- .../language/python/stylescipython.h | 24 - .../language/python/texteditpython.cpp | 65 -- .../language/python/texteditpython.h | 26 - .../textedittabwidget/scintillaeditextern.h | 125 -- .../style/lspclientkeeper.cpp | 78 -- .../textedittabwidget/style/lspclientkeeper.h | 27 - .../textedittabwidget/style/stylecolor.cpp | 11 - .../textedittabwidget/style/stylecolor.h | 175 --- .../textedittabwidget/style/stylejsonfile.cpp | 123 -- .../textedittabwidget/style/stylejsonfile.h | 105 -- .../textedittabwidget/style/stylelsp.cpp | 1002 ----------------- .../textedittabwidget/style/stylelsp.h | 124 -- .../textedittabwidget/style/stylesci.cpp | 232 ---- .../textedittabwidget/style/stylesci.h | 57 - .../codeeditor/textedittabwidget/textedit.cpp | 140 --- .../codeeditor/textedittabwidget/textedit.h | 36 - .../textedittabwidget/texteditsplitter.cpp | 369 ------ .../textedittabwidget/texteditsplitter.h | 59 - .../textedittabwidget/textedittabbar.cpp | 304 ----- .../textedittabwidget/textedittabbar.h | 46 - .../textedittabwidget/textedittabwidget.cpp | 793 ------------- .../textedittabwidget/textedittabwidget.h | 88 -- .../textedittabwidget/textedittitlebar.cpp | 73 -- .../textedittabwidget/textedittitlebar.h | 40 - .../codeeditor/texts/edit-hSplit_16px.svg | 6 +- .../codeeditor/texts/edit-vSplit_16px.svg | 6 +- .../transceiver/codeeditorreceiver.cpp | 242 ++-- .../transceiver/codeeditorreceiver.h | 2 + src/plugins/codeeditor/utils/defaultlexer.h | 55 + src/plugins/codeeditor/utils/editorutils.cpp | 60 + src/plugins/codeeditor/utils/editorutils.h | 17 + 88 files changed, 2440 insertions(+), 6066 deletions(-) create mode 100644 src/base/abstracteditormenu.cpp create mode 100644 src/base/abstracteditormenu.h create mode 100644 src/plugins/codeeditor/gui/private/tabbar_p.h create mode 100644 src/plugins/codeeditor/gui/private/tabwidget_p.h create mode 100644 src/plugins/codeeditor/gui/private/texteditor_p.cpp create mode 100644 src/plugins/codeeditor/gui/private/texteditor_p.h create mode 100644 src/plugins/codeeditor/gui/private/workspacewidget_p.h create mode 100644 src/plugins/codeeditor/gui/tabbar.cpp create mode 100644 src/plugins/codeeditor/gui/tabbar.h create mode 100644 src/plugins/codeeditor/gui/tabwidget.cpp create mode 100644 src/plugins/codeeditor/gui/tabwidget.h create mode 100644 src/plugins/codeeditor/gui/texteditor.cpp create mode 100644 src/plugins/codeeditor/gui/texteditor.h create mode 100644 src/plugins/codeeditor/gui/workspacewidget.cpp create mode 100644 src/plugins/codeeditor/gui/workspacewidget.h create mode 100644 src/plugins/codeeditor/manager/private/texteditormanager_p.h create mode 100644 src/plugins/codeeditor/manager/texteditormanager.cpp create mode 100644 src/plugins/codeeditor/manager/texteditormanager.h create mode 100644 src/plugins/codeeditor/menu/texteditormarginmenu.cpp create mode 100644 src/plugins/codeeditor/menu/texteditormarginmenu.h create mode 100644 src/plugins/codeeditor/menu/texteditormenu.cpp create mode 100644 src/plugins/codeeditor/menu/texteditormenu.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/scintillaeditextern.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylecolor.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylecolor.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylelsp.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylelsp.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylesci.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/style/stylesci.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedit.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedit.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/texteditsplitter.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/texteditsplitter.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittabbar.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittabbar.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittabwidget.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittabwidget.h delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittitlebar.cpp delete mode 100644 src/plugins/codeeditor/textedittabwidget/textedittitlebar.h create mode 100644 src/plugins/codeeditor/utils/defaultlexer.h create mode 100644 src/plugins/codeeditor/utils/editorutils.cpp create mode 100644 src/plugins/codeeditor/utils/editorutils.h diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 782537a8f..058cf558e 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -2,6 +2,7 @@ project(base) set(CXX_H abstractmenu.h + abstracteditormenu.h abstractaction.h abstractwidget.h abstractdebugger.h @@ -9,6 +10,7 @@ set(CXX_H set(CXX_CPP abstractmenu.cpp + abstracteditormenu.cpp abstractaction.cpp abstractwidget.cpp abstractdebugger.cpp diff --git a/src/base/abstracteditormenu.cpp b/src/base/abstracteditormenu.cpp new file mode 100644 index 000000000..3af138e81 --- /dev/null +++ b/src/base/abstracteditormenu.cpp @@ -0,0 +1,85 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "abstracteditormenu.h" + +AbstractEditorMenu::AbstractEditorMenu(QObject *parent) + : QObject(parent) +{ +} + +AbstractEditorMenu::~AbstractEditorMenu() +{ +} + +bool AbstractEditorMenu::initialize(const QVariantHash ¶ms) +{ + auto current = subMenu; + for (AbstractEditorMenu *scene : current) { + if (!scene->initialize(params)) { + subMenu.removeOne(scene); + delete scene; + } + } + + return true; +} + +bool AbstractEditorMenu::create(QMenu *parent) +{ + for (AbstractEditorMenu *scene : subMenu) + scene->create(parent); + return true; +} + +void AbstractEditorMenu::updateState(QMenu *parent) +{ + for (AbstractEditorMenu *scene : subMenu) + scene->updateState(parent); +} + +bool AbstractEditorMenu::triggered(QAction *action) +{ + for (AbstractEditorMenu *scene : subMenu) + if (scene->triggered(action)) + return true; + + return false; +} + +AbstractEditorMenu *AbstractEditorMenu::menu(QAction *action) const +{ + for (AbstractEditorMenu *scene : subMenu) + if (auto from = scene->menu(action)) + return from; + + return nullptr; +} + +bool AbstractEditorMenu::addSubmenu(AbstractEditorMenu *menu) +{ + if (!menu) + return false; + + menu->setParent(this); + subMenu.append(menu); + return true; +} + +void AbstractEditorMenu::removeSubmenu(AbstractEditorMenu *menu) +{ + if (menu && menu->parent() == this) + menu->setParent(nullptr); + + subMenu.removeOne(menu); +} + +void AbstractEditorMenu::setSubmenu(const QList &menus) +{ + //! if these already were subscenes before setting, the caller is responsible for managing their lifecycle + + subMenu = menus; + for (auto scene : menus) + scene->setParent(this); +} diff --git a/src/base/abstracteditormenu.h b/src/base/abstracteditormenu.h new file mode 100644 index 000000000..dbddcaa2e --- /dev/null +++ b/src/base/abstracteditormenu.h @@ -0,0 +1,41 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef ABSTRACTEDITORMENU_H +#define ABSTRACTEDITORMENU_H + +#include + +QT_BEGIN_NAMESPACE +class QMenu; +class QAction; +QT_END_NAMESPACE + +class AbstractEditorMenu : public QObject +{ + Q_OBJECT +public: + explicit AbstractEditorMenu(QObject *parent = nullptr); + virtual ~AbstractEditorMenu(); + virtual QString name() const = 0; + virtual bool initialize(const QVariantHash ¶ms); + virtual bool create(QMenu *parent); + virtual void updateState(QMenu *parent); + virtual bool triggered(QAction *action); + virtual AbstractEditorMenu *menu(QAction *action) const; + virtual bool addSubmenu(AbstractEditorMenu *menu); + virtual void removeSubmenu(AbstractEditorMenu *scene); + inline QList submenu() const + { + return subMenu; + } + +protected: + virtual void setSubmenu(const QList &menus); + +protected: + QList subMenu; +}; + +#endif // ABSTRACTEDITORMENU_H diff --git a/src/plugins/codeeditor/CMakeLists.txt b/src/plugins/codeeditor/CMakeLists.txt index abf5a61fc..07c50f3ff 100644 --- a/src/plugins/codeeditor/CMakeLists.txt +++ b/src/plugins/codeeditor/CMakeLists.txt @@ -2,95 +2,27 @@ cmake_minimum_required(VERSION 3.0.2) project(plugin-codeeditor) -include(${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515.cmake) -include(${CMAKE_SOURCE_DIR}/3rdparty/unioncode-lexilla514.cmake) set(CMAKE_INCLUDE_CURRENT_DIR true) add_definitions(-DLIBRARY_INSTALL_PREFIX="${LIBRARY_INSTALL_PREFIX}") -set(CXX_CPP - mainframe/naveditmainwindow.cpp - mainframe/texteditkeeper.cpp - transceiver/codeeditorreceiver.cpp - codelens/codelenstype.cpp - codelens/codelenstree.cpp - codelens/codelensdelegate.cpp - codelens/codelens.cpp - renamepopup/renamepopup.cpp - textedittabwidget/scintillaeditextern.cpp - textedittabwidget/textedittabwidget.cpp - textedittabwidget/textedittabbar.cpp - textedittabwidget/textedittitlebar.cpp - textedittabwidget/textedit.cpp - textedittabwidget/texteditsplitter.cpp - textedittabwidget/style/lspclientkeeper.cpp - textedittabwidget/style/stylecolor.cpp - textedittabwidget/style/stylesci.cpp - textedittabwidget/style/stylelsp.cpp - textedittabwidget/style/stylejsonfile.cpp - textedittabwidget/language/java/texteditjava.cpp - textedittabwidget/language/java/stylelspjava.cpp - textedittabwidget/language/java/stylescijava.cpp - textedittabwidget/language/cpp/texteditcpp.cpp - textedittabwidget/language/cpp/stylelspcpp.cpp - textedittabwidget/language/cpp/stylescicpp.cpp - textedittabwidget/language/cmake/texteditcmake.cpp - textedittabwidget/language/cmake/stylelspcmake.cpp - textedittabwidget/language/cmake/stylescicmake.cpp - textedittabwidget/language/python/texteditpython.cpp - textedittabwidget/language/python/stylelsppython.cpp - textedittabwidget/language/python/stylescipython.cpp - textedittabwidget/language/js/texteditjs.cpp - textedittabwidget/language/js/stylelspjs.cpp - textedittabwidget/language/js/stylescijs.cpp - codeeditor.cpp - codeeditor.json - ) +FILE(GLOB_RECURSE PROJECT_SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/*/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/*.json" +) -set(CXX_H - mainframe/naveditmainwindow.h - mainframe/texteditkeeper.h - transceiver/codeeditorreceiver.h - codelens/codelenstype.h - codelens/codelenstree.h - codelens/codelensdelegate.h - codelens/codelens.h - renamepopup/renamepopup.h - textedittabwidget/scintillaeditextern.h - textedittabwidget/textedittabwidget.h - textedittabwidget/textedittitlebar.h - textedittabwidget/textedittabbar.h - textedittabwidget/textedit.h - textedittabwidget/texteditsplitter.h - textedittabwidget/style/stylecolor.h - textedittabwidget/style/stylesci.h - textedittabwidget/style/stylelsp.h - textedittabwidget/style/stylejsonfile.h - textedittabwidget/style/lspclientkeeper.h - textedittabwidget/language/java/texteditjava.h - textedittabwidget/language/java/stylelspjava.h - textedittabwidget/language/java/stylescijava.h - textedittabwidget/language/cpp/texteditcpp.h - textedittabwidget/language/cpp/stylelspcpp.h - textedittabwidget/language/cpp/stylescicpp.h - textedittabwidget/language/cmake/texteditcmake.h - textedittabwidget/language/cmake/stylelspcmake.h - textedittabwidget/language/cmake/stylescicmake.h - textedittabwidget/language/python/texteditpython.h - textedittabwidget/language/python/stylelsppython.h - textedittabwidget/language/python/stylescipython.h - textedittabwidget/language/js/texteditjs.h - textedittabwidget/language/js/stylelspjs.h - textedittabwidget/language/js/stylescijs.h - codeeditor.h - ) +set (QRC_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/codeeditor.qrc" +) add_library(${PROJECT_NAME} SHARED - ${CXX_CPP} - ${CXX_H} - codeeditor.qrc - ) + ${PROJECT_SOURCES} + ${QRC_FILES} +) target_link_libraries(${PROJECT_NAME} framework @@ -100,6 +32,7 @@ target_link_libraries(${PROJECT_NAME} ${QtUseModules} ${PkgUserModules} ${DtkWidget_LIBRARIES} - ) + qscintilla2_qt5 +) install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH}) diff --git a/src/plugins/codeeditor/codeeditor.cpp b/src/plugins/codeeditor/codeeditor.cpp index 81421da75..a829d51da 100644 --- a/src/plugins/codeeditor/codeeditor.cpp +++ b/src/plugins/codeeditor/codeeditor.cpp @@ -4,16 +4,10 @@ #include "codeeditor.h" #include "codelens/codelens.h" -#include "textedittabwidget/textedittabwidget.h" -#include "textedittabwidget/language/cpp/texteditcpp.h" -#include "textedittabwidget/language/cmake/texteditcmake.h" -#include "textedittabwidget/language/java/texteditjava.h" -#include "textedittabwidget/language/python/texteditpython.h" -#include "textedittabwidget/language/js/texteditjs.h" -#include "textedittabwidget/texteditsplitter.h" #include "mainframe/naveditmainwindow.h" #include "mainframe/texteditkeeper.h" #include "transceiver/codeeditorreceiver.h" +#include "gui/workspacewidget.h" #include "base/abstractmenu.h" #include "base/abstractaction.h" @@ -36,12 +30,6 @@ const QString PRINT = CodeEditor::tr("Print"); void CodeEditor::initialize() { qInfo() << __FUNCTION__; - TextEditKeeper::impl(""); - TextEditKeeper::impl(); - TextEditKeeper::impl(); - TextEditKeeper::impl(); - TextEditKeeper::impl(); - TextEditKeeper::impl(); QString errStr; auto &ctx = dpfInstance.serviceContext(); @@ -57,11 +45,11 @@ bool CodeEditor::start() auto &ctx = dpfInstance.serviceContext(); WindowService *windowService = ctx.service(WindowService::name()); - TextEditSplitter *editManager = TextEditSplitter::instance(); + auto workspaceWidget = new WorkspaceWidget; using namespace std::placeholders; if (windowService) { NavEditMainWindow *navEditWindow = NavEditMainWindow::instance(); - navEditWindow->setWidgetEdit(new AbstractWidget(editManager)); + navEditWindow->setWidgetEdit(new AbstractWidget(workspaceWidget)); windowService->addCentralNavigation(MWNA_EDIT, new AbstractWidget(navEditWindow)); @@ -118,29 +106,29 @@ bool CodeEditor::start() qCritical() << errStr; } EditorService *editorService = dpfGetService(EditorService); - if (editorService) { - if (!editorService->getSelectedText) { - editorService->getSelectedText = std::bind(&TextEditSplitter::getSelectedText, editManager); - } - if (!editorService->getCursorBeforeText) { - editorService->getCursorBeforeText = std::bind(&TextEditSplitter::getCursorBeforeText, editManager); - } - if (!editorService->getCursorAfterText) { - editorService->getCursorAfterText = std::bind(&TextEditSplitter::getCursorAfterText, editManager); - } - if (!editorService->replaceSelectedText) { - editorService->replaceSelectedText = std::bind(&TextEditSplitter::replaceSelectedText, editManager, _1); - } - if (!editorService->showTips) { - editorService->showTips = std::bind(&TextEditSplitter::showTips, editManager, _1); - } - if (!editorService->insertText) { - editorService->insertText = std::bind(&TextEditSplitter::insertText, editManager, _1); - } - if (!editorService->undo) { - editorService->undo = std::bind(&TextEditSplitter::undo, editManager); - } - } + // if (editorService) { + // if (!editorService->getSelectedText) { + // editorService->getSelectedText = std::bind(&TextEditSplitter::getSelectedText, editManager); + // } + // if (!editorService->getCursorBeforeText) { + // editorService->getCursorBeforeText = std::bind(&TextEditSplitter::getCursorBeforeText, editManager); + // } + // if (!editorService->getCursorAfterText) { + // editorService->getCursorAfterText = std::bind(&TextEditSplitter::getCursorAfterText, editManager); + // } + // if (!editorService->replaceSelectedText) { + // editorService->replaceSelectedText = std::bind(&TextEditSplitter::replaceSelectedText, editManager, _1); + // } + // if (!editorService->showTips) { + // editorService->showTips = std::bind(&TextEditSplitter::showTips, editManager, _1); + // } + // if (!editorService->insertText) { + // editorService->insertText = std::bind(&TextEditSplitter::insertText, editManager, _1); + // } + // if (!editorService->undo) { + // editorService->undo = std::bind(&TextEditSplitter::undo, editManager); + // } + // } return true; } @@ -150,4 +138,3 @@ dpf::Plugin::ShutdownFlag CodeEditor::stop() qInfo() << __FUNCTION__; return Sync; } - diff --git a/src/plugins/codeeditor/codeeditor.h b/src/plugins/codeeditor/codeeditor.h index fe39d7d7c..8ef2f77ac 100644 --- a/src/plugins/codeeditor/codeeditor.h +++ b/src/plugins/codeeditor/codeeditor.h @@ -20,4 +20,4 @@ class CodeEditor : public dpf::Plugin virtual dpf::Plugin::ShutdownFlag stop() override; }; -#endif // COREPLUGIN_H +#endif // COREPLUGIN_H diff --git a/src/plugins/codeeditor/codeeditor.qrc b/src/plugins/codeeditor/codeeditor.qrc index 5594d2c0a..43647c101 100644 --- a/src/plugins/codeeditor/codeeditor.qrc +++ b/src/plugins/codeeditor/codeeditor.qrc @@ -3,8 +3,8 @@ texts/edit-file_16px.svg texts/edit-tree_16px.svg texts/edit-project_16px.svg - texts/edit-hSplit_16px.svg texts/edit-vSplit_16px.svg + texts/edit-hSplit_16px.svg texts/edit-closeBtn_16px.svg diff --git a/src/plugins/codeeditor/codelens/codelenstree.cpp b/src/plugins/codeeditor/codelens/codelenstree.cpp index fb5bddff6..9ccd5d601 100644 --- a/src/plugins/codeeditor/codelens/codelenstree.cpp +++ b/src/plugins/codeeditor/codelens/codelenstree.cpp @@ -5,7 +5,6 @@ #include "codelenstree.h" #include "framework.h" #include "codelensdelegate.h" -#include "textedittabwidget/style/stylecolor.h" #include #include @@ -79,7 +78,7 @@ void CodeLensTree::setData(const lsp::References &refs) } QString codeText = readLine(file, range.start.line); QString displayText = codeDataFormat(range.start.line, codeText); - QColor hColor = StyleColor::Table::get()->Yellow; + QColor hColor(Qt::yellow); QStandardItem *codeChild = new QStandardItem(displayText); codeChild->setData(QVariant::fromValue(range), CodeLensItemRole::Range); codeChild->setData(QVariant::fromValue(codeText), CodeLensItemRole::CodeText); diff --git a/src/plugins/codeeditor/gui/private/tabbar_p.h b/src/plugins/codeeditor/gui/private/tabbar_p.h new file mode 100644 index 000000000..d4b7b2d84 --- /dev/null +++ b/src/plugins/codeeditor/gui/private/tabbar_p.h @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TABBAR_P_H +#define TABBAR_P_H + +#include "gui/tabbar.h" + +#include +#include + +DWIDGET_USE_NAMESPACE + +class TabBarPrivate : public QObject +{ + Q_OBJECT +public: + explicit TabBarPrivate(TabBar *qq); + + void initUI(); + void initConnection(); + +public slots: + void onCurrentTabChanged(int index); + void onTabColseRequested(int index); + +public: + TabBar *q; + + DTabBar *tabBar { nullptr }; + DToolButton *hSplitBtn { nullptr }; + DToolButton *vSplitBtn { nullptr }; + DToolButton *closeBtn { nullptr }; +}; + +#endif // TABBAR_P_H diff --git a/src/plugins/codeeditor/gui/private/tabwidget_p.h b/src/plugins/codeeditor/gui/private/tabwidget_p.h new file mode 100644 index 000000000..33f448576 --- /dev/null +++ b/src/plugins/codeeditor/gui/private/tabwidget_p.h @@ -0,0 +1,41 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TABWIDGET_P_H +#define TABWIDGET_P_H + +#include "gui/tabwidget.h" +#include "gui/tabbar.h" +#include "manager/texteditormanager.h" + +#include + +class TabWidgetPrivate : public QObject +{ + Q_OBJECT +public: + explicit TabWidgetPrivate(TabWidget *qq); + + void initUI(); + void initConnection(); + + TextEditor *currentTextEditor() const; + void changeFocusProxy(); + +public: + void onTabSwitched(const QString &fileName); + void onTabClosed(const QString &fileName); + void onSpliterClicked(Qt::Orientation ori); + +public: + TabWidget *q; + + QStackedLayout *editorLayout { nullptr }; + TabBar *tabBar { nullptr }; + TextEditorManager *editorMng { nullptr }; + + QHash editorIndexHash; +}; + +#endif // TABWIDGET_P_H diff --git a/src/plugins/codeeditor/gui/private/texteditor_p.cpp b/src/plugins/codeeditor/gui/private/texteditor_p.cpp new file mode 100644 index 000000000..aba33f7ee --- /dev/null +++ b/src/plugins/codeeditor/gui/private/texteditor_p.cpp @@ -0,0 +1,198 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "texteditor_p.h" +#include "utils/editorutils.h" + +#include + +#include + +#include + +static constexpr int MARGIN_SYMBOLE_DEFAULT_WIDTH = 14; +static constexpr int MARGIN_FOLDER_DEFAULT_WIDTH = 14; +static constexpr int MARGIN_CHANGEBAR_DEFAULT_WIDTH = 3; + +static constexpr int INDENTATION_DEFAULT_WIDTH = 4; + +DGUI_USE_NAMESPACE + +TextEditorPrivate::TextEditorPrivate(TextEditor *qq) + : q(qq) +{ + init(); +} + +void TextEditorPrivate::init() +{ + initMargins(); + updateColorTheme(); + updateSettings(); +} + +void TextEditorPrivate::initMargins() +{ + // Display line number + q->setMarginLineNumbers(LineNumberMargin, true); + setMarginVisible(LineNumberMargin, true); + + // folding + q->setFolding(TextEditor::BoxedTreeFoldStyle, FoldingMargin); + + // Set the margin symbol + q->setMarginType(SymbolMargin, TextEditor::SymbolMargin); + setMarginVisible(SymbolMargin, true); + q->setMarginSensitivity(SymbolMargin, true); + q->setMarginMarkerMask(SymbolMargin, BreakpointMask | BreakpointDisabledMask | BookmarkMask | RuntimeMask | WarningMask | ErrorMask); + + // TODO: 使用图片资源代替? + q->markerDefine(TextEditor::Circle, BreakpointSymbol); + q->setMarkerBackgroundColor(QColor(Qt::red), BreakpointSymbol); + + q->markerDefine(TextEditor::RightTriangle, BookmarkSymbol); + q->setMarkerBackgroundColor(QColor(Qt::red), BookmarkSymbol); +} + +void TextEditorPrivate::updateColorTheme() +{ + if (DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::DarkType) { + // editor + q->setPaper(QColor("#2b2b2b")); + q->setCaretForegroundColor(QColor("#FFFFFF")); + q->setCaretLineBackgroundColor(QColor("#444444")); + + // margins + q->setMarginsBackgroundColor(QColor("#000000")); + q->setMarginsForegroundColor(QColor("#F8F8F8")); + } else { + // editor + q->setPaper(QColor("#F8F8F8")); + q->setCaretForegroundColor(QColor("#000000")); + q->setCaretLineBackgroundColor(QColor("#E8E8FF")); + + // margins + q->setMarginsBackgroundColor(QColor("#FFFFFF")); + q->setMarginsForegroundColor(QColor("#b2b2b2")); + } +} + +void TextEditorPrivate::updateSettings() +{ + // Indentation + q->setIndentationWidth(INDENTATION_DEFAULT_WIDTH); + q->setAutoIndent(true); + q->setIndentationsUseTabs(false); + + // Highlight the current line + q->setCaretLineVisible(true); + + // Opening brace matching + q->setBraceMatching(TextEditor::SloppyBraceMatch); + + q->setEolMode(TextEditor::EolUnix); + q->setScrollWidth(1); + q->setScrollWidthTracking(true); +} + +void TextEditorPrivate::loadDefaultLexer() +{ + if (fileName.isEmpty()) + return; + + if (auto lexer = EditorUtils::defaultLexer(fileName)) { + lexer->setParent(q); + q->setLexer(lexer); + setMarginVisible(FoldingMargin, true); + } else { + setMarginVisible(FoldingMargin, false); + } +} + +int TextEditorPrivate::cursorPosition() const +{ + return static_cast(q->SendScintilla(TextEditor::SCI_GETCURRENTPOS)); +} + +int TextEditorPrivate::marginsWidth() +{ + int width = 0; + auto count = q->margins(); + for (int i = 0; i < count; ++i) { + width += q->marginWidth(i); + } + + return width; +} + +void TextEditorPrivate::setMarginVisible(TextEditorPrivate::MarginType type, bool visible) +{ + switch (type) { + case LineNumberMargin: + updateLineNumberMargin(visible); + break; + case SymbolMargin: + q->setMarginWidth(type, visible ? MARGIN_SYMBOLE_DEFAULT_WIDTH : 0); + break; + case FoldingMargin: + q->setMarginWidth(type, visible ? MARGIN_FOLDER_DEFAULT_WIDTH : 0); + break; + case ChangeBarMargin: + q->setMarginWidth(type, visible ? MARGIN_CHANGEBAR_DEFAULT_WIDTH : 0); + break; + } +} + +void TextEditorPrivate::updateLineNumberMargin(bool visible) +{ + if (!visible) { + q->setMarginWidth(LineNumberMargin, 0); + return; + } + + q->updateLineNumberWidth(false); +} + +QVariantHash TextEditorPrivate::getMenuParams(QContextMenuEvent *event) +{ + QVariantHash params; + params.insert("id", q->id()); + params.insert("fileName", fileName); + params.insert("selectedText", q->selectedText()); + + int line = 0, index = 0; + q->getCursorPosition(&line, &index); + params.insert("cursorLine", line); + params.insert("cursorIndex", index); + + return params; +} + +void TextEditorPrivate::gotoNextMark(MarginMask mask) +{ + int line = q->currentLineNumber() + 1; + int newLine = q->markerFindNext(line, mask); + + if (-1 == newLine) { + line = 0; + newLine = q->markerFindNext(line, mask); + } + + if (-1 != newLine) + q->gotoLine(newLine); +} + +void TextEditorPrivate::gotoPreviousMark(MarginMask mask) +{ + int line = q->currentLineNumber() - 1; + int newLine = q->markerFindPrevious(line, mask); + + if (-1 == newLine) { + line = q->currentLineNumber(); + newLine = q->markerFindPrevious(line, mask); + } + + if (-1 != newLine) + q->gotoLine(newLine); +} diff --git a/src/plugins/codeeditor/gui/private/texteditor_p.h b/src/plugins/codeeditor/gui/private/texteditor_p.h new file mode 100644 index 000000000..b7d5c2ca2 --- /dev/null +++ b/src/plugins/codeeditor/gui/private/texteditor_p.h @@ -0,0 +1,65 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITOR_P_H +#define TEXTEDITOR_P_H + +#include "gui/texteditor.h" + +class TextEditorPrivate +{ +public: + enum MarkSymbol { + BreakpointSymbol = 0, + RuntimeSymbol, + BookmarkSymbol + }; + + enum MarginType { + LineNumberMargin = 0, + SymbolMargin, + ChangeBarMargin, + FoldingMargin + }; + + enum MarginMask { + BreakpointMask = 1, + BreakpointDisabledMask = 1 << 1, + BookmarkMask = 1 << 2, + RuntimeMask = 1 << 3, + WarningMask = 1 << 4, + ErrorMask = 1 << 5, + + ChangeUnsavedMask = 1 << 6, + ChangeSavedMask = 1 << 7 + }; + + explicit TextEditorPrivate(TextEditor *qq); + + void init(); + void initMargins(); + void updateColorTheme(); + void updateSettings(); + + void loadDefaultLexer(); + + int cursorPosition() const; + int marginsWidth(); + void setMarginVisible(MarginType type, bool visible); + void updateLineNumberMargin(bool visible); + + QVariantHash getMenuParams(QContextMenuEvent *event); + + void gotoNextMark(MarginMask mask); + void gotoPreviousMark(MarginMask mask); + +public: + TextEditor *q { nullptr }; + + QString fileName; + int preFirstLineNum { 0 }; + int lastCursorPos { 0 }; +}; + +#endif // TEXTEDITOR_P_H diff --git a/src/plugins/codeeditor/gui/private/workspacewidget_p.h b/src/plugins/codeeditor/gui/private/workspacewidget_p.h new file mode 100644 index 000000000..0ed717863 --- /dev/null +++ b/src/plugins/codeeditor/gui/private/workspacewidget_p.h @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef WORKSPACEWIDGET_P_H +#define WORKSPACEWIDGET_P_H + +#include "gui/workspacewidget.h" +#include "gui/tabwidget.h" + +class WorkspaceWidgetPrivate : public QObject +{ + Q_OBJECT +public: + explicit WorkspaceWidgetPrivate(WorkspaceWidget *qq); + + void initUI(); + void initConnection(); + void connectTabWidgetSignals(TabWidget *tabWidget); + + TabWidget *currentTabWidget() const; + void doSplit(QSplitter *spliter, int index, const QString &fileName, int pos, int scroll); + +public: + void onSplitRequested(Qt::Orientation ori, const QString &fileName); + void onCloseRequested(); + void onOpenFileRequested(const QString &fileName); + void onFocusChanged(QWidget *old, QWidget *now); + +public: + WorkspaceWidget *q; + + TabWidget *focusTabWidget { nullptr }; + QList tabWidgetList; +}; + +#endif // WORKSPACEWIDGET_P_H diff --git a/src/plugins/codeeditor/gui/tabbar.cpp b/src/plugins/codeeditor/gui/tabbar.cpp new file mode 100644 index 000000000..0b983e711 --- /dev/null +++ b/src/plugins/codeeditor/gui/tabbar.cpp @@ -0,0 +1,200 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "tabbar.h" +#include "private/tabbar_p.h" + +#include "common/common.h" +#include "services/editor/editorservice.h" + +#include +#include + +TabBarPrivate::TabBarPrivate(TabBar *qq) + : QObject(qq), + q(qq) +{ +} + +void TabBarPrivate::initUI() +{ + tabBar = new DTabBar(q); + tabBar->setVisibleAddButton(false); + tabBar->setTabsClosable(true); + tabBar->setEnabledEmbedStyle(true); + hSplitBtn = new DToolButton(q); + hSplitBtn->setIcon(QIcon::fromTheme("edit-hSplit")); + vSplitBtn = new DToolButton(q); + vSplitBtn->setIcon(QIcon::fromTheme("edit-vSplit")); + closeBtn = new DToolButton(q); + closeBtn->setIcon(QIcon::fromTheme("edit-closeBtn")); + + QHBoxLayout *mainLayout = new QHBoxLayout(q); + mainLayout->setContentsMargins(0, 0, 0, 0); + mainLayout->addWidget(tabBar, 1, Qt::AlignLeft); + mainLayout->addWidget(hSplitBtn, 0, Qt::AlignRight); + mainLayout->addWidget(vSplitBtn, 0, Qt::AlignRight); + mainLayout->addWidget(closeBtn, 0, Qt::AlignRight); +} + +void TabBarPrivate::initConnection() +{ + connect(tabBar, &DTabBar::currentChanged, this, &TabBarPrivate::onCurrentTabChanged); + connect(tabBar, &DTabBar::tabCloseRequested, this, &TabBarPrivate::onTabColseRequested); + connect(hSplitBtn, &DToolButton::clicked, this, [this] { emit q->spliterClicked(Qt::Horizontal); }); + connect(vSplitBtn, &DToolButton::clicked, this, [this] { emit q->spliterClicked(Qt::Vertical); }); + connect(closeBtn, &DToolButton::clicked, q, &TabBar::closeRequested); +} + +void TabBarPrivate::onCurrentTabChanged(int index) +{ + const auto &file = q->indexFile(index); + emit q->tabSwitched(file); + editor.switchedFile(file); +} + +void TabBarPrivate::onTabColseRequested(int index) +{ + const auto &file = q->indexFile(index); + q->removeTab(file); +} + +TabBar::TabBar(QWidget *parent) + : QWidget(parent), + d(new TabBarPrivate(this)) +{ + d->initUI(); + d->initConnection(); +} + +void TabBar::setFileName(const QString &fileName) +{ + if (fileName.isEmpty() || !QFile::exists(fileName)) + return; + + int index = indexOf(fileName); + if (-1 != index) { + d->tabBar->setCurrentIndex(index); + return; + } + + QFileInfo info(fileName); + index = d->tabBar->addTab(info.fileName()); + d->tabBar->setTabToolTip(index, fileName); + d->tabBar->setCurrentIndex(index); +} + +int TabBar::indexOf(const QString &fileName) +{ + int index = -1; + for (int i = 0; i < d->tabBar->count(); ++i) { + if (d->tabBar->tabToolTip(i) != fileName) + continue; + + index = i; + break; + } + + return index; +} + +QString TabBar::indexFile(int index) const +{ + return d->tabBar->tabToolTip(index); +} + +int TabBar::tabCount() const +{ + return d->tabBar->count(); +} + +int TabBar::currentIndex() const +{ + return d->tabBar->currentIndex(); +} + +QString TabBar::currentFileName() const +{ + return indexFile(currentIndex()); +} + +void TabBar::setCurrentIndex(int index) +{ + d->tabBar->setCurrentIndex(index); +} + +void TabBar::switchTab(const QString &fileName) +{ + int index = indexOf(fileName); + if (-1 != index) + d->tabBar->setCurrentIndex(index); +} + +void TabBar::removeTab(const QString &fileName) +{ + int index = indexOf(fileName); + if (-1 == index) + return; + + QString text = d->tabBar->tabText(index); + QFileInfo info(fileName); + if (info.exists() && text.length() > 0 && text.at(0) == "*") { + int ret = QMessageBox::question(this, QMessageBox::tr("Save Changes"), + QMessageBox::tr("The file has unsaved changes, will save?"), + QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, + QMessageBox::Cancel); + if (QMessageBox::Yes != ret && QMessageBox::No != ret) { + return; + } else if (QMessageBox::Yes == ret) { + emit saveFileRequested(fileName); + } + } + + emit tabClosed(fileName); + editor.closedFile(fileName); + d->tabBar->removeTab(index); +} + +void TabBar::setCloseButtonVisible(bool visible) +{ + d->closeBtn->setVisible(visible); +} + +void TabBar::setSplitButtonVisible(bool visible) +{ + d->hSplitBtn->setVisible(visible); + d->vSplitBtn->setVisible(visible); +} + +void TabBar::closeTab(int index) +{ + d->onTabColseRequested(index); +} + +void TabBar::onFileChanged(const QString &fileName) +{ + int index = indexOf(fileName); + if (-1 == index) + return; + + QString changedFileName = "*" + QFileInfo(fileName).fileName(); + if (d->tabBar->tabText(index) == changedFileName) + return; + + d->tabBar->setTabText(index, "*" + d->tabBar->tabText(index)); +} + +void TabBar::onFileSaved(const QString &fileName) +{ + int index = indexOf(fileName); + if (index == -1) + return; + + auto text = d->tabBar->tabText(index); + if (QFileInfo(fileName).fileName() == text) + return; + + text = text.remove(0, 1); + d->tabBar->setTabText(index, text); +} diff --git a/src/plugins/codeeditor/gui/tabbar.h b/src/plugins/codeeditor/gui/tabbar.h new file mode 100644 index 000000000..bdaf964b7 --- /dev/null +++ b/src/plugins/codeeditor/gui/tabbar.h @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TABBAR_H +#define TABBAR_H + +#include + +class TabBarPrivate; +class TabBar : public QWidget +{ + Q_OBJECT +public: + explicit TabBar(QWidget *parent = nullptr); + + void setFileName(const QString &fileName); + int indexOf(const QString &fileName); + QString indexFile(int index) const; + int tabCount() const; + int currentIndex() const; + QString currentFileName() const; + void setCurrentIndex(int index); + + void switchTab(const QString &fileName); + void removeTab(const QString &fileName); + + void setCloseButtonVisible(bool visible); + void setSplitButtonVisible(bool visible); + +public slots: + void closeTab(int index); + void onFileChanged(const QString &fileName); + void onFileSaved(const QString &fileName); + +signals: + void spliterClicked(Qt::Orientation ori); + void closeRequested(); + void saveFileRequested(const QString &fileName); + void tabClosed(const QString &fileName); + void tabSwitched(const QString &fileName); + +private: + QSharedPointer d { nullptr }; +}; + +#endif // TABBAR_H diff --git a/src/plugins/codeeditor/gui/tabwidget.cpp b/src/plugins/codeeditor/gui/tabwidget.cpp new file mode 100644 index 000000000..a852cfeee --- /dev/null +++ b/src/plugins/codeeditor/gui/tabwidget.cpp @@ -0,0 +1,259 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "tabwidget.h" +#include "private/tabwidget_p.h" +#include "common/common.h" + +#include +#include +#include +#include +#include + +TabWidgetPrivate::TabWidgetPrivate(TabWidget *qq) + : QObject(qq), + q(qq), + editorMng(new TextEditorManager(this)) +{ +} + +void TabWidgetPrivate::initUI() +{ + q->setFocusPolicy(Qt::ClickFocus); + + QVBoxLayout *mainLayout = new QVBoxLayout(q); + mainLayout->setSpacing(0); + mainLayout->setMargin(0); + mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); + + // TODO: space page + QLabel *spaceWidget = new QLabel(tr("This is a blank page"), q); + spaceWidget->setAlignment(Qt::AlignCenter); + spaceWidget->setBackgroundRole(QPalette::Dark); + + editorLayout = new QStackedLayout(); + editorLayout->setSpacing(0); + editorLayout->setMargin(0); + editorLayout->addWidget(spaceWidget); + + tabBar = new TabBar(q); + mainLayout->addWidget(tabBar, 0, Qt::AlignTop); + mainLayout->addLayout(editorLayout); +} + +void TabWidgetPrivate::initConnection() +{ + connect(tabBar, &TabBar::tabSwitched, this, &TabWidgetPrivate::onTabSwitched); + connect(tabBar, &TabBar::tabClosed, this, &TabWidgetPrivate::onTabClosed); + connect(tabBar, &TabBar::spliterClicked, this, &TabWidgetPrivate::onSpliterClicked); + connect(tabBar, &TabBar::closeRequested, q, &TabWidget::closeRequested); +} + +TextEditor *TabWidgetPrivate::currentTextEditor() const +{ + return qobject_cast(editorLayout->currentWidget()); +} + +void TabWidgetPrivate::changeFocusProxy() +{ + auto editor = currentTextEditor(); + q->setFocusProxy(editor); + tabBar->setFocusProxy(editor); + + // need to set the proxy first, + // otherwise `setFocus` will not work + q->setFocus(); +} + +void TabWidgetPrivate::onTabSwitched(const QString &fileName) +{ + if (!editorIndexHash.contains(fileName)) + return; + + editorLayout->setCurrentIndex(editorIndexHash[fileName]); + changeFocusProxy(); +} + +void TabWidgetPrivate::onTabClosed(const QString &fileName) +{ + auto editor = editorMng->findEditor(fileName); + if (!editor) + return; + + editorIndexHash.remove(fileName); + editorLayout->removeWidget(editor); + changeFocusProxy(); + + emit editor->fileClosed(fileName); + editor->deleteLater(); + + if (editorIndexHash.isEmpty()) { + q->setSplitButtonVisible(false); + emit q->closeRequested(); + } +} + +void TabWidgetPrivate::onSpliterClicked(Qt::Orientation ori) +{ + const auto &fileName = tabBar->currentFileName(); + emit q->splitRequested(ori, fileName); +} + +TabWidget::TabWidget(QWidget *parent) + : QWidget(parent), + d(new TabWidgetPrivate(this)) +{ + d->initUI(); + d->initConnection(); +} + +void TabWidget::setCloseButtonVisible(bool visible) +{ + d->tabBar->setCloseButtonVisible(visible); +} + +void TabWidget::setSplitButtonVisible(bool visible) +{ + d->tabBar->setSplitButtonVisible(visible); +} + +QString TabWidget::selectedText() const +{ + auto editor = d->currentTextEditor(); + if (!editor) + return ""; + + return d->currentTextEditor()->selectedText(); +} + +QString TabWidget::cursorBeforeText() const +{ + auto editor = d->currentTextEditor(); + if (!editor) + return ""; + + return editor->cursorBeforeText(); +} + +QString TabWidget::cursorBehindText() const +{ + auto editor = d->currentTextEditor(); + if (!editor) + return ""; + + return editor->cursorBehindText(); +} + +void TabWidget::replaceSelectedText(const QString &text) +{ + auto editor = d->currentTextEditor(); + if (!editor) + return; + + return editor->replaceSelectedText(text); +} + +void TabWidget::setEditorCursorPosition(int pos) +{ + auto editor = d->currentTextEditor(); + if (!editor) + return; + + editor->gotoPosition(pos); +} + +int TabWidget::editorCursorPosition() +{ + auto editor = d->currentTextEditor(); + if (!editor) + return 0; + + return editor->cursorPosition(); +} + +void TabWidget::setEditorScrollValue(int value) +{ + auto editor = d->currentTextEditor(); + if (!editor) + return; + + editor->verticalScrollBar()->setValue(value); +} + +int TabWidget::editorScrollValue() +{ + auto editor = d->currentTextEditor(); + if (!editor) + return 0; + + return editor->verticalScrollBar()->value(); +} + +void TabWidget::openFile(const QString &fileName) +{ + if (!QFile::exists(fileName)) + return; + + if (d->editorMng->findEditor(fileName)) { + d->tabBar->switchTab(fileName); + return; + } + + // add file monitor + Inotify::globalInstance()->addPath(fileName); + + d->tabBar->setFileName(fileName); + TextEditor *editor = d->editorMng->createEditor(this, fileName); + editor->setCursorPosition(0, 0); + connect(editor, &TextEditor::fileSaved, d->tabBar, &TabBar::onFileSaved); + connect(editor, &TextEditor::textChanged, d->tabBar, + [this, fileName] { + d->tabBar->onFileChanged(fileName); + }, + Qt::UniqueConnection); + + int index = d->editorLayout->addWidget(editor); + d->editorLayout->setCurrentIndex(index); + d->changeFocusProxy(); + + if (d->editorIndexHash.isEmpty()) + setSplitButtonVisible(true); + d->editorIndexHash.insert(fileName, index); +} + +void TabWidget::keyPressEvent(QKeyEvent *event) +{ + QWidget::keyPressEvent(event); +} + +void TabWidget::focusInEvent(QFocusEvent *event) +{ + QWidget::focusInEvent(event); +} + +void TabWidget::focusOutEvent(QFocusEvent *event) +{ + QWidget::focusOutEvent(event); +} + +void TabWidget::dragEnterEvent(QDragEnterEvent *event) +{ + if (event->mimeData()->hasUrls()) { + event->acceptProposedAction(); + } else { + event->ignore(); + } +} + +void TabWidget::dropEvent(QDropEvent *event) +{ + const QMimeData *mimeData = event->mimeData(); + if (mimeData->hasUrls()) { + const auto &urlList = mimeData->urls(); + const auto &fileName = urlList.at(0).toLocalFile(); + if (!fileName.isEmpty()) + openFile(fileName); + } +} diff --git a/src/plugins/codeeditor/gui/tabwidget.h b/src/plugins/codeeditor/gui/tabwidget.h new file mode 100644 index 000000000..cb0717424 --- /dev/null +++ b/src/plugins/codeeditor/gui/tabwidget.h @@ -0,0 +1,50 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TABWIDGET_H +#define TABWIDGET_H + +#include +#include + +class TabWidgetPrivate; +class TabWidget : public QWidget +{ + Q_OBJECT +public: + explicit TabWidget(QWidget *parent = nullptr); + + void setCloseButtonVisible(bool visible); + void setSplitButtonVisible(bool visible); + + QString selectedText() const; + QString cursorBeforeText() const; + QString cursorBehindText() const; + void replaceSelectedText(const QString &text); + + void setEditorCursorPosition(int pos); + int editorCursorPosition(); + void setEditorScrollValue(int value); + int editorScrollValue(); + +public slots: + void openFile(const QString &fileName); + +signals: + void closeRequested(); + void splitRequested(Qt::Orientation ori, const QString &fileName); + +protected: + virtual void keyPressEvent(QKeyEvent *event) override; + virtual void focusInEvent(QFocusEvent *event) override; + virtual void focusOutEvent(QFocusEvent *event) override; + virtual void dragEnterEvent(QDragEnterEvent *event) override; + virtual void dropEvent(QDropEvent *event) override; + +private: + std::once_flag flag; + QSharedPointer d { nullptr }; +}; + +#endif // TABWIDGET_H diff --git a/src/plugins/codeeditor/gui/texteditor.cpp b/src/plugins/codeeditor/gui/texteditor.cpp new file mode 100644 index 000000000..f100b239c --- /dev/null +++ b/src/plugins/codeeditor/gui/texteditor.cpp @@ -0,0 +1,309 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "texteditor.h" +#include "private/texteditor_p.h" +#include "menu/texteditormarginmenu.h" +#include "menu/texteditormenu.h" +#include "utils/editorutils.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +TextEditor::TextEditor(QWidget *parent) + : QsciScintilla(parent), + d(new TextEditorPrivate(this)) +{ + horizontalScrollBar()->setVisible(false); + init(); +} + +TextEditor::~TextEditor() +{ +} + +void TextEditor::init() +{ + connect(this, &TextEditor::marginClicked, this, &TextEditor::onMarginClicked); + connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &TextEditor::onScrollValueChanged); + connect(this, &TextEditor::cursorPositionChanged, this, &TextEditor::onCursorPositionChanged); +} + +void TextEditor::setFile(const QString &fileName) +{ + if (d->fileName == fileName) + return; + + d->fileName = fileName; + QString text; + QFile file(d->fileName); + if (file.open(QFile::OpenModeFlag::ReadOnly)) { + text = file.readAll(); + file.close(); + } + + setText(text.toUtf8()); + d->loadDefaultLexer(); +} + +QString TextEditor::getFile() const +{ + return d->fileName; +} + +QString TextEditor::id() const +{ + static auto id = QUuid::createUuid().toString(QUuid::Id128); + return id; +} + +void TextEditor::save() +{ + if (!isModified()) + return; + + QFile file(d->fileName); + if (!file.exists()) + return; + + if (!file.open(QFile::WriteOnly | QFile::Text | QFile::Truncate)) + return; + + file.write(text().toUtf8()); + file.close(); +} + +void TextEditor::saveAs() +{ + d->fileName = QFileDialog::getSaveFileName(this); + if (d->fileName.isEmpty()) + return; + + QFile file(d->fileName); + if (!file.open(QFile::ReadWrite | QFile::Text | QFile::Truncate)) + return; + + file.write(text().toUtf8()); + file.close(); +} + +void TextEditor::reload() +{ + int line = 0, index = 0; + getCursorPosition(&line, &index); + + QString text; + QFile file(d->fileName); + if (file.open(QFile::OpenModeFlag::ReadOnly)) { + text = file.readAll(); + file.close(); + } + setText(text.toUtf8()); + + setCursorPosition(line, index); +} + +void TextEditor::addBreakpoint(int line) +{ + markerAdd(line, TextEditorPrivate::BreakpointSymbol); +} + +void TextEditor::removeBreakpoint(int line) +{ + markerDelete(line, TextEditorPrivate::BreakpointSymbol); +} + +void TextEditor::setBreakpointEnabled(int line) +{ + Q_UNUSED(line) + // TODO: +} + +bool TextEditor::hasBreakpoint(int line) +{ + int mask = static_cast(markersAtLine(line)); + return (mask & TextEditorPrivate::BreakpointMask); +} + +void TextEditor::gotoNextBreakpoint() +{ + d->gotoNextMark(TextEditorPrivate::BreakpointMask); +} + +void TextEditor::gotoPreviousBreakpoint() +{ + d->gotoPreviousMark(TextEditorPrivate::BreakpointMask); +} + +void TextEditor::clearAllBreakpoints() +{ + markerDeleteAll(TextEditorPrivate::BreakpointSymbol); +} + +void TextEditor::addBookmark(int line) +{ + markerAdd(line, TextEditorPrivate::BookmarkSymbol); +} + +void TextEditor::removeBookmark(int line) +{ + markerDelete(line, TextEditorPrivate::BookmarkSymbol); +} + +bool TextEditor::hasBookmark(int line) +{ + int mask = static_cast(markersAtLine(line)); + return (mask & TextEditorPrivate::BookmarkMask); +} + +void TextEditor::gotoNextBookmark() +{ + d->gotoNextMark(TextEditorPrivate::BookmarkMask); +} + +void TextEditor::gotoPreviousBookmark() +{ + d->gotoPreviousMark(TextEditorPrivate::BookmarkMask); +} + +void TextEditor::clearAllBookmarks() +{ + markerDeleteAll(TextEditorPrivate::BookmarkSymbol); +} + +int TextEditor::currentLineNumber() +{ + auto num = SendScintilla(SCI_LINEFROMPOSITION, SendScintilla(SCI_GETCURRENTPOS)); + return static_cast(num); +} + +void TextEditor::gotoLine(int line) +{ + ensureLineVisible(line); + + SendScintilla(SCI_GOTOLINE, line); +} + +void TextEditor::gotoPosition(int pos) +{ + SendScintilla(SCI_GOTOPOS, pos); + ensureCursorVisible(); +} + +int TextEditor::cursorPosition() +{ + return d->lastCursorPos; +} + +QString TextEditor::cursorBeforeText() const +{ + int pos = d->cursorPosition(); + return text(0, pos); +} + +QString TextEditor::cursorBehindText() const +{ + int pos = d->cursorPosition(); + return text(pos, length()); +} + +void TextEditor::onMarginClicked(int margin, int line, Qt::KeyboardModifiers state) +{ + Q_UNUSED(state) + + if (margin == TextEditorPrivate::SymbolMargin) { + auto modifers = QApplication::queryKeyboardModifiers(); + int mask = static_cast(markersAtLine(line)); + switch (modifers) { + case Qt::ControlModifier: // 按下Ctrl键 + if (mask & TextEditorPrivate::BookmarkMask) + markerDelete(line, TextEditorPrivate::BookmarkSymbol); + else + markerAdd(line, TextEditorPrivate::BookmarkSymbol); // 添加书签 + break; + default: + if (mask & TextEditorPrivate::BreakpointMask) + markerDelete(line, TextEditorPrivate::BreakpointSymbol); + else + markerAdd(line, TextEditorPrivate::BreakpointSymbol); // 添加断点 + } + } +} + +void TextEditor::updateLineNumberWidth(bool isDynamicWidth) +{ + auto linesVisible = SendScintilla(SCI_LINESONSCREEN); + if (!linesVisible) + return; + + int nbDigits = 0; + if (isDynamicWidth) { + auto firstVisibleLineVis = SendScintilla(SCI_GETFIRSTVISIBLELINE); + auto lastVisibleLineVis = linesVisible + firstVisibleLineVis + 1; + auto lastVisibleLineDoc = SendScintilla(SCI_DOCLINEFROMVISIBLE, lastVisibleLineVis); + + nbDigits = EditorUtils::nbDigitsFromNbLines(lastVisibleLineDoc); + nbDigits = nbDigits < 4 ? 4 : nbDigits; + } else { + auto nbLines = SendScintilla(SCI_GETLINECOUNT); + nbDigits = EditorUtils::nbDigitsFromNbLines(nbLines); + nbDigits = nbDigits < 4 ? 4 : nbDigits; + } + + auto pixelWidth = 6 + nbDigits * SendScintilla(SCI_TEXTWIDTH, STYLE_LINENUMBER, reinterpret_cast("8")); + setMarginWidth(TextEditorPrivate::LineNumberMargin, static_cast(pixelWidth)); +} + +void TextEditor::onScrollValueChanged(int value) +{ + // Adjust the line width every 200 units of scroll + if (qAbs(value - d->preFirstLineNum) > 200) { + d->preFirstLineNum = value; + updateLineNumberWidth(true); + } +} + +void TextEditor::onCursorPositionChanged(int line, int index) +{ + Q_UNUSED(line) + + int pos = positionFromLineIndex(line, index); + if (d->lastCursorPos != pos) + d->lastCursorPos = pos; +} + +void TextEditor::contextMenuEvent(QContextMenuEvent *event) +{ + if (!contextMenuNeeded(event->pos().x(), event->pos().y())) + return; + + const auto ¶ms = d->getMenuParams(event); + AbstractEditorMenu *editorMenu { nullptr }; + if (event->pos().x() <= d->marginsWidth()) { + editorMenu = new TextEditorMarginMenu; + } else { + editorMenu = new TextEditorMenu; + } + + if (!editorMenu->initialize(params)) { + delete editorMenu; + return; + } + + QMenu menu(this); + editorMenu->create(&menu); + editorMenu->updateState(&menu); + + if (auto act = menu.exec(QCursor::pos())) + editorMenu->triggered(act); + + delete editorMenu; +} diff --git a/src/plugins/codeeditor/gui/texteditor.h b/src/plugins/codeeditor/gui/texteditor.h new file mode 100644 index 000000000..eb30f4211 --- /dev/null +++ b/src/plugins/codeeditor/gui/texteditor.h @@ -0,0 +1,71 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITOR_H +#define TEXTEDITOR_H + +#include + +class TextEditorPrivate; +class TextEditor : public QsciScintilla +{ + Q_OBJECT +public: + explicit TextEditor(QWidget *parent = nullptr); + ~TextEditor() override; + + virtual void setFile(const QString &fileName); + QString getFile() const; + QString id() const; + + void save(); + void saveAs(); + void reload(); + + // debug + void addBreakpoint(int line); + void removeBreakpoint(int line); + void setBreakpointEnabled(int line); + bool hasBreakpoint(int line); + void gotoNextBreakpoint(); + void gotoPreviousBreakpoint(); + void clearAllBreakpoints(); + + // bookmark + void addBookmark(int line); + void removeBookmark(int line); + bool hasBookmark(int line); + void gotoNextBookmark(); + void gotoPreviousBookmark(); + void clearAllBookmarks(); + + // util + int currentLineNumber(); + void gotoLine(int line); + void gotoPosition(int pos); + int cursorPosition(); + + QString cursorBeforeText() const; + QString cursorBehindText() const; + +public slots: + void onMarginClicked(int margin, int line, Qt::KeyboardModifiers state); + void updateLineNumberWidth(bool isDynamicWidth); + void onScrollValueChanged(int value); + void onCursorPositionChanged(int line, int index); + +signals: + void fileSaved(const QString &fileName); + void fileClosed(const QString &fileName); + +private: + void init(); + +protected: + virtual void contextMenuEvent(QContextMenuEvent *event) override; + +private: + QSharedPointer d { nullptr }; +}; +#endif // TEXTEDITOR_H diff --git a/src/plugins/codeeditor/gui/workspacewidget.cpp b/src/plugins/codeeditor/gui/workspacewidget.cpp new file mode 100644 index 000000000..35e9c42f0 --- /dev/null +++ b/src/plugins/codeeditor/gui/workspacewidget.cpp @@ -0,0 +1,192 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "workspacewidget.h" +#include "private/workspacewidget_p.h" +#include "transceiver/codeeditorreceiver.h" + +#include +#include + +WorkspaceWidgetPrivate::WorkspaceWidgetPrivate(WorkspaceWidget *qq) + : QObject(qq), + q(qq) +{ +} + +void WorkspaceWidgetPrivate::initUI() +{ + QSplitter *splitter = new QSplitter(q); + splitter->setHandleWidth(0); + splitter->setOpaqueResize(true); + splitter->setChildrenCollapsible(false); + + TabWidget *tabWidget = new TabWidget(splitter); + tabWidget->setCloseButtonVisible(false); + tabWidget->setSplitButtonVisible(false); + tabWidgetList.append(tabWidget); + + connectTabWidgetSignals(tabWidget); + splitter->addWidget(tabWidget); + + QVBoxLayout *mainLayout = new QVBoxLayout(q); + mainLayout->setContentsMargins(0, 0, 0, 0); + mainLayout->addWidget(splitter); +} + +void WorkspaceWidgetPrivate::initConnection() +{ + connect(EditorCallProxy::instance(), &EditorCallProxy::openFileRequested, this, &WorkspaceWidgetPrivate::onOpenFileRequested); + connect(qApp, &QApplication::focusChanged, this, &WorkspaceWidgetPrivate::onFocusChanged); +} + +void WorkspaceWidgetPrivate::connectTabWidgetSignals(TabWidget *tabWidget) +{ + connect(tabWidget, &TabWidget::splitRequested, this, &WorkspaceWidgetPrivate::onSplitRequested); + connect(tabWidget, &TabWidget::closeRequested, this, &WorkspaceWidgetPrivate::onCloseRequested); +} + +TabWidget *WorkspaceWidgetPrivate::currentTabWidget() const +{ + if (focusTabWidget) + return focusTabWidget; + + // Return a default tabWidget + return tabWidgetList.isEmpty() ? nullptr : tabWidgetList.first(); +} + +void WorkspaceWidgetPrivate::doSplit(QSplitter *spliter, int index, const QString &fileName, int pos, int scroll) +{ + TabWidget *tabWidget = new TabWidget(spliter); + connectTabWidgetSignals(tabWidget); + + tabWidgetList.append(tabWidget); + spliter->insertWidget(index, tabWidget); + + tabWidget->openFile(fileName); + // Set the cursor and scroll position + tabWidget->setEditorCursorPosition(pos); + tabWidget->setEditorScrollValue(scroll); +} + +void WorkspaceWidgetPrivate::onSplitRequested(Qt::Orientation ori, const QString &fileName) +{ + auto tabWidgetSender = qobject_cast(sender()); + if (!tabWidgetSender) + return; + + auto spliter = qobject_cast(tabWidgetSender->parent()); + if (!spliter) + return; + + tabWidgetSender->setCloseButtonVisible(true); + + int index = spliter->indexOf(tabWidgetSender); + int cursorPos = tabWidgetSender->editorCursorPosition(); + int scroll = tabWidgetSender->editorScrollValue(); + + if (spliter->count() == 1) { + // Only one widget is added to the splitter, + // change its orientation and add a new widget + spliter->setOrientation(ori); + doSplit(spliter, index + 1, fileName, cursorPos, scroll); + } else if (spliter->orientation() == ori) { + doSplit(spliter, index + 1, fileName, cursorPos, scroll); + } else { + // Use a new splitter to replace + QSplitter *newSplitter = new QSplitter(q); + newSplitter->setOrientation(ori); + + spliter->replaceWidget(index, newSplitter); + newSplitter->addWidget(tabWidgetSender); + doSplit(newSplitter, 1, fileName, cursorPos, scroll); + } +} + +void WorkspaceWidgetPrivate::onCloseRequested() +{ + if (tabWidgetList.size() == 1) + return; + + TabWidget *tabWidget = qobject_cast(sender()); + if (!tabWidget) + return; + + if (focusTabWidget == tabWidget) + focusTabWidget = nullptr; + + tabWidgetList.removeOne(tabWidget); + tabWidget->deleteLater(); + + if (tabWidgetList.size() == 1) + tabWidgetList.first()->setCloseButtonVisible(false); +} + +void WorkspaceWidgetPrivate::onOpenFileRequested(const QString &fileName) +{ + auto tabWidget = currentTabWidget(); + if (!tabWidget) + return; + + tabWidget->openFile(fileName); +} + +void WorkspaceWidgetPrivate::onFocusChanged(QWidget *old, QWidget *now) +{ + Q_UNUSED(old) + + if (!now) + return; + + // the `now` is TextEditor + auto tabWidget = qobject_cast(now->parentWidget()); + if (!tabWidget) + return; + + focusTabWidget = tabWidget; +} + +WorkspaceWidget::WorkspaceWidget(QWidget *parent) + : QWidget(parent), + d(new WorkspaceWidgetPrivate(this)) +{ + d->initUI(); + d->initConnection(); +} + +QString WorkspaceWidget::selectedText() const +{ + auto tabWidget = d->currentTabWidget(); + if (!tabWidget) + return ""; + + return tabWidget->selectedText(); +} + +QString WorkspaceWidget::cursorBeforeText() const +{ + auto tabWidget = d->currentTabWidget(); + if (!tabWidget) + return ""; + + return tabWidget->cursorBeforeText(); +} + +QString WorkspaceWidget::cursorBehindText() const +{ + auto tabWidget = d->currentTabWidget(); + if (!tabWidget) + return ""; + + return tabWidget->cursorBehindText(); +} + +void WorkspaceWidget::replaceSelectedText(const QString &text) +{ + auto tabWidget = d->currentTabWidget(); + if (!tabWidget) + return; + + tabWidget->replaceSelectedText(text); +} diff --git a/src/plugins/codeeditor/gui/workspacewidget.h b/src/plugins/codeeditor/gui/workspacewidget.h new file mode 100644 index 000000000..3e65f9cf1 --- /dev/null +++ b/src/plugins/codeeditor/gui/workspacewidget.h @@ -0,0 +1,27 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef WORKSPACEWIDGET_H +#define WORKSPACEWIDGET_H + +#include +#include + +class WorkspaceWidgetPrivate; +class WorkspaceWidget : public QWidget +{ + Q_OBJECT +public: + explicit WorkspaceWidget(QWidget *parent = nullptr); + + QString selectedText() const; + QString cursorBeforeText() const; + QString cursorBehindText() const; + void replaceSelectedText(const QString &text); + +private: + QSharedPointer d { nullptr }; +}; + +#endif // WORKSPACEWIDGET_H diff --git a/src/plugins/codeeditor/mainframe/texteditkeeper.cpp b/src/plugins/codeeditor/mainframe/texteditkeeper.cpp index 6868c81a1..909074b95 100644 --- a/src/plugins/codeeditor/mainframe/texteditkeeper.cpp +++ b/src/plugins/codeeditor/mainframe/texteditkeeper.cpp @@ -1,119 +1,119 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditkeeper.h" - -TextEdit *TextEditKeeper::create(const QString &language, QString *err) -{ - TextEdit *textEdit = instance()->editFactory.create(language, err); - connect(textEdit, &TextEdit::focusChanged, [=](bool focused){ - if (focused) - instance()->activeTextEdit = textEdit; - }); - connect(textEdit, &TextEdit::fileClosed, [=](const QString &file){ - Q_UNUSED(file) - instance()->activeTextEdit = nullptr; - }); - return textEdit; -} - -void TextEditKeeper::setAnalysedLanguage(const QString &lang) -{ - instance()->analysedLanguage = lang; -} - -QString TextEditKeeper::getAnalysedLanguage() -{ - return instance()->analysedLanguage; -} - -void TextEditKeeper::setAnalysedWorkspace(const QString &workspace) -{ - instance()->analysedWorkspace = workspace; -} - -QString TextEditKeeper::getAnalysedWorkspace() -{ - return instance()->analysedWorkspace; -} - -void TextEditKeeper::setAnalysedStorage(const QString &storage) -{ - instance()->analysedStorage = storage; -} - -QString TextEditKeeper::getAnalysedStorage() -{ - return instance()->analysedStorage; -} - -void TextEditKeeper::setAnalysedData(const AnalysedData &data) -{ - instance()->data = data; -} - -void TextEditKeeper::cleanAnalysedData() -{ - instance()->data.rules.clear(); - instance()->data.tokenMaps.clear(); -} - -QString TextEditKeeper::userActionAnalyseTitle() -{ - return "User Action Analyse"; // can't translation this, crashed -} - -QString TextEditKeeper::getTokenTypeAnnLine(const QString &tokenType, const QString &displayText) -{ - QString result; - auto data = instance()->data; - auto rules = data.rules; - for(auto tokenMap: data.tokenMaps) { - if (tokenType.toStdString() != tokenMap.semanticTokenType - || tokenMap.result.empty()) - continue; - for (size_t idx = 0; idx < rules.size(); idx++) { - if (!result.isEmpty()) result += " "; - result += QString::fromStdString(data.rules[idx]); - if (!result.isEmpty()) result += ": "; - result += QString::number(tokenMap.result[idx]*100) + "%"; - } - } - if (!result.isEmpty()) { - QString textInfo; - if (!displayText.isEmpty()) { - textInfo += "\"" + displayText + "\""; - } - if (!textInfo.isEmpty()) - result = tokenType + " " + textInfo + " " + result; - } - return result; -} - -AnalysedData TextEditKeeper::analysedData() -{ - return instance()->data; -} - -dpfservice::ProjectInfo TextEditKeeper::projectInfo() -{ - return instance()->proInfo; -} - -void TextEditKeeper::saveProjectInfo(const dpfservice::ProjectInfo &info) -{ - instance()->proInfo = info; -} - -void TextEditKeeper::removeProjectInfo(const dpfservice::ProjectInfo &info) -{ - if (instance()->proInfo.workspaceFolder() == info.workspaceFolder()) { - instance()->proInfo = dpfservice::ProjectInfo(); - } -} - -TextEdit *TextEditKeeper::getActiveTextEdit() -{ - return instance()->activeTextEdit; -} +//// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//// +//// SPDX-License-Identifier: GPL-3.0-or-later + +//#include "texteditkeeper.h" + +//TextEdit *TextEditKeeper::create(const QString &language, QString *err) +//{ +// TextEdit *textEdit = instance()->editFactory.create(language, err); +// connect(textEdit, &TextEdit::focusChanged, [=](bool focused){ +// if (focused) +// instance()->activeTextEdit = textEdit; +// }); +// connect(textEdit, &TextEdit::fileClosed, [=](const QString &file){ +// Q_UNUSED(file) +// instance()->activeTextEdit = nullptr; +// }); +// return textEdit; +//} + +//void TextEditKeeper::setAnalysedLanguage(const QString &lang) +//{ +// instance()->analysedLanguage = lang; +//} + +//QString TextEditKeeper::getAnalysedLanguage() +//{ +// return instance()->analysedLanguage; +//} + +//void TextEditKeeper::setAnalysedWorkspace(const QString &workspace) +//{ +// instance()->analysedWorkspace = workspace; +//} + +//QString TextEditKeeper::getAnalysedWorkspace() +//{ +// return instance()->analysedWorkspace; +//} + +//void TextEditKeeper::setAnalysedStorage(const QString &storage) +//{ +// instance()->analysedStorage = storage; +//} + +//QString TextEditKeeper::getAnalysedStorage() +//{ +// return instance()->analysedStorage; +//} + +//void TextEditKeeper::setAnalysedData(const AnalysedData &data) +//{ +// instance()->data = data; +//} + +//void TextEditKeeper::cleanAnalysedData() +//{ +// instance()->data.rules.clear(); +// instance()->data.tokenMaps.clear(); +//} + +//QString TextEditKeeper::userActionAnalyseTitle() +//{ +// return "User Action Analyse"; // can't translation this, crashed +//} + +//QString TextEditKeeper::getTokenTypeAnnLine(const QString &tokenType, const QString &displayText) +//{ +// QString result; +// auto data = instance()->data; +// auto rules = data.rules; +// for(auto tokenMap: data.tokenMaps) { +// if (tokenType.toStdString() != tokenMap.semanticTokenType +// || tokenMap.result.empty()) +// continue; +// for (size_t idx = 0; idx < rules.size(); idx++) { +// if (!result.isEmpty()) result += " "; +// result += QString::fromStdString(data.rules[idx]); +// if (!result.isEmpty()) result += ": "; +// result += QString::number(tokenMap.result[idx]*100) + "%"; +// } +// } +// if (!result.isEmpty()) { +// QString textInfo; +// if (!displayText.isEmpty()) { +// textInfo += "\"" + displayText + "\""; +// } +// if (!textInfo.isEmpty()) +// result = tokenType + " " + textInfo + " " + result; +// } +// return result; +//} + +//AnalysedData TextEditKeeper::analysedData() +//{ +// return instance()->data; +//} + +//dpfservice::ProjectInfo TextEditKeeper::projectInfo() +//{ +// return instance()->proInfo; +//} + +//void TextEditKeeper::saveProjectInfo(const dpfservice::ProjectInfo &info) +//{ +// instance()->proInfo = info; +//} + +//void TextEditKeeper::removeProjectInfo(const dpfservice::ProjectInfo &info) +//{ +// if (instance()->proInfo.workspaceFolder() == info.workspaceFolder()) { +// instance()->proInfo = dpfservice::ProjectInfo(); +// } +//} + +//TextEdit *TextEditKeeper::getActiveTextEdit() +//{ +// return instance()->activeTextEdit; +//} diff --git a/src/plugins/codeeditor/mainframe/texteditkeeper.h b/src/plugins/codeeditor/mainframe/texteditkeeper.h index b507572da..210cf9d61 100644 --- a/src/plugins/codeeditor/mainframe/texteditkeeper.h +++ b/src/plugins/codeeditor/mainframe/texteditkeeper.h @@ -1,64 +1,64 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later +//// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//// +//// SPDX-License-Identifier: GPL-3.0-or-later -#ifndef TEXTEDITKEEPER_H -#define TEXTEDITKEEPER_H +//#ifndef TEXTEDITKEEPER_H +//#define TEXTEDITKEEPER_H -#include "textedittabwidget/textedit.h" -#include "services/project/projectinfo.h" -#include -#include +//#include "textedittabwidget/textedit.h" +//#include "services/project/projectinfo.h" +//#include +//#include -class TextEditKeeper : public QObject -{ - Q_OBJECT +//class TextEditKeeper : public QObject +//{ +// Q_OBJECT - dpf::QtClassFactory editFactory; - QString analysedLanguage; - QString analysedWorkspace; - QString analysedStorage; - AnalysedData data; - dpfservice::ProjectInfo proInfo; - TextEdit *activeTextEdit = nullptr; - TextEditKeeper(){} +// dpf::QtClassFactory editFactory; +// QString analysedLanguage; +// QString analysedWorkspace; +// QString analysedStorage; +// AnalysedData data; +// dpfservice::ProjectInfo proInfo; +// TextEdit *activeTextEdit = nullptr; +// TextEditKeeper(){} -public: - inline static TextEditKeeper *instance(){ - static TextEditKeeper ins; - return &ins; - } +//public: +// inline static TextEditKeeper *instance(){ +// static TextEditKeeper ins; +// return &ins; +// } - template - static bool impl(const QString &language = Edit::implLanguage(), QString *err = nullptr) { - bool result = true; - result &= instance()->editFactory.regClass(language, err); - return result; - } +// template +// static bool impl(const QString &language = Edit::implLanguage(), QString *err = nullptr) { +// bool result = true; +// result &= instance()->editFactory.regClass(language, err); +// return result; +// } - static TextEdit *create(const QString &language, QString *err = nullptr); +// static TextEdit *create(const QString &language, QString *err = nullptr); - static void setAnalysedLanguage(const QString &lang); - static QString getAnalysedLanguage(); +// static void setAnalysedLanguage(const QString &lang); +// static QString getAnalysedLanguage(); - static void setAnalysedWorkspace(const QString &workspace); - static QString getAnalysedWorkspace(); +// static void setAnalysedWorkspace(const QString &workspace); +// static QString getAnalysedWorkspace(); - static void setAnalysedStorage(const QString &storage); - static QString getAnalysedStorage(); +// static void setAnalysedStorage(const QString &storage); +// static QString getAnalysedStorage(); - static void setAnalysedData(const AnalysedData &data); - static AnalysedData analysedData(); - static void cleanAnalysedData(); +// static void setAnalysedData(const AnalysedData &data); +// static AnalysedData analysedData(); +// static void cleanAnalysedData(); - static QString userActionAnalyseTitle(); - static QString getTokenTypeAnnLine(const QString &tokenType, const QString &displayText); +// static QString userActionAnalyseTitle(); +// static QString getTokenTypeAnnLine(const QString &tokenType, const QString &displayText); - static dpfservice::ProjectInfo projectInfo(); - static void saveProjectInfo(const dpfservice::ProjectInfo &info); - static void removeProjectInfo(const dpfservice::ProjectInfo &info); +// static dpfservice::ProjectInfo projectInfo(); +// static void saveProjectInfo(const dpfservice::ProjectInfo &info); +// static void removeProjectInfo(const dpfservice::ProjectInfo &info); - static TextEdit *getActiveTextEdit(); -}; +// static TextEdit *getActiveTextEdit(); +//}; -#endif // TEXTEDITKEEPER_H +//#endif // TEXTEDITKEEPER_H diff --git a/src/plugins/codeeditor/manager/private/texteditormanager_p.h b/src/plugins/codeeditor/manager/private/texteditormanager_p.h new file mode 100644 index 000000000..6bb3155ff --- /dev/null +++ b/src/plugins/codeeditor/manager/private/texteditormanager_p.h @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITORMANAGER_P_H +#define TEXTEDITORMANAGER_P_H + +#include "manager/texteditormanager.h" + +class TextEditorManagerPrivate +{ +public: + explicit TextEditorManagerPrivate(TextEditorManager *qq); + +public: + TextEditorManager *q; + + QHash editorHash; +}; + +#endif // TEXTEDITORMANAGER_P_H diff --git a/src/plugins/codeeditor/manager/texteditormanager.cpp b/src/plugins/codeeditor/manager/texteditormanager.cpp new file mode 100644 index 000000000..ccec33450 --- /dev/null +++ b/src/plugins/codeeditor/manager/texteditormanager.cpp @@ -0,0 +1,55 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "texteditormanager.h" +#include "private/texteditormanager_p.h" + +TextEditorManagerPrivate::TextEditorManagerPrivate(TextEditorManager *qq) + : q(qq) +{ +} + +TextEditorManager::TextEditorManager(QObject *parent) + : QObject(parent), + d(new TextEditorManagerPrivate(this)) +{ +} + +TextEditor *TextEditorManager::createEditor(QWidget *parent, const QString &fileName) +{ + TextEditor *editor = new TextEditor(parent); + connect(editor, &TextEditor::cursorPositionChanged, this, &TextEditorManager::onLinePositionChanged, Qt::QueuedConnection); + connect(editor, &TextEditor::destroyed, this, [this, fileName] { onEditorDestroyed(fileName); }); + + editor->setFile(fileName); + d->editorHash.insert(fileName, editor); + + return editor; +} + +TextEditor *TextEditorManager::findEditor(const QString &fileName) +{ + return d->editorHash.value(fileName, nullptr); +} + +void TextEditorManager::gotoNextPosition() +{ + // TODO +} + +void TextEditorManager::gotoPreviousPsontion() +{ + // TODO +} + +void TextEditorManager::onLinePositionChanged(int line, int pos) +{ + Q_UNUSED(line) + // TODO +} + +void TextEditorManager::onEditorDestroyed(const QString &fileName) +{ + d->editorHash.remove(fileName); +} diff --git a/src/plugins/codeeditor/manager/texteditormanager.h b/src/plugins/codeeditor/manager/texteditormanager.h new file mode 100644 index 000000000..bc06bc191 --- /dev/null +++ b/src/plugins/codeeditor/manager/texteditormanager.h @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITORMANAGER_H +#define TEXTEDITORMANAGER_H + +#include "gui/texteditor.h" + +class TextEditorManagerPrivate; +class TextEditorManager : public QObject +{ + Q_OBJECT +public: + explicit TextEditorManager(QObject *parent = nullptr); + + TextEditor *createEditor(QWidget *parent, const QString &fileName = ""); + TextEditor *findEditor(const QString &fileName); + + void gotoNextPosition(); + void gotoPreviousPsontion(); + +public slots: + void onLinePositionChanged(int line, int pos); + void onEditorDestroyed(const QString &fileName); + +private: + QSharedPointer d { nullptr }; +}; + +#endif // TEXTEDITORMANAGER_H diff --git a/src/plugins/codeeditor/menu/texteditormarginmenu.cpp b/src/plugins/codeeditor/menu/texteditormarginmenu.cpp new file mode 100644 index 000000000..7ee23c522 --- /dev/null +++ b/src/plugins/codeeditor/menu/texteditormarginmenu.cpp @@ -0,0 +1,40 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "texteditormarginmenu.h" + +TextEditorMarginMenu::TextEditorMarginMenu(QObject *parent) + : AbstractEditorMenu(parent) +{ +} + +QString TextEditorMarginMenu::name() const +{ + +} + +bool TextEditorMarginMenu::initialize(const QVariantHash ¶ms) +{ + return false; +} + +bool TextEditorMarginMenu::create(QMenu *parent) +{ + +} + +void TextEditorMarginMenu::updateState(QMenu *parent) +{ + +} + +bool TextEditorMarginMenu::triggered(QAction *action) +{ + +} + +AbstractEditorMenu *TextEditorMarginMenu::menu(QAction *action) const +{ + +} diff --git a/src/plugins/codeeditor/menu/texteditormarginmenu.h b/src/plugins/codeeditor/menu/texteditormarginmenu.h new file mode 100644 index 000000000..65bf07e79 --- /dev/null +++ b/src/plugins/codeeditor/menu/texteditormarginmenu.h @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITORMARGINMENU_H +#define TEXTEDITORMARGINMENU_H + +#include "base/abstracteditormenu.h" + +class TextEditorMarginMenu : public AbstractEditorMenu +{ + Q_OBJECT +public: + explicit TextEditorMarginMenu(QObject *parent = nullptr); + + virtual QString name() const override; + virtual bool initialize(const QVariantHash ¶ms) override; + virtual bool create(QMenu *parent) override; + virtual void updateState(QMenu *parent) override; + virtual bool triggered(QAction *action) override; + virtual AbstractEditorMenu *menu(QAction *action) const override; +}; + +#endif // TEXTEDITORMARGINMENU_H diff --git a/src/plugins/codeeditor/menu/texteditormenu.cpp b/src/plugins/codeeditor/menu/texteditormenu.cpp new file mode 100644 index 000000000..7803c5b1d --- /dev/null +++ b/src/plugins/codeeditor/menu/texteditormenu.cpp @@ -0,0 +1,103 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "texteditormenu.h" +#include "gui/texteditor.h" + +#include + +namespace ActionId { +static constexpr char Copy[] { "copy" }; +static constexpr char Cut[] { "cut" }; +static constexpr char Paste[] { "paste" }; +static constexpr char Delete[] { "delete" }; +static constexpr char SelectAll[] { "select-all" }; +static constexpr char Undo[] { "undo" }; +static constexpr char Redo[] { "redo" }; +} + +TextEditorMenu::TextEditorMenu(QObject *parent) + : AbstractEditorMenu(parent) +{ + predicateName[ActionId::Copy] = tr("Copy"); + predicateName[ActionId::Cut] = tr("Cut"); + predicateName[ActionId::Paste] = tr("Paste"); + predicateName[ActionId::Delete] = tr("Delete"); + predicateName[ActionId::SelectAll] = tr("Select All"); + predicateName[ActionId::Undo] = tr("Undo"); + predicateName[ActionId::Redo] = tr("Redo"); +} + +QString TextEditorMenu::name() const +{ + return "EditorMenu"; +} + +bool TextEditorMenu::initialize(const QVariantHash ¶ms) +{ + // TODO + return false; +} + +bool TextEditorMenu::create(QMenu *parent) +{ + QAction *action { nullptr }; + if (!editor->isReadOnly()) { + action = parent->addAction(predicateName[ActionId::Undo], this, [this] { editor->undo(); }); + action->setEnabled(editor->isUndoAvailable()); + predicateAction[ActionId::Undo] = action; + + action = parent->addAction(predicateName[ActionId::Redo], this, [this] { editor->redo(); }); + action->setEnabled(editor->isRedoAvailable()); + predicateAction[ActionId::Redo] = action; + + parent->addSeparator(); + + action = parent->addAction(predicateName[ActionId::Cut], this, [this] { editor->cut(); }); + action->setEnabled(editor->hasSelectedText()); + predicateAction[ActionId::Cut] = action; + } + + action = parent->addAction(predicateName[ActionId::Copy], this, [this] { editor->copy(); }); + action->setEnabled(editor->hasSelectedText()); + predicateAction[ActionId::Copy] = action; + + if (!editor->isReadOnly()) { + action = parent->addAction(predicateName[ActionId::Paste], this, [this] { editor->paste(); }); + action->setEnabled(editor->SendScintilla(TextEditor::SCI_CANPASTE)); + predicateAction[ActionId::Paste] = action; + + action = parent->addAction(predicateName[ActionId::Delete], this, [this] { editor->SendScintilla(TextEditor::SCI_CLEAR); }); + action->setEnabled(editor->hasSelectedText()); + predicateAction[ActionId::Delete] = action; + } + + parent->addSeparator(); + action = parent->addAction(predicateName[ActionId::SelectAll], this, [this] { editor->selectAll(); }); + action->setEnabled(editor->length() != 0); + predicateAction[ActionId::SelectAll] = action; + + return AbstractEditorMenu::create(parent); +} + +void TextEditorMenu::updateState(QMenu *parent) +{ + AbstractEditorMenu::updateState(parent); +} + +bool TextEditorMenu::triggered(QAction *action) +{ + return AbstractEditorMenu::triggered(action); +} + +AbstractEditorMenu *TextEditorMenu::menu(QAction *action) const +{ + if (!action) + return nullptr; + + if (predicateAction.values().contains(action)) + return const_cast(this); + + return AbstractEditorMenu::menu(action); +} diff --git a/src/plugins/codeeditor/menu/texteditormenu.h b/src/plugins/codeeditor/menu/texteditormenu.h new file mode 100644 index 000000000..20fa8f03f --- /dev/null +++ b/src/plugins/codeeditor/menu/texteditormenu.h @@ -0,0 +1,32 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef TEXTEDITORMENU_H +#define TEXTEDITORMENU_H + +#include "base/abstracteditormenu.h" + +#include + +class TextEditor; +class TextEditorMenu : public AbstractEditorMenu +{ + Q_OBJECT +public: + explicit TextEditorMenu(QObject *parent = nullptr); + + virtual QString name() const override; + virtual bool initialize(const QVariantHash ¶ms) override; + virtual bool create(QMenu *parent) override; + virtual void updateState(QMenu *parent) override; + virtual bool triggered(QAction *action) override; + virtual AbstractEditorMenu *menu(QAction *action) const override; + +private: + QMap predicateAction; // id -- instance + QMap predicateName; // id -- text + TextEditor *editor { nullptr }; +}; + +#endif // TEXTEDITORMENU_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.cpp b/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.cpp deleted file mode 100644 index 498707dfa..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.cpp +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelspcmake.h" - -StyleLspCmake::StyleLspCmake(TextEdit *parent) - : StyleLsp (parent) -{ - -} - - diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.h b/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.h deleted file mode 100644 index d45c187d4..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylelspcmake.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSPCMAKE_H -#define STYLELSPCMAKE_H - -#include "textedittabwidget/style/stylelsp.h" - -class TextEdit; -class StyleLspCmake : public StyleLsp -{ -public: - StyleLspCmake(TextEdit *parent); - -}; - - - -#endif // STYLELSPCMAKE_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.cpp b/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.cpp deleted file mode 100644 index 59930dfc1..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylescicmake.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/textedit.h" -#include "SciLexer.h" - -StyleSciCmake::StyleSciCmake(TextEdit *parent) - : StyleSci (parent) -{ - -} - -QMap StyleSciCmake::keyWords() const -{ - return StyleSci::keyWords(); -} - -void StyleSciCmake::setStyle() -{ - StyleSci::setStyle(); - edit()->styleSetFore(SCE_CMAKE_COMMENT, StyleColor::color(StyleColor::Table::get()->SkyBlue)); - edit()->styleSetFore(SCE_CMAKE_STRINGDQ, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_CMAKE_STRINGLQ, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_CMAKE_STRINGRQ, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_CMAKE_COMMANDS, StyleColor::color(StyleColor::Table::get()->PaleGoldenRod)); - edit()->styleSetFore(SCE_CMAKE_PARAMETERS, StyleColor::color(StyleColor::Table::get()->Orange)); - edit()->styleSetFore(SCE_CMAKE_VARIABLE, StyleColor::color(StyleColor::Table::get()->Orange)); - edit()->styleSetFore(SCE_CMAKE_USERDEFINED, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_CMAKE_WHILEDEF, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_CMAKE_FOREACHDEF, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_CMAKE_IFDEFINEDEF, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_CMAKE_MACRODEF, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_CMAKE_STRINGVAR, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_CMAKE_NUMBER, StyleColor::color(StyleColor::Table::get()->Magenta)); -} - -void StyleSciCmake::setLexer() -{ - StyleSci::setLexer(); -} - -int StyleSciCmake::sectionEnd() const -{ - return SCE_CMAKE_NUMBER; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.h b/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.h deleted file mode 100644 index a70e1d004..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/stylescicmake.h +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCICMAKE_H -#define STYLESCICMAKE_H - -#include "textedittabwidget/style/stylesci.h" - -class StyleSciCmake : public StyleSci -{ -public: - StyleSciCmake(TextEdit *parent); - virtual QMap keyWords() const override; - virtual void setStyle() override; - virtual void setLexer() override; - virtual int sectionEnd() const override; -}; - -#endif // STYLESCICMAKE_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.cpp b/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.cpp deleted file mode 100644 index e1c946d1b..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditcmake.h" -#include "stylelspcmake.h" -#include "stylescicmake.h" -#include "textedittabwidget/style/stylejsonfile.h" - -class TextEditCmakePrivate -{ - friend class TextEditCmake; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - StyleJsonFile *styleFile {nullptr}; -}; - -TextEditCmake::TextEditCmake(QWidget *parent) - : TextEdit (parent) - , d (new TextEditCmakePrivate) -{ - d->styleFile = new StyleJsonFile(this); - d->styleFile->setLanguage(this->supportLanguage()); - d->styleFile->setTheme(StyleJsonFile::Theme::get()->Dark); - d->styleSci = new StyleSciCmake(this); -// d->styleLsp = new StyleLspCmake(this); -} - -TextEditCmake::~TextEditCmake() -{ - if (d) { - if (d->styleLsp) - delete d->styleLsp; - if (d->styleSci) - delete d->styleSci; - if (d->styleFile) - delete d->styleFile; - } -} - -QString TextEditCmake::supportLanguage() -{ - return "cmake"; // 向上兼容Scintilla中Lexer -} - -QString TextEditCmake::implLanguage() -{ - return "cmake"; // 界面调用兼容 -} - -StyleLsp *TextEditCmake::getStyleLsp() const -{ - return d->styleLsp; -} - -StyleSci *TextEditCmake::getStyleSci() const -{ - return d->styleSci; -} - -StyleJsonFile *TextEditCmake::getStyleFile() const -{ - return d->styleFile; -} - diff --git a/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.h b/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.h deleted file mode 100644 index 7fd1018c0..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cmake/texteditcmake.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITCMAKE_H -#define TEXTEDITCMAKE_H - -#include "textedittabwidget/textedit.h" - -class TextEditCmakePrivate; -class TextEditCmake : public TextEdit -{ - Q_OBJECT - TextEditCmakePrivate *const d; -public: - explicit TextEditCmake(QWidget * parent = nullptr); - virtual ~TextEditCmake(); - virtual QString supportLanguage(); - static QString implLanguage(); - - virtual StyleLsp *getStyleLsp() const; - virtual StyleSci *getStyleSci() const; - virtual StyleJsonFile *getStyleFile() const; -}; - -#endif // TEXTEDITCMAKE_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.cpp b/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.cpp deleted file mode 100644 index 87cc2fae8..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelspcpp.h" -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/style/stylejsonfile.h" -#include "common/common.h" - -#include -#include -#include -#include - -StyleLspCpp::StyleLspCpp(TextEdit *parent) - : StyleLsp (parent) -{ - -} - -StyleLsp::IndicStyleExt StyleLspCpp::symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) -{ - Q_UNUSED(modifier); - IndicStyleExt result; - - auto jsonFile = edit()->getStyleFile(); - auto tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Self).toObject(); - auto tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - if (lsp::SemanticTokenType::get()->Namespace == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Namespace).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Type == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Type).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Class == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Enum == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Interface == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Struct == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->TypeParameter == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Parameter == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Parameter).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Variable == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Property == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Property).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->EnumMember == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Event == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Function == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Function).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Method == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Method).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Macro == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Macro).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Keyword == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Modifier == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Comment == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->String == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Number == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Regexp == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Operator == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - result.fore[INDIC_TEXTFORE] = tempFore; - - return result; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.h b/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.h deleted file mode 100644 index a0463c9d9..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylelspcpp.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSPCPP_H -#define STYLELSPCPP_H - -#include "textedittabwidget/style/stylelsp.h" - -class StyleLspCpp : public StyleLsp -{ - Q_OBJECT -public: - StyleLspCpp(TextEdit *parent); - virtual IndicStyleExt symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) override; -}; - -#endif // STYLELSPCPP_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.cpp b/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.cpp deleted file mode 100644 index 0c6b45488..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.cpp +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylescicpp.h" -#include "textedittabwidget/style/stylejsonfile.h" -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/style/stylecolor.h" - -#include "SciLexer.h" - - -StyleSciCpp::StyleSciCpp(TextEdit *parent) - : StyleSci(parent) -{ - -} - -QMap StyleSciCpp::keyWords() const -{ - return { - { 1, "and and_eq asm auto bitand bitor bool break case " - "catch char class compl const const_cast continue " - "default delete do double dynamic_cast else enum " - "explicit export extern false float for friend goto if " - "inline int long mutable namespace new not not_eq " - "operator or or_eq private protected public register " - "reinterpret_cast return short signed sizeof static " - "static_cast struct switch template this throw true " - "try typedef typeid typename union unsigned using " - "virtual void volatile wchar_t while xor xor_eq" - } - }; -} - -void StyleSciCpp::setStyle() -{ - StyleSci::setStyle(); -} - -int StyleSciCpp::sectionEnd() const -{ - return SCE_C_ESCAPESEQUENCE; //default style key end; -} - -void StyleSciCpp::setThemeColor(DGuiApplicationHelper::ColorType colorType) -{ - StyleSci::setThemeColor(colorType); - - if (colorType == DGuiApplicationHelper::DarkType) { - QJsonObject tempObj; - int tempFore; - auto jsonFile = edit()->getStyleFile(); - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_COMMENT, tempFore); // #整行 - edit()->styleSetFore(SCE_C_COMMENTLINE, tempFore); // //注释 - edit()->styleSetFore(SCE_C_COMMENTDOC, tempFore); - edit()->styleSetFore(SCE_C_COMMENTLINEDOC, tempFore); // ///注释 - edit()->styleSetFore(SCE_C_COMMENTDOCKEYWORD, tempFore - 0x3333); - edit()->styleSetFore(SCE_C_COMMENTDOCKEYWORDERROR, tempFore - 0x3333); // /// @ - edit()->styleSetFore(SCE_C_PREPROCESSORCOMMENT, tempFore); - edit()->styleSetFore(SCE_C_PREPROCESSORCOMMENTDOC, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_NUMBER, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_WORD, tempFore); - edit()->styleSetFore(SCE_C_WORD2, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_STRING, tempFore); // 字符串 - edit()->styleSetFore(SCE_C_CHARACTER, tempFore); // 字符串 - edit()->styleSetFore(SCE_C_UUID, tempFore); - edit()->styleSetFore(SCE_C_STRINGEOL, tempFore); - edit()->styleSetFore(SCE_C_REGEX, tempFore); - edit()->styleSetFore(SCE_C_STRINGRAW, tempFore); - edit()->styleSetFore(SCE_C_VERBATIM, tempFore); - edit()->styleSetFore(SCE_C_HASHQUOTEDSTRING, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Preprocessor).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_PREPROCESSOR, tempFore); // # - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_OPERATOR, tempFore); // 符号 - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_IDENTIFIER, tempFore); - edit()->styleSetFore(SCE_C_USERLITERAL, tempFore); - edit()->styleSetFore(SCE_C_TASKMARKER, tempFore); - edit()->styleSetFore(SCE_C_ESCAPESEQUENCE, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Global).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_C_GLOBALCLASS, tempFore); - } else { - edit()->styleSetFore(SCE_C_DEFAULT, StyleColor::color(StyleColor::Table::get()->DarkBlue)); // #整行 - edit()->styleSetFore(SCE_C_COMMENT, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); // #整行 - edit()->styleSetFore(SCE_C_COMMENTLINE, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); // //注释 - edit()->styleSetFore(SCE_C_COMMENTDOC, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); - edit()->styleSetFore(SCE_C_NUMBER, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_WORD, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_C_STRING, StyleColor::color(StyleColor::Table::get()->Magenta)); // 字符串 - edit()->styleSetFore(SCE_C_CHARACTER, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_UUID, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_PREPROCESSOR, StyleColor::color(StyleColor::Table::get()->MediumBlue)); // # - edit()->styleSetFore(SCE_C_OPERATOR, edit()->styleFore(SCE_C_DEFAULT)); // 符号 - edit()->styleSetFore(SCE_C_IDENTIFIER, edit()->styleFore(SCE_C_DEFAULT)); - edit()->styleSetFore(SCE_C_STRINGEOL, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_VERBATIM, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_REGEX, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_C_COMMENTLINEDOC, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); // ///注释 - edit()->styleSetFore(SCE_C_WORD2, StyleColor::color(StyleColor::Table::get()->DarkMagenta)); // 1 一般关键字 - edit()->styleSetFore(SCE_C_COMMENTDOCKEYWORD, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); - edit()->styleSetFore(SCE_C_COMMENTDOCKEYWORDERROR, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); // /// @ - edit()->styleSetFore(SCE_C_GLOBALCLASS, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_C_STRINGRAW, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_HASHQUOTEDSTRING, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_PREPROCESSORCOMMENT, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_PREPROCESSORCOMMENTDOC, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_USERLITERAL, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_TASKMARKER, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_C_ESCAPESEQUENCE, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - } -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.h b/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.h deleted file mode 100644 index 434b8ebaa..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/stylescicpp.h +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCICPP_H -#define STYLESCICPP_H - -#include "textedittabwidget/style/stylesci.h" - -class StyleSciCpp : public StyleSci -{ -public: - StyleSciCpp(TextEdit *parent); - virtual QMap keyWords() const override; - virtual void setStyle() override; - virtual int sectionEnd() const override; - -protected: - virtual void setThemeColor(DGuiApplicationHelper::ColorType colorType) override; -}; - -#endif // STYLESCICPP_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.cpp b/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.cpp deleted file mode 100644 index d847767a5..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditcpp.h" -#include "stylelspcpp.h" -#include "stylescicpp.h" -#include "textedittabwidget/style/stylejsonfile.h" - -class TextEditCppPrivate -{ - friend class TextEditCpp; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - StyleJsonFile *styleFile {nullptr}; -}; - -TextEditCpp::TextEditCpp(QWidget *parent) - : TextEdit (parent) - , d (new TextEditCppPrivate) -{ - d->styleFile = new StyleJsonFile(this); - d->styleFile->setLanguage(this->supportLanguage()); - d->styleSci = new StyleSciCpp(this); - d->styleLsp = new StyleLspCpp(this); -} - -TextEditCpp::~TextEditCpp() -{ - if (d) { - if (d->styleLsp) - delete d->styleLsp; - if (d->styleSci) - delete d->styleSci; - if (d->styleFile) - delete d->styleFile; - } -} - -QString TextEditCpp::supportLanguage() -{ - return "cpp"; // 向上兼容Scintilla中Lexer -} - -QString TextEditCpp::implLanguage() -{ - return "cpp"; // 界面调用兼容 -} - -StyleLsp *TextEditCpp::getStyleLsp() const -{ - return d->styleLsp; -} - -StyleSci *TextEditCpp::getStyleSci() const -{ - return d->styleSci; -} - -StyleJsonFile *TextEditCpp::getStyleFile() const -{ - return d->styleFile; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.h b/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.h deleted file mode 100644 index a185366b8..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/cpp/texteditcpp.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITCPP_H -#define TEXTEDITCPP_H - -#include "textedittabwidget/textedit.h" - -class TextEditCppPrivate; -class TextEditCpp : public TextEdit -{ - Q_OBJECT - TextEditCppPrivate *const d; -public: - explicit TextEditCpp(QWidget * parent = nullptr); - virtual ~TextEditCpp(); - virtual QString supportLanguage(); - static QString implLanguage(); - - virtual StyleLsp *getStyleLsp() const; - virtual StyleSci *getStyleSci() const; - virtual StyleJsonFile *getStyleFile() const; -}; - -#endif // TEXTEDITCPP_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.cpp b/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.cpp deleted file mode 100644 index 65009e2b5..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.cpp +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelspjava.h" -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/style/stylejsonfile.h" - -StyleLspJava::StyleLspJava(TextEdit *parent) - : StyleLsp (parent) -{ - -} - - -StyleLsp::IndicStyleExt StyleLspJava::symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) -{ - Q_UNUSED(modifier); - IndicStyleExt result; - - auto jsonFile = edit()->getStyleFile(); - auto tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Self).toObject(); - auto tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - if (lsp::SemanticTokenType::get()->Namespace == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Namespace).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Type == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Type).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Class == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Enum == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Interface == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Struct == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->TypeParameter == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Parameter == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Variable == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Property == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Property).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->EnumMember == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Event == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Function == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Function).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Method == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->FunctionDeclaration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Macro == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Macro).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Keyword == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Modifier == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Comment == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->String == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Number == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Regexp == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Operator == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - result.fore[INDIC_TEXTFORE] = tempFore; - - return result; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.h b/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.h deleted file mode 100644 index 3a06e0f33..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/stylelspjava.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSPJAVA_H -#define STYLELSPJAVA_H - -#include "textedittabwidget/style/stylelsp.h" - -class TextEdit; -class StyleLspJava : public StyleLsp -{ -public: - StyleLspJava(TextEdit *parent); - virtual IndicStyleExt symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) override; -}; - -#endif // STYLELSPJAVA_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.cpp b/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.cpp deleted file mode 100644 index 597f1ad25..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylescijava.h" -#include "textedittabwidget/style/stylejsonfile.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/textedit.h" -#include "SciLexer.h" - -StyleSciJava::StyleSciJava(TextEdit *parent) - : StyleSci (parent) -{ - -} - -QMap StyleSciJava::keyWords() const -{ - return StyleSci::keyWords(); -} - -void StyleSciJava::setStyle() -{ - StyleSci::setStyle(); -} - -void StyleSciJava::setLexer() -{ - StyleSci::setLexer(); -} - -int StyleSciJava::sectionEnd() const -{ - return SCE_JAVA_ESCAPESEQUENCE; -} - -void StyleSciJava::setThemeColor(DGuiApplicationHelper::ColorType colorType) -{ - StyleSci::setThemeColor(colorType); - - if (colorType == DGuiApplicationHelper::DarkType) { - QJsonObject tempObj; - int tempFore; - auto jsonFile = edit()->getStyleFile(); - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_COMMENT, tempFore); // #整行 - edit()->styleSetFore(SCE_JAVA_COMMENTLINE, tempFore); // //注释 - edit()->styleSetFore(SCE_JAVA_COMMENTDOC, tempFore); - edit()->styleSetFore(SCE_JAVA_COMMENTLINEDOC, tempFore); // ///注释 - edit()->styleSetFore(SCE_JAVA_COMMENTDOCKEYWORD, tempFore - 0x3333); - edit()->styleSetFore(SCE_JAVA_COMMENTDOCKEYWORDERROR, tempFore - 0x3333); // /// @ - edit()->styleSetFore(SCE_JAVA_PREPROCESSORCOMMENT, tempFore); - edit()->styleSetFore(SCE_JAVA_PREPROCESSORCOMMENTDOC, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_NUMBER, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_WORD, tempFore); - edit()->styleSetFore(SCE_JAVA_WORD2, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_STRING, tempFore); // 字符串 - edit()->styleSetFore(SCE_JAVA_CHARACTER, tempFore); // 字符串 - edit()->styleSetFore(SCE_JAVA_UUID, tempFore); - edit()->styleSetFore(SCE_JAVA_STRINGEOL, tempFore); - edit()->styleSetFore(SCE_JAVA_REGEX, tempFore); - edit()->styleSetFore(SCE_JAVA_STRINGRAW, tempFore); - edit()->styleSetFore(SCE_JAVA_VERBATIM, tempFore); - edit()->styleSetFore(SCE_JAVA_HASHQUOTEDSTRING, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Preprocessor).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_PREPROCESSOR, tempFore); // # - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_OPERATOR, tempFore); // 符号 - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_IDENTIFIER, tempFore); - edit()->styleSetFore(SCE_JAVA_USERLITERAL, tempFore); - edit()->styleSetFore(SCE_JAVA_TASKMARKER, tempFore); - edit()->styleSetFore(SCE_JAVA_ESCAPESEQUENCE, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Global).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_JAVA_GLOBALCLASS, tempFore); - } else { - edit()->styleSetFore(SCE_JAVA_COMMENT, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); // #整行 - edit()->styleSetFore(SCE_JAVA_COMMENTLINE, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); // //注释 - edit()->styleSetFore(SCE_JAVA_COMMENTDOC, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); - edit()->styleSetFore(SCE_JAVA_NUMBER, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_WORD, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_JAVA_STRING, StyleColor::color(StyleColor::Table::get()->Magenta)); // 字符串 - edit()->styleSetFore(SCE_JAVA_CHARACTER, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_UUID, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_PREPROCESSOR, StyleColor::color(StyleColor::Table::get()->MediumBlue)); // # - edit()->styleSetFore(SCE_JAVA_OPERATOR, edit()->styleFore(SCE_JAVA_DEFAULT)); // 符号 - edit()->styleSetFore(SCE_JAVA_IDENTIFIER, edit()->styleFore(SCE_JAVA_DEFAULT)); - edit()->styleSetFore(SCE_JAVA_STRINGEOL, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_VERBATIM, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_REGEX, StyleColor::color(StyleColor::Table::get()->Magenta)); - edit()->styleSetFore(SCE_JAVA_COMMENTLINEDOC, StyleColor::color(StyleColor::Table::get()->DarkTurquoise)); // ///注释 - edit()->styleSetFore(SCE_JAVA_WORD2, StyleColor::color(StyleColor::Table::get()->Gold)); // 1 一般关键字 - edit()->styleSetFore(SCE_JAVA_COMMENTDOCKEYWORD, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); - edit()->styleSetFore(SCE_JAVA_COMMENTDOCKEYWORDERROR, StyleColor::color(StyleColor::Table::get()->DeepSkyBlue)); // /// @ - edit()->styleSetFore(SCE_JAVA_GLOBALCLASS, StyleColor::color(StyleColor::Table::get()->Gold)); - edit()->styleSetFore(SCE_JAVA_STRINGRAW, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_HASHQUOTEDSTRING, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_PREPROCESSORCOMMENT, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_PREPROCESSORCOMMENTDOC, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_USERLITERAL, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_TASKMARKER, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - edit()->styleSetFore(SCE_JAVA_ESCAPESEQUENCE, StyleColor::color(StyleColor::Table::get()->Gainsboro)); - } -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.h b/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.h deleted file mode 100644 index cd050cd2d..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/stylescijava.h +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCIJAVA_H -#define STYLESCIJAVA_H - -#include "textedittabwidget/style/stylesci.h" - -class StyleSciJava : public StyleSci -{ -public: - StyleSciJava(TextEdit *parent); - virtual QMap keyWords() const override; - virtual void setStyle() override; - virtual void setLexer() override; - virtual int sectionEnd() const override; - -protected: - virtual void setThemeColor(DGuiApplicationHelper::ColorType colorType) override; -}; - -#endif // STYLESCIJAVA_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.cpp b/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.cpp deleted file mode 100644 index 38ee35bfd..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.cpp +++ /dev/null @@ -1,64 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditjava.h" -#include "stylelspjava.h" -#include "stylescijava.h" -#include "textedittabwidget/style/stylejsonfile.h" - -class TextEditJavaPrivate -{ - friend class TextEditJava; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - StyleJsonFile *styleFile {nullptr}; -}; - -TextEditJava::TextEditJava(QWidget *parent) - : TextEdit (parent) - , d (new TextEditJavaPrivate) -{ - d->styleFile = new StyleJsonFile(this); - d->styleFile->setLanguage(this->supportLanguage()); - d->styleFile->setTheme(StyleJsonFile::Theme::get()->Dark); - d->styleSci = new StyleSciJava(this); - d->styleLsp = new StyleLspJava(this); -} - -TextEditJava::~TextEditJava() -{ - if (d) { - if (d->styleLsp) - delete d->styleLsp; - if (d->styleSci) - delete d->styleSci; - if (d->styleFile) - delete d->styleFile; - } -} - -QString TextEditJava::supportLanguage() -{ - return "java"; // 向上兼容Scintilla中Lexer -} - -QString TextEditJava::implLanguage() -{ - return "java"; // 界面调用兼容 -} - -StyleLsp *TextEditJava::getStyleLsp() const -{ - return d->styleLsp; -} - -StyleSci *TextEditJava::getStyleSci() const -{ - return d->styleSci; -} - -StyleJsonFile *TextEditJava::getStyleFile() const -{ - return d->styleFile; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.h b/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.h deleted file mode 100644 index 4520738fa..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/java/texteditjava.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITJAVA_H -#define TEXTEDITJAVA_H - -#include "textedittabwidget/textedit.h" - -class TextEditJavaPrivate; -class TextEditJava : public TextEdit -{ - Q_OBJECT - TextEditJavaPrivate *const d; -public: - explicit TextEditJava(QWidget * parent = nullptr); - virtual ~TextEditJava(); - virtual QString supportLanguage(); - static QString implLanguage(); - - virtual StyleLsp *getStyleLsp() const; - virtual StyleSci *getStyleSci() const; - virtual StyleJsonFile *getStyleFile() const; -}; - -#endif // TEXTEDITJAVA_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.cpp b/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.cpp deleted file mode 100644 index 4979ec3d0..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelspjs.h" - -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/style/stylejsonfile.h" - -StyleLspJS::StyleLspJS(TextEdit *parent) - : StyleLsp (parent) -{ - -} - -StyleLsp::IndicStyleExt StyleLspJS::symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) -{ - Q_UNUSED(modifier); - IndicStyleExt result; - - auto jsonFile = edit()->getStyleFile(); - if (jsonFile->setTheme(StyleJsonFile::Theme::get()->Dark)) { - QJsonObject tempObj; - int tokenForeColor = 0; - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Self).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - if (lsp::SemanticTokenType::get()->Namespace == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Namespace).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Type == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Type).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Class == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Enum == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Interface == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Struct == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->TypeParameter == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Parameter == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Variable == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Property == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Property).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->EnumMember == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Event == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Function == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Function).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Method == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->FunctionDeclaration).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Macro == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Macro).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Keyword == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Modifier == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Comment == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->String == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Number == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Regexp == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Operator == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else if (lsp::SemanticTokenType::get()->Member == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Member).toObject(); - tokenForeColor = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - } else { - result.fore[INDIC_TEXTFORE] = tokenForeColor; - } - } - return result; -} - - diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.h b/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.h deleted file mode 100644 index 5ad655236..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/stylelspjs.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSPJS_H -#define STYLELSPJS_H - -#include "textedittabwidget/style/stylelsp.h" - -class TextEdit; -class StyleLspJS : public StyleLsp -{ -public: - StyleLspJS(TextEdit *parent); - virtual IndicStyleExt symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) override; -}; - -#endif // STYLELSPJS_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.cpp b/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.cpp deleted file mode 100644 index 068ecf2ab..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylescijs.h" -#include "textedittabwidget/style/stylejsonfile.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/textedit.h" -#include "SciLexer.h" - -StyleSciJS::StyleSciJS(TextEdit *parent) - : StyleSci(parent) -{ -} - -QMap StyleSciJS::keyWords() const -{ - return StyleSci::keyWords(); -} - -void StyleSciJS::setStyle() -{ - StyleSci::setStyle(); - - auto jsonFile = edit()->getStyleFile(); - if (jsonFile->setTheme(StyleJsonFile::Theme::get()->Dark)) { - auto highLightColor = [&](const QString &key) -> int { - QJsonObject tempObj = jsonFile->value(key).toObject(); - return StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toUInt(nullptr, 16)); - }; - // comment. - int color = highLightColor(StyleJsonFile::Key_1::get()->Comment); - edit()->styleSetFore(SCE_HJ_COMMENTLINE, color); - edit()->styleSetFore(SCE_HJ_COMMENT, color); - edit()->styleSetFore(SCE_HJ_COMMENTDOC, color); - - // number. - color = highLightColor(StyleJsonFile::Key_1::get()->Number); - edit()->styleSetFore(SCE_HJ_NUMBER, color); - - // keyword. - color = highLightColor(StyleJsonFile::Key_1::get()->Keyword); - edit()->styleSetFore(SCE_HJ_KEYWORD, color); - - // string. - color = highLightColor(StyleJsonFile::Key_1::get()->String); - edit()->styleSetFore(SCE_HJ_DOUBLESTRING, color); - edit()->styleSetFore(SCE_HJ_DOUBLESTRING, color); - - // word. - color = highLightColor(StyleJsonFile::Key_1::get()->Text); - edit()->styleSetFore(SCE_HJ_WORD, color); - } -} - -void StyleSciJS::setLexer() -{ - StyleSci::setLexer(); -} - -int StyleSciJS::sectionEnd() const -{ - return SCE_HJ_REGEX; -} - -int StyleSciJS::sectionStart() const -{ - return SCE_HJ_START; -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.h b/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.h deleted file mode 100644 index 023d343e5..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/stylescijs.h +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCIJS_H -#define STYLESCIJS_H - -#include "textedittabwidget/style/stylesci.h" -#include "common/common.h" - -class StyleSciJS : public StyleSci -{ -public: - StyleSciJS(TextEdit *parent); - virtual QMap keyWords() const override; - virtual void setStyle() override; - virtual void setLexer() override; - virtual int sectionEnd() const override; - virtual int sectionStart() const override; -}; - -#endif // STYLESCIJS_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.cpp b/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.cpp deleted file mode 100644 index d72ba7a10..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditjs.h" -#include "stylelspjs.h" -#include "stylescijs.h" -#include "textedittabwidget/style/stylejsonfile.h" - -class TextEditJSPrivate -{ - friend class TextEditJS; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - StyleJsonFile *styleFile {nullptr}; -}; - -TextEditJS::TextEditJS(QWidget *parent) - : TextEdit (parent) - , d (new TextEditJSPrivate) -{ - d->styleFile = new StyleJsonFile(this); - d->styleFile->setLanguage(this->supportLanguage()); - d->styleFile->setTheme(StyleJsonFile::Theme::get()->Dark); - d->styleSci = new StyleSciJS(this); - d->styleLsp = new StyleLspJS(this); -} - -TextEditJS::~TextEditJS() -{ - if (d) { - if (d->styleLsp) - delete d->styleLsp; - if (d->styleSci) - delete d->styleSci; - if (d->styleFile) - delete d->styleFile; - } -} - -QString TextEditJS::supportLanguage() -{ - return "js"; -} - -QString TextEditJS::implLanguage() -{ - return "js"; -} - -StyleLsp *TextEditJS::getStyleLsp() const -{ - return d->styleLsp; -} - -StyleSci *TextEditJS::getStyleSci() const -{ - return d->styleSci; -} - -StyleJsonFile *TextEditJS::getStyleFile() const -{ - return d->styleFile; -} - diff --git a/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.h b/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.h deleted file mode 100644 index bed6f30cd..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/js/texteditjs.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITJS_H -#define TEXTEDITJS_H - -#include "textedittabwidget/textedit.h" - -class TextEditJSPrivate; -class TextEditJS : public TextEdit -{ - Q_OBJECT - TextEditJSPrivate *const d; -public: - explicit TextEditJS(QWidget * parent = nullptr); - virtual ~TextEditJS(); - virtual QString supportLanguage(); - static QString implLanguage(); - - virtual StyleLsp *getStyleLsp() const; - virtual StyleSci *getStyleSci() const; - virtual StyleJsonFile *getStyleFile() const; -}; - -#endif // TEXTEDITJS_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.cpp b/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.cpp deleted file mode 100644 index 6c86ce3de..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelsppython.h" - -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/style/stylejsonfile.h" - -StyleLspPython::StyleLspPython(TextEdit *parent) - : StyleLsp (parent) -{ - -} - - -StyleLsp::IndicStyleExt StyleLspPython::symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) -{ - Q_UNUSED(modifier); - IndicStyleExt result; - - auto jsonFile = edit()->getStyleFile(); - auto tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Self).toObject(); - auto tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - if (lsp::SemanticTokenType::get()->Namespace == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Namespace).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Type == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Type).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Class == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Enum == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Interface == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Struct == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->TypeParameter == token) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Parameter == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Variable == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Property == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Property).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->EnumMember == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Enumeration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Event == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Function == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Function).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Method == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->FunctionDeclaration).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Macro == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Macro).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Keyword == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Modifier == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Text).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Comment == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->String == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Number == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Regexp == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - if (lsp::SemanticTokenType::get()->Operator == token){ - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - } - result.fore[INDIC_TEXTFORE] = tempFore; - - return result; -} - - diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.h b/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.h deleted file mode 100644 index 1ab450796..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/stylelsppython.h +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSPPYTHON_H -#define STYLELSPPYTHON_H - -#include "textedittabwidget/style/stylelsp.h" - -class TextEdit; -class StyleLspPython : public StyleLsp -{ -public: - StyleLspPython(TextEdit *parent); - virtual IndicStyleExt symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) override; -}; - -#endif // STYLELSPPYTHON_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.cpp b/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.cpp deleted file mode 100644 index 891262acb..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.cpp +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylescipython.h" -#include "textedittabwidget/style/stylejsonfile.h" -#include "textedittabwidget/style/stylecolor.h" -#include "textedittabwidget/textedit.h" -#include "SciLexer.h" - -StyleSciPython::StyleSciPython(TextEdit *parent) - : StyleSci (parent) -{ - -} - -QMap StyleSciPython::keyWords() const -{ - return StyleSci::keyWords(); -} - -void StyleSciPython::setStyle() -{ - StyleSci::setStyle(); -} - -void StyleSciPython::setLexer() -{ - StyleSci::setLexer(); -} - -int StyleSciPython::sectionEnd() const -{ - return SCE_P_FTRIPLEDOUBLE; -} - -int lightToDark(int color) -{ - return 0xFFFFFF - color; -} - -void StyleSciPython::setThemeColor(DGuiApplicationHelper::ColorType colorType) -{ - StyleSci::setThemeColor(colorType); - - QJsonObject tempObj; - int tempFore; - auto jsonFile = edit()->getStyleFile(); - if (colorType == DGuiApplicationHelper::DarkType) { - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_COMMENTLINE, tempFore); - edit()->styleSetFore(SCE_P_COMMENTBLOCK, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_CLASSNAME, tempFore); - edit()->styleSetFore(SCE_P_DEFNAME, tempFore); - edit()->styleSetFore(SCE_P_TRIPLE, tempFore); - edit()->styleSetFore(SCE_P_TRIPLEDOUBLE, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_IDENTIFIER, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_NUMBER, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_WORD, tempFore); - edit()->styleSetFore(SCE_P_WORD2, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_STRING, tempFore); - edit()->styleSetFore(SCE_P_CHARACTER, tempFore); - edit()->styleSetFore(SCE_P_STRINGEOL, tempFore); - edit()->styleSetFore(SCE_P_DECORATOR, tempFore); - edit()->styleSetFore(SCE_P_FSTRING, tempFore); - edit()->styleSetFore(SCE_P_FCHARACTER, tempFore); - edit()->styleSetFore(SCE_P_FTRIPLE, tempFore); - edit()->styleSetFore(SCE_P_FTRIPLEDOUBLE, tempFore); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_OPERATOR, tempFore); // 符号 - } else { // TODO(mozart):same with dark,should use light theme. - edit()->styleSetFore(SCE_P_DEFAULT, StyleColor::color(StyleColor::Table::get()->DarkBlue)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Comment).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_COMMENTLINE, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_COMMENTBLOCK, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Class).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_CLASSNAME, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_DEFNAME, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_TRIPLE, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_TRIPLEDOUBLE, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Variable).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_IDENTIFIER, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Number).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_NUMBER, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Keyword).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_WORD, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_WORD2, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->String).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_STRING, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_CHARACTER, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_STRINGEOL, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_DECORATOR, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_FSTRING, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_FCHARACTER, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_FTRIPLE, lightToDark(tempFore)); - edit()->styleSetFore(SCE_P_FTRIPLEDOUBLE, lightToDark(tempFore)); - - tempObj = jsonFile->value(StyleJsonFile::Key_1::get()->Operators).toObject(); - tempFore = StyleColor::color(tempObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16)); - edit()->styleSetFore(SCE_P_OPERATOR, lightToDark(tempFore)); // 符号 - } -} diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.h b/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.h deleted file mode 100644 index ec16881a6..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/stylescipython.h +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCIPYTHON_H -#define STYLESCIPYTHON_H - -#include "textedittabwidget/style/stylesci.h" -#include "common/common.h" - -class StyleSciPython : public StyleSci -{ -public: - StyleSciPython(TextEdit *parent); - virtual QMap keyWords() const override; - virtual void setStyle() override; - virtual void setLexer() override; - virtual int sectionEnd() const override; - -protected: - virtual void setThemeColor(DGuiApplicationHelper::ColorType colorType) override; -}; - -#endif // STYLESCIPYTHON_H diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.cpp b/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.cpp deleted file mode 100644 index 6736b0bff..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditpython.h" -#include "stylelsppython.h" -#include "stylescipython.h" -#include "textedittabwidget/style/stylejsonfile.h" - -class TextEditPythonPrivate -{ - friend class TextEditPython; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - StyleJsonFile *styleFile {nullptr}; -}; - -TextEditPython::TextEditPython(QWidget *parent) - : TextEdit (parent) - , d (new TextEditPythonPrivate) -{ - d->styleFile = new StyleJsonFile(this); - d->styleFile->setLanguage(this->supportLanguage()); - d->styleFile->setTheme(StyleJsonFile::Theme::get()->Dark); - d->styleSci = new StyleSciPython(this); - d->styleLsp = new StyleLspPython(this); -} - -TextEditPython::~TextEditPython() -{ - if (d) { - if (d->styleLsp) - delete d->styleLsp; - if (d->styleSci) - delete d->styleSci; - if (d->styleFile) - delete d->styleFile; - } -} - -QString TextEditPython::supportLanguage() -{ - return "python"; // 向上兼容Scintilla中Lexer -} - -QString TextEditPython::implLanguage() -{ - return "python"; // 界面调用兼容 -} - -StyleLsp *TextEditPython::getStyleLsp() const -{ - return d->styleLsp; -} - -StyleSci *TextEditPython::getStyleSci() const -{ - return d->styleSci; -} - -StyleJsonFile *TextEditPython::getStyleFile() const -{ - return d->styleFile; -} - diff --git a/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.h b/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.h deleted file mode 100644 index c44813937..000000000 --- a/src/plugins/codeeditor/textedittabwidget/language/python/texteditpython.h +++ /dev/null @@ -1,26 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITPYTHON_H -#define TEXTEDITPYTHON_H - -#include "textedittabwidget/textedit.h" - -class TextEditPythonPrivate; -class TextEditPython : public TextEdit -{ - Q_OBJECT - TextEditPythonPrivate *const d; -public: - explicit TextEditPython(QWidget * parent = nullptr); - virtual ~TextEditPython(); - virtual QString supportLanguage(); - static QString implLanguage(); - - virtual StyleLsp *getStyleLsp() const; - virtual StyleSci *getStyleSci() const; - virtual StyleJsonFile *getStyleFile() const; -}; - -#endif // TEXTEDITPYTHON_H diff --git a/src/plugins/codeeditor/textedittabwidget/scintillaeditextern.h b/src/plugins/codeeditor/textedittabwidget/scintillaeditextern.h deleted file mode 100644 index 5ed89865d..000000000 --- a/src/plugins/codeeditor/textedittabwidget/scintillaeditextern.h +++ /dev/null @@ -1,125 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef SCINTILLAEDITEXTERN_H -#define SCINTILLAEDITEXTERN_H - -#include "ScintillaEdit.h" -#include "style/stylelsp.h" -#include "style/stylesci.h" - -#include -#include - -class ScintillaEditExternPrivate; -class ScintillaEditExtern : public ScintillaEdit -{ - Q_OBJECT - ScintillaEditExternPrivate *const d; -public: - explicit ScintillaEditExtern(QWidget *parent = nullptr); - virtual ~ScintillaEditExtern(); - - void initThemeColor(); - virtual QString supportLanguage(){return "";} // 当前编辑器支持的语言类型 - static QString fileLanguage(const QString &path); // 获取注册文件中语言支持 - virtual void setFile(const QString &filePath); - virtual QString file() const; - virtual void setProjectKey(const newlsp::ProjectKey &key); - virtual newlsp::ProjectKey projectKey() const; - /** - * @brief language get value from projectKey - * extension: shuold used to mimetype, not from outside setting - * @return if unset return default "" - */ - virtual QString language() const; - /** - * @brief workspace get value from projectKey - * @return if unset return default "" - */ - virtual QString workspace() const; // from projectKey, - - void addDebugPoint(int line); - void removeDebugPoint(int line); - void debugPointAllDelete(); - void jumpToLine(int line); - void jumpToRange(Scintilla::Position start, Scintilla::Position end); - void runningToLine(int line); - void runningEnd(); - void saveText(); - bool isLeave(); - void replaceRange(Scintilla::Position start, Scintilla::Position end, const QString &text); - QPair findText(long int start, long int end, const QString &text); - void findText(const QString &srcText, bool reverse); - void findText(const QString &srcText, long int startPos, long int endPos); - void replaceAll(const QString &srcText, const QString &destText); - void setLineBackground(int line, const QColor &color); - void delLineBackground(int line); - void cleanLineBackground(); - void setAnnotation(int line, const QString &title, const AnnotationInfo &info); - void cleanAnnotation(const QString &title); - void updateFile(); - void saveAsText(); - bool isSaveText(); - void cleanIsSaveText(); - void find(const QString &srcText, int operateType); - void replace(const QString &srcText, const QString &destText, int operateType); - - // Mozart added. - QString getSelectedText(); - QString getCursorLineText(); - QString getCursorBeforeText(); - QString getCursorAfterText(); - void replaceSelectedRange(const QString &text); - void showTips(const QString &tips); - void insertText(const QString &text); - -signals: - void hovered(Scintilla::Position position); - void hoverCleaned(Scintilla::Position position); - void definitionHover(Scintilla::Position position); - void definitionHoverCleaned(Scintilla::Position position); - void textInserted(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line); - void textDeleted(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line); - void completed(Scintilla::Position position); - void completeCleaned(); - void indicClicked(Scintilla::Position position); - void indicReleased(Scintilla::Position position); - void saved(const QString &file); - void replaceed(const QString &file, Scintilla::Position start, - Scintilla::Position end, const QString &text); - void selectionMenu(QContextMenuEvent *event); - void fileChanged(const QString &file); - void fileClosed(const QString &file); - void fileSaved(const QString &file); - -private slots: - void sciModified(Scintilla::ModificationFlags type, Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line, - Scintilla::FoldLevel foldNow, Scintilla::FoldLevel foldPrev); - void sciNotify(Scintilla::NotificationData *data); - void sciUpdateUi(Scintilla::Update update); - void sciDwellStart(int x, int y); - void sciDwellEnd(int x, int y); - void sciUpdateAnnotation(); - - void setThemeColor(DGuiApplicationHelper::ColorType colorType); - -protected: - virtual void keyReleaseEvent(QKeyEvent *event) override; - virtual void keyPressEvent(QKeyEvent *event) override; - virtual void enterEvent(QEvent *event) override; - virtual void leaveEvent(QEvent *event) override; - virtual void focusInEvent(QFocusEvent *event) override; - virtual void focusOutEvent(QFocusEvent *event) override; - virtual void contextMenuEvent(QContextMenuEvent *event) override; - virtual void sciMarginClicked(Scintilla::Position position, Scintilla::KeyMod modifiers, int margin); -}; - -#endif // SCINTILLAEDITEXTERN_H diff --git a/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.cpp b/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.cpp deleted file mode 100644 index 391f584df..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "lspclientkeeper.h" - -#include -#include - -//#define AUTO_LANUCH_LSP_SERVER - -#define LANGUAGE_ADAPTER_NAME "languageadapter" -#define LANGUAGE_ADAPTER_PATH CustomPaths::global(CustomPaths::Tools) \ - + QDir::separator() + LANGUAGE_ADAPTER_NAME - -LSPClientKeeper::LSPClientKeeper() -{ -#ifdef AUTO_LANUCH_LSP_SERVER - while (ProcessUtil::portOverhead(defPort)) { - defPort ++; - } - QString currDefPort = QString::number(defPort); - QString currPid = QString::number(qApp->applicationPid()); - lspServerProc = new QProcess; - lspServerProc->setProgram(LANGUAGE_ADAPTER_PATH); - lspServerProc->setArguments({"--port", currDefPort, - "--parentPid", currPid}); - lspServerProc->setReadChannelMode(QProcess::SeparateChannels); - lspServerProc->start(); - while (!lspServerProc->canReadLine()) { - lspServerProc->waitForReadyRead(); - QByteArray lineData = lspServerProc->readLine(); - qInfo() << "[lsp server]:" << lineData; - if ("Server started successfully\n" == lineData) { - QObject::connect(lspServerProc, &QProcess::readyRead, [=](){ - qInfo() << qPrintable(lspServerProc->readAll()); - }); - break; - } - } - qInfo() << lspServerProc << lspServerProc->state(); - if (lspServerProc->state() != QProcess::ProcessState::Running) - qInfo() << lspServerProc->errorString() << LANGUAGE_ADAPTER_PATH; -#endif -} - -LSPClientKeeper::~LSPClientKeeper() -{ - if (client) - delete client; -} - -LSPClientKeeper *LSPClientKeeper::instance() -{ - static LSPClientKeeper ins; - return &ins; -} - -newlsp::Client *LSPClientKeeper::get(const newlsp::ProjectKey &key) -{ - if (!key.isValid()) - return nullptr; - - if (client) { - qApp->metaObject()->invokeMethod(client, "selectLspServer", Q_ARG(const newlsp::ProjectKey &, key)); - } else { - client = new newlsp::Client(); - qApp->metaObject()->invokeMethod(client, "selectLspServer", Q_ARG(const newlsp::ProjectKey &, key)); - } - - if (!projectKeys.contains(key)) { - QString complieDB_Path = QString::fromStdString(key.workspace) + QDir::separator() + ".unioncode"; - qApp->metaObject()->invokeMethod(client, "initRequest", Q_ARG(const QString &, complieDB_Path)); - projectKeys.append(key); - } - - return client; -} diff --git a/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.h b/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.h deleted file mode 100644 index f550a9a39..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/lspclientkeeper.h +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef LSPCLIENTKEEPER_H -#define LSPCLIENTKEEPER_H - -#include "common/common.h" - -class LSPClientKeeper final -{ - Q_DISABLE_COPY(LSPClientKeeper) -public: - LSPClientKeeper(); - - virtual ~LSPClientKeeper(); - - static LSPClientKeeper *instance(); - - newlsp::Client *get(const newlsp::ProjectKey &key); - -private: - QList projectKeys; - newlsp::Client* client{nullptr}; -}; - -#endif // LSPCLIENTKEEPER_H diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylecolor.cpp b/src/plugins/codeeditor/textedittabwidget/style/stylecolor.cpp deleted file mode 100644 index 7ff120221..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylecolor.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylecolor.h" - - - - - - diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylecolor.h b/src/plugins/codeeditor/textedittabwidget/style/stylecolor.h deleted file mode 100644 index deea8f0ca..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylecolor.h +++ /dev/null @@ -1,175 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLECOLOR_H -#define STYLECOLOR_H - -#include "common/common.h" - -//from https://www.w3school.com.cn/cssref/css_colors.asp -namespace StyleColor -{ -enum_def(Table, QColor) -{ - enum_exp AliceBlue = QRgb(0xF0F8FF); - enum_exp AntiqueWhite = QRgb(0xFAEBD7); - enum_exp Aqua = QRgb(0x00FFFF); - enum_exp Aquamarine = QRgb(0x7FFFD4); - enum_exp Azure = QRgb(0xF0FFFF); - enum_exp Beige = QRgb(0xF5F5DC); - enum_exp Bisque = QRgb(0xFFE4C4); - enum_exp Black = QRgb(0x000000); - enum_exp BlanchedAlmond = QRgb(0xFFEBCD); - enum_exp Blue = QRgb(0x0000FF); - enum_exp BlueViolet = QRgb(0x8A2BE2); - enum_exp Brown = QRgb(0xA52A2A); - enum_exp BurlyWood = QRgb(0xDEB887); - enum_exp CadetBlue = QRgb(0x5F9EA0); - enum_exp Chartreuse = QRgb(0x7FFF00); - enum_exp Chocolate = QRgb(0xD2691E); - enum_exp Coral = QRgb(0xFF7F50); - enum_exp CornflowerBlue = QRgb(0x6495ED); - enum_exp Cornsilk = QRgb(0xFFF8DC); - enum_exp Crimson = QRgb(0xDC143C); - enum_exp Cyan = QRgb(0x00FFFF); - enum_exp DarkBlue = QRgb(0x00008B); - enum_exp DarkCyan = QRgb(0x008B8B); - enum_exp DarkGoldenRod = QRgb(0xB8860B); - enum_exp DarkGray = QRgb(0xA9A9A9); - enum_exp DarkGreen = QRgb(0x006400); - enum_exp DarkKhaki = QRgb(0xBDB76B); - enum_exp DarkMagenta = QRgb(0x8B008B); - enum_exp DarkOliveGreen = QRgb(0x556B2F); - enum_exp Darkorange = QRgb(0xFF8C00); - enum_exp DarkOrchid = QRgb(0x9932CC); - enum_exp DarkRed = QRgb(0x8B0000); - enum_exp DarkSalmon = QRgb(0xE9967A); - enum_exp DarkSeaGreen = QRgb(0x8FBC8F); - enum_exp DarkSlateBlue = QRgb(0x483D8B); - enum_exp DarkSlateGray = QRgb(0x2F4F4F); - enum_exp DarkTurquoise = QRgb(0x00CED1); - enum_exp DarkViolet = QRgb(0x9400D3); - enum_exp DeepPink = QRgb(0xFF1493); - enum_exp DeepSkyBlue = QRgb(0x00BFFF); - enum_exp DimGray = QRgb(0x696969); - enum_exp DodgerBlue = QRgb(0x1E90FF); - enum_exp Feldspar = QRgb(0xD19275); - enum_exp FireBrick = QRgb(0xB22222); - enum_exp FloralWhite = QRgb(0xFFFAF0); - enum_exp ForestGreen = QRgb(0x228B22); - enum_exp Fuchsia = QRgb(0xFF00FF); - enum_exp Gainsboro = QRgb(0xDCDCDC); - enum_exp GhostWhite = QRgb(0xF8F8FF); - enum_exp Gold = QRgb(0xFFD700); - enum_exp GoldenRod = QRgb(0xDAA520); - enum_exp Gray = QRgb(0x808080); - enum_exp Green = QRgb(0x008000); - enum_exp GreenYellow = QRgb(0xADFF2F); - enum_exp HoneyDew = QRgb(0xF0FFF0); - enum_exp HotPink = QRgb(0xFF69B4); - enum_exp IndianRed = QRgb(0xCD5C5C); - enum_exp Indigo = QRgb(0x4B0082); - enum_exp Ivory = QRgb(0xFFFFF0); - enum_exp Khaki = QRgb(0xF0E68C); - enum_exp Lavender = QRgb(0xE6E6FA); - enum_exp LavenderBlush = QRgb(0xFFF0F5); - enum_exp LawnGreen = QRgb(0x7CFC00); - enum_exp LemonChiffon = QRgb(0xFFFACD); - enum_exp LightBlue = QRgb(0xADD8E6); - enum_exp LightCoral = QRgb(0xF08080); - enum_exp LightCyan = QRgb(0xE0FFFF); - enum_exp LightGoldenRodYellow = QRgb(0xFAFAD2); - enum_exp LightGrey = QRgb(0xD3D3D3); - enum_exp LightGreen = QRgb(0x90EE90); - enum_exp LightPink = QRgb(0xFFB6C1); - enum_exp LightSalmon = QRgb(0xFFA07A); - enum_exp LightSeaGreen = QRgb(0x20B2AA); - enum_exp LightSkyBlue = QRgb(0x87CEFA); - enum_exp LightSlateBlue = QRgb(0x8470FF); - enum_exp LightSlateGray = QRgb(0x778899); - enum_exp LightSteelBlue = QRgb(0xB0C4DE); - enum_exp LightYellow = QRgb(0xFFFFE0); - enum_exp Lime = QRgb(0x00FF00); - enum_exp LimeGreen = QRgb(0x32CD32); - enum_exp Linen = QRgb(0xFAF0E6); - enum_exp Magenta = QRgb(0xFF00FF); - enum_exp Maroon = QRgb(0x800000); - enum_exp MediumAquaMarine = QRgb(0x66CDAA); - enum_exp MediumBlue = QRgb(0x0000CD); - enum_exp MediumOrchid = QRgb(0xBA55D3); - enum_exp MediumPurple = QRgb(0x9370D8); - enum_exp MediumSeaGreen = QRgb(0x3CB371); - enum_exp MediumSlateBlue = QRgb(0x7B68EE); - enum_exp MediumSpringGreen = QRgb(0x00FA9A); - enum_exp MediumTurquoise = QRgb(0x48D1CC); - enum_exp MediumVioletRed = QRgb(0xC71585); - enum_exp MidnightBlue = QRgb(0x191970); - enum_exp MintCream = QRgb(0xF5FFFA); - enum_exp MistyRose = QRgb(0xFFE4E1); - enum_exp Moccasin = QRgb(0xFFE4B5); - enum_exp NavajoWhite = QRgb(0xFFDEAD); - enum_exp Navy = QRgb(0x000080); - enum_exp OldLace = QRgb(0xFDF5E6); - enum_exp Olive = QRgb(0x808000); - enum_exp OliveDrab = QRgb(0x6B8E23); - enum_exp Orange = QRgb(0xFFA500); - enum_exp OrangeRed = QRgb(0xFF4500); - enum_exp Orchid = QRgb(0xDA70D6); - enum_exp PaleGoldenRod = QRgb(0xEEE8AA); - enum_exp PaleGreen = QRgb(0x98FB98); - enum_exp PaleTurquoise = QRgb(0xAFEEEE); - enum_exp PaleVioletRed = QRgb(0xD87093); - enum_exp PapayaWhip = QRgb(0xFFEFD5); - enum_exp PeachPuff = QRgb(0xFFDAB9); - enum_exp Peru = QRgb(0xCD853F); - enum_exp Pink = QRgb(0xFFC0CB); - enum_exp Plum = QRgb(0xDDA0DD); - enum_exp PowderBlue = QRgb(0xB0E0E6); - enum_exp Purple = QRgb(0x800080); - enum_exp Red = QRgb(0xFF0000); - enum_exp RosyBrown = QRgb(0xBC8F8F); - enum_exp RoyalBlue = QRgb(0x4169E1); - enum_exp SaddleBrown = QRgb(0x8B4513); - enum_exp Salmon = QRgb(0xFA8072); - enum_exp SandyBrown = QRgb(0xF4A460); - enum_exp SeaGreen = QRgb(0x2E8B57); - enum_exp SeaShell = QRgb(0xFFF5EE); - enum_exp Sienna = QRgb(0xA0522D); - enum_exp Silver = QRgb(0xC0C0C0); - enum_exp SkyBlue = QRgb(0x87CEEB); - enum_exp SlateBlue = QRgb(0x6A5ACD); - enum_exp SlateGray = QRgb(0x708090); - enum_exp Snow = QRgb(0xFFFAFA); - enum_exp SpringGreen = QRgb(0x00FF7F); - enum_exp SteelBlue = QRgb(0x4682B4); - enum_exp Tan = QRgb(0xD2B48C); - enum_exp Teal = QRgb(0x008080); - enum_exp Thistle = QRgb(0xD8BFD8); - enum_exp Tomato = QRgb(0xFF6347); - enum_exp Turquoise = QRgb(0x40E0D0); - enum_exp Violet = QRgb(0xEE82EE); - enum_exp VioletRed = QRgb(0xD02090); - enum_exp Wheat = QRgb(0xF5DEB3); - enum_exp White = QRgb(0xFFFFFF); - enum_exp WhiteSmoke = QRgb(0xF5F5F5); - enum_exp Yellow = QRgb(0xFFFF00); - enum_exp YellowGreen = QRgb(0x9ACD32); -}; - -inline int color(const QColor &col) -{ - return (col.blue() << 16) | (col.green() << 8) | col.red(); -} - -inline int colorAlpha(const QColor &col) -{ - return (col.alpha() << 24) | (col.blue() << 16) | (col.green() << 8) | col.red(); -} - -inline int colorAlpha(const QColor &col, const char alpha) { - return (col.alpha() << 24) | (col.blue() << 16) | (col.green() << 8) | col.red(); -} -}; - -# endif // STYLECOLOR_H diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.cpp b/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.cpp deleted file mode 100644 index 46cd2d7d0..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.cpp +++ /dev/null @@ -1,123 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylejsonfile.h" -#include "textedittabwidget/textedit.h" -#include "common/common.h" - -#include -#include -#include -#include - -namespace { -static QMutex mutex; -} - -class StyleJsonFilePrivate -{ - friend class StyleJsonFile; - TextEdit *edit; - QHash userObjects{}; - QString languageID; - QJsonObject themeObj; - bool load(const QString &languageID); -}; - -StyleJsonFile::StyleJsonFile(TextEdit *edit) - : QObject (edit) - , d(new StyleJsonFilePrivate()) -{ - d->edit = edit; -} - -TextEdit *StyleJsonFile::edit() -{ - return d->edit; -} - -StyleJsonFile::~StyleJsonFile() -{ - if (d) { - delete d; - } -} - -bool StyleJsonFile::setLanguage(const QString &languageID) -{ - bool result = false; - result = d->load(languageID); - - QMutexLocker locker(&::mutex); - if (result) { - d->languageID = languageID; - } - return result; -} - -QStringList StyleJsonFile::themes() const -{ - QMutexLocker locker(&::mutex); - - if (d->languageID.isEmpty()) - return {}; - - return d->userObjects[d->languageID].keys(); -} - -bool StyleJsonFile::setTheme(const QString &theme) -{ - QMutexLocker locker(&::mutex); - - if (d->languageID.isEmpty()) { - qCritical() << "Failed, Language is no setting, " - "call setTheme after need to call setLanguage"; - return false; - } - - QJsonObject fileObj= d->userObjects.value(d->languageID); - if (!fileObj.keys().contains(theme)) - return false; - - d->themeObj = fileObj.value(theme).toObject(); - - if (d->themeObj.isEmpty()) - return false; - - return true; -} - -QJsonValue StyleJsonFile::value(const QString &Key) const -{ - QMutexLocker locker(&::mutex); - return d->themeObj.value(Key); -} - -bool StyleJsonFilePrivate::load(const QString &languageID) -{ - QMutexLocker locker(&::mutex); - - if (!userObjects[languageID].isEmpty()) - return true; - - QString languageStyleFilePath = support_file::EditorStyle::globalPath(languageID); - QFile file(languageStyleFilePath); - - if (!file.exists()) { - return false; - } - - QJsonObject obj; - if (file.open(QFile::ReadOnly)){ - QJsonParseError error; - auto jsonDoc = QJsonDocument::fromJson(file.readAll(), &error); - if (error.error != QJsonParseError::NoError) { - qCritical() << error.errorString(); - } - obj = jsonDoc.object(); - userObjects[languageID] = obj; - file.close(); - } - return true; -} diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.h b/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.h deleted file mode 100644 index 926138463..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylejsonfile.h +++ /dev/null @@ -1,105 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLEJSONFILE_H -#define STYLEJSONFILE_H - -#include -#include -#include -#include - -#include "common/common.h" - -/*! - * \brief The StyleJsonFile class - * 该类线程安全 - */ -class TextEdit; -class StyleJsonFilePrivate; -class StyleJsonFile : public QObject -{ - Q_OBJECT - StyleJsonFilePrivate *const d; -public: - enum_def(Theme, QString) - { - enum_exp Dark = "Dark"; - enum_exp Light = "Light"; - }; - - enum_def(Key_1, QString) - { - enum_exp Self = "Self"; - enum_exp Namespace = "Namespace"; - enum_exp Macro = "Macro"; - enum_exp Type = "Type"; - enum_exp Class = "Class"; - enum_exp Variable = "Variable"; - enum_exp Property = "Property"; - enum_exp Text = "Text"; - enum_exp Link = "Link"; - enum_exp Selection = "Selection"; - enum_exp LineNumber = "Line Number"; - enum_exp Keyword = "Keyword"; - enum_exp Punctuation = "Punctuation"; - enum_exp Operators = "Operators"; - enum_exp OverloadedOperators = "Overloaded Operators"; - enum_exp Preprocessor = "Preprocessor"; - enum_exp SearchResult = "Search Result"; - enum_exp SearchScope = "Search Scope"; - enum_exp Parentheses = "Parentheses"; - enum_exp MismatchedParentheses = "Mismatched Parentheses"; - enum_exp AutoComplete = "Auto Complete"; - enum_exp CurrentLine = "Current Line"; - enum_exp CurrentLineNumber = "Current Line Number"; - enum_exp Occurrences = "Occurrences"; - enum_exp UnusedOccurrences = "Unused Occurrences"; - enum_exp RenamingOccurrences = "Renaming Occurrences"; - enum_exp Number = "Number"; - enum_exp String = "String"; - enum_exp PrimitiveType = "Primitive Type"; - enum_exp Local = "Local"; - enum_exp Field = "Field"; - enum_exp Global = "Global"; - enum_exp Enumeration = "Enumeration"; - enum_exp Function = "Function"; - enum_exp FunctionDeclaration = "Function Declaration"; - enum_exp FunctionDefinition = "Function Definition"; - enum_exp VirtualFunction = "Virtual Function"; - enum_exp Comment = "Comment"; - enum_exp Error = "Error"; - enum_exp ErrorContext = "Error Context"; - enum_exp Warning = "Warning"; - enum_exp WarningContext = "Warning Context"; - enum_exp Method = "Method"; - enum_exp Parameter = "Parameter"; - enum_exp Member = "Member"; - }; - - enum_def(Key_2, QString) - { - enum_exp Background = "Background"; - enum_exp Foreground = "Foreground"; - enum_exp Cursor = "Cursor"; - enum_exp FontSize = "FontSize"; - enum_exp UnderLine = "UnderLine"; - }; - - enum_def(Key_3, QString) - { - enum_exp Color = "Color"; - enum_exp Style = "Style"; - }; - - StyleJsonFile(TextEdit *edit); - TextEdit *edit(); - virtual ~StyleJsonFile(); - bool setLanguage(const QString &languageID); - QStringList themes() const; - bool setTheme(const QString &theme); - QJsonValue value(const QString &Key) const; -}; - -#endif // STYLEJSONFILE_H diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylelsp.cpp b/src/plugins/codeeditor/textedittabwidget/style/stylelsp.cpp deleted file mode 100644 index 5db454bb7..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylelsp.cpp +++ /dev/null @@ -1,1002 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylelsp.h" -#include "Scintilla.h" -#include "stylesci.h" -#include "stylecolor.h" -#include "mainframe/texteditkeeper.h" -#include "textedittabwidget/textedit.h" -#include "textedittabwidget/textedittabwidget.h" -#include "textedittabwidget/style/lspclientkeeper.h" -#include "codelens/codelens.h" -#include "transceiver/codeeditorreceiver.h" -#include "renamepopup/renamepopup.h" -#include "base/abstractaction.h" - -#include "common/common.h" -#include "framework/service/qtclassmanager.h" -#include "services/window/windowservice.h" - -#include "Document.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace dpfservice; -DCORE_USE_NAMESPACE - -class SciRangeCache -{ - std::optional start; - std::optional end; -public: - SciRangeCache(Scintilla::Position start, Scintilla::Position end) - :start(start), end(end){} - SciRangeCache(){} - void clean() { start.reset(); end.reset(); } - bool isEmpty() { return start && end;} - Scintilla::Position getStart() const {return start.value();} - void setStart(const Scintilla::Position &value) {start = value;} - Scintilla::Position getEnd() const {return end.value();} - void setEnd(const Scintilla::Position &value) {end = value;} - bool operator == (const SciRangeCache &other){ - return start == other.start && end == other.end; - } -}; - -class SciPositionCache -{ - Scintilla::Position sciPosition = -1; -public: - SciPositionCache(){} - SciPositionCache(const Scintilla::Position &pos) - : sciPosition(pos){} - void clean() {sciPosition = -1;} - bool isEmpty() { return sciPosition == -1;} - Scintilla::Position getSciPosition() const { return sciPosition;} - void setSciPosition(const Scintilla::Position &value) { sciPosition = value;} -}; - -class DefinitionCache : public SciPositionCache -{ - std::optional> locations{}; - std::optional> locationLinks{}; - std::optional location{}; - SciRangeCache textRange{}; - int cursor = 0; //Invalid -public: - void clean() { - cleanFromLsp(); - cursor = 0; - SciPositionCache::clean(); - textRange.clean(); - } - void cleanFromLsp() { - if (locations) location.reset(); - if (location) location.reset(); - if (locationLinks) locationLinks.reset(); - } - - bool isEmpty() { - return locations && location && locationLinks - && cursor == 0 && SciPositionCache::isEmpty() - && textRange.isEmpty(); - } - std::vector getLocations() const - { - if (locations.has_value()) - return locations.value(); - return {}; - } - newlsp::Location getLocation() const {return location.value();} - std::vector getLocationLinks() const {return locationLinks.value();} - void set(const std::vector &value) {locations = value;} - void set(const newlsp::Location &value) {location = value;} - void set(const std::vector &value) {locationLinks = value;} - int getCursor() const {return cursor;} - void setCursor(int value) {cursor = value;} - SciRangeCache getTextRange() const {return textRange;} - void setTextRange(const SciRangeCache &value) {textRange = value;} -}; - -class HoverCache : public SciPositionCache -{ -public: - void clean() { SciPositionCache::clean(); } - bool isEmpty() { return SciPositionCache::isEmpty(); } -}; - -class RenameCache -{ - SciPositionCache start; - SciPositionCache end; -public: - void clean() { start.clean(); end.clean(); } - bool isEmpty() { return start.isEmpty() && end.isEmpty(); } - SciPositionCache getStart() const { return start; } - void setStart(const SciPositionCache &value) {start = value;} - SciPositionCache getEnd() const {return end;} - void setEnd(const SciPositionCache &value) {end = value;} -}; - -class CompletionCache -{ -public: - lsp::CompletionProvider provider; -}; - -struct TextChangeCache -{ - enum State{ - Inserted, - Deleted - }; - State state; - Scintilla::Position positionCache; - Scintilla::Position lengthCache; - Scintilla::Position linesAddedCache; - QByteArray textCache; - Scintilla::Position lineCache; -}; - -class StyleLspPrivate -{ - CompletionCache completionCache; - DefinitionCache definitionCache; - QTimer textChangedTimer; - HoverCache hoverCache; - RenamePopup renamePopup; - RenameCache renameCache; - TextEdit *edit{nullptr}; - TextChangeCache textChangedCache; - QList tokensCache; - static QAction *rangeFormattingAction; - static QString formattingFile; - friend class StyleLsp; - newlsp::Client *getClient() const; -}; - -QAction *StyleLspPrivate::rangeFormattingAction = nullptr; -QString StyleLspPrivate::formattingFile = ""; -// from ascii code -inline bool StyleLsp::isCharSymbol(const char ch) { - return (ch >= 0x21 && ch < 0x2F + 1) || (ch >= 0x3A && ch < 0x40 + 1) - || (ch >= 0x5B && ch < 0x60 + 1) || (ch >= 0x7B && ch < 0x7E + 1); -} - -Sci_Position StyleLsp::getSciPosition(sptr_t doc, const newlsp::Position &pos) -{ - auto docTemp = (Scintilla::Internal::Document*)(doc); - return docTemp->GetRelativePosition(docTemp->LineStart(pos.line), pos.character); -} - -lsp::Position StyleLsp::getLspPosition(sptr_t doc, sptr_t sciPosition) -{ - auto docTemp = (Scintilla::Internal::Document*)(doc); - int line = docTemp->LineFromPosition(sciPosition); - Sci_Position lineChStartPos = getSciPosition(doc, newlsp::Position{line, 0}); - return lsp::Position{line, (int)(sciPosition - lineChStartPos)}; -} - -int editLineNumber(int originLineNumber) -{ - return originLineNumber + 1; -} - -StyleLsp::StyleLsp(TextEdit *parent) - : QObject (parent) - , d (new StyleLspPrivate()) -{ - auto &ctx = dpfInstance.serviceContext(); - auto windowService = ctx.service(WindowService::name()); - if (!windowService) - return; - d->edit = parent; - - setIndicStyle(); - setMargin(); - - QObject::connect(d->edit, &ScintillaEditExtern::charAdded, this, &StyleLsp::SciCharAdded); - QObject::connect(d->edit, &ScintillaEditExtern::linesAdded, this, &StyleLsp::sciLinesAdded); - QObject::connect(d->edit, &ScintillaEditExtern::textInserted, this, &StyleLsp::sciTextInsertedTotal); - QObject::connect(d->edit, &ScintillaEditExtern::textDeleted, this, &StyleLsp::sciTextDeletedTotal); - QObject::connect(d->edit, &ScintillaEditExtern::hovered, this, &StyleLsp::sciHovered); - QObject::connect(d->edit, &ScintillaEditExtern::hoverCleaned, this, &StyleLsp::sciHoverCleaned); - QObject::connect(d->edit, &ScintillaEditExtern::definitionHover, this, &StyleLsp::sciDefinitionHover); - QObject::connect(d->edit, &ScintillaEditExtern::definitionHoverCleaned, this, &StyleLsp::sciDefinitionHoverCleaned); - QObject::connect(d->edit, &ScintillaEditExtern::indicClicked, this, &StyleLsp::sciIndicClicked); - QObject::connect(d->edit, &ScintillaEditExtern::indicReleased, this, &StyleLsp::sciIndicReleased); - QObject::connect(d->edit, &ScintillaEditExtern::selectionMenu, this, &StyleLsp::sciSelectionMenu); - QObject::connect(d->edit, &ScintillaEditExtern::replaceed, this, &StyleLsp::sciReplaced); - QObject::connect(d->edit, &ScintillaEditExtern::fileClosed, this, &StyleLsp::sciClosed); - QObject::connect(&d->renamePopup, &RenamePopup::editingFinished, this, &StyleLsp::renameRequest, Qt::UniqueConnection); - QObject::connect(CodeLens::instance(), &CodeLens::doubleClicked, - this, [=](const QString &filePath, const lsp::Range &range){ - newlsp::Range newRange; - newRange.start.line = range.start.line; - newRange.start.character = range.start.character; - newRange.end.line = range.end.line; - newRange.end.character = range.end.character; - EditorCallProxy::instance()->toJumpFileLineWithKey(d->edit->projectKey(), filePath, editLineNumber(range.start.line)); - }); - QObject::connect(qApp, &QApplication::applicationStateChanged, this, [=](Qt::ApplicationState state){ - if(state == Qt::ApplicationState::ApplicationInactive && d->edit->callTipActive()) - d->edit->callTipCancel(); - }); - - if (!d->rangeFormattingAction) { - d->rangeFormattingAction = new QAction(tr("Range Formatting")); - ActionManager::getInstance()->registerAction(d->rangeFormattingAction, "Tool.Range.Formatting", - tr("Range Formatting"), QKeySequence(Qt::Modifier::CTRL | Qt::Key::Key_I), - ""); - AbstractAction *actionImpl = new AbstractAction(d->rangeFormattingAction); - windowService->addAction(MWM_TOOLS, actionImpl); - QObject::connect(d->rangeFormattingAction, &QAction::triggered, [&](){ - if (d->getClient()) { - auto selStart = getLspPosition(d->edit->docPointer(), d->edit->selectionStart()); - auto selEnd = getLspPosition(d->edit->docPointer(), d->edit->selectionEnd()); - newlsp::Position newSelStart = {selStart.line, selStart.character}; - newlsp::Position newSelEnd = {selEnd.line, selEnd.character}; - newlsp::DocumentRangeFormattingParams params; - params.textDocument.uri = QUrl::fromLocalFile(d->edit->file()) - .toString().toStdString(); - params.range = newlsp::Range{newSelStart, newSelEnd}; - params.options.tabSize = 4; - params.options.insertSpaces = true; - d->formattingFile = d->edit->file(); - qApp->metaObject()->invokeMethod(d->getClient(), "rangeFormatting", - Q_ARG(const newlsp::DocumentRangeFormattingParams &, params)); - } - }); - } -} - -TextEdit *StyleLsp::edit() -{ - return d->edit; -} - -StyleLsp::~StyleLsp() -{ - -} - -void StyleLsp::initLspConnection() -{ - if (!d->edit) { - return; - } - - QObject::connect(d->getClient(), QOverload::of(&newlsp::Client::requestResult), - CodeLens::instance(), &CodeLens::displayReference, Qt::UniqueConnection); - - //bind signals to file diagnostics - QObject::connect(d->getClient(), QOverload::of(&newlsp::Client::publishDiagnostics), - this, [=](const newlsp::PublishDiagnosticsParams &data) {this->setDiagnostics(data);}); - - QObject::connect(d->getClient(), QOverload&>::of(&newlsp::Client::requestResult), - this, &StyleLsp::setTokenFull); - - QObject::connect(d->getClient(), QOverload::of(&newlsp::Client::hoverRes), - this, &StyleLsp::setHover); - - QObject::connect(d->getClient(), QOverload::of(&newlsp::Client::requestResult), - this, [=](const lsp::CompletionProvider& provider){ - d->completionCache.provider = provider; - }); - - QObject::connect(d->getClient(), &newlsp::Client::rangeFormattingRes, - this, &StyleLsp::rangeFormattingReplace); - - /* to use QOverload cast virtual slot can't working */ - QObject::connect(d->getClient(), QOverload::of(&newlsp::Client::definitionRes), - this, QOverload::of(&StyleLsp::setDefinition)); - QObject::connect(d->getClient(), QOverload&>::of(&newlsp::Client::definitionRes), - this, QOverload &>::of(&StyleLsp::setDefinition)); - QObject::connect(d->getClient(), QOverload&>::of(&newlsp::Client::definitionRes), - this, QOverload&>::of(&StyleLsp::setDefinition)); -} - -void StyleLsp::updateTokens() -{ - if (d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "openRequest", Qt::QueuedConnection, Q_ARG(const QString &, d->edit->file())); - qApp->metaObject()->invokeMethod(d->getClient(), "docSemanticTokensFull", Qt::QueuedConnection, Q_ARG(const QString &, d->edit->file())); - } -} - -int StyleLsp::getLspCharacter(sptr_t doc, sptr_t sciPosition) -{ - return getLspPosition(doc, sciPosition).character; -} - -void StyleLsp::sciTextInsertedTotal(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line) -{ - if (!d->edit || !d->getClient()) - return; - - if (d->textChangedTimer.isActive()) { - d->textChangedTimer.stop(); - } - - // 补全 - auto wordStartPos = d->edit->wordStartPosition(position - length, true); - setCompletion(d->edit->textRange(wordStartPos, position).replace(" ","") + text, - position - wordStartPos, d->completionCache.provider); - - if (position == d->textChangedCache.positionCache + d->textChangedCache.lengthCache) { - d->textChangedCache.lengthCache += length; - d->textChangedCache.textCache += text; - } else { - d->textChangedCache.positionCache = position; - d->textChangedCache.lengthCache = length; - d->textChangedCache.textCache = text; - d->textChangedCache.state = TextChangeCache::State::Inserted; //设置增量标志 - } - - d->textChangedTimer.start(500); - QObject::connect(&d->textChangedTimer, &QTimer::timeout, - this, &StyleLsp::sciTextChangedTotal, - Qt::UniqueConnection); -} - -void StyleLsp::sciTextDeletedTotal(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line) -{ - if (!d->edit || !d->getClient()) - return; - - if (d->textChangedTimer.isActive()) { - d->textChangedTimer.stop(); - } - - if (d->textChangedCache.lengthCache == 0) { // 性质跳变 - d->textChangedCache.state = TextChangeCache::State::Deleted; // 设置为减量 - d->textChangedCache.positionCache = position + length; - d->textChangedCache.lengthCache = length; - d->textChangedCache.textCache.insert(0, text); - } - - // 增量删除 - if (d->textChangedCache.state == TextChangeCache::State::Inserted) { - if (d->textChangedCache.positionCache + d->textChangedCache.lengthCache - length == position && 0 != position) { - d->textChangedCache.textCache.remove(d->textChangedCache.textCache.size() - length, - d->textChangedCache.textCache.size()); - d->textChangedCache.lengthCache -= length; - d->textChangedCache.state = TextChangeCache::State::Inserted; // 设置增量标志 - // // 补全 - // auto wordStartPos = d->edit->wordStartPosition(position, true); - // auto wordEndPos = d->edit->wordEndPosition(position, true); - // qInfo() << "\npositionCache" << d->textChangedCache.positionCache - // << "\ntextCache" << d->textChangedCache.textCache - // << "\nlengthCache" << d->textChangedCache.lengthCache - // << "\nstate" << d->textChangedCache.state - // << "\nwodStartPos" << wordStartPos - // << "\nwodEndPos" << wordEndPos - // << "textRange" << d->edit->textRange(wordStartPos, wordEndPos); - // setCompletion(d->edit->textRange(wordStartPos, wordEndPos), - // wordStartPos, d->completionCache.provider); - } - } else if (d->textChangedCache.state == TextChangeCache::State::Deleted){ - if (d->textChangedCache.positionCache == position + d->textChangedCache.lengthCache) { - d->textChangedCache.lengthCache += length; // 删除文字数量统计 - d->textChangedCache.textCache.insert(0, text); // 删除文字总览 - } - } - - d->textChangedTimer.start(500); - QObject::connect(&d->textChangedTimer, &QTimer::timeout, - this, &StyleLsp::sciTextChangedTotal, - Qt::UniqueConnection); -} - -void StyleLsp::sciLinesAdded(Scintilla::Position position) -{ - Q_UNUSED(position) - //notiong to do -} - -void StyleLsp::SciCharAdded(int ch) -{ - if (ch == '\n') { - auto currLine = d->edit->lineFromPosition(d->edit->currentPos()); - if (currLine > 0){ - auto upLineIndentation = d->edit->lineIndentation(currLine - 1); - int count = 0; - std::string indent; - while (count < upLineIndentation) { - indent += " "; - count ++; - } - d->edit->addText(indent.size(), indent.c_str()); - } - } -} - -void StyleLsp::sciTextChangedTotal() -{ - if (d->textChangedTimer.isActive()) - d->textChangedTimer.stop(); - - if (!d->edit) - return; - - d->edit->indicatorClearRange(0, d->edit->length()); // clean all indicator range style - cleanDiagnostics(); - - if (d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "changeRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const QByteArray &, d->edit->textRange(0, d->edit->length()))); - qApp->metaObject()->invokeMethod(d->getClient(), "completionRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const lsp::Position &, getLspPosition(d->edit->docPointer(), d->textChangedCache.positionCache))); - qApp->metaObject()->invokeMethod(d->getClient(), "docSemanticTokensFull", - Q_ARG(const QString &, d->edit->file())); - } -}; - -void StyleLsp::sciHovered(Scintilla::Position position) -{ - if (!d->edit) - return; - - if (d->edit->isLeave()) - return; - - d->hoverCache.setSciPosition(position); - - if(d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "docHoverRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const lsp::Position &, getLspPosition(d->edit->docPointer(), d->hoverCache.getSciPosition()))); - } -} - -void StyleLsp::sciHoverCleaned(Scintilla::Position position) -{ - Q_UNUSED(position); - if (!d->edit) - return; - - cleanHover(); - d->hoverCache.clean(); -} - -void StyleLsp::sciDefinitionHover(Scintilla::Position position) -{ - if (!d->edit || d->edit->isLeave()) - return; - - // 判断缓存文字范围 - auto afterTextRange = d->definitionCache.getTextRange(); - auto currTextRange = SciRangeCache{d->edit->wordStartPosition(position, true), d->edit->wordEndPosition(position, true)}; - auto isSameTextRange = afterTextRange == currTextRange; - - if (isSameTextRange) { // 相同的关键字不再触发Definition的绘制 - d->definitionCache.setSciPosition(position); // 更新坐标点 - return; - } else { - d->definitionCache.setTextRange(currTextRange); - d->definitionCache.setSciPosition(position); - d->definitionCache.cleanFromLsp(); - } - - auto lspPostion = getLspPosition(d->edit->docPointer(), d->definitionCache.getSciPosition()); - if (d->getClient()){ - qApp->metaObject()->invokeMethod(d->getClient(), "definitionRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const lsp::Position &, lspPostion)); - } -} - -void StyleLsp::sciDefinitionHoverCleaned(Scintilla::Position position) -{ - Q_UNUSED(position); - if (!d->edit) - return; - - // 判断缓存文字范围 - auto afterTextRange = d->definitionCache.getTextRange(); - auto currTextRange = SciRangeCache{d->edit->wordStartPosition(position, true), d->edit->wordEndPosition(position, true)}; - auto isSameTextRange = afterTextRange == currTextRange; - if (!d->definitionCache.isEmpty() && !isSameTextRange) { - if (d->edit) { - cleanDefinition(d->definitionCache.getSciPosition()); - } - d->definitionCache.clean(); - } -} - -void StyleLsp::sciIndicClicked(Scintilla::Position position) -{ - Q_UNUSED(position); - if (!d->edit) - return; - - std::bitset<32> flags(d->edit->indicatorAllOnFor(position)); - if (flags[INDIC_COMPOSITIONTHICK]) { - if (d->definitionCache.getLocations().size() > 0) { - auto one = d->definitionCache.getLocations().front(); - EditorCallProxy::instance()->toJumpFileLineWithKey(d->edit->projectKey(), - QUrl(QString::fromStdString(one.uri)).toLocalFile(), - editLineNumber(one.range.end.line)); - cleanDefinition(position); - } else if (d->definitionCache.getLocationLinks().size() > 0) { - auto one = d->definitionCache.getLocationLinks().front(); - EditorCallProxy::instance()->toJumpFileLineWithKey(d->edit->projectKey(), - QUrl(QString::fromStdString(one.targetUri)).toLocalFile(), - editLineNumber(one.targetRange.end.line)); - cleanDefinition(position); - } else { - auto one = d->definitionCache.getLocation(); - EditorCallProxy::instance()->toJumpFileLineWithKey(d->edit->projectKey(), - QUrl(QString::fromStdString(one.uri)).toLocalFile(), - editLineNumber(one.range.end.line)); - cleanDefinition(position); - } - } -} - -void StyleLsp::sciIndicReleased(Scintilla::Position position) -{ - Q_UNUSED(position); -} - -void StyleLsp::sciSelectionMenu(QContextMenuEvent *event) -{ - if (!d->edit) - return; - - d->renameCache.setStart(d->edit->selectionStart()); - d->renameCache.setEnd(d->edit->selectionEnd()); - - QPoint showPos = d->edit->mapToGlobal(event->pos()); - QByteArray sourceText = d->edit->textRange( - d->edit->wordStartPosition(d->edit->selectionStart(), true), - d->edit->wordEndPosition(d->edit->selectionEnd(), true)); - - QMenu contextMenu; - QMenu refactor(QMenu::tr("Refactor")); - - QAction *renameAction = refactor.addAction(QAction::tr("Rename")); - QObject::connect(renameAction, &QAction::triggered, [&](){ - d->renamePopup.setOldName(sourceText); - d->renamePopup.exec(showPos); - }); - contextMenu.addMenu(&refactor); - - QAction *findUsageAction = contextMenu.addAction(QAction::tr("Find Usages")); - QObject::connect(findUsageAction, &QAction::triggered, [&](){ - if (d->getClient()) { - auto lspPos = getLspPosition(d->edit->docPointer(), d->edit->selectionStart()); - qApp->metaObject()->invokeMethod(d->getClient(), "referencesRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const lsp::Position &, lspPos)); - } - }); - - contextMenu.addAction(d->rangeFormattingAction); - - // notify other plugin to add action. - editor.contextMenu(QVariant::fromValue(&contextMenu)); - - contextMenu.move(showPos); - contextMenu.exec(); -} - -void StyleLsp::sciReplaced(const QString &file, Scintilla::Position start, Scintilla::Position end, const QString &text) -{ - if (!d->edit || file != d->formattingFile) - return; - Q_UNUSED(text) - Q_UNUSED(start); - Q_UNUSED(end); - if (d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "changeRequest", - Q_ARG(const QString &, file), - Q_ARG(const QByteArray &, d->edit->textRange(0, d->edit->length()))); - } -} - -void StyleLsp::sciClosed(const QString &file) -{ - if (d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "closeRequest", Q_ARG(const QString &, file)); - } -} - -void StyleLsp::renameRequest(const QString &newText) -{ - auto sciPostion = d->renameCache.getStart().getSciPosition(); - if (d->edit) { - if (d->getClient()) { - qApp->metaObject()->invokeMethod(d->getClient(), "renameRequest", - Q_ARG(const QString &, d->edit->file()), - Q_ARG(const lsp::Position &, getLspPosition(d->edit->docPointer(), sciPostion)), - Q_ARG(const QString &, newText)); - } - } -} - -StyleLsp::IndicStyleExt StyleLsp::symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier) -{ - Q_UNUSED(d->edit); - Q_UNUSED(token); - Q_UNUSED(modifier); - return {}; -} - -lsp::SemanticTokenType::type_value StyleLsp::tokenToDefine(int token) -{ - auto client = d->getClient(); - if (!client) - return {}; - auto initSecTokensProvider = client->initSecTokensProvider(); - if (0 <= token && token < initSecTokensProvider.legend.tokenTypes.size()) - return initSecTokensProvider.legend.tokenTypes[token]; - return {}; -} - -void StyleLsp::setIndicStyle() -{ - d->edit->indicSetStyle(INDIC_PLAIN, INDIC_PLAIN); - d->edit->indicSetStyle(INDIC_SQUIGGLE, INDIC_SQUIGGLE); - d->edit->indicSetStyle(INDIC_TT, INDIC_TT); - d->edit->indicSetStyle(INDIC_DIAGONAL, INDIC_DIAGONAL); - d->edit->indicSetStyle(INDIC_STRIKE, INDIC_STRIKE); - d->edit->indicSetStyle(INDIC_HIDDEN, INDIC_HIDDEN); - d->edit->indicSetStyle(INDIC_BOX, INDIC_BOX); - d->edit->indicSetStyle(INDIC_ROUNDBOX, INDIC_ROUNDBOX); - d->edit->indicSetStyle(INDIC_STRAIGHTBOX, INDIC_STRAIGHTBOX); - d->edit->indicSetStyle(INDIC_FULLBOX, INDIC_FULLBOX); - d->edit->indicSetStyle(INDIC_DASH, INDIC_DASH); - d->edit->indicSetStyle(INDIC_DOTS, INDIC_DOTS); - d->edit->indicSetStyle(INDIC_SQUIGGLELOW, INDIC_SQUIGGLELOW); - d->edit->indicSetStyle(INDIC_DOTBOX, INDIC_DOTBOX); - d->edit->indicSetStyle(INDIC_GRADIENT, INDIC_GRADIENT); - d->edit->indicSetStyle(INDIC_GRADIENTCENTRE, INDIC_GRADIENTCENTRE); - d->edit->indicSetStyle(INDIC_SQUIGGLEPIXMAP, INDIC_SQUIGGLEPIXMAP); - d->edit->indicSetStyle(INDIC_COMPOSITIONTHICK, INDIC_COMPOSITIONTHICK); - d->edit->indicSetStyle(INDIC_COMPOSITIONTHIN, INDIC_COMPOSITIONTHIN); - d->edit->indicSetStyle(INDIC_TEXTFORE, INDIC_TEXTFORE); - d->edit->indicSetStyle(INDIC_POINT, INDIC_POINT); - d->edit->indicSetStyle(INDIC_POINTCHARACTER, INDIC_POINTCHARACTER); -} - -void StyleLsp::setMargin() -{ - d->edit->setMargins(SC_MAX_MARGIN); - d->edit->setMarginTypeN(Margin::LspCustom, SC_MARGIN_SYMBOL); - d->edit->setMarginWidthN(Margin::LspCustom, 16); - d->edit->setMarginMaskN(Margin::LspCustom, 1 << MarkerNumber::Error | 1 << MarkerNumber::ErrorLineBackground - | 1 << MarkerNumber::Warning | 1 << MarkerNumber::WarningLineBackground - | 1 << MarkerNumber::Information | 1 << MarkerNumber::InformationLineBackground - | 1 << MarkerNumber::Hint | 1 << MarkerNumber::HintLineBackground); - - d->edit->markerDefine(MarkerNumber::Error, SC_MARK_CIRCLE); - d->edit->markerDefine(MarkerNumber::Warning, SC_MARK_CIRCLE); - d->edit->markerDefine(MarkerNumber::Information, SC_MARK_CIRCLE); - d->edit->markerDefine(MarkerNumber::Hint, SC_MARK_CIRCLE); - - d->edit->markerDefine(MarkerNumber::ErrorLineBackground, SC_MARK_BACKGROUND); - d->edit->markerDefine(MarkerNumber::WarningLineBackground, SC_MARK_BACKGROUND); - d->edit->markerDefine(MarkerNumber::InformationLineBackground, SC_MARK_BACKGROUND); - d->edit->markerDefine(MarkerNumber::HintLineBackground, SC_MARK_BACKGROUND); - - d->edit->markerSetFore(MarkerNumber::Error, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->markerSetBackTranslucent(MarkerNumber::Error, 0); - d->edit->markerSetStrokeWidth(MarkerNumber::Error, 300); - - d->edit->markerSetFore(MarkerNumber::Warning, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBackTranslucent(MarkerNumber::Warning, 0); - d->edit->markerSetStrokeWidth(MarkerNumber::Warning, 300); - - d->edit->markerSetFore(MarkerNumber::Information, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBackTranslucent(MarkerNumber::Information, 0); - d->edit->markerSetStrokeWidth(MarkerNumber::Information, 300); - - d->edit->markerSetFore(MarkerNumber::Hint, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBackTranslucent(MarkerNumber::Hint, 0); - d->edit->markerSetStrokeWidth(MarkerNumber::Hint, 300); - - d->edit->markerSetFore(MarkerNumber::ErrorLineBackground, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->markerSetBack(MarkerNumber::ErrorLineBackground, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->markerSetAlpha(MarkerNumber::ErrorLineBackground, 0x22); - d->edit->markerSetFore(MarkerNumber::WarningLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBack(MarkerNumber::WarningLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetAlpha(MarkerNumber::WarningLineBackground, 0x22); - d->edit->markerSetFore(MarkerNumber::InformationLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBack(MarkerNumber::InformationLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetAlpha(MarkerNumber::InformationLineBackground, 0x22); - d->edit->markerSetFore(MarkerNumber::HintLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetBack(MarkerNumber::HintLineBackground, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->markerSetAlpha(MarkerNumber::HintLineBackground, 0x22); -} - -void StyleLsp::setDiagnostics(const newlsp::PublishDiagnosticsParams &data) -{ - if (!edit()) - return; - - if (QUrl(QString::fromStdString(data.uri)).toLocalFile() != edit()->file()) - return; - - this->cleanDiagnostics(); - for (auto val : data.diagnostics) { - if (newlsp::Enum::DiagnosticSeverity::get()->Error == val.severity.value()) { // error - newlsp::Position start{val.range.start.line, val.range.start.character}; - newlsp::Position end{val.range.end.line, val.range.start.character}; - Sci_Position startPos = getSciPosition(d->edit->docPointer(), start); - Sci_Position endPos = getSciPosition(d->edit->docPointer(), end); - d->edit->setIndicatorCurrent(INDIC_SQUIGGLE); - d->edit->indicSetFore(INDIC_SQUIGGLE, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->indicatorFillRange(startPos, endPos - startPos); - std::string message = "Error: " + val.message.value(); - d->edit->eOLAnnotationSetText(val.range.start.line, message.c_str()); - d->edit->eOLAnnotationSetStyleOffset(EOLAnnotation::RedTextFore); - d->edit->eOLAnnotationSetStyle(val.range.start.line, EOLAnnotation::RedTextFore - d->edit->eOLAnnotationStyleOffset()); - d->edit->styleSetFore(EOLAnnotation::RedTextFore, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->eOLAnnotationSetVisible(EOLANNOTATION_STANDARD); - d->edit->markerAdd(val.range.start.line, Error); - d->edit->markerAdd(val.range.start.line, ErrorLineBackground); - } - } -} - -void StyleLsp::cleanDiagnostics() -{ - d->edit->eOLAnnotationClearAll(); - for (int line = 0; line < d->edit->lineCount(); line ++) { - d->edit->markerDelete(line, Error); - d->edit->markerDelete(line, ErrorLineBackground); - d->edit->markerDelete(line, Warning); - d->edit->markerDelete(line, WarningLineBackground); - d->edit->markerDelete(line, Information); - d->edit->markerDelete(line, InformationLineBackground); - d->edit->markerDelete(line, Hint); - d->edit->markerDelete(line, HintLineBackground); - } -} - -void StyleLsp::setTokenFull(const QList &tokens) -{ - qInfo() << Q_FUNC_INFO << tokens.size(); - if (!edit()) - return; - - if (!d->edit->lexer()) - return; - - int cacheLine = 0; - for (auto val : tokens) { - cacheLine += val.start.line; -#ifdef QT_DEBUG - qInfo() << "line:" << cacheLine; - qInfo() << "charStart:" << val.start.character; - qInfo() << "charLength:" << val.length; - qInfo() << "tokenType:" << val.tokenType; - qInfo() << "tokenModifiers:" << val.tokenModifiers; -#endif - auto sciStartPos = StyleLsp::getSciPosition(d->edit->docPointer(), {cacheLine, val.start.character}); - auto sciEndPos = d->edit->wordEndPosition(sciStartPos, true); - auto wordStartPos = d->edit->wordStartPosition(sciStartPos, true); - if (sciStartPos == 0 || sciEndPos == d->edit->length() || wordStartPos != sciStartPos) - continue; - QString sourceText = d->edit->textRange(sciStartPos, sciEndPos); - int wordLength = sciEndPos - sciStartPos; -#ifdef QT_DEBUG - qInfo() << "text:" << sourceText; -#endif - if (!sourceText.isEmpty() && wordLength == val.length) { - QString tokenValue = tokenToDefine(val.tokenType); -#ifdef QT_DEBUG - qInfo() << "tokenValue:" << tokenValue; -#endif - auto indics = symbolIndic(tokenValue, val.tokenModifiers); - for (int i = 0; i < INDIC_MAX; i++) { - if (indics.fore.keys().contains(i)) { -#ifdef QT_DEBUG - qInfo() << "fillRangeColor:" << hex << indics.fore[i]; -#endif - d->edit->setIndicatorCurrent(i); - d->edit->indicSetFlags(i, SC_INDICFLAG_VALUEFORE); - d->edit->setIndicatorValue(indics.fore[i]); - d->edit->indicatorFillRange(sciStartPos, wordLength); - } - } - - QString tokenAnnLine = TextEditKeeper::getTokenTypeAnnLine(tokenValue, sourceText); - if (!tokenAnnLine.isEmpty()) { - editor.setAnnotation(d->edit->file(), cacheLine, - QString(TextEditKeeper::userActionAnalyseTitle()), - AnnotationInfo{tokenAnnLine}); - } - } - } -} - -void StyleLsp::cleanTokenFull() -{ - Q_UNUSED(d->edit); -} - -void StyleLsp::setHover(const newlsp::Hover &hover) -{ - if (!edit() || edit()->isLeave()) - return; -//callTipBack:设置背景色,参数为colour "red | (green << 8) | (blue << 16)" - if(DGuiApplicationHelper::instance()->themeType() == DGuiApplicationHelper::DarkType) - d->edit->callTipSetBack(STYLE_DEFAULT); - else - d->edit->callTipSetBack(0xffffff); - - std::string showText; - if (newlsp::any_contrast>(hover.contents)) { - auto markupStrings = std::any_cast>(hover.contents); - for (auto one : markupStrings) { - if (!showText.empty()) showText += "\n"; - - if (!one.value.empty()) // markedString value append - showText += one.value; - else if (!std::string(one).empty()) // markedString self is String append - showText += one; - }; - } else if (newlsp::any_contrast(hover.contents)){ - auto markupContent = std::any_cast(hover.contents); - showText = markupContent.value; - } else if (newlsp::any_contrast(hover.contents)){ - auto markedString = std::any_cast(hover.contents); - if (!std::string(markedString).empty()) { - showText = std::string(markedString); - } else { - showText = markedString.value; - } - } - if (hover.range) { - // noting to do - } - - if (!showText.empty()) - d->edit->callTipShow(d->hoverCache.getSciPosition(), showText.c_str()); - - d->hoverCache.clean(); -} - -void StyleLsp::cleanHover() -{ - d->edit->callTipCancel(); -} - -void StyleLsp::setDefinition(const newlsp::Location &data) -{ - if (!edit() || edit()->isLeave()) - return; - - d->definitionCache.set(data); - auto sciStartPos = d->edit->wordStartPosition(d->definitionCache.getSciPosition(), true); - auto sciEndPos = d->edit->wordEndPosition(d->definitionCache.getSciPosition(), true); - - setDefinitionSelectedStyle(sciStartPos, sciEndPos); -} - -void StyleLsp::setDefinition(const std::vector &data) -{ - if (!edit() || edit()->isLeave()) - return; - - d->definitionCache.set(data); - auto sciStartPos = d->edit->wordStartPosition(d->definitionCache.getSciPosition(), true); - auto sciEndPos = d->edit->wordEndPosition(d->definitionCache.getSciPosition(), true); - - if (data.size() >= 1) { - setDefinitionSelectedStyle(sciStartPos, sciEndPos); - } -} - -void StyleLsp::setDefinition(const std::vector &data) -{ - if (!edit() || edit()->isLeave()) - return; - - d->definitionCache.set(data); - auto sciStartPos = d->edit->wordStartPosition(d->definitionCache.getSciPosition(), true); - auto sciEndPos = d->edit->wordEndPosition(d->definitionCache.getSciPosition(), true); - - if (data.size() >= 1) { - setDefinitionSelectedStyle(sciStartPos, sciEndPos); - } -} - -void StyleLsp::cleanDefinition(const Scintilla::Position &pos) -{ - std::bitset<32> flags(d->edit->indicatorAllOnFor(pos)); - if (flags[INDIC_COMPOSITIONTHICK]) { - // auto hotSpotStart = d->edit->indicatorStart(INDIC_COMPOSITIONTHICK, pos); - // auto hotSpotEnd = d->edit->indicatorEnd(INDIC_COMPOSITIONTHICK, pos); - d->edit->setCursor(d->definitionCache.getCursor()); - // d->edit->indicatorClearRange(hotSpotStart, hotSpotEnd); - d->edit->indicatorClearRange(0, d->edit->length()); - } -} - -void StyleLsp::rangeFormattingReplace(const std::vector &edits) -{ - if (edits.size() <= 0) - return; - - for (auto itera = edits.rbegin(); itera != edits.rend(); itera++) { - auto sciPosStart = getSciPosition(d->edit->docPointer(), itera->range.start); - auto sciPosEnd = getSciPosition(d->edit->docPointer(), itera->range.end); - auto newText = QString::fromStdString(itera->newText); - QString curFile = d->edit->file(); - QString curFormatting = d->formattingFile; - if (d->edit->file() == d->formattingFile) - d->edit->replaceRange(sciPosStart, sciPosEnd, newText); - } -} - -void StyleLsp::setDefinitionSelectedStyle(const Scintilla::Position start, const Scintilla::Position end) -{ - d->edit->setIndicatorCurrent(INDIC_COMPOSITIONTHICK); - d->edit->indicSetFore(INDIC_COMPOSITIONTHICK, d->edit->styleFore(0)); - d->edit->indicatorFillRange(start, end - start); - if (d->edit->cursor() != 8) { - d->definitionCache.setCursor(d->edit->cursor()); - d->edit->setCursor(8); // hand from Scintilla platfrom.h - } -} - -void StyleLsp::setCompletion(const QByteArray &text, - const Scintilla::Position enterLenght, - const lsp::CompletionProvider &provider) -{ - if (d->edit->isLeave()) - return; - - if (provider.items.isEmpty() || d->textChangedCache.textCache.isEmpty()) - return; - - const unsigned char sep = 0x7C; // "|" - d->edit->autoCSetSeparator((sptr_t)sep); - QString inserts; - for (auto item : provider.items) { - if (!item.insertText.startsWith(text)) - continue; - inserts += (item.insertText += sep); - } - if (inserts.endsWith(sep)){ - inserts.remove(inserts.count() - 1 , 1); - } - - if (inserts.isEmpty()) - return; - - d->edit->autoCShow(enterLenght, inserts.toUtf8()); -} - -newlsp::Client *StyleLspPrivate::getClient() const -{ - if (edit) { - return LSPClientKeeper::instance()->get(edit->projectKey()); - } - return nullptr; -} diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylelsp.h b/src/plugins/codeeditor/textedittabwidget/style/stylelsp.h deleted file mode 100644 index 1b8999d16..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylelsp.h +++ /dev/null @@ -1,124 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLELSP_H -#define STYLELSP_H - -#include -#include - -#include "stylesci.h" -#include "ScintillaEditBase.h" - -#include "common/common.h" - -#include - -class TextEdit; -class StyleLspPrivate; -class StyleLsp : public QObject -{ - Q_OBJECT - StyleLspPrivate *const d; -public: - - enum Margin - { - LspCustom = StyleSci::Margin::Custom - }; - - enum MarkerNumber - { - Error = StyleSci::MarkerNumber::Extern, - Warning, - Information, - Hint, - ErrorLineBackground, - WarningLineBackground, - InformationLineBackground, - HintLineBackground, - }; - - struct IndicStyleExt - { - QMap fore; - }; - - enum EOLAnnotation - { - RedTextFore = 63, - }; - - static Sci_Position getSciPosition(sptr_t doc, const newlsp::Position &pos); - static lsp::Position getLspPosition(sptr_t doc, sptr_t sciPosition); - static int getLspCharacter(sptr_t doc, sptr_t sciPosition); - static bool isCharSymbol(const char ch); - - StyleLsp(TextEdit *parent); - TextEdit *edit(); - virtual ~StyleLsp(); - - virtual void initLspConnection(); //setting main - void updateTokens(); - - virtual IndicStyleExt symbolIndic(lsp::SemanticTokenType::type_value token, - QList modifier); - /*! - * \brief tokenFromServProvider find local token from lsp protocol init response provider data - * \param token from token request (tokenFull) key - * \return local key - */ - virtual lsp::SemanticTokenType::type_value tokenToDefine(int token); - - virtual void setIndicStyle(); - virtual void setMargin(); - - virtual void setDiagnostics(const newlsp::PublishDiagnosticsParams &data); - virtual void cleanDiagnostics(); - - virtual void setTokenFull(const QList &tokens); - virtual void cleanTokenFull(); - - virtual void setHover(const newlsp::Hover &hover); - virtual void cleanHover(); - - virtual void setDefinition(const newlsp::Location &data); - virtual void setDefinition(const std::vector &data); - virtual void setDefinition(const std::vector &data); - virtual void cleanDefinition(const Scintilla::Position &pos); - - virtual void rangeFormattingReplace(const std::vector &edits); - -private slots: - void setDefinitionSelectedStyle(const Scintilla::Position start, - const Scintilla::Position end); - void setCompletion(const QByteArray &text, - const Scintilla::Position enterLenght, - const lsp::CompletionProvider &provider); - - void sciTextInsertedTotal(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line); - - void sciTextDeletedTotal(Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line); - - void sciLinesAdded(Scintilla::Position position); - void SciCharAdded(int ch); - void sciTextChangedTotal(); - void sciHovered(Scintilla::Position position); - void sciHoverCleaned(Scintilla::Position position); - void sciDefinitionHover(Scintilla::Position position); - void sciDefinitionHoverCleaned(Scintilla::Position position); - void sciIndicClicked(Scintilla::Position position); - void sciIndicReleased(Scintilla::Position position); - void sciSelectionMenu(QContextMenuEvent *event); - void sciReplaced(const QString &file, Scintilla::Position start, - Scintilla::Position end, const QString &text); - void sciClosed(const QString &file); - void renameRequest(const QString &newText); -}; - -#endif // STYLELSP_H diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylesci.cpp b/src/plugins/codeeditor/textedittabwidget/style/stylesci.cpp deleted file mode 100644 index 28adc8e37..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylesci.cpp +++ /dev/null @@ -1,232 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "stylesci.h" -#include "stylecolor.h" -#include "stylejsonfile.h" -#include "textedittabwidget/textedit.h" - -#include "common/common.h" -#include "ILexer.h" -#include "Lexilla.h" - -#include -#include -#include -#include - -#include - -QString lexillaFileName() -{ - return QString(LEXILLA_LIB) + LEXILLA_EXTENSION; -} - -QString lexillaFilePath() -{ - return CustomPaths::global(CustomPaths::DependLibs) - + QDir::separator() + lexillaFileName(); -} - -sptr_t createLexerFromLib(const char *LanguageID) -{ - QFileInfo info(lexillaFilePath()); - if (!info.exists()) { - qCritical() << "Failed, can't found lexilla library: " << info.filePath(); - abort(); - } - - static QLibrary lexillaLibrary(info.filePath()); - if (!lexillaLibrary.isLoaded()) { - if (!lexillaLibrary.load()) { - qCritical() << "Failed, to loading lexilla library: " - << info.filePath() - << lexillaLibrary.errorString(); - abort(); - } - qInfo() << "Successful, Loaded lexilla library:" << info.filePath() - << "\nand lexilla library support language count:"; - -#ifdef QT_DEBUG - int langIDCount = ((Lexilla::GetLexerCountFn)(lexillaLibrary.resolve(LEXILLA_GETLEXERCOUNT)))(); - QStringList sciSupportLangs; - for (int i = 0; i < langIDCount; i++) { - sciSupportLangs << ((Lexilla::LexerNameFromIDFn)(lexillaLibrary.resolve(LEXILLA_LEXERNAMEFROMID)))(i); - } - qInfo() << "scintilla support language: " << sciSupportLangs; -#endif - } - QFunctionPointer fn = lexillaLibrary.resolve(LEXILLA_CREATELEXER); - if (!fn) { - qCritical() << lexillaLibrary.errorString(); - abort(); - } - void *lexer = ((Lexilla::CreateLexerFn)fn)(LanguageID); - return sptr_t(lexer); -} - -class StyleSciPrivate -{ - friend class StyleSci; - TextEdit *edit; -}; - -void StyleSci::setKeyWords() -{ - auto tokens = support_file::Language::tokenWords(d->edit->supportLanguage()); - auto codeKeyWordsMap = this->keyWords(); - - for (auto key : codeKeyWordsMap.keys()) { - auto codeKeyWords = codeKeyWordsMap[key].split(" ").toSet(); - auto fileKeyWords = tokens.value(key).split(" ").toSet(); - auto mergeKeywords = (codeKeyWords + fileKeyWords).values().join(" ").toLatin1(); - d->edit->setKeyWords(key, mergeKeywords); - } - - return; -} - -void StyleSci::setThemeColor(DGuiApplicationHelper::ColorType themeType) -{ - QString theme = StyleJsonFile::Theme::get()->Dark; - if (themeType == DGuiApplicationHelper::LightType) { - theme = StyleJsonFile::Theme::get()->Light; - } - - auto fileJson = d->edit->getStyleFile(); - auto themes = fileJson->themes(); - if (themes.contains(theme)) { - d->edit->styleResetDefault(); //clean all - fileJson->setTheme(theme); - - auto selfObj = fileJson->value(StyleJsonFile::Key_1::get()->Self).toObject(); - auto self_foreground = selfObj.value(StyleJsonFile::Key_2::get()->Foreground).toString().toInt(nullptr, 16); - auto self_background = selfObj.value(StyleJsonFile::Key_2::get()->Background).toString().toInt(nullptr, 16); - auto self_cursor = selfObj.value(StyleJsonFile::Key_2::get()->Cursor).toString().toInt(nullptr, 16); - d->edit->styleSetFore(STYLE_DEFAULT, self_foreground); - d->edit->styleSetBack(STYLE_DEFAULT, self_background); - d->edit->setCaretFore(self_cursor); - qInfo() << "Editor self jsonObject:" << selfObj; - qInfo() << "Editor self setting Style fore: " << hex << self_foreground; - qInfo() << "Editor self setting Style back: " << hex << self_background; - qInfo() << "Editor self setting Style cursor: " << hex << self_cursor; - // auto self_fontSize = selfObj.value(key_2.FontSize).toInt(); - // d->edit->styleSetSize(STYLE_DEFAULT, self_fontSize); - for(int i = sectionStart(); i <= sectionEnd(); i++) { - if (i == sectionStart()) - d->edit->styleSetFore(sectionStart(), self_foreground); - d->edit->styleSetBack(i, self_background); - } - d->edit->styleHotSpot(sectionEnd() + 1); - d->edit->styleSetUnderline(sectionEnd() + 1, true); - } -} - -void StyleSci::setStyle() -{ - auto themeType = DGuiApplicationHelper::instance()->themeType(); - setThemeColor(themeType); - - d->edit->annotationSetStyleOffset(AnnotationInfo::Role::get()->Fatal.code); - d->edit->annotationSetVisible(ANNOTATION_BOXED); - - d->edit->styleSetBack(AnnotationInfo::Role::get()->Note.code, StyleColor::color(StyleColor::Table::get()->Blue)); - d->edit->styleSetItalic(AnnotationInfo::Role::get()->Note.code, true); - - d->edit->styleSetFore(AnnotationInfo::Role::get()->Warning.code, StyleColor::color(StyleColor::Table::get()->Yellow)); - d->edit->styleSetBack(AnnotationInfo::Role::get()->Warning.code, StyleColor::color(StyleColor::Table::get()->Blue)); - d->edit->styleSetItalic(AnnotationInfo::Role::get()->Warning.code, true); - - d->edit->styleSetFore(AnnotationInfo::Role::get()->Error.code, StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->styleSetBack(AnnotationInfo::Role::get()->Error.code, StyleColor::color(StyleColor::Table::get()->Blue)); - d->edit->styleSetItalic(AnnotationInfo::Role::get()->Error.code, true); - - d->edit->styleSetFore(AnnotationInfo::Role::get()->Fatal.code , StyleColor::color(StyleColor::Table::get()->Red)); - d->edit->styleSetBack(AnnotationInfo::Role::get()->Fatal.code, StyleColor::color(StyleColor::Table::get()->Blue)); - d->edit->styleSetItalic(AnnotationInfo::Role::get()->Fatal.code, true); - - return; -} - -void StyleSci::setMargin() -{ - d->edit->setMargins(SC_MAX_MARGIN); - - d->edit->setMarginSensitiveN(Margin::LineNumber, SCN_MARGINCLICK); - d->edit->setMarginWidthN(Margin::LineNumber, d->edit->textWidth(STYLE_LINENUMBER ,"999999")); - d->edit->setMarginBackN(Margin::LineNumber, d->edit->styleBack(STYLE_DEFAULT)); - - //runtime margin - d->edit->setMarginSensitiveN(Margin::Runtime, SCN_MARGINCLICK); - d->edit->setMarginWidthN(Margin::Runtime, 16); - d->edit->setMarginTypeN(Margin::Runtime, SC_MARGIN_SYMBOL); - d->edit->setMarginMaskN(Margin::Runtime, 1 << MarkerNumber::Debug - | 1 << MarkerNumber::Running - | 1 << MarkerNumber::RunningLineBackground - | 1 << MarkerNumber::CustomLineBackground); - - d->edit->markerDefine(MarkerNumber::Debug, SC_MARK_CIRCLE); - d->edit->markerDefine(MarkerNumber::Running, SC_MARK_SHORTARROW); - d->edit->markerDefine(MarkerNumber::RunningLineBackground, SC_MARK_BACKGROUND); - d->edit->markerDefine(MarkerNumber::CustomLineBackground, SC_MARK_BACKGROUND); - - d->edit->markerSetFore(MarkerNumber::Debug, StyleColor::color(StyleColor::Table::get()->FireBrick)); - d->edit->markerSetBack(MarkerNumber::Debug, StyleColor::color(StyleColor::Table::get()->FireBrick)); - - d->edit->markerSetFore(MarkerNumber::Running, StyleColor::color(StyleColor::Table::get()->YellowGreen)); - d->edit->markerSetBack(MarkerNumber::Running, StyleColor::color(StyleColor::Table::get()->YellowGreen)); - - d->edit->markerSetFore(MarkerNumber::RunningLineBackground, StyleColor::color(StyleColor::Table::get()->YellowGreen)); - d->edit->markerSetBack(MarkerNumber::RunningLineBackground, StyleColor::color(StyleColor::Table::get()->YellowGreen)); - d->edit->markerSetAlpha(MarkerNumber::RunningLineBackground, 0x55); -} - -void StyleSci::setLexer() -{ - if (!d->edit->lexer()) { - //set token splitter - d->edit->setILexer(createLexerFromLib(d->edit->supportLanguage().toLatin1())); - if (!d->edit->lexer()) { - qCritical() << "Failed, can't create and load sci lexer"; - } - } -} - -StyleSci::StyleSci(TextEdit *parent) - : QObject (parent) - , d (new StyleSciPrivate()) -{ - d->edit = parent; -} - -StyleSci::~StyleSci() -{ - if (d) { - delete d; - } -} - -TextEdit *StyleSci::edit() -{ - return d->edit; -} - -QMap StyleSci::keyWords() const -{ - QMap result; - for(int i = 0; i <= KEYWORDSET_MAX; i++) { - result[i] = ""; - } - return result; -} - -int StyleSci::sectionEnd() const -{ - return 0; -} - -int StyleSci::sectionStart() const -{ - return 0; -} diff --git a/src/plugins/codeeditor/textedittabwidget/style/stylesci.h b/src/plugins/codeeditor/textedittabwidget/style/stylesci.h deleted file mode 100644 index 50ee04193..000000000 --- a/src/plugins/codeeditor/textedittabwidget/style/stylesci.h +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef STYLESCI_H -#define STYLESCI_H - -#include "common/common.h" -#include - -#include -#include - -class TextEdit; -class StyleSciPrivate; -class StyleSci : public QObject -{ - Q_OBJECT - StyleSciPrivate *const d; -public: - enum Margin - { - LineNumber = 0, - Runtime = 1, - CodeFormat = 2, - Custom = 3, - }; - - enum MarkerNumber - { - Debug = 0, - Running = 1, - RunningLineBackground = 2, - CustomLineBackground = 3, - Extern = 4 - }; - - StyleSci(TextEdit *parent); - virtual ~StyleSci(); - - TextEdit *edit(); - void setKeyWords(); - virtual void setStyle(); - virtual void setMargin(); - virtual void setLexer(); - - virtual QMap keyWords() const; - virtual int sectionEnd() const; - virtual int sectionStart() const; - -protected: - virtual void setThemeColor(DGuiApplicationHelper::ColorType colorType); -}; - - - -#endif // STYLESCI_H diff --git a/src/plugins/codeeditor/textedittabwidget/textedit.cpp b/src/plugins/codeeditor/textedittabwidget/textedit.cpp deleted file mode 100644 index 26a6ea5ea..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedit.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "textedit.h" -#include "style/lspclientkeeper.h" -#include "Document.h" -#include "SciLexer.h" -#include "common/common.h" -#include "framework/framework.h" -#include "services/editor/editorservice.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -DGUI_USE_NAMESPACE -class TextEditPrivate -{ - friend class TextEdit; - StyleLsp *styleLsp {nullptr}; - StyleSci *styleSci {nullptr}; - bool isInitLsp {false}; -}; - -using namespace dpfservice; -TextEdit::TextEdit(QWidget *parent) - : ScintillaEditExtern (parent) - , d (new TextEditPrivate) -{ - QObject::connect(this, &ScintillaEditExtern::textInserted, this, - [=](Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line){ - Q_UNUSED(position) - Q_UNUSED(length) - Q_UNUSED(linesAdded) - Q_UNUSED(text) - Q_UNUSED(line) - emit this->fileChanged(this->file()); - }, Qt::UniqueConnection); - - QObject::connect(this, &ScintillaEditExtern::textDeleted, this, - [=](Scintilla::Position position, - Scintilla::Position length, Scintilla::Position linesAdded, - const QByteArray &text, Scintilla::Position line){ - Q_UNUSED(position) - Q_UNUSED(length) - Q_UNUSED(linesAdded) - Q_UNUSED(text) - Q_UNUSED(line) - emit this->fileChanged(this->file()); - }, Qt::UniqueConnection); - - QObject::connect(this, &ScintillaEditExtern::saved, this, - &TextEdit::fileSaved, Qt::UniqueConnection); - - connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, - this, &TextEdit::slotThemeChanged); - - setFocusPolicy(Qt::ClickFocus); - setAcceptDrops(true); -} - -TextEdit::~TextEdit() -{ - // emit fileClosed(file()); -} - -void TextEdit::setFile(const QString &filePath) -{ - ScintillaEditExtern::setFile(filePath); //顶层设置 - - // 设置正则匹配规则 - if (getStyleSci()) { - getStyleSci()->setLexer(); - getStyleSci()->setStyle(); - getStyleSci()->setMargin(); - getStyleSci()->setKeyWords(); - } else { - styleClearAll(); - } - - QString currFileLanguage = fileLanguage(filePath); - if (supportLanguage() != currFileLanguage) { - return; - } - - if (!getStyleLsp()) - return; - - // 初始化所有lsp client设置 - if(!d->isInitLsp){ - getStyleLsp()->initLspConnection(); - d->isInitLsp = true; - } - getStyleLsp()->updateTokens(); -} - -void TextEdit::slotThemeChanged(DGuiApplicationHelper::ColorType colorType) -{ - Q_UNUSED(colorType) - setFile(file()); -} - -void TextEdit::dragEnterEvent(QDragEnterEvent *event) -{ - if (event->mimeData()->hasUrls()) { - event->acceptProposedAction(); - } else { - event->ignore(); - } -} - -void TextEdit::dropEvent(QDropEvent *event) -{ - const QMimeData* mimeData = event->mimeData(); - if(mimeData->hasUrls()) { - QListurlList = mimeData->urls(); - QString fileName = urlList.at(0).toLocalFile(); - if(!fileName.isEmpty()) { - editor.openFile(fileName); - } - } -} diff --git a/src/plugins/codeeditor/textedittabwidget/textedit.h b/src/plugins/codeeditor/textedittabwidget/textedit.h deleted file mode 100644 index 153e059b7..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedit.h +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDIT_H -#define TEXTEDIT_H - -#include "scintillaeditextern.h" -#include "DGuiApplicationHelper" - -#include - -class StyleLsp; -class StyleSci; -class StyleJsonFile; -class TextEditPrivate; -class TextEdit : public ScintillaEditExtern -{ - Q_OBJECT - TextEditPrivate *const d; -public: - explicit TextEdit(QWidget * parent = nullptr); - virtual ~TextEdit() override; - virtual void setFile(const QString &filePath) override; - virtual StyleLsp *getStyleLsp() const {return nullptr;} - virtual StyleSci *getStyleSci() const {return nullptr;} - virtual StyleJsonFile *getStyleFile() const {return nullptr;} - -protected: - void slotThemeChanged(DTK_GUI_NAMESPACE::DGuiApplicationHelper::ColorType colorType); - - void dragEnterEvent(QDragEnterEvent *event) override; - void dropEvent(QDropEvent *event) override; -}; - -#endif // TEXTEDIT_H diff --git a/src/plugins/codeeditor/textedittabwidget/texteditsplitter.cpp b/src/plugins/codeeditor/textedittabwidget/texteditsplitter.cpp deleted file mode 100644 index 1c2ff4470..000000000 --- a/src/plugins/codeeditor/textedittabwidget/texteditsplitter.cpp +++ /dev/null @@ -1,369 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "texteditsplitter.h" -#include "transceiver/codeeditorreceiver.h" -#include "mainframe/texteditkeeper.h" - -#include -#include - -namespace Private { -static TextEditSplitter *splitter = nullptr; -} - -TextEditSplitter::TextEditSplitter(QWidget *parent) - : QWidget (parent) - , vLayout(new QVBoxLayout) - , rootSplitter(new QSplitter) -{ - tabWidget = new TextEditTabWidget(rootSplitter); - rootSplitter->addWidget(tabWidget); - rootSplitter->setHandleWidth(0); - rootSplitter->setOpaqueResize(true); - rootSplitter->setChildrenCollapsible(false); - tabWidgets.insert(tabWidget, true); - tabWidget->setCloseButtonVisible(false); - tabWidget->setSplitButtonVisible(false); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - tabWidget, &TextEditTabWidget::openFileWithKey); - QObject::connect(tabWidget, &TextEditTabWidget::splitClicked, - this, &TextEditSplitter::doSplit); - QObject::connect(tabWidget, &TextEditTabWidget::closed, - this, &TextEditSplitter::doClose); - QObject::connect(tabWidget, &TextEditTabWidget::selected, - this, &TextEditSplitter::doSelected); - QObject::connect(tabWidget, &TextEditTabWidget::closeWidget, - this, &TextEditSplitter::doClose); - QObject::connect(tabWidget, &TextEditTabWidget::sigOpenFile, - this, &TextEditSplitter::doShowSplit); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toAddDebugPoint, - tabWidget, &TextEditTabWidget::addDebugPoint); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRemoveDebugPoint, - tabWidget, &TextEditTabWidget::removeDebugPoint); - - QHBoxLayout *hLayout = new QHBoxLayout; - hLayout->addStretch(20); - - vLayout->addLayout(hLayout); - vLayout->addWidget(rootSplitter); - vLayout->setContentsMargins(0, 0, 0, 0); - this->setLayout(vLayout); -} - -QString TextEditSplitter::getSelectedText() -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return ""; - - return edit->getSelectedText(); -} - -QString TextEditSplitter::getCursorBeforeText() -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return ""; - - return edit->getCursorBeforeText(); -} - -QString TextEditSplitter::getCursorAfterText() -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return ""; - - return edit->getCursorAfterText(); -} - -void TextEditSplitter::replaceSelectedText(const QString &text) -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return; - - edit->replaceSelectedRange(text); -} - -void TextEditSplitter::showTips(const QString &tips) -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return; - - edit->showTips(tips); -} - -void TextEditSplitter::insertText(const QString &text) -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return; - - edit->insertText(text); -} - -void TextEditSplitter::undo() -{ - auto edit = TextEditKeeper::instance()->getActiveTextEdit(); - if (!edit) - return; - - edit->undo(); -} - -TextEditSplitter::~TextEditSplitter() -{ - -} - -void TextEditSplitter::doSplit(Qt::Orientation orientation, const newlsp::ProjectKey &key, const QString &file) -{ - auto oldEditWidget = qobject_cast(sender()); - if (!oldEditWidget) - return; - - auto parentSplitter = getParentSplitter(oldEditWidget); - if (parentSplitter == rootSplitter) - rootSplit(oldEditWidget, orientation, key, file); - else - childSplit(oldEditWidget, orientation, key, file); -} - -void TextEditSplitter::rootSplit(TextEditTabWidget *oldEditWidget, Qt::Orientation orientation, - const newlsp::ProjectKey &key, const QString &file) -{ - TextEditTabWidget *newEditWidget = new TextEditTabWidget(); - - if (rootSplitter->count() != 1) { - childSplit(oldEditWidget, orientation, key, file); - return; - } - rootSplitter->setOrientation(orientation); - rootSplitter->addWidget(newEditWidget); - if (key.isValid()) { - newEditWidget->openFileWithKey(key, file); - } - splitUpdate(oldEditWidget, newEditWidget); -} - -void TextEditSplitter::childSplit(TextEditTabWidget *oldEditWidget, Qt::Orientation orientation, - const newlsp::ProjectKey &key, const QString &file) -{ - auto parentSplitter = getParentSplitter(oldEditWidget); - int index = parentSplitter->indexOf(oldEditWidget); - - TextEditTabWidget *newEditWidget = new TextEditTabWidget(); - QSplitter *newSplitter = new QSplitter(); - newSplitter->setOrientation(orientation); - newSplitter->setHandleWidth(0); - newSplitter->setOpaqueResize(true); - newSplitter->setChildrenCollapsible(false); - newSplitter->addWidget(oldEditWidget); - newSplitter->addWidget(newEditWidget); - - parentSplitter->insertWidget(index, newSplitter); - - if (key.isValid()) { - newEditWidget->openFileWithKey(key, file); - } - splitUpdate(oldEditWidget, newEditWidget); -} - -void TextEditSplitter::splitUpdate(TextEditTabWidget *oldEditWidget, TextEditTabWidget *newEditWidget) -{ - tabWidgets.insert(newEditWidget, true); - tabWidgets[oldEditWidget] = false; - oldEditWidget->setCloseButtonVisible(true); - - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - oldEditWidget, &TextEditTabWidget::openFileWithKey); - - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toJumpFileLineWithKey, - oldEditWidget, &TextEditTabWidget::jumpToLineWithKey); - - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toRunFileLineWithKey, - oldEditWidget, &TextEditTabWidget::runningToLineWithKey); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - newEditWidget, &TextEditTabWidget::openFileWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toAddDebugPoint, - newEditWidget, &TextEditTabWidget::addDebugPoint); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRemoveDebugPoint, - newEditWidget, &TextEditTabWidget::removeDebugPoint); - - // connect selected texteditwidget sig-slot bind, from texteditwidget focus - QObject::connect(newEditWidget, &TextEditTabWidget::splitClicked, - this, &TextEditSplitter::doSplit); - - QObject::connect(newEditWidget, &TextEditTabWidget::selected, - this, &TextEditSplitter::doSelected); - - QObject::connect(newEditWidget, &TextEditTabWidget::closed, - this, &TextEditSplitter::doClose); - QObject::connect(newEditWidget, &TextEditTabWidget::closeWidget, - this, &TextEditSplitter::doClose); - QObject::connect(newEditWidget, &TextEditTabWidget::sigOpenFile, - this, &TextEditSplitter::doShowSplit); -} - -QSplitter *TextEditSplitter::getParentSplitter(QWidget *widget) -{ - if (!widget) - return {}; - return qobject_cast(widget->parent()); -} - -bool TextEditSplitter::isEditWidget(QWidget *widget) -{ - TextEditTabWidget *editWidget = new TextEditTabWidget(); - return widget->metaObject()->className() == editWidget->metaObject()->className(); -} - -void TextEditSplitter::doClose() -{ - auto closedEditWidget = qobject_cast(sender()); - if (!closedEditWidget) - return; - - auto parentSplitter = getParentSplitter(closedEditWidget); - if (parentSplitter == rootSplitter) - rootClose(parentSplitter, closedEditWidget); - else - childClose(parentSplitter, closedEditWidget); -} - -void TextEditSplitter::rootClose(QSplitter *splitter, TextEditTabWidget *closedEditWidget) -{ - closeUpdate(closedEditWidget); - delete closedEditWidget; - tabWidgets.remove(closedEditWidget); - - if (tabWidgets.count() == 0) { - TextEditTabWidget *newEditWidget = new TextEditTabWidget(); - newEditWidget->setCloseButtonVisible(false); - newEditWidget->setSplitButtonVisible(false); - splitter->addWidget(newEditWidget); - tabWidgets.insert(newEditWidget, true); - return; - } - - QWidget *widget = splitter->widget(0); - if (isEditWidget(widget)) { - TextEditTabWidget *editWidget = qobject_cast(widget); - editWidget->setCloseButtonVisible(false); - } - else - rootSplitter = qobject_cast(widget); -} - -void TextEditSplitter::childClose(QSplitter *splitter, TextEditTabWidget *closedEditWidget) -{ - closeUpdate(closedEditWidget); - QSplitter *parentSplitter = qobject_cast(splitter->parent()); - int index = parentSplitter->indexOf(splitter); - QWidget *anotherWidget = splitter->widget(!splitter->indexOf(closedEditWidget)); - - if (isEditWidget(anotherWidget)) { - TextEditTabWidget *editWidget = qobject_cast(anotherWidget); - parentSplitter->insertWidget(index, editWidget); - - tabWidgets.remove(closedEditWidget); - delete closedEditWidget; - delete splitter; - - return; - } - QSplitter *replaceSplitter = qobject_cast(anotherWidget); - parentSplitter->insertWidget(index, replaceSplitter); - - tabWidgets.remove(closedEditWidget); - delete closedEditWidget; - delete splitter; -} - -void TextEditSplitter::closeUpdate(TextEditTabWidget *closedEditWidget) -{ - if (tabWidgets.count() == 1) { - return; - } - auto it = tabWidgets.begin(); - if (it.key() == closedEditWidget) - ++it; - it.value() = true; - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - it.key(), &TextEditTabWidget::openFileWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toJumpFileLineWithKey, - it.key(), &TextEditTabWidget::jumpToLineWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRunFileLineWithKey, - it.key(), &TextEditTabWidget::runningToLineWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toSetModifiedAutoReload, - it.key(), &TextEditTabWidget::setModifiedAutoReload); -} - -void TextEditSplitter::doSelected(bool state) -{ - auto textEditTabWidget = qobject_cast(sender()); - if (!textEditTabWidget) - return; - - auto findIsConnEdit = [=]() -> TextEditTabWidget* - { - for(auto it = tabWidgets.begin(); it != tabWidgets.end(); ++it) { - if (it.value() == true) - return it.key(); - } - return nullptr; - }; - - if (tabWidgets.values().contains(true)) { - if (state) { - while (tabWidgets.values().contains(true)) { - auto edit = findIsConnEdit(); - if (edit) { - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - edit, &TextEditTabWidget::openFileWithKey); - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toJumpFileLineWithKey, - edit, &TextEditTabWidget::jumpToLineWithKey); - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toRunFileLineWithKey, - edit, &TextEditTabWidget::runningToLineWithKey); - QObject::disconnect(EditorCallProxy::instance(), &EditorCallProxy::toSetModifiedAutoReload, - edit, &TextEditTabWidget::setModifiedAutoReload); - tabWidgets[edit] = false; - } - } - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toAddDebugPoint, - textEditTabWidget, &TextEditTabWidget::addDebugPoint); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRemoveDebugPoint, - textEditTabWidget, &TextEditTabWidget::removeDebugPoint); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - textEditTabWidget, &TextEditTabWidget::openFileWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toJumpFileLineWithKey, - textEditTabWidget, &TextEditTabWidget::jumpToLineWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRunFileLineWithKey, - textEditTabWidget, &TextEditTabWidget::runningToLineWithKey); - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toSetModifiedAutoReload, - textEditTabWidget, &TextEditTabWidget::setModifiedAutoReload); - tabWidgets[textEditTabWidget] = state; - } - } -} - -void TextEditSplitter::doShowSplit() -{ - if (tabWidgets.size() > 1) - return; - auto textEditTabWidget = qobject_cast(sender()); - textEditTabWidget->setSplitButtonVisible(true); -} - -TextEditSplitter *TextEditSplitter::instance() -{ - if (!Private::splitter) - Private::splitter = new TextEditSplitter; - return Private::splitter; -} diff --git a/src/plugins/codeeditor/textedittabwidget/texteditsplitter.h b/src/plugins/codeeditor/textedittabwidget/texteditsplitter.h deleted file mode 100644 index e4de5675c..000000000 --- a/src/plugins/codeeditor/textedittabwidget/texteditsplitter.h +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITSPLITTER_H -#define TEXTEDITSPLITTER_H - -#include "textedittabwidget.h" - -#include -#include -#include -#include -#include - -class TextEditSplitter : public QWidget -{ - Q_OBJECT -public: - friend class TextEditTabWidget; - - explicit TextEditSplitter(QWidget *parent = nullptr); - QSplitter *getSplitter() const; - - QString getSelectedText(); - QString getCursorBeforeText(); - QString getCursorAfterText(); - void replaceSelectedText(const QString &text); - void showTips(const QString &tips); - void insertText(const QString &text); - void undo(); - -public slots: - void doSplit(Qt::Orientation orientation, const newlsp::ProjectKey &key, const QString &file); - void doClose(); - void doSelected(bool state); - void doShowSplit(); - static TextEditSplitter *instance(); - -private: - virtual ~TextEditSplitter() override; - QVBoxLayout *vLayout = nullptr; - QSplitter *rootSplitter = nullptr; - TextEditTabWidget *tabWidget = nullptr; - QHash tabWidgets; - - void rootSplit(TextEditTabWidget *oldEditWidget, Qt::Orientation orientation, - const newlsp::ProjectKey &key, const QString &file); - void childSplit(TextEditTabWidget *oldEditWidget, Qt::Orientation orientation, - const newlsp::ProjectKey &key, const QString &file); - void rootClose(QSplitter *splitter, TextEditTabWidget *closedEditWidget); - void childClose(QSplitter *splitter, TextEditTabWidget *closedEditWidget); - void splitUpdate(TextEditTabWidget *oldEditWidget, TextEditTabWidget *newEditWidget); - void closeUpdate(TextEditTabWidget *closedEditWidget); - bool isEditWidget(QWidget *widget); - QSplitter *getParentSplitter(QWidget *widget); -}; - -#endif // TEXTEDITSPLITTER_H diff --git a/src/plugins/codeeditor/textedittabwidget/textedittabbar.cpp b/src/plugins/codeeditor/textedittabwidget/textedittabbar.cpp deleted file mode 100644 index 75c224a2e..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittabbar.cpp +++ /dev/null @@ -1,304 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "textedittabbar.h" -#include "common/common.h" -#include "services/editor/editorservice.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -class TextEditTabBarPrivate -{ - friend class TextEditTabBar; - QTabBar *tab = nullptr; - QHBoxLayout * hBoxLayout = nullptr; - DToolButton *pbtHorizontal = nullptr; - DToolButton *pbtVertical = nullptr; - DToolButton *pbtClose = nullptr; - DDialog *removeDialog = nullptr; -}; - -TextEditTabBar::TextEditTabBar(QWidget *parent) - : DWidget (parent) - , d(new TextEditTabBarPrivate) -{ - d->tab = new QTabBar(this); - d->hBoxLayout = new QHBoxLayout(); - d->pbtHorizontal = new DToolButton(); - d->pbtVertical = new DToolButton(); - d->pbtClose = new DToolButton(this); - d->hBoxLayout->setSpacing(5); - d->hBoxLayout->setMargin(0); - - d->pbtHorizontal->setIcon(QIcon::fromTheme("edit-hSplit")); - d->pbtVertical->setIcon(QIcon::fromTheme("edit-vSplit")); - d->pbtClose->setIcon(QIcon::fromTheme("edit-closeBtn")); - d->hBoxLayout->addWidget(d->tab); - d->hBoxLayout->addStretch(10); - d->hBoxLayout->addWidget(d->pbtHorizontal); - d->hBoxLayout->addWidget(d->pbtVertical); - d->hBoxLayout->addWidget(d->pbtClose); - d->tab->setTabsClosable(true); - - d->tab->setContextMenuPolicy(Qt::CustomContextMenu); - - this->setLayout(d->hBoxLayout); - - QObject::connect(d->tab, &QTabBar::currentChanged, - this, [=](int index){ - QString filePath = indexFile(index); - emit this->fileSwitched(filePath); - editor.switchedFile(filePath); - }); - - QObject::connect(d->tab, &QTabBar::tabCloseRequested, - this, [=](int index) { - this->removeTab(this->indexFile(index)); - }); - - QObject::connect(d->pbtHorizontal, &DToolButton::clicked, - this, [=]() { - emit splitClicked(Qt::Vertical); - }); - - QObject::connect(d->pbtVertical, &DToolButton::clicked, - this, [=]() { - emit splitClicked(Qt::Horizontal); - }); - - QObject::connect(d->pbtClose, &DToolButton::clicked, - this, [=]() { - emit closeClicked(); - }); - - QObject::connect(d->tab, &DTabBar::customContextMenuRequested, - this, &TextEditTabBar::showMenu); - -} - -TextEditTabBar::~TextEditTabBar() -{ - if (d) { - if (d->tab) - delete d->tab; - if (d->pbtClose) - delete d->pbtClose; - if (d->pbtHorizontal) - delete d->pbtHorizontal; - if (d->pbtVertical) - delete d->pbtVertical; - if (d->hBoxLayout) - delete d->hBoxLayout; - delete d; - } -} - -void TextEditTabBar::setFile(const QString &file) -{ - if (!QFile::exists(file)) { - return; - } - - int index = fileIndex(file); - if (index != -1) { - d->tab->setCurrentIndex(index); - return; - } - - // should emit index changed, to use addTab method with tab is empty - QFileInfo info(file); - int addIndex = d->tab->addTab(info.fileName()); - d->tab->setTabToolTip(addIndex, file); - d->tab->setTabData(addIndex, info.fileName()); - editor.openedFile(file); // plugin interface -} - -void TextEditTabBar::switchFile(const QString &file) -{ - int index = fileIndex(file); - if (index != -1) { - d->tab->setCurrentIndex(index); - } -} - -int TextEditTabBar::fileIndex(const QString &file) const -{ - int index = -1; - for (int i = 0; i < d->tab->count(); i++) { - if (d->tab->tabToolTip(i) == file) - index = i; - } - return index; -} - -QString TextEditTabBar::indexFile(int index) const -{ - return d->tab->tabToolTip(index); -} - -void TextEditTabBar::doFileChanged(const QString &file) -{ - int index = fileIndex(file); - if (index == -1) - return; - - QString changedFileName = "*" + QFileInfo(file).fileName(); - if (d->tab->tabText(index) == changedFileName) { - return; - } - - d->tab->setTabText(index , "*" + d->tab->tabText(index)); - qInfo() << d->tab->tabText(index); - -} - -void TextEditTabBar::doFileSaved(const QString &file) -{ - int index = fileIndex(file); - if (index == -1) - return; - - QString text = d->tab->tabText(index); - if (QFileInfo(file).fileName() == text){ - return; - } - - text = text.remove(0, 1); - d->tab->setTabText(index, text); -} - -void TextEditTabBar::removeTab(const QString &file) -{ - int index = fileIndex(file); - - if (index == -1) - return; - - bool cancelFlag = false; - - QString text = d->tab->tabText(index); - QFileInfo info(file); - if (info.exists() && text.length() > 0 && text.at(0) == "*") { - d->removeDialog = new DDialog(this); - d->removeDialog->setIcon(QIcon::fromTheme("dialog-question")); - d->removeDialog->setAttribute(Qt::WA_DeleteOnClose); - d->removeDialog->setMessage(tr("The file has unsaved changes, will save?")); - d->removeDialog->insertButton(0, tr("Cancel")); - d->removeDialog->insertButton(1, tr("No Changes")); - d->removeDialog->insertButton(2, tr("Save Changes"), true, DDialog::ButtonRecommend); - - connect(d->removeDialog, &DDialog::buttonClicked, [&](int index) { - if (index == 0) { - d->removeDialog->reject(); - cancelFlag = true; - } else if(index == 1) { - d->removeDialog->accept(); - } else if(index == 2) { - d->removeDialog->accept(); - emit saveFile(file); - } - }); - d->removeDialog->exec(); - } - - if (cancelFlag) - return; - - emit fileClosed(file); - editor.closedFile(file); - d->tab->removeTab(index); -} - -int TextEditTabBar::count() const -{ - return d->tab->count(); -} - -int TextEditTabBar::currentIndex() const -{ - return d->tab->currentIndex(); -} - -QString TextEditTabBar::currentFile() const -{ - return indexFile(currentIndex()); -} - -void TextEditTabBar::setCurrentIndex(int idx) -{ - return d->tab->setCurrentIndex(idx); -} - -void TextEditTabBar::setCloseButtonVisible(bool flag) -{ - d->pbtClose->setVisible(flag); -} - -void TextEditTabBar::setSplitButtonVisible(bool flag) -{ - d->pbtHorizontal->setVisible(flag); - d->pbtVertical->setVisible(flag); -} - -void TextEditTabBar::tabCloseRequested(int idx) -{ - return d->tab->tabCloseRequested(idx); -} - -void TextEditTabBar::showMenu(QPoint pos) -{ - int curIndex = d->tab->tabAt(pos); - DMenu *menu = new DMenu(this); - - menu->addAction(tr("Copy File Path"), [=]() { - auto file = d->tab->tabToolTip(curIndex); - qApp->clipboard()->setText(file); - }); - menu->addAction(tr("Copy File Name"), [=]() { - auto fileName = d->tab->tabData(curIndex).toString(); - qApp->clipboard()->setText(fileName); - }); - - menu->addSeparator(); - - menu->addAction(tr("Close This File"), [=]() { - auto file = d->tab->tabToolTip(curIndex); - removeTab(file); - }); - menu->addAction(tr("Close All Files"), [=]() { - while(d->tab->count() > 0) { - auto file = d->tab->tabToolTip(0); - removeTab(file); - }; - }); - menu->addAction(tr("Close All Files Except This"), [=]() { - auto curFile = d->tab->tabToolTip(curIndex); - int index = 0; - while(d->tab->count() > 1) { - auto file = d->tab->tabToolTip(index); - if (file != curFile) - removeTab(file); - else - index++; - }; - }); - - menu->addSeparator(); - - menu->addAction(tr("Open File Location"), [=]() { - auto file = d->tab->tabToolTip(curIndex); - QProcess::startDetached("dde-file-manager", QStringList() << "--show-item" << file << "--raw"); - }); - - menu->exec(QCursor::pos()); - menu->deleteLater(); -} diff --git a/src/plugins/codeeditor/textedittabwidget/textedittabbar.h b/src/plugins/codeeditor/textedittabwidget/textedittabbar.h deleted file mode 100644 index 7c4951ac9..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittabbar.h +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITTABBAR_H -#define TEXTEDITTABBAR_H - -#include -#include - -class TextEditTabBarPrivate; -class TextEditTabBar : public DTK_WIDGET_NAMESPACE::DWidget -{ - Q_OBJECT - friend class TextEditTabBarPrivate; - TextEditTabBarPrivate *const d; -public: - explicit TextEditTabBar(QWidget *parent = nullptr); - virtual ~TextEditTabBar(); - int fileIndex(const QString &file) const; - QString indexFile(int index) const; - void setFile(const QString &file); - void switchFile(const QString &file); - void removeTab(const QString &file); - int count() const; - int currentIndex() const; - QString currentFile() const; - void setCurrentIndex(int idx); - void setCloseButtonVisible(bool flag); - void setSplitButtonVisible(bool flag); - -signals: - void fileClosed(const QString &file); - void fileSwitched(const QString &file); - void saveFile(const QString &file); - void splitClicked(Qt::Orientation ori); - void closeClicked(); - -public slots: - void tabCloseRequested(int idx); - void doFileChanged(const QString &file); - void doFileSaved(const QString &file); - void showMenu(QPoint pos); -}; - -#endif // TEXTEDITTABBAR_H diff --git a/src/plugins/codeeditor/textedittabwidget/textedittabwidget.cpp b/src/plugins/codeeditor/textedittabwidget/textedittabwidget.cpp deleted file mode 100644 index 450ccdd05..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittabwidget.cpp +++ /dev/null @@ -1,793 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "style/lspclientkeeper.h" -#include "textedittabwidget.h" -#include "textedittitlebar.h" -#include "textedittabbar.h" -#include "textedit.h" -#include "mainframe/texteditkeeper.h" -#include "transceiver/codeeditorreceiver.h" -#include "codelens/codelens.h" -#include "common/common.h" -#include -#include -#include - -static TextEditTabWidget *ins{nullptr}; - -class TextEditTabWidgetPrivate -{ - friend class TextEditTabWidget; - TextEditTabBar *tab {nullptr}; - QGridLayout *gridLayout {nullptr}; - QHash textEdits{}; - QHash titleBars{}; - QHash textEditAutoReloadFlags; - TextEdit defaultEdit; - QString runningFilePathCache; - bool selFlag = false; - QColor selColor{}; - QColor defColor{}; -}; - -TextEditTabWidget::TextEditTabWidget(QWidget *parent) - : QWidget(parent) - , d(new TextEditTabWidgetPrivate) -{ - d->gridLayout = new QGridLayout(this); - d->gridLayout->setSpacing(0); - d->gridLayout->setMargin(0); - - d->tab = new TextEditTabBar(this); - d->gridLayout->addWidget(d->tab); - d->gridLayout->addWidget(&d->defaultEdit); - this->setLayout(d->gridLayout); - this->setAcceptDrops(true); - - setMinimumSize(QSize(100, 100)); - - setDefaultFileEdit(); - setFocusPolicy(Qt::ClickFocus); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toOpenFileWithKey, - this, &TextEditTabWidget::openFileWithKey); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRunFileLineWithKey, - this, &TextEditTabWidget::runningToLineWithKey); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toRunClean, - this, &TextEditTabWidget::runningEnd); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toDebugPointClean, - this, &TextEditTabWidget::debugPointClean); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toJumpFileLineWithKey, - this, &TextEditTabWidget::jumpToLineWithKey); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toSetLineBackground, - this, &TextEditTabWidget::setLineBackground); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toDelLineBackground, - this, &TextEditTabWidget::delLineBackground); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toCleanLineBackground, - this, &TextEditTabWidget::cleanLineBackground); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toSetAnnotation, - this, &TextEditTabWidget::setAnnotation); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toCleanAnnotation, - this, &TextEditTabWidget::cleanAnnotation); - - QObject::connect(EditorCallProxy::instance(), &EditorCallProxy::toCleanAllAnnotation, - this, &TextEditTabWidget::cleanAllAnnotation); - - QObject::connect(d->tab, &TextEditTabBar::fileSwitched, - this, &TextEditTabWidget::showFileEdit, Qt::QueuedConnection); - - QObject::connect(d->tab, &TextEditTabBar::fileClosed, - this, &TextEditTabWidget::removeFileEdit, Qt::QueuedConnection); - - QObject::connect(d->tab, &TextEditTabBar::fileClosed, - this, &TextEditTabWidget::removeFileStatusBar, Qt::QueuedConnection); - - QObject::connect(d->tab, &TextEditTabBar::closeClicked, this, &TextEditTabWidget::closed); - - QObject::connect(d->tab, &TextEditTabBar::splitClicked, this, [=](Qt::Orientation ori) { - QString currSelFile = d->tab->currentFile(); - newlsp::ProjectKey key = {}; - if(d->textEdits[currSelFile] && !currSelFile.isEmpty()) { - key = d->textEdits[currSelFile]->projectKey(); - } - emit splitClicked(ori, key, currSelFile); - }); - - QObject::connect(Inotify::globalInstance(), &Inotify::deletedSelf, - this, &TextEditTabWidget::fileDeleted, Qt::QueuedConnection); - QObject::connect(Inotify::globalInstance(), &Inotify::movedSelf, - this, &TextEditTabWidget::fileMoved, Qt::QueuedConnection); - QObject::connect(Inotify::globalInstance(), &Inotify::modified, - this, &TextEditTabWidget::fileModifyed, Qt::QueuedConnection); -} - -TextEditTabWidget::~TextEditTabWidget() -{ - if (d) { - if (d->tab) { - delete d->tab; - d->tab = nullptr; - } - - auto editsItera = d->textEdits.begin(); - while (editsItera != d->textEdits.end()) { - delete editsItera.value(); // free instance - editsItera = d->textEdits.erase(editsItera); - } - - auto titleItera = d->titleBars.begin(); - while (titleItera != d->titleBars.end()) { - delete titleItera.value(); - titleItera = d->titleBars.erase(titleItera); - } - - delete d; // free private - } -} - -TextEditTabWidget *TextEditTabWidget::instance() -{ - if (!ins) - ins = new TextEditTabWidget; - return ins; -} - -void TextEditTabWidget::openFile(const QString &filePath) -{ - QFileInfo info(filePath); - if (!info.exists() || !d->tab ) - return; - // can't add widget to much - if (d->textEdits.keys().contains(info.filePath())) { - d->tab->switchFile(filePath); - return; - } - - d->tab->setFile(filePath); - - - TextEdit *edit = new TextEdit; - - QObject::connect(edit, &TextEdit::focusChanged, - this, &TextEditTabWidget::selectSelf); - - QObject::connect(edit, &TextEdit::fileChanged, d->tab, - &TextEditTabBar::doFileChanged, Qt::UniqueConnection); - - QObject::connect(edit, &TextEdit::fileSaved, d->tab, - &TextEditTabBar::doFileSaved, Qt::UniqueConnection); - - edit->setFile(info.filePath()); - d->textEdits[filePath] = edit; - - // 添加监听 - Inotify::globalInstance()->addPath(info.filePath()); - // set display textedit - d->gridLayout->addWidget(edit); - - if (!d->defaultEdit.isHidden()) - d->defaultEdit.hide(); - - d->tab->switchFile(filePath); - - d->textEditAutoReloadFlags[filePath] = false; - - showFileEdit(filePath); - emit sigOpenFile(); -} - -void TextEditTabWidget::openFileWithKey(const newlsp::ProjectKey &key, const QString &filePath) -{ - QFileInfo info(filePath); - if (!info.exists() || !d->tab ) - return; - // can't add widget to much - if (d->textEdits.keys().contains(info.filePath())) { - d->tab->switchFile(filePath); - return; - } - - d->tab->setFile(filePath); - - newlsp::Client *client = LSPClientKeeper::instance()->get(key); - if (!client) { - client = LSPClientKeeper::instance()->get(key); - } - - // 全局rename操作 - QObject::connect(client, QOverload::of(&newlsp::Client::renameRes), - this, &TextEditTabWidget::doRenameReplace, Qt::UniqueConnection); - - // 使用取出适用的编辑器 - TextEdit *edit = TextEditKeeper::create(TextEdit::fileLanguage(filePath)); - - QObject::connect(edit, &TextEdit::fileChanged, d->tab, - &TextEditTabBar::doFileChanged, Qt::UniqueConnection); - - QObject::connect(edit, &TextEdit::fileSaved, d->tab, - &TextEditTabBar::doFileSaved, Qt::UniqueConnection); - - QObject::connect(d->tab, &TextEditTabBar::saveFile, - this, &TextEditTabWidget::saveEditFile, - Qt::UniqueConnection); - - if (edit){ - edit->setProjectKey(key); - edit->setFile(info.filePath()); - } else { - edit = new TextEdit(); - edit->setProjectKey(key); - edit->setFile(info.filePath()); - } - - QObject::connect(edit, &TextEdit::focusChanged, - this, &TextEditTabWidget::selectSelf); - - d->textEdits[filePath] = edit; - // 添加监听 - Inotify::globalInstance()->addPath(info.filePath()); - // set display textedit - d->gridLayout->addWidget(edit); - - if (!d->defaultEdit.isHidden()) - d->defaultEdit.hide(); - - d->tab->switchFile(filePath); - - d->textEditAutoReloadFlags[filePath] = false; - - showFileEdit(filePath); - emit sigOpenFile(); -} - -void TextEditTabWidget::closeFile(const QString &filePath) -{ - Inotify::globalInstance()->removePath(filePath); - - if (!d->tab) - return; - - int index = d->tab->fileIndex(filePath); - if (index >=0 && index < d->tab->count()) - emit d->tab->tabCloseRequested(index); -} - -void TextEditTabWidget::jumpToLineWithKey(const newlsp::ProjectKey &key, const QString &filePath, int line) -{ - auto edit = switchFileAndToOpen(key, filePath); - - if (edit) { - edit->jumpToLine(line); - } -} - -void TextEditTabWidget::jumpToLine(const QString &filePath, int line) -{ - auto edit = switchFileAndToOpen(filePath); - - if (edit) { - edit->jumpToLine(line); - } -} - -void TextEditTabWidget::jumpToRange(const QString &filePath, const newlsp::Range &range) -{ - auto edit = switchFileAndToOpen(filePath); - - if (edit) { - auto styleLsp = edit->getStyleLsp(); - if (styleLsp) { - auto start = styleLsp->getSciPosition(edit->docPointer(), range.start); - auto end = styleLsp->getSciPosition(edit->docPointer(), range.end); - edit->jumpToRange(start, end); - } - } -} - -void TextEditTabWidget::runningToLineWithKey(const newlsp::ProjectKey &key, const QString &filePath, int line) -{ - auto edit = switchFileAndToOpen(key, filePath); - - if (edit) { - edit->jumpToLine(line); - edit->runningToLine(line); - } -} - -void TextEditTabWidget::runningToLine(const QString &filePath, int line) -{ - auto edit = switchFileAndToOpen(filePath); - - if (edit) { - edit->jumpToLine(line); - edit->runningToLine(line); - } -} - -void TextEditTabWidget::runningEnd() -{ - for (auto edit : d->textEdits) { - edit->runningEnd(); - } -} - -void TextEditTabWidget::addDebugPoint(const QString &filePath, int line) -{ - for (auto edit : d->textEdits) { - if (filePath == edit->file()) { - edit->addDebugPoint(line); - } - } -} - -void TextEditTabWidget::removeDebugPoint(const QString &filePath, int line) -{ - for (auto edit : d->textEdits) { - if (filePath == edit->file()) { - edit->removeDebugPoint(line); - } - } -} - -void TextEditTabWidget::debugPointClean() -{ - for (auto edit : d->textEdits) { - edit->debugPointAllDelete(); - } -} - -void TextEditTabWidget::replaceRange(const QString &filePath, const newlsp::Range &range, const QString &text) -{ - auto edit = d->textEdits.value(filePath); - if (edit) { - auto styleLsp = edit->getStyleLsp(); - if (styleLsp) { - auto start = styleLsp->getSciPosition(edit->docPointer(), range.start); - auto end = styleLsp->getSciPosition(edit->docPointer(), range.end); - edit->replaceRange(start, end, text); - } - } else { //直接更改磁盘数据 - if (range.start.line != range.end.line) { - qCritical() << "Failed, Unknown error"; - abort(); - } - QFile changeFile(filePath); - QString cacheData; - if (changeFile.open(QFile::ReadOnly)) { - int i = 0; - while (i != range.start.line) { - cacheData += changeFile.readLine(); - i++; - } - QString changeLine = changeFile.readLine(); - int removeLength = range.end.character - range.start.character; - changeLine = changeLine.replace(range.start.character, removeLength, text); - cacheData += changeLine; - QByteArray array = changeFile.readLine(); - while (!array.isEmpty()) { - cacheData += array; - array = changeFile.readLine(); - } - changeFile.close(); - } - - if (changeFile.open(QFile::WriteOnly | QFile::Truncate)) { - int writeCount = changeFile.write(cacheData.toLatin1()); - if (writeCount != cacheData.size()) { - qCritical() << "Failed, Unknown error"; - abort(); - } - changeFile.close(); - } - } -} - -void TextEditTabWidget::setLineBackground(const QString &filePath, int line, const QColor &color) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(filePath); - - if (!edit) - return; - - edit->setLineBackground(line, color); -} - -void TextEditTabWidget::delLineBackground(const QString &filePath, int line) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(filePath); - - if (!edit) - return; - - edit->delLineBackground(line); -} - -void TextEditTabWidget::cleanLineBackground(const QString &filePath) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(filePath); - - if (!edit) - return; - - edit->cleanLineBackground(); -} - -void TextEditTabWidget::setAnnotation(const QString &filePath, int line, - const QString &title, const AnnotationInfo &info) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(filePath); - - if (!edit) - return; - - edit->setAnnotation(line, title, info); -} - -void TextEditTabWidget::cleanAnnotation(const QString &filePath, const QString &title) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(filePath); - - if (!edit) - return; - - edit->cleanAnnotation(title); -} - -void TextEditTabWidget::cleanAllAnnotation(const QString &title) -{ - for (auto filePath : d->textEdits.keys()) { - cleanAnnotation(filePath, title); - } -} - -void TextEditTabWidget::selectSelf(bool state) -{ - d->selFlag = state; - emit selected(state); - update(); -} - -void TextEditTabWidget::setModifiedAutoReload(const QString &filePath, bool flag) -{ - d->textEditAutoReloadFlags[filePath] = flag; -} - -void TextEditTabWidget::setDefaultFileEdit() -{ - if (!d || !d->gridLayout) - return; - - d->gridLayout->addWidget(&d->defaultEdit); - d->defaultEdit.setEnabled(false); - d->defaultEdit.show(); -} - -void TextEditTabWidget::hideFileEdit(const QString &file) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(file); - - if (!edit) - return; - - edit->hide(); -} - -void TextEditTabWidget::showFileEdit(const QString &file) -{ - if (!d->gridLayout) - return; - - auto edit = d->textEdits.value(file); - - if (!edit) - return; - - auto itera = d->textEdits.begin(); - while (itera != d->textEdits.end()){ - if (itera.key() != file && itera.value()){ - itera.value()->hide(); // hide other; - } - itera ++; - } - - edit->show(); -} - -void TextEditTabWidget::hideFileStatusBar(const QString &file) -{ - auto statusBar = d->titleBars.value(file); - statusBar->hide(); -} - -void TextEditTabWidget::showFileStatusBar(const QString &file) -{ - if (d->titleBars.contains(file)) { - auto statusBar = d->titleBars.value(file); - if (statusBar) - statusBar->show(); - } -} - -void TextEditTabWidget::removeFileStatusBar(const QString &file) -{ - if (d->textEditAutoReloadFlags.contains(file)) - d->textEditAutoReloadFlags.remove(file); - - auto statusBar = d->titleBars.value(file); - if (!statusBar) - return; - - delete statusBar; - d->titleBars.remove(file); -} - -void TextEditTabWidget::removeFileEdit(const QString &file) -{ - auto edit = d->textEdits.value(file); - if (!edit) - return; - - edit->fileClosed(file); - edit->deleteLater(); - d->textEdits.remove(file); - - if (d->textEdits.size() == 0) { - setDefaultFileEdit(); - emit closeWidget(); - } - -} - -void TextEditTabWidget::removeFileTab(const QString &file) -{ - d->tab->removeTab(file); -} - -void TextEditTabWidget::fileModifyed(const QString &file) -{ - auto edit = d->textEdits[file]; - - if (!edit) - return; - - if (!edit->isHidden() && !edit->isSaveText()) { - - if (!d->titleBars[file]) { - d->titleBars[file] = TextEditTitleBar::changedReload(file); - QObject::connect(d->titleBars[file], &TextEditTitleBar::reloadfile, [=](){ - if(d->titleBars.contains(file) && d->textEdits.contains(file)) { - d->textEdits[file]->updateFile(); - } - }); - } - - if (d->textEditAutoReloadFlags.contains(file) && d->textEditAutoReloadFlags[file]) { - d->titleBars[file]->reloadfile(); - } else { - d->gridLayout->addWidget(d->titleBars[file], 1, 0); - d->titleBars[file]->show(); - } - } - - // 100 ms 内多次触发变动将忽略 - QTimer::singleShot(100, [=](){edit->cleanIsSaveText();}); -} - -void TextEditTabWidget::fileDeleted(const QString &file) -{ - detectFile(file); -} - -void TextEditTabWidget::fileMoved(const QString &file) -{ - detectFile(file); -} - -void TextEditTabWidget::detectFile(const QString &file) -{ - QFileInfo info(file); - if (info.exists()) { - fileModifyed(file); - Inotify::globalInstance()->addPath(file); - } else { - Inotify::globalInstance()->removePath(file); - handleDeletedFile(file); - } -} - -void TextEditTabWidget::setCloseButtonVisible(bool flag) -{ - d->tab->setCloseButtonVisible(flag); -} - -void TextEditTabWidget::setSplitButtonVisible(bool flag) -{ - d->tab->setSplitButtonVisible(flag); -} - -void TextEditTabWidget::handleDeletedFile(const QString &file) -{ - int ret = QMessageBox::question(this, QMessageBox::tr("File Has Been Removed"), - QMessageBox::tr("The file has been removed, Do you want to save it?"), - QMessageBox::Save | QMessageBox::Discard, QMessageBox::Discard); - if (QMessageBox::Save == ret) { - TextEdit* edit = d->textEdits.value(file); - if (edit) { - edit->saveAsText(); - Inotify::globalInstance()->addPath(file); - } - } else { - closeFile(file); - } -} - -void TextEditTabWidget::doRenameReplace(const newlsp::WorkspaceEdit &renameResult) -{ - if (renameResult.changes) { - auto changes = renameResult.changes; - auto itera = changes->begin(); - while (itera != changes->end()) { - for (auto edit : itera->second) { - QString filePath = QUrl(QString::fromStdString(itera->first)).toLocalFile(); - QString newText = QString::fromStdString(edit.newText); - replaceRange(filePath, edit.range, newText); - } - itera ++; - } - } - if (renameResult.documentChanges) { - if (newlsp::any_contrast>(renameResult.documentChanges.value())) { - std::vector documentChanges - = std::any_cast>(renameResult.documentChanges.value()); - for (auto documentChange : documentChanges) { - QString filePath = QUrl(QString::fromStdString(documentChange.textDocument.uri)).toLocalFile(); - if (!std::vector(documentChange.edits).empty()) { - auto edits = std::vector(documentChange.edits); - for (auto edit : edits) { - QString newText = QString::fromStdString(edit.newText); - replaceRange(filePath, edit.range, newText); - } - } else if (!std::vector(documentChange.edits).empty()) { - auto edits = std::vector(documentChange.edits); - for (auto edit : edits) { - QString newText = QString::fromStdString(edit.newText); - replaceRange(filePath, edit.range, newText); - } - } - } - } - } -} - -TextEdit* TextEditTabWidget::switchFileAndToOpen(const newlsp::ProjectKey &key, const QString &filePath) -{ - auto edit = d->textEdits.value(filePath); - if (edit) { - d->tab->switchFile(filePath); - showFileEdit(filePath); - } else { - openFileWithKey(key, filePath); - for (auto textEdit : d->textEdits.values()) { - textEdit->runningEnd(); - if (textEdit->file() == filePath) { - showFileEdit(filePath); - edit = textEdit; - } - } - } - return edit; -} - -TextEdit* TextEditTabWidget::switchFileAndToOpen(const QString &filePath) -{ - auto edit = d->textEdits.value(filePath); - if (edit) { - d->tab->switchFile(filePath); - showFileEdit(filePath); - } else { - openFile(filePath); - for (auto textEdit : d->textEdits.values()) { - textEdit->runningEnd(); - if (textEdit->file() == filePath) { - showFileEdit(filePath); - edit = textEdit; - } - } - } - - showFileStatusBar(filePath); - return edit; -} - -void TextEditTabWidget::saveEditFile(const QString &file) -{ - TextEdit* edit = d->textEdits.value(file); - if (edit) { - edit->saveText(); - } -} - -void TextEditTabWidget::keyPressEvent(QKeyEvent *event) -{ - if (event->modifiers() == Qt::AltModifier) { - int idx = d->tab->currentIndex(); - int count = d->tab->count(); - if (count > 0 && idx > -1) { - if (event->key() == Qt::Key_Left) { - d->tab->setCurrentIndex((idx - 1 + count) % count); - setFocus(); - } else if (event->key() == Qt::Key_Right) { - d->tab->setCurrentIndex((idx + 1) % count); - setFocus(); - } - } - } - return QWidget::keyPressEvent(event); -} - -void TextEditTabWidget::focusInEvent(QFocusEvent *event) -{ - QWidget::focusInEvent(event); - this->selectSelf(true); -} - -void TextEditTabWidget::focusOutEvent(QFocusEvent *event) -{ - QWidget::focusOutEvent(event); - this->selectSelf(false); -} - -void TextEditTabWidget::paintEvent(QPaintEvent *event) -{ - -} - -void TextEditTabWidget::dragEnterEvent(QDragEnterEvent *event) -{ - if (event->mimeData()->hasUrls()) { - event->acceptProposedAction(); - } else { - event->ignore(); - } -} - -void TextEditTabWidget::dropEvent(QDropEvent *event) -{ - const QMimeData* mimeData = event->mimeData(); - if(mimeData->hasUrls()) { - QListurlList = mimeData->urls(); - QString fileName = urlList.at(0).toLocalFile(); - if(!fileName.isEmpty()) { - editor.openFile(fileName); - } - } -} diff --git a/src/plugins/codeeditor/textedittabwidget/textedittabwidget.h b/src/plugins/codeeditor/textedittabwidget/textedittabwidget.h deleted file mode 100644 index ad95f5bd0..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittabwidget.h +++ /dev/null @@ -1,88 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITTABWIDGET_H -#define TEXTEDITTABWIDGET_H - -#include "common/common.h" - -#include - -class TextEdit; -class TextEditTabWidgetPrivate; -class TextEditTabWidget : public QWidget -{ - Q_OBJECT - friend class TextEditTabWidgetPrivate; - TextEditTabWidgetPrivate *const d; -public: - explicit TextEditTabWidget(QWidget *parent = nullptr); - explicit TextEditTabWidget(TextEditTabWidget &text); - virtual ~TextEditTabWidget(); - static TextEditTabWidget *instance(); - void setCloseButtonVisible(bool flag); - void setSplitButtonVisible(bool flag); - TextEdit *activeTextWidget(); - -protected: - virtual void keyPressEvent(QKeyEvent *event) override; - virtual void focusInEvent(QFocusEvent *event) override; - virtual void focusOutEvent(QFocusEvent *event) override; - void paintEvent(QPaintEvent *event = nullptr) override; - void dragEnterEvent(QDragEnterEvent *event) override; - void dropEvent(QDropEvent *event) override; - -signals: - void closed(); - void splitClicked(Qt::Orientation, const newlsp::ProjectKey &, const QString &); - void selected(bool state); - void closeWidget(); - void sigOpenFile(); - -public slots: - void openFile(const QString &filePath); - void closeFile(const QString &filePath); - void jumpToLine(const QString &filePath, int line); - void jumpToRange(const QString &filePath, const newlsp::Range &range); - void runningToLine(const QString &filePath, int line); - void openFileWithKey(const newlsp::ProjectKey &key, const QString &filePath); - void jumpToLineWithKey(const newlsp::ProjectKey &key, const QString &filePath, int line); - void runningToLineWithKey(const newlsp::ProjectKey &key, const QString &filePath, int line); - void runningEnd(); - void addDebugPoint(const QString &filePath, int line); - void removeDebugPoint(const QString &filePath, int line); - void debugPointClean(); - void replaceRange(const QString &filePath, const newlsp::Range &range,const QString &text); - void setLineBackground(const QString &filePath, int line, const QColor &color); - void delLineBackground(const QString &filePath, int line); - void cleanLineBackground(const QString &filePath); - void setAnnotation(const QString &filePath, int line, const QString &title, const AnnotationInfo &info); - void cleanAnnotation(const QString &filePath, const QString &title); - void cleanAllAnnotation(const QString &title); - void selectSelf(bool state); - void setModifiedAutoReload(const QString &filePath, bool flag); - -private slots: - void setDefaultFileEdit(); - void hideFileEdit(const QString &file); - void showFileEdit(const QString &file); - void hideFileStatusBar(const QString &file); - void showFileStatusBar(const QString &file); - void removeFileStatusBar(const QString &file); - void removeFileEdit(const QString &file); - void removeFileTab(const QString &file); - void fileModifyed(const QString &file); - void fileDeleted(const QString &file); - void fileMoved(const QString &file); - void doRenameReplace(const newlsp::WorkspaceEdit &renameResult); - TextEdit *switchFileAndToOpen(const newlsp::ProjectKey &key, const QString &filePath); - TextEdit *switchFileAndToOpen(const QString &filePath); - void saveEditFile(const QString &file); - -private: - void handleDeletedFile(const QString &file); - void detectFile(const QString &file); -}; - -#endif // TEXTEDITTABWIDGET_H diff --git a/src/plugins/codeeditor/textedittabwidget/textedittitlebar.cpp b/src/plugins/codeeditor/textedittabwidget/textedittitlebar.cpp deleted file mode 100644 index f49d4ebf4..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittitlebar.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include "textedittitlebar.h" - -#include -#include -#include -#include -#include - -class TextEditTitleBarPrivate -{ - friend class TextEditTitleBar; - QLabel infoLabel; - QColor background; - QMap buttons; -}; - -TextEditTitleBar::TextEditTitleBar(QWidget *parent) - : QStatusBar(parent), d(new TextEditTitleBarPrivate) -{ -} - -TextEditTitleBar::~TextEditTitleBar() -{ - if (d) { - for (auto button : d->buttons.values()) { - delete button; - } - d->buttons.clear(); - delete d; - } -} - -QPushButton *TextEditTitleBar::button(TextEditTitleBar::StandardButton button) -{ - return d->buttons[button]; -} - -TextEditTitleBar *TextEditTitleBar::changedReload(const QString &filePath) -{ - auto self = new TextEditTitleBar(); - self->d->infoLabel.setText( - QLabel::tr("File Path: %0").arg(filePath) - + "\n" - + QLabel::tr("The current file has changed. Do you want to reload the current file?")); - self->d->buttons[StandardButton::Reload] = new QPushButton(QPushButton::tr("Reload")); - self->d->buttons[StandardButton::Cancel] = new QPushButton(QPushButton::tr("Cancel")); - self->d->background = QColor(0xff0000); - self->setAutoFillBackground(true); - - connect(self->d->buttons[StandardButton::Reload], &QPushButton::clicked, [=](){ - self->reloadfile(); - self->close(); - }); - - connect(self->d->buttons[StandardButton::Cancel], &QPushButton::clicked, [=](){ - self->close(); - }); - - self->addWidget(&(self->d->infoLabel), 0); - for (auto button : self->d->buttons) { - button->setFixedSize(60, 30); - self->addWidget(button); - } - - QPalette palette; - palette.setBrush(QPalette::ColorRole::Window, QBrush(self->d->background)); - self->setPalette(palette); - return self; -} diff --git a/src/plugins/codeeditor/textedittabwidget/textedittitlebar.h b/src/plugins/codeeditor/textedittabwidget/textedittitlebar.h deleted file mode 100644 index 33643193e..000000000 --- a/src/plugins/codeeditor/textedittabwidget/textedittitlebar.h +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef TEXTEDITTITLEBAR_H -#define TEXTEDITTITLEBAR_H - -#include -#include -#include -#include - -#include -#include - -class TextEditTitleBarPrivate; -class TextEditTitleBar : public QStatusBar -{ - Q_OBJECT - TextEditTitleBarPrivate * const d; - -public: - - enum StandardButton - { - Reload, - Cancel - }; - - explicit TextEditTitleBar(QWidget *parent = nullptr); - virtual ~TextEditTitleBar(); - QPushButton * button(StandardButton button); - static TextEditTitleBar* changedReload(const QString &filePath); - -signals: - void reloadfile(); - -}; - -#endif // TEXTEDITTITLEBAR_H diff --git a/src/plugins/codeeditor/texts/edit-hSplit_16px.svg b/src/plugins/codeeditor/texts/edit-hSplit_16px.svg index cf88a9a0f..aef4a0ba4 100644 --- a/src/plugins/codeeditor/texts/edit-hSplit_16px.svg +++ b/src/plugins/codeeditor/texts/edit-hSplit_16px.svg @@ -1,7 +1,7 @@ - ICON / view / ud - - + ICON / view / lr + + \ No newline at end of file diff --git a/src/plugins/codeeditor/texts/edit-vSplit_16px.svg b/src/plugins/codeeditor/texts/edit-vSplit_16px.svg index aef4a0ba4..cf88a9a0f 100644 --- a/src/plugins/codeeditor/texts/edit-vSplit_16px.svg +++ b/src/plugins/codeeditor/texts/edit-vSplit_16px.svg @@ -1,7 +1,7 @@ - ICON / view / lr - - + ICON / view / ud + + \ No newline at end of file diff --git a/src/plugins/codeeditor/transceiver/codeeditorreceiver.cpp b/src/plugins/codeeditor/transceiver/codeeditorreceiver.cpp index 546d465f3..cb4cd5087 100644 --- a/src/plugins/codeeditor/transceiver/codeeditorreceiver.cpp +++ b/src/plugins/codeeditor/transceiver/codeeditorreceiver.cpp @@ -31,15 +31,15 @@ void CodeEditorReceiver::eventProcess(const dpf::Event &event) { if (event.data() == project.activedProject.name) { QVariant proInfoVar = event.property(project.activedProject.pKeys[0]); - TextEditKeeper::saveProjectInfo(qvariant_cast(proInfoVar)); +// TextEditKeeper::saveProjectInfo(qvariant_cast(proInfoVar)); } else if (event.data() == project.deletedProject.name) { QVariant proInfoVar = event.property(project.deletedProject.pKeys[0]); - TextEditKeeper::removeProjectInfo(qvariant_cast(proInfoVar)); +// TextEditKeeper::removeProjectInfo(qvariant_cast(proInfoVar)); } else if (event.data() == project.createdProject.name) { QVariant proInfoVar = event.property(project.createdProject.pKeys[0]); - TextEditKeeper::saveProjectInfo(qvariant_cast(proInfoVar)); +// TextEditKeeper::saveProjectInfo(qvariant_cast(proInfoVar)); }else if (event.data() == editor.cleanRunning.name) { - return EditorCallProxy::instance()->toRunClean(); +// return EditorCallProxy::instance()->toRunClean(); } else if (event.data() == editor.openFile.name) { using namespace support_file; QString filePath = event.property(editor.openFile.pKeys[0]).toString(); @@ -59,123 +59,123 @@ void CodeEditorReceiver::eventProcess(const dpf::Event &event) newlsp::ProjectKey proKey; proKey.language = language.toStdString(); proKey.workspace = workspace.toStdString(); - EditorCallProxy::instance()->toOpenFileWithKey(proKey, filePath); - } else if (event.data() == editor.searchText.name) { - QString srcText = event.property(editor.searchText.pKeys[0]).toString(); - int findType = event.property(editor.searchText.pKeys[1]).toInt(); - return EditorCallProxy::instance()->toSearchText(srcText, findType); - } else if (event.data() == editor.replaceText.name) { - QString srcText = event.property(editor.replaceText.pKeys[0]).toString(); - QString targetText = event.property(editor.replaceText.pKeys[1]).toString(); - int replaceType = event.property(editor.replaceText.pKeys[2]).toInt(); - return EditorCallProxy::instance()->toReplaceText(srcText, targetText, replaceType); - } else if (event.data() == editor.jumpToLine.name) { - QString workspace = TextEditKeeper::projectInfo().workspaceFolder(); - if (workspace.isEmpty()) { - workspace = QDir::homePath(); - } - QString filePath = event.property(editor.jumpToLine.pKeys[0]).toString(); - using namespace support_file; - QString language = Language::idAlias(Language::id(filePath)); - newlsp::ProjectKey proKey; - proKey.language = language.toStdString(); - proKey.workspace = workspace.toStdString(); - int line = event.property(editor.jumpToLine.pKeys[1]).toInt(); - return EditorCallProxy::instance()->toJumpFileLineWithKey(proKey, filePath, line); - } else if (event.data() == actionanalyse.analyseDone.name) { - QString workspace = event.property(actionanalyse.analyseDone.pKeys[0]).toString(); - QString language = event.property(actionanalyse.analyseDone.pKeys[1]).toString(); - QString storage = event.property(actionanalyse.analyseDone.pKeys[2]).toString(); - AnalysedData analyseData = qvariant_cast(event.property(actionanalyse.analyseDone.pKeys[3])); - TextEditKeeper::setAnalysedWorkspace(workspace); - TextEditKeeper::setAnalysedLanguage(language); - TextEditKeeper::setAnalysedStorage(storage); - TextEditKeeper::setAnalysedData(analyseData); - } else if (event.data() == actionanalyse.enabled.name) { - bool enabled = event.property(actionanalyse.enabled.pKeys[0]).toBool(); - if (enabled) { - QString workspace = TextEditKeeper::getAnalysedWorkspace(); - QString language = TextEditKeeper::getAnalysedLanguage(); - QString storage = TextEditKeeper::getAnalysedStorage();; - if (workspace.isEmpty() || language.isEmpty() || storage.isEmpty()) { - dpfservice::ProjectInfo projectInfo = TextEditKeeper::projectInfo(); - workspace = FileOperation::checkCreateDir(FileOperation::checkCreateDir(projectInfo.workspaceFolder(), ".unioncode"), "symbol"); - language = projectInfo.language(); - storage = workspace; - } - if (!workspace.isEmpty() && !language.isEmpty() && !storage.isEmpty()) - actionanalyse.analyse(workspace, language, storage); - return; - } else { - TextEditKeeper::cleanAnalysedData(); - EditorCallProxy::instance()->toCleanAllAnnotation(TextEditKeeper::userActionAnalyseTitle()); - } - } else if (event.data() == editor.setAnnotation.name) { - QString filePath = event.property(editor.setAnnotation.pKeys[0]).toString(); - int line = event.property(editor.setAnnotation.pKeys[1]).toInt(); - QString title = event.property(editor.setAnnotation.pKeys[2]).toString(); - AnnotationInfo annInfo = qvariant_cast(event.property(editor.setAnnotation.pKeys[3])); - EditorCallProxy::instance()->toSetAnnotation(filePath, line, title, annInfo); - } else if (event.data() == editor.cleanAnnotation.name) { - QString filePath = event.property(editor.cleanAnnotation.pKeys[0]).toString(); - QString title = event.property(editor.cleanAnnotation.pKeys[1]).toString(); - EditorCallProxy::instance()->toCleanAnnotation(filePath, title); - } else if (event.data() == editor.setLineBackground.name) { - QString filePath = event.property(editor.setLineBackground.pKeys[0]).toString(); - int line = event.property(editor.setLineBackground.pKeys[1]).toInt(); - QColor color = qvariant_cast(event.property(editor.setLineBackground.pKeys[2])); - EditorCallProxy::instance()->toSetLineBackground(filePath, line, color); - } else if (event.data() == editor.delLineBackground.name) { - QString filePath = event.property(editor.delLineBackground.pKeys[0]).toString(); - int line = event.property(editor.delLineBackground.pKeys[1]).toInt(); - EditorCallProxy::instance()->toDelLineBackground(filePath, line); - } else if (event.data() == editor.cleanLineBackground.name) { - QString filePath = event.property(editor.cleanLineBackground.pKeys[0]).toString(); - EditorCallProxy::instance()->toCleanLineBackground(filePath); - } else if (event.data() == editor.runningToLine.name) { - auto proInfo = TextEditKeeper::projectInfo(); - QString workspace = proInfo.workspaceFolder(); - if (workspace.isEmpty()) { - workspace = QDir::homePath(); - } - QString language = proInfo.language(); - QString filePath = event.property(editor.runningToLine.pKeys[0]).toString(); - if (language.isEmpty()) { - using namespace support_file; - QString language = Language::idAlias(Language::id(filePath)); - } - newlsp::ProjectKey proKey; - proKey.language = language.toStdString(); - proKey.workspace = workspace.toStdString(); - int line = event.property(editor.runningToLine.pKeys[1]).toInt(); - EditorCallProxy::instance()->toRunFileLineWithKey(proKey, filePath, line); - } else if (event.data() == editor.jumpToLineWithKey.name){ - QString workspace = event.property(editor.jumpToLineWithKey.pKeys[0]).toString(); - QString language = event.property(editor.jumpToLineWithKey.pKeys[1]).toString(); - newlsp::ProjectKey proKey; - proKey.language = language.toStdString(); - proKey.workspace = workspace.toStdString(); - QString filePath = event.property(editor.jumpToLineWithKey.pKeys[2]).toString(); - int line = event.property(editor.jumpToLineWithKey.pKeys[3]).toInt(); - EditorCallProxy::instance()->toJumpFileLineWithKey(proKey, filePath, line); - } else if (event.data() == editor.switchContext.name) { - QString titleName = event.property(editor.switchContext.pKeys[0]).toString(); - EditorCallProxy::instance()->toSwitchContext(titleName); - } else if (event.data() == editor.switchWorkspace.name) { - QString titleName = event.property(editor.switchWorkspace.pKeys[0]).toString(); - EditorCallProxy::instance()->toSwitchWorkspace(titleName); - } else if (event.data() == editor.setModifiedAutoReload.name) { - QString filePath = event.property(editor.setModifiedAutoReload.pKeys[0]).toString(); - bool flag = event.property(editor.setModifiedAutoReload.pKeys[1]).toBool(); - EditorCallProxy::instance()->toSetModifiedAutoReload(filePath, flag); - } else if (event.data() == editor.addDebugPoint.name) { - QString filePath = event.property(editor.addDebugPoint.pKeys[0]).toString(); - int line = event.property(editor.addDebugPoint.pKeys[1]).toInt() - 1; - EditorCallProxy::instance()->toAddDebugPoint(filePath, line); - } else if (event.data() == editor.removeDebugPoint.name) { - QString filePath = event.property(editor.removeDebugPoint.pKeys[0]).toString(); - int line = event.property(editor.removeDebugPoint.pKeys[1]).toInt() - 1; - EditorCallProxy::instance()->toRemoveDebugPoint(filePath, line); + EditorCallProxy::instance()->openFileRequested(filePath); +// } else if (event.data() == editor.searchText.name) { +// QString srcText = event.property(editor.searchText.pKeys[0]).toString(); +// int findType = event.property(editor.searchText.pKeys[1]).toInt(); +// return EditorCallProxy::instance()->toSearchText(srcText, findType); +// } else if (event.data() == editor.replaceText.name) { +// QString srcText = event.property(editor.replaceText.pKeys[0]).toString(); +// QString targetText = event.property(editor.replaceText.pKeys[1]).toString(); +// int replaceType = event.property(editor.replaceText.pKeys[2]).toInt(); +// return EditorCallProxy::instance()->toReplaceText(srcText, targetText, replaceType); +// } else if (event.data() == editor.jumpToLine.name) { +// QString workspace = TextEditKeeper::projectInfo().workspaceFolder(); +// if (workspace.isEmpty()) { +// workspace = QDir::homePath(); +// } +// QString filePath = event.property(editor.jumpToLine.pKeys[0]).toString(); +// using namespace support_file; +// QString language = Language::idAlias(Language::id(filePath)); +// newlsp::ProjectKey proKey; +// proKey.language = language.toStdString(); +// proKey.workspace = workspace.toStdString(); +// int line = event.property(editor.jumpToLine.pKeys[1]).toInt(); +// return EditorCallProxy::instance()->toJumpFileLineWithKey(proKey, filePath, line); +// } else if (event.data() == actionanalyse.analyseDone.name) { +// QString workspace = event.property(actionanalyse.analyseDone.pKeys[0]).toString(); +// QString language = event.property(actionanalyse.analyseDone.pKeys[1]).toString(); +// QString storage = event.property(actionanalyse.analyseDone.pKeys[2]).toString(); +// AnalysedData analyseData = qvariant_cast(event.property(actionanalyse.analyseDone.pKeys[3])); +// TextEditKeeper::setAnalysedWorkspace(workspace); +// TextEditKeeper::setAnalysedLanguage(language); +// TextEditKeeper::setAnalysedStorage(storage); +// TextEditKeeper::setAnalysedData(analyseData); +// } else if (event.data() == actionanalyse.enabled.name) { +// bool enabled = event.property(actionanalyse.enabled.pKeys[0]).toBool(); +// if (enabled) { +// QString workspace = TextEditKeeper::getAnalysedWorkspace(); +// QString language = TextEditKeeper::getAnalysedLanguage(); +// QString storage = TextEditKeeper::getAnalysedStorage();; +// if (workspace.isEmpty() || language.isEmpty() || storage.isEmpty()) { +// dpfservice::ProjectInfo projectInfo = TextEditKeeper::projectInfo(); +// workspace = FileOperation::checkCreateDir(FileOperation::checkCreateDir(projectInfo.workspaceFolder(), ".unioncode"), "symbol"); +// language = projectInfo.language(); +// storage = workspace; +// } +// if (!workspace.isEmpty() && !language.isEmpty() && !storage.isEmpty()) +// actionanalyse.analyse(workspace, language, storage); +// return; +// } else { +// TextEditKeeper::cleanAnalysedData(); +// EditorCallProxy::instance()->toCleanAllAnnotation(TextEditKeeper::userActionAnalyseTitle()); +// } +// } else if (event.data() == editor.setAnnotation.name) { +// QString filePath = event.property(editor.setAnnotation.pKeys[0]).toString(); +// int line = event.property(editor.setAnnotation.pKeys[1]).toInt(); +// QString title = event.property(editor.setAnnotation.pKeys[2]).toString(); +// AnnotationInfo annInfo = qvariant_cast(event.property(editor.setAnnotation.pKeys[3])); +// EditorCallProxy::instance()->toSetAnnotation(filePath, line, title, annInfo); +// } else if (event.data() == editor.cleanAnnotation.name) { +// QString filePath = event.property(editor.cleanAnnotation.pKeys[0]).toString(); +// QString title = event.property(editor.cleanAnnotation.pKeys[1]).toString(); +// EditorCallProxy::instance()->toCleanAnnotation(filePath, title); +// } else if (event.data() == editor.setLineBackground.name) { +// QString filePath = event.property(editor.setLineBackground.pKeys[0]).toString(); +// int line = event.property(editor.setLineBackground.pKeys[1]).toInt(); +// QColor color = qvariant_cast(event.property(editor.setLineBackground.pKeys[2])); +// EditorCallProxy::instance()->toSetLineBackground(filePath, line, color); +// } else if (event.data() == editor.delLineBackground.name) { +// QString filePath = event.property(editor.delLineBackground.pKeys[0]).toString(); +// int line = event.property(editor.delLineBackground.pKeys[1]).toInt(); +// EditorCallProxy::instance()->toDelLineBackground(filePath, line); +// } else if (event.data() == editor.cleanLineBackground.name) { +// QString filePath = event.property(editor.cleanLineBackground.pKeys[0]).toString(); +// EditorCallProxy::instance()->toCleanLineBackground(filePath); +// } else if (event.data() == editor.runningToLine.name) { +// auto proInfo = TextEditKeeper::projectInfo(); +// QString workspace = proInfo.workspaceFolder(); +// if (workspace.isEmpty()) { +// workspace = QDir::homePath(); +// } +// QString language = proInfo.language(); +// QString filePath = event.property(editor.runningToLine.pKeys[0]).toString(); +// if (language.isEmpty()) { +// using namespace support_file; +// QString language = Language::idAlias(Language::id(filePath)); +// } +// newlsp::ProjectKey proKey; +// proKey.language = language.toStdString(); +// proKey.workspace = workspace.toStdString(); +// int line = event.property(editor.runningToLine.pKeys[1]).toInt(); +// EditorCallProxy::instance()->toRunFileLineWithKey(proKey, filePath, line); +// } else if (event.data() == editor.jumpToLineWithKey.name){ +// QString workspace = event.property(editor.jumpToLineWithKey.pKeys[0]).toString(); +// QString language = event.property(editor.jumpToLineWithKey.pKeys[1]).toString(); +// newlsp::ProjectKey proKey; +// proKey.language = language.toStdString(); +// proKey.workspace = workspace.toStdString(); +// QString filePath = event.property(editor.jumpToLineWithKey.pKeys[2]).toString(); +// int line = event.property(editor.jumpToLineWithKey.pKeys[3]).toInt(); +// EditorCallProxy::instance()->toJumpFileLineWithKey(proKey, filePath, line); +// } else if (event.data() == editor.switchContext.name) { +// QString titleName = event.property(editor.switchContext.pKeys[0]).toString(); +// EditorCallProxy::instance()->toSwitchContext(titleName); +// } else if (event.data() == editor.switchWorkspace.name) { +// QString titleName = event.property(editor.switchWorkspace.pKeys[0]).toString(); +// EditorCallProxy::instance()->toSwitchWorkspace(titleName); +// } else if (event.data() == editor.setModifiedAutoReload.name) { +// QString filePath = event.property(editor.setModifiedAutoReload.pKeys[0]).toString(); +// bool flag = event.property(editor.setModifiedAutoReload.pKeys[1]).toBool(); +// EditorCallProxy::instance()->toSetModifiedAutoReload(filePath, flag); +// } else if (event.data() == editor.addDebugPoint.name) { +// QString filePath = event.property(editor.addDebugPoint.pKeys[0]).toString(); +// int line = event.property(editor.addDebugPoint.pKeys[1]).toInt() - 1; +// EditorCallProxy::instance()->toAddDebugPoint(filePath, line); +// } else if (event.data() == editor.removeDebugPoint.name) { +// QString filePath = event.property(editor.removeDebugPoint.pKeys[0]).toString(); +// int line = event.property(editor.removeDebugPoint.pKeys[1]).toInt() - 1; +// EditorCallProxy::instance()->toRemoveDebugPoint(filePath, line); } } diff --git a/src/plugins/codeeditor/transceiver/codeeditorreceiver.h b/src/plugins/codeeditor/transceiver/codeeditorreceiver.h index b9fd25e0e..ee7302179 100644 --- a/src/plugins/codeeditor/transceiver/codeeditorreceiver.h +++ b/src/plugins/codeeditor/transceiver/codeeditorreceiver.h @@ -28,6 +28,8 @@ class EditorCallProxy : public QObject static EditorCallProxy* instance(); signals: + void openFileRequested(const QString &fileName); + void toOpenFile(const QString &filePath); void toRunClean(); void toDebugPointClean(); diff --git a/src/plugins/codeeditor/utils/defaultlexer.h b/src/plugins/codeeditor/utils/defaultlexer.h new file mode 100644 index 000000000..a1d162214 --- /dev/null +++ b/src/plugins/codeeditor/utils/defaultlexer.h @@ -0,0 +1,55 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef DEFAULTLEXER_H +#define DEFAULTLEXER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // DEFAULTLEXER_H diff --git a/src/plugins/codeeditor/utils/editorutils.cpp b/src/plugins/codeeditor/utils/editorutils.cpp new file mode 100644 index 000000000..9e6228752 --- /dev/null +++ b/src/plugins/codeeditor/utils/editorutils.cpp @@ -0,0 +1,60 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "editorutils.h" +#include "defaultlexer.h" +#include "common/common.h" + +QsciLexer *EditorUtils::defaultLexer(const QString &fileName) +{ + using namespace support_file; + auto id = Language::id(fileName); + + QsciLexer *lexer { nullptr }; + if (id.compare("cpp", Qt::CaseInsensitive)) { + lexer = new QsciLexerCPP(); + } else if (id.compare("java", Qt::CaseInsensitive)) { + lexer = new QsciLexerJava(); + } else if (id.compare("cmake", Qt::CaseInsensitive)) { + lexer = new QsciLexerCMake(); + } else if (id.compare("json", Qt::CaseInsensitive)) { + lexer = new QsciLexerJSON(); + } else if (id.compare("xml", Qt::CaseInsensitive)) { + lexer = new QsciLexerXML(); + } else if (id.compare("python", Qt::CaseInsensitive)) { + lexer = new QsciLexerPython(); + } else if (id.compare("js", Qt::CaseInsensitive)) { + lexer = new QsciLexerJavaScript(); + } + + return lexer; +} + +int EditorUtils::nbDigitsFromNbLines(long nbLines) +{ + int nbDigits = 0; // minimum number of digit should be 4 + if (nbLines < 10) + nbDigits = 1; + else if (nbLines < 100) + nbDigits = 2; + else if (nbLines < 1000) + nbDigits = 3; + else if (nbLines < 10000) + nbDigits = 4; + else if (nbLines < 100000) + nbDigits = 5; + else if (nbLines < 1000000) + nbDigits = 6; + else { // rare case + nbDigits = 7; + nbLines /= 1000000; + + while (nbLines) { + nbLines /= 10; + ++nbDigits; + } + } + + return nbDigits; +} diff --git a/src/plugins/codeeditor/utils/editorutils.h b/src/plugins/codeeditor/utils/editorutils.h new file mode 100644 index 000000000..feeca1830 --- /dev/null +++ b/src/plugins/codeeditor/utils/editorutils.h @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// +// SPDX-License-Identifier: GPL-3.0-or-later + +#ifndef EDITORUTILS_H +#define EDITORUTILS_H + +#include + +class EditorUtils +{ +public: + static QsciLexer *defaultLexer(const QString &fileName); + static int nbDigitsFromNbLines(long nbLines); +}; + +#endif // EDITORUTILS_H From 7a01b4b052e85da7b5bf40d4a0dca55406e11aa2 Mon Sep 17 00:00:00 2001 From: liuzhangjian Date: Thu, 18 Jan 2024 16:01:47 +0800 Subject: [PATCH 003/300] refactor: Replace `Scintilla` with `QScintilla` 1.Remove the `Scintilla` source code 2.Add the `QScintilla` source code --- .reuse/dep5 | 12 +- 3rdparty/CMakeLists.txt | 2 +- 3rdparty/unioncode-lexilla514.cmake | 11 - 3rdparty/unioncode-qscintilla214.cmake | 7 + .../unioncode-qscintilla214/CMakeLists.txt | 48 + 3rdparty/unioncode-qscintilla214/LICENSE | 674 + .../scintilla/include/ILexer.h | 27 +- .../scintilla/include/ILoader.h | 4 - .../scintilla/include}/License.txt | 4 +- .../scintilla/include/Platform.h | 553 + .../scintilla}/include/SciLexer.h | 222 +- .../scintilla/include/Sci_Position.h | 0 .../scintilla/include/Scintilla.h | 197 +- .../scintilla/include/Scintilla.iface | 3157 ++- .../scintilla/include/ScintillaWidget.h | 0 .../scintilla/lexers/LexA68k.cpp} | 5 +- .../scintilla/lexers/LexAPDL.cpp} | 5 +- .../scintilla/lexers/LexASY.cpp} | 6 +- .../scintilla/lexers/LexAU3.cpp} | 7 +- .../scintilla/lexers/LexAVE.cpp} | 5 +- .../scintilla/lexers/LexAVS.cpp} | 5 +- .../scintilla/lexers/LexAbaqus.cpp} | 7 +- .../scintilla/lexers/LexAda.cpp} | 3 +- .../scintilla/lexers/LexAsm.cpp} | 28 +- .../scintilla/lexers/LexAsn1.cpp} | 5 +- .../scintilla/lexers/LexBaan.cpp} | 13 +- .../scintilla/lexers/LexBash.cpp} | 270 +- .../scintilla/lexers/LexBasic.cpp} | 24 +- .../scintilla/lexers/LexBatch.cpp | 498 + .../scintilla/lexers/LexBibTeX.cpp} | 3 +- .../scintilla/lexers/LexBullant.cpp} | 5 +- .../scintilla/lexers/LexCLW.cpp} | 7 +- .../scintilla/lexers/LexCOBOL.cpp} | 5 +- .../scintilla/lexers/LexCPP.cpp} | 374 +- .../scintilla/lexers/LexCSS.cpp} | 13 +- .../scintilla/lexers/LexCaml.cpp} | 139 +- .../scintilla/lexers/LexCmake.cpp} | 10 +- .../scintilla/lexers/LexCoffeeScript.cpp} | 5 +- .../scintilla/lexers/LexConf.cpp} | 5 +- .../scintilla/lexers/LexCrontab.cpp} | 5 +- .../scintilla/lexers/LexCsound.cpp} | 5 +- .../scintilla/lexers/LexD.cpp} | 13 +- .../scintilla/lexers/LexDMAP.cpp} | 5 +- .../scintilla/lexers/LexDMIS.cpp} | 23 +- .../scintilla/lexers/LexDiff.cpp} | 5 +- .../scintilla/lexers/LexECL.cpp} | 4 +- .../scintilla/lexers/LexEDIFACT.cpp} | 141 +- .../scintilla/lexers/LexEScript.cpp} | 7 +- .../scintilla/lexers/LexEiffel.cpp} | 5 +- .../scintilla/lexers/LexErlang.cpp} | 17 +- .../scintilla/lexers/LexErrorList.cpp} | 100 +- .../scintilla/lexers/LexFlagship.cpp} | 7 +- .../scintilla/lexers/LexForth.cpp} | 5 +- .../scintilla/lexers/LexFortran.cpp} | 5 +- .../scintilla/lexers/LexGAP.cpp} | 5 +- .../scintilla/lexers/LexGui4Cli.cpp} | 6 +- .../scintilla/lexers/LexHTML.cpp} | 265 +- .../scintilla/lexers/LexHaskell.cpp} | 17 +- .../scintilla/lexers/LexHex.cpp} | 5 +- .../scintilla/lexers/LexIndent.cpp} | 5 +- .../scintilla/lexers/LexInno.cpp} | 84 +- .../scintilla/lexers/LexJSON.cpp} | 12 +- .../scintilla/lexers/LexKVIrc.cpp} | 5 +- .../scintilla/lexers/LexKix.cpp} | 5 +- .../scintilla/lexers/LexLPeg.cpp | 799 + .../scintilla/lexers/LexLaTeX.cpp} | 27 +- .../scintilla/lexers/LexLisp.cpp} | 5 +- .../scintilla/lexers/LexLout.cpp} | 5 +- .../scintilla/lexers/LexLua.cpp} | 49 +- .../scintilla/lexers/LexMMIXAL.cpp} | 22 +- .../scintilla/lexers/LexMPT.cpp} | 3 +- .../scintilla/lexers/LexMSSQL.cpp} | 5 +- .../scintilla/lexers/LexMagik.cpp} | 9 +- .../scintilla/lexers/LexMake.cpp} | 5 +- .../scintilla/lexers/LexMarkdown.cpp} | 76 +- .../scintilla/lexers/LexMatlab.cpp} | 9 +- .../scintilla/lexers/LexMaxima.cpp} | 5 +- .../scintilla/lexers/LexMetapost.cpp} | 10 +- .../scintilla/lexers/LexModula.cpp} | 5 +- .../scintilla/lexers/LexMySQL.cpp} | 5 +- .../scintilla/lexers/LexNimrod.cpp} | 5 +- .../scintilla/lexers/LexNsis.cpp} | 5 +- .../scintilla/lexers/LexNull.cpp} | 5 +- .../scintilla/lexers/LexOScript.cpp} | 5 +- .../scintilla/lexers/LexOpal.cpp} | 5 +- .../scintilla/lexers/LexPB.cpp} | 5 +- .../scintilla/lexers/LexPLM.cpp} | 6 +- .../scintilla/lexers/LexPO.cpp} | 5 +- .../scintilla/lexers/LexPOV.cpp} | 5 +- .../scintilla/lexers/LexPS.cpp} | 5 +- .../scintilla/lexers/LexPascal.cpp} | 5 +- .../scintilla/lexers/LexPerl.cpp} | 46 +- .../scintilla/lexers/LexPowerPro.cpp} | 5 +- .../scintilla/lexers/LexPowerShell.cpp} | 5 +- .../scintilla/lexers/LexProgress.cpp} | 11 +- .../scintilla/lexers/LexProps.cpp} | 21 +- .../scintilla/lexers/LexPython.cpp} | 112 +- .../scintilla/lexers/LexR.cpp} | 7 +- .../scintilla/lexers/LexRebol.cpp} | 5 +- .../scintilla/lexers/LexRegistry.cpp} | 14 +- .../scintilla/lexers/LexRuby.cpp} | 61 +- .../scintilla/lexers/LexRust.cpp} | 24 +- .../scintilla/lexers/LexSAS.cpp} | 5 +- .../scintilla/lexers/LexSML.cpp} | 5 +- .../scintilla/lexers/LexSQL.cpp} | 22 +- .../scintilla/lexers/LexSTTXT.cpp} | 5 +- .../scintilla/lexers/LexScriptol.cpp} | 5 +- .../scintilla/lexers/LexSmalltalk.cpp} | 5 +- .../scintilla/lexers/LexSorcus.cpp} | 5 +- .../scintilla/lexers/LexSpecman.cpp} | 5 +- .../scintilla/lexers/LexSpice.cpp} | 3 +- .../scintilla/lexers/LexStata.cpp} | 5 +- .../scintilla/lexers/LexTACL.cpp} | 9 +- .../scintilla/lexers/LexTADS3.cpp} | 5 +- .../scintilla/lexers/LexTAL.cpp} | 5 +- .../scintilla/lexers/LexTCL.cpp} | 21 +- .../scintilla/lexers/LexTCMD.cpp} | 5 +- .../scintilla/lexers/LexTeX.cpp} | 7 +- .../scintilla/lexers/LexTxt2tags.cpp} | 5 +- .../scintilla/lexers/LexVB.cpp} | 11 +- .../scintilla/lexers/LexVHDL.cpp} | 9 +- .../scintilla/lexers/LexVerilog.cpp} | 11 +- .../scintilla/lexers/LexVisualProlog.cpp} | 12 +- .../scintilla/lexers/LexYAML.cpp} | 15 +- .../scintilla/lexers}/License.txt | 4 +- .../scintilla/lexlib/Accessor.cpp} | 9 +- .../scintilla}/lexlib/Accessor.h | 8 +- .../scintilla/lexlib/CharacterCategory.cpp} | 309 +- .../scintilla}/lexlib/CharacterCategory.h | 19 +- .../scintilla/lexlib/CharacterSet.cpp} | 8 +- .../scintilla}/lexlib/CharacterSet.h | 137 +- .../scintilla/lexlib/DefaultLexer.cpp} | 27 +- .../scintilla}/lexlib/DefaultLexer.h | 16 +- .../scintilla}/lexlib/LexAccessor.h | 55 +- .../scintilla/lexlib/LexerBase.cpp} | 36 +- .../scintilla}/lexlib/LexerBase.h | 12 +- .../scintilla/lexlib/LexerModule.cpp} | 22 +- .../scintilla}/lexlib/LexerModule.h | 35 +- .../scintilla/lexlib/LexerNoExceptions.cpp} | 9 +- .../scintilla}/lexlib/LexerNoExceptions.h | 10 +- .../scintilla/lexlib/LexerSimple.cpp} | 15 +- .../scintilla}/lexlib/LexerSimple.h | 9 +- .../scintilla/lexlib/License.txt | 20 + .../scintilla}/lexlib/OptionSet.h | 25 +- .../scintilla/lexlib/PropSetSimple.cpp | 157 + .../scintilla/lexlib/PropSetSimple.h | 28 + .../scintilla}/lexlib/SparseState.h | 10 +- .../scintilla}/lexlib/StringCopy.h | 2 +- .../scintilla/lexlib/StyleContext.cpp} | 36 +- .../scintilla}/lexlib/StyleContext.h | 21 +- .../scintilla}/lexlib/SubStyles.h | 76 +- .../scintilla/lexlib/WordList.cpp} | 123 +- .../scintilla/lexlib/WordList.h | 38 + .../scintilla/src/AutoComplete.cpp} | 70 +- .../scintilla/src/AutoComplete.h | 27 +- .../scintilla/src/CallTip.cpp | 332 + .../scintilla/src/CallTip.h | 56 +- .../scintilla/src/CaseConvert.cpp} | 92 +- .../scintilla/src/CaseConvert.h | 20 +- .../scintilla/src/CaseFolder.cpp} | 13 +- .../scintilla/src/CaseFolder.h | 9 +- .../scintilla/src/Catalogue.cpp | 204 + .../scintilla/src/Catalogue.h | 24 + .../scintilla/src/CellBuffer.cpp} | 514 +- .../scintilla/src/CellBuffer.h | 107 +- .../scintilla/src/CharClassify.cpp} | 27 +- .../scintilla/src/CharClassify.h | 31 + .../scintilla/src/ContractionState.cpp} | 104 +- .../scintilla/src/ContractionState.h | 27 +- .../scintilla/src/DBCS.cpp} | 16 +- .../scintilla/src/DBCS.h | 11 +- .../scintilla/src/Decoration.cpp} | 91 +- .../scintilla/src/Decoration.h | 40 +- .../scintilla/src/Document.cpp} | 1396 +- .../scintilla/src/Document.h | 256 +- .../scintilla/src/EditModel.cpp | 77 + .../scintilla/src/EditModel.h | 21 +- .../scintilla/src/EditView.cpp} | 1749 +- .../scintilla/src/EditView.h | 111 +- .../scintilla/src/Editor.cpp} | 4685 ++-- .../scintilla/src/Editor.h | 374 +- .../scintilla/src/ElapsedPeriod.h | 16 +- .../scintilla/src/ExternalLexer.cpp | 135 + .../scintilla/src/ExternalLexer.h | 80 + .../scintilla/src/FontQuality.h | 27 + .../scintilla/src/Indicator.cpp | 223 + .../scintilla/src/Indicator.h | 56 + .../scintilla/src/IntegerRectangle.h | 29 + .../scintilla/src/KeyMap.cpp | 164 + .../scintilla/src/KeyMap.h | 64 + .../scintilla/src/License.txt | 20 + .../scintilla/src/LineMarker.cpp | 436 + .../scintilla/src/LineMarker.h | 48 + .../scintilla/src/MarginView.cpp | 470 + .../scintilla/src/MarginView.h | 15 +- .../scintilla/src/Partitioning.h | 63 +- .../scintilla/src/PerLine.cpp} | 191 +- .../scintilla/src/PerLine.h | 46 +- .../scintilla/src/Position.h | 9 +- .../scintilla/src/PositionCache.cpp | 719 + .../scintilla/src/PositionCache.h | 194 +- .../scintilla/src/RESearch.cpp} | 51 +- .../scintilla/src/RESearch.h | 36 +- .../scintilla/src/RunStyles.cpp} | 27 +- .../scintilla/src/RunStyles.h | 7 +- .../scintilla/src/SciTE.properties | 0 .../scintilla/src/ScintillaBase.cpp} | 614 +- .../scintilla/src/ScintillaBase.h | 33 +- .../scintilla/src/Selection.cpp} | 129 +- .../scintilla/src/Selection.h | 192 + .../scintilla/src/SparseVector.h | 105 +- .../scintilla/src/SplitVector.h | 63 +- .../scintilla/src/Style.cpp | 168 + .../scintilla/src/Style.h | 92 + .../scintilla/src/UniConversion.cpp} | 116 +- .../scintilla/src/UniConversion.h | 52 +- .../scintilla/src/UniqueString.h | 30 + .../scintilla/src/ViewStyle.cpp | 613 + .../scintilla/src/ViewStyle.h | 224 + .../scintilla/src/XPM.cpp} | 230 +- .../scintilla/src/XPM.h | 130 + .../src/InputMethod.cpp | 281 + .../unioncode-qscintilla214/src/ListBoxQt.cpp | 367 + .../unioncode-qscintilla214/src/ListBoxQt.h | 76 + .../src/MacPasteboardMime.cpp | 111 + .../unioncode-qscintilla214/src/PlatQt.cpp | 990 + .../src/Qsci/qsciabstractapis.h | 90 + .../src/Qsci/qsciapis.h | 213 + .../src/Qsci/qscicommand.h | 408 + .../src/Qsci/qscicommandset.h | 89 + .../src/Qsci/qscidocument.h | 61 + .../src/Qsci/qsciglobal.h | 54 + .../src/Qsci/qscilexer.h | 356 + .../src/Qsci/qscilexerasm.h | 201 + .../src/Qsci/qscilexeravs.h | 174 + .../src/Qsci/qscilexerbash.h | 178 + .../src/Qsci/qscilexerbatch.h | 115 + .../src/Qsci/qscilexercmake.h | 160 + .../src/Qsci/qscilexercoffeescript.h | 264 + .../src/Qsci/qscilexercpp.h | 398 + .../src/Qsci/qscilexercsharp.h | 77 + .../src/Qsci/qscilexercss.h | 252 + .../src/Qsci/qscilexercustom.h | 100 + .../src/Qsci/qscilexerd.h | 242 + .../src/Qsci/qscilexerdiff.h | 107 + .../src/Qsci/qscilexeredifact.h | 96 + .../src/Qsci/qscilexerfortran.h | 59 + .../src/Qsci/qscilexerfortran77.h | 168 + .../src/Qsci/qscilexerhex.h | 120 + .../src/Qsci/qscilexerhtml.h | 532 + .../src/Qsci/qscilexeridl.h | 64 + .../src/Qsci/qscilexerintelhex.h | 60 + .../src/Qsci/qscilexerjava.h | 55 + .../src/Qsci/qscilexerjavascript.h | 81 + .../src/Qsci/qscilexerjson.h | 184 + .../src/Qsci/qscilexerlua.h | 194 + .../src/Qsci/qscilexermakefile.h | 105 + .../src/Qsci/qscilexermarkdown.h | 148 + .../src/Qsci/qscilexermasm.h | 54 + .../src/Qsci/qscilexermatlab.h | 104 + .../src/Qsci/qscilexernasm.h | 54 + .../src/Qsci/qscilexeroctave.h | 60 + .../src/Qsci/qscilexerpascal.h | 227 + .../src/Qsci/qscilexerperl.h | 312 + .../src/Qsci/qscilexerpo.h | 163 + .../src/Qsci/qscilexerpostscript.h | 204 + .../src/Qsci/qscilexerpov.h | 203 + .../src/Qsci/qscilexerproperties.h | 150 + .../src/Qsci/qscilexerpython.h | 333 + .../src/Qsci/qscilexerruby.h | 240 + .../src/Qsci/qscilexerspice.h | 106 + .../src/Qsci/qscilexersql.h | 286 + .../src/Qsci/qscilexersrec.h | 59 + .../src/Qsci/qscilexertcl.h | 189 + .../src/Qsci/qscilexertekhex.h | 60 + .../src/Qsci/qscilexertex.h | 163 + .../src/Qsci/qscilexerverilog.h | 257 + .../src/Qsci/qscilexervhdl.h | 221 + .../src/Qsci/qscilexerxml.h | 106 + .../src/Qsci/qscilexeryaml.h | 147 + .../src/Qsci/qscimacro.h | 98 + .../src/Qsci/qsciprinter.h | 120 + .../src/Qsci/qsciscintilla.h | 2313 ++ .../src/Qsci/qsciscintillabase.h | 3888 ++++ .../src/Qsci/qscistyle.h | 204 + .../src/Qsci/qscistyledtext.h | 61 + .../src/SciAccessibility.cpp | 739 + .../src/SciAccessibility.h | 119 + .../src/SciClasses.cpp | 189 + .../unioncode-qscintilla214/src/SciClasses.h | 103 + .../src/ScintillaQt.cpp | 768 + .../unioncode-qscintilla214/src/ScintillaQt.h | 151 + .../src/features/qscintilla2.prf | 25 + .../src/features_staticlib/qscintilla2.prf | 23 + .../src/qsciabstractapis.cpp | 51 + .../unioncode-qscintilla214/src/qsciapis.cpp | 995 + .../src/qscicommand.cpp | 143 + .../src/qscicommandset.cpp | 987 + .../src/qscidocument.cpp | 151 + .../unioncode-qscintilla214/src/qscilexer.cpp | 749 + .../src/qscilexerasm.cpp | 575 + .../src/qscilexeravs.cpp | 414 + .../src/qscilexerbash.cpp | 350 + .../src/qscilexerbatch.cpp | 212 + .../src/qscilexercmake.cpp | 304 + .../src/qscilexercoffeescript.cpp | 454 + .../src/qscilexercpp.cpp | 801 + .../src/qscilexercsharp.cpp | 118 + .../src/qscilexercss.cpp | 440 + .../src/qscilexercustom.cpp | 101 + .../src/qscilexerd.cpp | 450 + .../src/qscilexerdiff.cpp | 143 + .../src/qscilexeredifact.cpp | 122 + .../src/qscilexerfortran.cpp | 109 + .../src/qscilexerfortran77.cpp | 296 + .../src/qscilexerhex.cpp | 156 + .../src/qscilexerhtml.cpp | 1181 + .../src/qscilexeridl.cpp | 100 + .../src/qscilexerintelhex.cpp | 59 + .../src/qscilexerjava.cpp | 57 + .../src/qscilexerjavascript.cpp | 120 + .../src/qscilexerjson.cpp | 298 + .../src/qscilexerlua.cpp | 368 + .../src/qscilexermakefile.cpp | 158 + .../src/qscilexermarkdown.cpp | 289 + .../src/qscilexermasm.cpp | 48 + .../src/qscilexermatlab.cpp | 161 + .../src/qscilexernasm.cpp | 48 + .../src/qscilexeroctave.cpp | 68 + .../src/qscilexerpascal.cpp | 432 + .../src/qscilexerperl.cpp | 658 + .../src/qscilexerpo.cpp | 223 + .../src/qscilexerpostscript.cpp | 448 + .../src/qscilexerpov.cpp | 464 + .../src/qscilexerproperties.cpp | 213 + .../src/qscilexerpython.cpp | 507 + .../src/qscilexerruby.cpp | 445 + .../src/qscilexerspice.cpp | 194 + .../src/qscilexersql.cpp | 521 + .../src/qscilexersrec.cpp | 62 + .../src/qscilexertcl.cpp | 438 + .../src/qscilexertekhex.cpp | 59 + .../src/qscilexertex.cpp | 308 + .../src/qscilexerverilog.cpp | 572 + .../src/qscilexervhdl.cpp | 418 + .../src/qscilexerxml.cpp | 252 + .../src/qscilexeryaml.cpp | 269 + .../unioncode-qscintilla214/src/qscimacro.cpp | 313 + .../src/qscintilla.pro | 445 + .../src/qscintilla_cs.ts | 4227 ++++ .../src/qscintilla_de.ts | 4227 ++++ .../src/qscintilla_es.ts | 4227 ++++ .../src/qscintilla_fr.ts | 4227 ++++ .../src/qscintilla_pt_br.ts | 4227 ++++ .../src/qsciprinter.cpp | 196 + .../src/qsciscintilla.cpp | 4569 ++++ .../src/qsciscintillabase.cpp | 867 + .../unioncode-qscintilla214/src/qscistyle.cpp | 184 + .../src/qscistyledtext.cpp | 54 + 3rdparty/unioncode-scintilla515.cmake | 12 - .../unioncode-scintilla515/CMakeLists.txt | 2 - .../lexilla/CONTRIBUTING | 42 - .../unioncode-scintilla515/lexilla/README | 49 - .../lexilla/access/LexillaAccess.cxx | 285 - .../lexilla/access/LexillaAccess.h | 35 - .../lexilla/access/README | 9 - .../lexilla/bin/empty.txt | 1 - .../lexilla/cppcheck.suppress | 153 - .../unioncode-scintilla515/lexilla/delbin.bat | 1 - .../lexilla/doc/Lexilla.html | 163 - .../lexilla/doc/LexillaDoc.html | 254 - .../lexilla/doc/LexillaDownload.html | 71 - .../lexilla/doc/LexillaHistory.html | 13369 ------------ .../lexilla/doc/LexillaLogo.png | Bin 34509 -> 0 bytes .../lexilla/doc/LexillaLogo2x.png | Bin 45190 -> 0 bytes .../examples/CheckLexilla/CheckLexilla.c | 144 - .../lexilla/examples/CheckLexilla/makefile | 22 - .../examples/SimpleLexer/SimpleLexer.cxx | 123 - .../lexilla/examples/SimpleLexer/makefile | 38 - .../lexilla/include/LexicalStyles.iface | 2330 -- .../lexilla/include/Lexilla.h | 108 - .../lexilla/lexers/LexAsciidoc.cxx | 393 - .../lexilla/lexers/LexBatch.cxx | 627 - .../lexilla/lexers/LexCIL.cxx | 410 - .../lexilla/lexers/LexDataflex.cxx | 611 - .../lexilla/lexers/LexFSharp.cxx | 729 - .../lexilla/lexers/LexGDScript.cxx | 733 - .../lexilla/lexers/LexHollywood.cxx | 519 - .../lexilla/lexers/LexJAVA.cxx | 1825 -- .../lexilla/lexers/LexJS.cxx | 2613 --- .../lexilla/lexers/LexJulia.cxx | 1263 -- .../lexilla/lexers/LexNim.cxx | 814 - .../lexilla/lexers/LexRaku.cxx | 1632 -- .../lexilla/lexers/LexX12.cxx | 400 - .../lexilla/lexlib/CatalogueModules.h | 74 - .../lexilla/lexlib/LexAccessor.cxx | 70 - .../lexilla/lexlib/PropSetSimple.cxx | 75 - .../lexilla/lexlib/PropSetSimple.h | 31 - .../lexilla/lexlib/WordList.h | 43 - .../lexilla/scripts/HeaderOrder.txt | 103 - .../lexilla/scripts/LexFacer.py | 29 - .../lexilla/scripts/LexillaData.py | 282 - .../lexilla/scripts/LexillaGen.py | 158 - .../lexilla/scripts/LexillaLogo.py | 75 - .../lexilla/scripts/RunTest.bat | 7 - .../lexilla/scripts/RunTest.sh | 7 - .../lexilla/src/CMakeLists.txt | 28 - .../lexilla/src/DepGen.py | 40 - .../lexilla/src/Lexilla.cxx | 385 - .../lexilla/src/Lexilla.def | 9 - .../lexilla/src/Lexilla.pro | 33 - .../lexilla/src/Lexilla.vcxproj | 170 - .../lexilla/src/Lexilla/Info.plist | 24 - .../Lexilla/Lexilla.xcodeproj/project.pbxproj | 925 - .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../lexilla/src/LexillaVersion.rc | 37 - .../lexilla/src/deps.mak | 1582 -- .../lexilla/src/lexilla.mak | 249 - .../lexilla/src/makefile | 140 - .../lexilla/src/nmdeps.mak | 1582 -- .../lexilla/test/README | 109 - .../lexilla/test/TestDocument.cxx | 262 - .../lexilla/test/TestDocument.h | 54 - .../lexilla/test/TestLexers.cxx | 534 - .../lexilla/test/TestLexers.vcxproj | 177 - .../test/examples/asciidoc/AllStyles.adoc | 54 - .../examples/asciidoc/AllStyles.adoc.folded | 55 - .../examples/asciidoc/AllStyles.adoc.styled | 54 - .../test/examples/asciidoc/SciTE.properties | 3 - .../test/examples/batch/SciTE.properties | 3 - .../lexilla/test/examples/batch/x.bat | 57 - .../lexilla/test/examples/batch/x.bat.folded | 58 - .../lexilla/test/examples/batch/x.bat.styled | 57 - .../lexilla/test/examples/caml/AllStyles.ml | 49 - .../test/examples/caml/AllStyles.ml.folded | 50 - .../test/examples/caml/AllStyles.ml.styled | 49 - .../test/examples/caml/SciTE.properties | 4 - .../lexilla/test/examples/cpp/Bug2245.cxx | 13 - .../test/examples/cpp/Bug2245.cxx.folded | 14 - .../test/examples/cpp/Bug2245.cxx.styled | 13 - .../test/examples/cpp/SciTE.properties | 10 - .../lexilla/test/examples/cpp/x.cxx | 39 - .../lexilla/test/examples/cpp/x.cxx.folded | 40 - .../lexilla/test/examples/cpp/x.cxx.styled | 39 - .../lexilla/test/examples/css/AllStyles.css | 89 - .../test/examples/css/AllStyles.css.folded | 90 - .../test/examples/css/AllStyles.css.styled | 89 - .../test/examples/css/SciTE.properties | 28 - .../lexilla/test/examples/d/SciTE.properties | 10 - .../lexilla/test/examples/d/x.d | 47 - .../lexilla/test/examples/d/x.d.folded | 48 - .../lexilla/test/examples/d/x.d.styled | 47 - .../test/examples/erlang/AllStyles.erl | 78 - .../test/examples/erlang/AllStyles.erl.folded | 79 - .../test/examples/erlang/AllStyles.erl.styled | 78 - .../test/examples/erlang/SciTE.properties | 7 - .../test/examples/errorlist/AllStyles.err | 111 - .../examples/errorlist/AllStyles.err.folded | 112 - .../examples/errorlist/AllStyles.err.styled | 111 - .../test/examples/errorlist/SciTE.properties | 5 - .../lexilla/test/examples/fsharp/FmtSpecs.fs | 26 - .../test/examples/fsharp/FmtSpecs.fs.folded | 27 - .../test/examples/fsharp/FmtSpecs.fs.styled | 26 - .../test/examples/fsharp/SciTE.properties | 42 - .../lexilla/test/examples/fsharp/x.fs | 53 - .../lexilla/test/examples/fsharp/x.fs.folded | 54 - .../lexilla/test/examples/fsharp/x.fs.styled | 53 - .../test/examples/gdscript/AllStyles.gd | 51 - .../examples/gdscript/AllStyles.gd.folded | 52 - .../examples/gdscript/AllStyles.gd.styled | 51 - .../test/examples/gdscript/SciTE.properties | 5 - .../test/examples/hypertext/Bug2207.html | 7 - .../examples/hypertext/Bug2207.html.folded | 8 - .../examples/hypertext/Bug2207.html.styled | 7 - .../test/examples/hypertext/Issue19.php | 30 - .../examples/hypertext/Issue19.php.folded | 31 - .../examples/hypertext/Issue19.php.styled | 30 - .../examples/hypertext/Issue20Numbers.php | 30 - .../hypertext/Issue20Numbers.php.folded | 31 - .../hypertext/Issue20Numbers.php.styled | 30 - .../test/examples/hypertext/SciTE.properties | 10 - .../test/examples/hypertext/apostophe.php | 11 - .../examples/hypertext/apostophe.php.folded | 12 - .../examples/hypertext/apostophe.php.styled | 11 - .../lexilla/test/examples/hypertext/x.asp | 12 - .../test/examples/hypertext/x.asp.folded | 13 - .../test/examples/hypertext/x.asp.styled | 12 - .../lexilla/test/examples/hypertext/x.html | 12 - .../test/examples/hypertext/x.html.folded | 13 - .../test/examples/hypertext/x.html.styled | 12 - .../lexilla/test/examples/hypertext/x.php | 17 - .../test/examples/hypertext/x.php.folded | 18 - .../test/examples/hypertext/x.php.styled | 17 - .../test/examples/inno/SciTE.properties | 11 - .../lexilla/test/examples/inno/x.iss | 42 - .../lexilla/test/examples/inno/x.iss.folded | 43 - .../lexilla/test/examples/inno/x.iss.styled | 42 - .../test/examples/julia/SciTE.properties | 4 - .../lexilla/test/examples/julia/x.jl | 19 - .../lexilla/test/examples/julia/x.jl.folded | 20 - .../lexilla/test/examples/julia/x.jl.styled | 19 - .../lexilla/test/examples/latex/AllStyles.tex | 47 - .../test/examples/latex/AllStyles.tex.folded | 48 - .../test/examples/latex/AllStyles.tex.styled | 47 - .../test/examples/latex/Feature1358.tex | 10 - .../examples/latex/Feature1358.tex.folded | 11 - .../examples/latex/Feature1358.tex.styled | 10 - .../test/examples/latex/SciTE.properties | 1 - .../lexilla/test/examples/lua/Bug2205.lua | 5 - .../test/examples/lua/Bug2205.lua.folded | 6 - .../test/examples/lua/Bug2205.lua.styled | 5 - .../test/examples/lua/SciTE.properties | 4 - .../lexilla/test/examples/lua/x.lua | 7 - .../lexilla/test/examples/lua/x.lua.folded | 8 - .../lexilla/test/examples/lua/x.lua.styled | 7 - .../test/examples/makefile/SciTE.properties | 1 - .../lexilla/test/examples/makefile/x.mak | 16 - .../test/examples/makefile/x.mak.folded | 17 - .../test/examples/makefile/x.mak.styled | 16 - .../test/examples/markdown/AllStyles.md | 30 - .../examples/markdown/AllStyles.md.folded | 30 - .../examples/markdown/AllStyles.md.styled | 30 - .../lexilla/test/examples/markdown/Bug1216.md | 27 - .../test/examples/markdown/Bug1216.md.folded | 28 - .../test/examples/markdown/Bug1216.md.styled | 27 - .../lexilla/test/examples/markdown/Bug2235.md | 15 - .../test/examples/markdown/Bug2235.md.folded | 16 - .../test/examples/markdown/Bug2235.md.styled | 15 - .../lexilla/test/examples/markdown/Bug2247.md | 30 - .../test/examples/markdown/Bug2247.md.folded | 31 - .../test/examples/markdown/Bug2247.md.styled | 30 - .../test/examples/markdown/SciTE.properties | 3 - .../test/examples/matlab/AllStyles.m.matlab | 44 - .../examples/matlab/AllStyles.m.matlab.folded | 45 - .../examples/matlab/AllStyles.m.matlab.styled | 44 - .../test/examples/matlab/AllStyles.m.octave | 44 - .../examples/matlab/AllStyles.m.octave.folded | 45 - .../examples/matlab/AllStyles.m.octave.styled | 44 - .../matlab/Issue18_EscapeSequence.m.matlab | 16 - .../Issue18_EscapeSequence.m.matlab.folded | 17 - .../Issue18_EscapeSequence.m.matlab.styled | 16 - .../matlab/Issue18_EscapeSequence.m.octave | 4 - .../Issue18_EscapeSequence.m.octave.folded | 5 - .../Issue18_EscapeSequence.m.octave.styled | 4 - .../test/examples/matlab/SciTE.properties | 8 - .../test/examples/mmixal/AllStyles.mms | 74 - .../test/examples/mmixal/AllStyles.mms.folded | 75 - .../test/examples/mmixal/AllStyles.mms.styled | 74 - .../test/examples/mmixal/SciTE.properties | 4 - .../test/examples/mmixal/references.mms | 16 - .../examples/mmixal/references.mms.folded | 17 - .../examples/mmixal/references.mms.styled | 16 - .../lexilla/test/examples/mmixal/x.mms | 12 - .../lexilla/test/examples/mmixal/x.mms.folded | 13 - .../lexilla/test/examples/mmixal/x.mms.styled | 12 - .../test/examples/nim/SciTE.properties | 2 - .../lexilla/test/examples/nim/x.nim | 28 - .../lexilla/test/examples/nim/x.nim.folded | 29 - .../lexilla/test/examples/nim/x.nim.styled | 28 - .../test/examples/perl/SciTE.properties | 33 - .../test/examples/perl/perl-test-5220delta.pl | 178 - .../perl/perl-test-5220delta.pl.folded | 179 - .../perl/perl-test-5220delta.pl.styled | 178 - .../examples/perl/perl-test-sub-prototypes.pl | 239 - .../perl/perl-test-sub-prototypes.pl.folded | 240 - .../perl/perl-test-sub-prototypes.pl.styled | 239 - .../lexilla/test/examples/perl/x.pl | 5 - .../lexilla/test/examples/perl/x.pl.folded | 5 - .../lexilla/test/examples/perl/x.pl.styled | 5 - .../lexilla/test/examples/python/AllStyles.py | 63 - .../test/examples/python/AllStyles.py.folded | 64 - .../test/examples/python/AllStyles.py.styled | 63 - .../test/examples/python/SciTE.properties | 5 - .../lexilla/test/examples/python/x.py | 19 - .../lexilla/test/examples/python/x.py.folded | 20 - .../lexilla/test/examples/python/x.py.styled | 19 - .../test/examples/raku/SciTE.properties | 114 - .../lexilla/test/examples/raku/x.p6 | 54 - .../lexilla/test/examples/raku/x.p6.folded | 55 - .../lexilla/test/examples/raku/x.p6.styled | 54 - .../test/examples/ruby/SciTE.properties | 3 - .../lexilla/test/examples/ruby/x.rb | 6 - .../lexilla/test/examples/ruby/x.rb.folded | 6 - .../lexilla/test/examples/ruby/x.rb.styled | 6 - .../lexilla/test/examples/rust/Issue33.rs | 5 - .../test/examples/rust/Issue33.rs.folded | 6 - .../test/examples/rust/Issue33.rs.styled | 5 - .../lexilla/test/examples/rust/Issue34.rs | 11 - .../test/examples/rust/Issue34.rs.folded | 12 - .../test/examples/rust/Issue34.rs.styled | 11 - .../lexilla/test/examples/rust/Issue35.rs | 3 - .../test/examples/rust/Issue35.rs.folded | 3 - .../test/examples/rust/Issue35.rs.styled | 3 - .../test/examples/rust/SciTE.properties | 12 - .../test/examples/tcl/SciTE.properties | 4 - .../lexilla/test/examples/tcl/x.tcl | 13 - .../lexilla/test/examples/tcl/x.tcl.folded | 14 - .../lexilla/test/examples/tcl/x.tcl.styled | 13 - .../lexilla/test/examples/vb/SciTE.properties | 2 - .../lexilla/test/examples/vb/x.vb | 13 - .../lexilla/test/examples/vb/x.vb.folded | 14 - .../lexilla/test/examples/vb/x.vb.styled | 13 - .../test/examples/x12/SciTE.properties | 3 - .../lexilla/test/examples/x12/x.x12 | 33 - .../lexilla/test/examples/x12/x.x12.folded | 34 - .../lexilla/test/examples/x12/x.x12.styled | 33 - .../test/examples/yaml/SciTE.properties | 3 - .../lexilla/test/examples/yaml/x.yaml | 12 - .../lexilla/test/examples/yaml/x.yaml.folded | 13 - .../lexilla/test/examples/yaml/x.yaml.styled | 12 - .../lexilla/test/makefile | 69 - .../lexilla/test/testlexers.mak | 44 - .../lexilla/test/unit/LICENSE_1_0.txt | 23 - .../lexilla/test/unit/README | 15 - .../lexilla/test/unit/Sci.natvis | 33 - .../lexilla/test/unit/SciTE.properties | 5 - .../lexilla/test/unit/UnitTester.cxx | 24 - .../lexilla/test/unit/UnitTester.vcxproj | 169 - .../lexilla/test/unit/catch.hpp | 17959 ---------------- .../lexilla/test/unit/makefile | 71 - .../lexilla/test/unit/test.mak | 34 - .../lexilla/test/unit/testCharacterSet.cxx | 141 - .../lexilla/test/unit/testLexerSimple.cxx | 63 - .../lexilla/test/unit/testPropSetSimple.cxx | 48 - .../lexilla/test/unit/testSparseState.cxx | 234 - .../lexilla/test/unit/testWordList.cxx | 89 - .../lexilla/test/unit/unitTest.cxx | 29 - .../unioncode-scintilla515/lexilla/tgzsrc | 4 - .../lexilla/version.txt | 1 - .../unioncode-scintilla515/lexilla/zipsrc.bat | 18 - .../scintilla/CONTRIBUTING | 20 - .../unioncode-scintilla515/scintilla/README | 92 - .../scintilla/bin/empty.txt | 1 - .../scintilla/call/ScintillaCall.cxx | 3345 --- .../scintilla/cocoa/InfoBar.h | 53 - .../scintilla/cocoa/InfoBar.mm | 409 - .../scintilla/cocoa/InfoBarCommunicator.h | 35 - .../scintilla/cocoa/PlatCocoa.h | 147 - .../scintilla/cocoa/PlatCocoa.mm | 2393 -- .../scintilla/cocoa/QuartzTextLayout.h | 109 - .../scintilla/cocoa/QuartzTextStyle.h | 95 - .../cocoa/QuartzTextStyleAttribute.h | 72 - .../scintilla/cocoa/Scintilla/Info.plist | 24 - .../Scintilla.xcodeproj/project.pbxproj | 744 - .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../cocoa/Scintilla/module.modulemap | 10 - .../scintilla/cocoa/ScintillaCocoa.h | 265 - .../scintilla/cocoa/ScintillaCocoa.mm | 2715 --- .../cocoa/ScintillaTest/AppController.h | 31 - .../cocoa/ScintillaTest/AppController.mm | 316 - .../scintilla/cocoa/ScintillaTest/Info.plist | 28 - .../cocoa/ScintillaTest/Scintilla-Info.plist | 20 - .../ScintillaTest.xcodeproj/project.pbxproj | 459 - .../contents.xcworkspacedata | 7 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../ScintillaTest/ScintillaTest_Prefix.pch | 7 - .../cocoa/ScintillaTest/TestData.sql | 215 - .../ScintillaTest/en.lproj/InfoPlist.strings | Bin 92 -> 0 bytes .../cocoa/ScintillaTest/en.lproj/MainMenu.xib | 609 - .../scintilla/cocoa/ScintillaTest/main.m | 15 - .../scintilla/cocoa/ScintillaView.h | 168 - .../scintilla/cocoa/ScintillaView.mm | 2229 -- .../scintilla/cocoa/checkbuildosx.sh | 66 - .../scintilla/cocoa/res/info_bar_bg.png | Bin 1221 -> 0 bytes .../scintilla/cocoa/res/info_bar_bg@2x.png | Bin 1284 -> 0 bytes .../scintilla/cocoa/res/mac_cursor_busy.png | Bin 5292 -> 0 bytes .../cocoa/res/mac_cursor_busy@2x.png | Bin 8950 -> 0 bytes .../cocoa/res/mac_cursor_flipped.png | Bin 4506 -> 0 bytes .../cocoa/res/mac_cursor_flipped@2x.png | Bin 5779 -> 0 bytes .../scintilla/cppcheck.suppress | 45 - .../scintilla/delbin.bat | 1 - .../scintilla/doc/AddSource.txt | 30 - .../scintilla/doc/Design.html | 246 - .../scintilla/doc/Icons.html | 57 - .../scintilla/doc/Indicators.png | Bin 13819 -> 0 bytes .../scintilla/doc/Lexer.txt | 226 - .../scintilla/doc/Markers.png | Bin 22999 -> 0 bytes .../scintilla/doc/Privacy.html | 70 - .../scintilla/doc/SciBreak.jpg | Bin 33592 -> 0 bytes .../scintilla/doc/SciCoding.html | 296 - .../scintilla/doc/SciRest.jpg | Bin 16680 -> 0 bytes .../scintilla/doc/SciTEIco.png | Bin 9709 -> 0 bytes .../scintilla/doc/SciWord.jpg | Bin 6164 -> 0 bytes .../scintilla/doc/Scintilla5Migration.html | 225 - .../scintilla/doc/ScintillaDoc.html | 9685 --------- .../scintilla/doc/ScintillaDownload.html | 71 - .../scintilla/doc/ScintillaHistory.html | 13473 ------------ .../scintilla/doc/ScintillaRelated.html | 557 - .../scintilla/doc/ScintillaToDo.html | 140 - .../scintilla/doc/ScintillaUsage.html | 376 - .../scintilla/doc/StadiumVariants.png | Bin 23919 -> 0 bytes .../scintilla/doc/Steps.html | 142 - .../scintilla/doc/StyleMetadata.html | 204 - .../scintilla/doc/annotations.png | Bin 25243 -> 0 bytes .../scintilla/doc/eolannotation.png | Bin 21161 -> 0 bytes .../scintilla/doc/index.html | 196 - .../scintilla/doc/styledmargin.png | Bin 14033 -> 0 bytes .../scintilla/gtk/Converter.h | 75 - .../scintilla/gtk/DepGen.py | 23 - .../scintilla/gtk/PlatGTK.cxx | 2190 -- .../scintilla/gtk/ScintillaGTK.cxx | 3331 --- .../scintilla/gtk/ScintillaGTK.h | 327 - .../scintilla/gtk/ScintillaGTKAccessible.cxx | 1263 -- .../scintilla/gtk/ScintillaGTKAccessible.h | 194 - .../scintilla/gtk/deps.mak | 486 - .../scintilla/gtk/makefile | 171 - .../scintilla/gtk/scintilla-marshal.c | 122 - .../scintilla/gtk/scintilla-marshal.h | 30 - .../scintilla/gtk/scintilla-marshal.list | 2 - .../scintilla/include/ScintillaCall.h | 885 - .../scintilla/include/ScintillaMessages.h | 792 - .../scintilla/include/ScintillaStructures.h | 103 - .../scintilla/include/ScintillaTypes.h | 806 - .../scintilla/qt/README | 32 - .../scintilla/qt/ScintillaDocument.h | 91 - .../scintilla/qt/ScintillaEdit.h | 835 - .../scintilla/qt/ScintillaEdit/CMakeLists.txt | 71 - .../qt/ScintillaEdit/ScintillaDocument.cpp | 282 - .../qt/ScintillaEdit/ScintillaDocument.h | 91 - .../qt/ScintillaEdit/ScintillaEdit.cpp | 3134 --- .../ScintillaEdit/ScintillaEdit.cpp.template | 86 - .../qt/ScintillaEdit/ScintillaEdit.h | 835 - .../qt/ScintillaEdit/ScintillaEdit.h.template | 73 - .../qt/ScintillaEdit/ScintillaEdit.pro | 75 - .../scintilla/qt/ScintillaEdit/WidgetGen.py | 269 - .../scintilla/qt/ScintillaEdit/WidgetGen.pyc | Bin 8434 -> 0 bytes .../scintilla/qt/ScintillaEditBase/Notes.txt | 18 - .../scintilla/qt/ScintillaEditBase/PlatQt.cpp | 1346 -- .../scintilla/qt/ScintillaEditBase/PlatQt.h | 162 - .../ScintillaEditBase/ScintillaEditBase.cpp | 839 - .../qt/ScintillaEditBase/ScintillaEditBase.h | 167 - .../ScintillaEditBase/ScintillaEditBase.pro | 102 - .../qt/ScintillaEditBase/ScintillaQt.cpp | 864 - .../qt/ScintillaEditBase/ScintillaQt.h | 185 - .../qt/ScintillaEditPy/ScintillaConstants.py | 752 - .../scintilla/scripts/CheckMentioned.py | 217 - .../scintilla/scripts/Dependencies.py | 152 - .../scintilla/scripts/Face.py | 147 - .../scintilla/scripts/FileGenerator.py | 223 - .../scintilla/scripts/GenerateCaseConvert.py | 127 - .../scripts/GenerateCharacterCategory.py | 53 - .../scintilla/scripts/HFacer.py | 56 - .../scintilla/scripts/HeaderCheck.py | 116 - .../scintilla/scripts/HeaderOrder.txt | 177 - .../scintilla/scripts/LexGen.py | 80 - .../scintilla/scripts/ScintillaAPIFacer.py | 283 - .../scintilla/scripts/ScintillaData.py | 82 - .../scintilla/scripts/__init__.py | 0 .../scripts/__pycache__/Face.cpython-36.pyc | Bin 3381 -> 0 bytes .../__pycache__/FileGenerator.cpython-36.pyc | Bin 5735 -> 0 bytes .../scintilla/scripts/archive.sh | 5 - .../scintilla/src/CallTip.cxx | 356 - .../scintilla/src/CharClassify.h | 32 - .../scintilla/src/CharacterCategoryMap.cxx | 4105 ---- .../scintilla/src/CharacterCategoryMap.h | 52 - .../scintilla/src/CharacterType.cxx | 51 - .../scintilla/src/CharacterType.h | 142 - .../scintilla/src/Debugging.h | 44 - .../scintilla/src/EditModel.cxx | 124 - .../scintilla/src/Geometry.cxx | 122 - .../scintilla/src/Geometry.h | 295 - .../scintilla/src/Indicator.cxx | 291 - .../scintilla/src/Indicator.h | 57 - .../scintilla/src/KeyMap.cxx | 172 - .../scintilla/src/KeyMap.h | 63 - .../scintilla/src/LineMarker.cxx | 560 - .../scintilla/src/LineMarker.h | 58 - .../scintilla/src/MarginView.cxx | 488 - .../scintilla/src/Platform.h | 379 - .../scintilla/src/PositionCache.cxx | 945 - .../scintilla/src/Selection.h | 198 - .../scintilla/src/Style.cxx | 81 - .../scintilla/src/Style.h | 64 - .../scintilla/src/UniqueString.cxx | 54 - .../scintilla/src/UniqueString.h | 46 - .../scintilla/src/ViewStyle.cxx | 721 - .../scintilla/src/ViewStyle.h | 251 - .../scintilla/src/XPM.h | 86 - .../scintilla/test/MessageNumbers.py | 64 - .../scintilla/test/README | 23 - .../scintilla/test/ScintillaCallable.py | 167 - .../scintilla/test/XiteMenu.py | 28 - .../scintilla/test/XiteWin.py | 578 - .../scintilla/test/gi/Scintilla-0.1.gir.good | 345 - .../scintilla/test/gi/filter-scintilla-h.py | 19 - .../scintilla/test/gi/gi-test.py | 26 - .../scintilla/test/gi/makefile | 53 - .../scintilla/test/performanceTests.py | 130 - .../scintilla/test/simpleTests.py | 2994 --- .../scintilla/test/unit/LICENSE_1_0.txt | 23 - .../scintilla/test/unit/README | 15 - .../scintilla/test/unit/Sci.natvis | 33 - .../scintilla/test/unit/SciTE.properties | 5 - .../scintilla/test/unit/UnitTester.cxx | 45 - .../scintilla/test/unit/UnitTester.vcxproj | 176 - .../scintilla/test/unit/catch.hpp | 17959 ---------------- .../scintilla/test/unit/makefile | 82 - .../scintilla/test/unit/test.mak | 41 - .../scintilla/test/unit/testCellBuffer.cxx | 440 - .../scintilla/test/unit/testCharClassify.cxx | 124 - .../test/unit/testCharacterCategoryMap.cxx | 73 - .../test/unit/testContractionState.cxx | 183 - .../scintilla/test/unit/testDecoration.cxx | 98 - .../scintilla/test/unit/testDocument.cxx | 605 - .../scintilla/test/unit/testGeometry.cxx | 233 - .../scintilla/test/unit/testPartitioning.cxx | 219 - .../scintilla/test/unit/testPerLine.cxx | 369 - .../scintilla/test/unit/testRESearch.cxx | 77 - .../scintilla/test/unit/testRunStyles.cxx | 335 - .../scintilla/test/unit/testSparseVector.cxx | 420 - .../scintilla/test/unit/testSplitVector.cxx | 358 - .../scintilla/test/unit/testUniConversion.cxx | 361 - .../scintilla/test/unit/unitTest.cxx | 75 - .../scintilla/test/win32Tests.py | 176 - .../scintilla/test/xite.py | 8 - .../unioncode-scintilla515/scintilla/tgzsrc | 4 - .../scintilla/version.txt | 1 - .../scintilla/win32/DepGen.py | 32 - .../scintilla/win32/HanjaDic.cxx | 137 - .../scintilla/win32/HanjaDic.h | 22 - .../scintilla/win32/PlatWin.cxx | 3899 ---- .../scintilla/win32/PlatWin.h | 60 - .../scintilla/win32/SciTE.properties | 21 - .../scintilla/win32/ScintRes.rc | 37 - .../scintilla/win32/Scintilla.def | 2 - .../scintilla/win32/Scintilla.vcxproj | 182 - .../scintilla/win32/ScintillaDLL.cxx | 37 - .../scintilla/win32/ScintillaWin.cxx | 3688 ---- .../scintilla/win32/ScintillaWin.h | 21 - .../scintilla/win32/WinTypes.h | 58 - .../scintilla/win32/deps.mak | 448 - .../scintilla/win32/makefile | 138 - .../scintilla/win32/nmdeps.mak | 448 - .../scintilla/win32/scintilla.mak | 146 - .../scintilla/zipsrc.bat | 4 - src/plugins/codeeditor/CMakeLists.txt | 2 +- .../codeeditor/gui/private/texteditor_p.cpp | 15 +- .../gui/private/workspacewidget_p.h | 2 + src/plugins/codeeditor/gui/tabwidget.cpp | 17 + src/plugins/codeeditor/gui/tabwidget.h | 4 + .../codeeditor/gui/workspacewidget.cpp | 50 +- .../codeeditor/manager/texteditormanager.cpp | 6 + .../codeeditor/manager/texteditormanager.h | 1 + .../transceiver/codeeditorreceiver.h | 5 + src/plugins/codeeditor/utils/editorutils.cpp | 14 +- 847 files changed, 81434 insertions(+), 182220 deletions(-) delete mode 100644 3rdparty/unioncode-lexilla514.cmake create mode 100644 3rdparty/unioncode-qscintilla214.cmake create mode 100644 3rdparty/unioncode-qscintilla214/CMakeLists.txt create mode 100755 3rdparty/unioncode-qscintilla214/LICENSE rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/ILexer.h (91%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/ILoader.h (95%) rename 3rdparty/{unioncode-scintilla515/scintilla => unioncode-qscintilla214/scintilla/include}/License.txt (88%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/include/Platform.h rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/include/SciLexer.h (89%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/Sci_Position.h (100%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/Scintilla.h (88%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/Scintilla.iface (57%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/include/ScintillaWidget.h (100%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexA68k.cxx => unioncode-qscintilla214/scintilla/lexers/LexA68k.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAPDL.cxx => unioncode-qscintilla214/scintilla/lexers/LexAPDL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexASY.cxx => unioncode-qscintilla214/scintilla/lexers/LexASY.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAU3.cxx => unioncode-qscintilla214/scintilla/lexers/LexAU3.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAVE.cxx => unioncode-qscintilla214/scintilla/lexers/LexAVE.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAVS.cxx => unioncode-qscintilla214/scintilla/lexers/LexAVS.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAbaqus.cxx => unioncode-qscintilla214/scintilla/lexers/LexAbaqus.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAda.cxx => unioncode-qscintilla214/scintilla/lexers/LexAda.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAsm.cxx => unioncode-qscintilla214/scintilla/lexers/LexAsm.cpp} (94%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexAsn1.cxx => unioncode-qscintilla214/scintilla/lexers/LexAsn1.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexBaan.cxx => unioncode-qscintilla214/scintilla/lexers/LexBaan.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexBash.cxx => unioncode-qscintilla214/scintilla/lexers/LexBash.cpp} (80%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexBasic.cxx => unioncode-qscintilla214/scintilla/lexers/LexBasic.cpp} (94%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBatch.cpp rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexBibTeX.cxx => unioncode-qscintilla214/scintilla/lexers/LexBibTeX.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexBullant.cxx => unioncode-qscintilla214/scintilla/lexers/LexBullant.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCLW.cxx => unioncode-qscintilla214/scintilla/lexers/LexCLW.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCOBOL.cxx => unioncode-qscintilla214/scintilla/lexers/LexCOBOL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCPP.cxx => unioncode-qscintilla214/scintilla/lexers/LexCPP.cpp} (84%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCSS.cxx => unioncode-qscintilla214/scintilla/lexers/LexCSS.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCaml.cxx => unioncode-qscintilla214/scintilla/lexers/LexCaml.cpp} (73%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCmake.cxx => unioncode-qscintilla214/scintilla/lexers/LexCmake.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCoffeeScript.cxx => unioncode-qscintilla214/scintilla/lexers/LexCoffeeScript.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexConf.cxx => unioncode-qscintilla214/scintilla/lexers/LexConf.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCrontab.cxx => unioncode-qscintilla214/scintilla/lexers/LexCrontab.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexCsound.cxx => unioncode-qscintilla214/scintilla/lexers/LexCsound.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexD.cxx => unioncode-qscintilla214/scintilla/lexers/LexD.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexDMAP.cxx => unioncode-qscintilla214/scintilla/lexers/LexDMAP.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexDMIS.cxx => unioncode-qscintilla214/scintilla/lexers/LexDMIS.cpp} (93%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexDiff.cxx => unioncode-qscintilla214/scintilla/lexers/LexDiff.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexECL.cxx => unioncode-qscintilla214/scintilla/lexers/LexECL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexEDIFACT.cxx => unioncode-qscintilla214/scintilla/lexers/LexEDIFACT.cpp} (75%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexEScript.cxx => unioncode-qscintilla214/scintilla/lexers/LexEScript.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexEiffel.cxx => unioncode-qscintilla214/scintilla/lexers/LexEiffel.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexErlang.cxx => unioncode-qscintilla214/scintilla/lexers/LexErlang.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexErrorList.cxx => unioncode-qscintilla214/scintilla/lexers/LexErrorList.cpp} (83%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexFlagship.cxx => unioncode-qscintilla214/scintilla/lexers/LexFlagship.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexForth.cxx => unioncode-qscintilla214/scintilla/lexers/LexForth.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexFortran.cxx => unioncode-qscintilla214/scintilla/lexers/LexFortran.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexGAP.cxx => unioncode-qscintilla214/scintilla/lexers/LexGAP.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexGui4Cli.cxx => unioncode-qscintilla214/scintilla/lexers/LexGui4Cli.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexHTML.cxx => unioncode-qscintilla214/scintilla/lexers/LexHTML.cpp} (92%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexHaskell.cxx => unioncode-qscintilla214/scintilla/lexers/LexHaskell.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexHex.cxx => unioncode-qscintilla214/scintilla/lexers/LexHex.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexIndent.cxx => unioncode-qscintilla214/scintilla/lexers/LexIndent.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexInno.cxx => unioncode-qscintilla214/scintilla/lexers/LexInno.cpp} (79%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexJSON.cxx => unioncode-qscintilla214/scintilla/lexers/LexJSON.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexKVIrc.cxx => unioncode-qscintilla214/scintilla/lexers/LexKVIrc.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexKix.cxx => unioncode-qscintilla214/scintilla/lexers/LexKix.cpp} (98%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLPeg.cpp rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexLaTeX.cxx => unioncode-qscintilla214/scintilla/lexers/LexLaTeX.cpp} (95%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexLisp.cxx => unioncode-qscintilla214/scintilla/lexers/LexLisp.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexLout.cxx => unioncode-qscintilla214/scintilla/lexers/LexLout.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexLua.cxx => unioncode-qscintilla214/scintilla/lexers/LexLua.cpp} (93%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMMIXAL.cxx => unioncode-qscintilla214/scintilla/lexers/LexMMIXAL.cpp} (94%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMPT.cxx => unioncode-qscintilla214/scintilla/lexers/LexMPT.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMSSQL.cxx => unioncode-qscintilla214/scintilla/lexers/LexMSSQL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMagik.cxx => unioncode-qscintilla214/scintilla/lexers/LexMagik.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMake.cxx => unioncode-qscintilla214/scintilla/lexers/LexMake.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMarkdown.cxx => unioncode-qscintilla214/scintilla/lexers/LexMarkdown.cpp} (86%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMatlab.cxx => unioncode-qscintilla214/scintilla/lexers/LexMatlab.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMaxima.cxx => unioncode-qscintilla214/scintilla/lexers/LexMaxima.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMetapost.cxx => unioncode-qscintilla214/scintilla/lexers/LexMetapost.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexModula.cxx => unioncode-qscintilla214/scintilla/lexers/LexModula.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexMySQL.cxx => unioncode-qscintilla214/scintilla/lexers/LexMySQL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexNimrod.cxx => unioncode-qscintilla214/scintilla/lexers/LexNimrod.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexNsis.cxx => unioncode-qscintilla214/scintilla/lexers/LexNsis.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexNull.cxx => unioncode-qscintilla214/scintilla/lexers/LexNull.cpp} (94%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexOScript.cxx => unioncode-qscintilla214/scintilla/lexers/LexOScript.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexOpal.cxx => unioncode-qscintilla214/scintilla/lexers/LexOpal.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPB.cxx => unioncode-qscintilla214/scintilla/lexers/LexPB.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPLM.cxx => unioncode-qscintilla214/scintilla/lexers/LexPLM.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPO.cxx => unioncode-qscintilla214/scintilla/lexers/LexPO.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPOV.cxx => unioncode-qscintilla214/scintilla/lexers/LexPOV.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPS.cxx => unioncode-qscintilla214/scintilla/lexers/LexPS.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPascal.cxx => unioncode-qscintilla214/scintilla/lexers/LexPascal.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPerl.cxx => unioncode-qscintilla214/scintilla/lexers/LexPerl.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPowerPro.cxx => unioncode-qscintilla214/scintilla/lexers/LexPowerPro.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPowerShell.cxx => unioncode-qscintilla214/scintilla/lexers/LexPowerShell.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexProgress.cxx => unioncode-qscintilla214/scintilla/lexers/LexProgress.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexProps.cxx => unioncode-qscintilla214/scintilla/lexers/LexProps.cpp} (91%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexPython.cxx => unioncode-qscintilla214/scintilla/lexers/LexPython.cpp} (92%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexR.cxx => unioncode-qscintilla214/scintilla/lexers/LexR.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexRebol.cxx => unioncode-qscintilla214/scintilla/lexers/LexRebol.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexRegistry.cxx => unioncode-qscintilla214/scintilla/lexers/LexRegistry.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexRuby.cxx => unioncode-qscintilla214/scintilla/lexers/LexRuby.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexRust.cxx => unioncode-qscintilla214/scintilla/lexers/LexRust.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSAS.cxx => unioncode-qscintilla214/scintilla/lexers/LexSAS.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSML.cxx => unioncode-qscintilla214/scintilla/lexers/LexSML.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSQL.cxx => unioncode-qscintilla214/scintilla/lexers/LexSQL.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSTTXT.cxx => unioncode-qscintilla214/scintilla/lexers/LexSTTXT.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexScriptol.cxx => unioncode-qscintilla214/scintilla/lexers/LexScriptol.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSmalltalk.cxx => unioncode-qscintilla214/scintilla/lexers/LexSmalltalk.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSorcus.cxx => unioncode-qscintilla214/scintilla/lexers/LexSorcus.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSpecman.cxx => unioncode-qscintilla214/scintilla/lexers/LexSpecman.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexSpice.cxx => unioncode-qscintilla214/scintilla/lexers/LexSpice.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexStata.cxx => unioncode-qscintilla214/scintilla/lexers/LexStata.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTACL.cxx => unioncode-qscintilla214/scintilla/lexers/LexTACL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTADS3.cxx => unioncode-qscintilla214/scintilla/lexers/LexTADS3.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTAL.cxx => unioncode-qscintilla214/scintilla/lexers/LexTAL.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTCL.cxx => unioncode-qscintilla214/scintilla/lexers/LexTCL.cpp} (95%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTCMD.cxx => unioncode-qscintilla214/scintilla/lexers/LexTCMD.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTeX.cxx => unioncode-qscintilla214/scintilla/lexers/LexTeX.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexTxt2tags.cxx => unioncode-qscintilla214/scintilla/lexers/LexTxt2tags.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexVB.cxx => unioncode-qscintilla214/scintilla/lexers/LexVB.cpp} (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexVHDL.cxx => unioncode-qscintilla214/scintilla/lexers/LexVHDL.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexVerilog.cxx => unioncode-qscintilla214/scintilla/lexers/LexVerilog.cpp} (99%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexVisualProlog.cxx => unioncode-qscintilla214/scintilla/lexers/LexVisualProlog.cpp} (98%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexers/LexYAML.cxx => unioncode-qscintilla214/scintilla/lexers/LexYAML.cpp} (96%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla/lexers}/License.txt (88%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/Accessor.cxx => unioncode-qscintilla214/scintilla/lexlib/Accessor.cpp} (88%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/Accessor.h (77%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/CharacterCategory.cxx => unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.cpp} (93%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/CharacterCategory.h (64%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/CharacterSet.cxx => unioncode-qscintilla214/scintilla/lexlib/CharacterSet.cpp} (88%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/CharacterSet.h (51%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/DefaultLexer.cxx => unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.cpp} (83%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/DefaultLexer.h (81%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/LexAccessor.h (78%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/LexerBase.cxx => unioncode-qscintilla214/scintilla/lexlib/LexerBase.cpp} (84%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/LexerBase.h (85%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/LexerModule.cxx => unioncode-qscintilla214/scintilla/lexlib/LexerModule.cpp} (86%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/LexerModule.h (68%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.cxx => unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.cpp} (89%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/LexerNoExceptions.h (76%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/LexerSimple.cxx => unioncode-qscintilla214/scintilla/lexlib/LexerSimple.cpp} (79%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/LexerSimple.h (73%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexlib/License.txt rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/OptionSet.h (86%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.h rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/SparseState.h (90%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/StringCopy.h (97%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/StyleContext.cxx => unioncode-qscintilla214/scintilla/lexlib/StyleContext.cpp} (54%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/StyleContext.h (92%) rename 3rdparty/{unioncode-scintilla515/lexilla => unioncode-qscintilla214/scintilla}/lexlib/SubStyles.h (68%) rename 3rdparty/{unioncode-scintilla515/lexilla/lexlib/WordList.cxx => unioncode-qscintilla214/scintilla/lexlib/WordList.cpp} (74%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.h rename 3rdparty/{unioncode-scintilla515/scintilla/src/AutoComplete.cxx => unioncode-qscintilla214/scintilla/src/AutoComplete.cpp} (79%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/AutoComplete.h (68%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.cpp rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/CallTip.h (61%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/CaseConvert.cxx => unioncode-qscintilla214/scintilla/src/CaseConvert.cpp} (91%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/CaseConvert.h (72%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/CaseFolder.cxx => unioncode-qscintilla214/scintilla/src/CaseFolder.cpp} (87%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/CaseFolder.h (84%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.h rename 3rdparty/{unioncode-scintilla515/scintilla/src/CellBuffer.cxx => unioncode-qscintilla214/scintilla/src/CellBuffer.cpp} (67%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/CellBuffer.h (69%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/CharClassify.cxx => unioncode-qscintilla214/scintilla/src/CharClassify.cpp} (58%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.h rename 3rdparty/{unioncode-scintilla515/scintilla/src/ContractionState.cxx => unioncode-qscintilla214/scintilla/src/ContractionState.cpp} (80%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/ContractionState.h (59%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/DBCS.cxx => unioncode-qscintilla214/scintilla/src/DBCS.cpp} (79%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/DBCS.h (56%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/Decoration.cxx => unioncode-qscintilla214/scintilla/src/Decoration.cpp} (76%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/Decoration.h (57%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/Document.cxx => unioncode-qscintilla214/scintilla/src/Document.cpp} (69%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/Document.h (69%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.cpp rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/EditModel.h (67%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/EditView.cxx => unioncode-qscintilla214/scintilla/src/EditView.cpp} (54%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/EditView.h (72%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/Editor.cxx => unioncode-qscintilla214/scintilla/src/Editor.cpp} (61%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/Editor.h (59%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/ElapsedPeriod.h (61%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/ExternalLexer.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/ExternalLexer.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/FontQuality.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Indicator.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Indicator.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/IntegerRectangle.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/KeyMap.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/KeyMap.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/License.txt create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/LineMarker.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/LineMarker.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/MarginView.cpp rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/MarginView.h (76%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/Partitioning.h (75%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/PerLine.cxx => unioncode-qscintilla214/scintilla/src/PerLine.cpp} (70%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/PerLine.h (75%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/Position.h (77%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/PositionCache.cpp rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/PositionCache.h (50%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/RESearch.cxx => unioncode-qscintilla214/scintilla/src/RESearch.cpp} (96%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/RESearch.h (65%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/RunStyles.cxx => unioncode-qscintilla214/scintilla/src/RunStyles.cpp} (93%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/RunStyles.h (95%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/SciTE.properties (100%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/ScintillaBase.cxx => unioncode-qscintilla214/scintilla/src/ScintillaBase.cpp} (62%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/ScintillaBase.h (76%) rename 3rdparty/{unioncode-scintilla515/scintilla/src/Selection.cxx => unioncode-qscintilla214/scintilla/src/Selection.cpp} (72%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Selection.h rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/SparseVector.h (58%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/SplitVector.h (86%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Style.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/Style.h rename 3rdparty/{unioncode-scintilla515/scintilla/src/UniConversion.cxx => unioncode-qscintilla214/scintilla/src/UniConversion.cpp} (78%) rename 3rdparty/{unioncode-scintilla515 => unioncode-qscintilla214}/scintilla/src/UniConversion.h (58%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/UniqueString.h create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/ViewStyle.cpp create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/ViewStyle.h rename 3rdparty/{unioncode-scintilla515/scintilla/src/XPM.cxx => unioncode-qscintilla214/scintilla/src/XPM.cpp} (57%) create mode 100644 3rdparty/unioncode-qscintilla214/scintilla/src/XPM.h create mode 100644 3rdparty/unioncode-qscintilla214/src/InputMethod.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/ListBoxQt.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/ListBoxQt.h create mode 100644 3rdparty/unioncode-qscintilla214/src/MacPasteboardMime.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/PlatQt.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciabstractapis.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciapis.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscicommand.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscicommandset.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscidocument.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciglobal.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexer.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerasm.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexeravs.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerbash.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerbatch.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercmake.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercoffeescript.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercpp.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercsharp.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercss.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexercustom.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerd.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerdiff.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexeredifact.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerfortran.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerfortran77.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerhex.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerhtml.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexeridl.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerintelhex.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerjava.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerjavascript.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerjson.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerlua.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexermakefile.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexermarkdown.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexermasm.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexermatlab.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexernasm.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexeroctave.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerpascal.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerperl.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerpo.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerpostscript.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerpov.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerproperties.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerpython.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerruby.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerspice.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexersql.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexersrec.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexertcl.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexertekhex.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexertex.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerverilog.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexervhdl.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexerxml.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscilexeryaml.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscimacro.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciprinter.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciscintilla.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qsciscintillabase.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscistyle.h create mode 100644 3rdparty/unioncode-qscintilla214/src/Qsci/qscistyledtext.h create mode 100644 3rdparty/unioncode-qscintilla214/src/SciAccessibility.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/SciAccessibility.h create mode 100644 3rdparty/unioncode-qscintilla214/src/SciClasses.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/SciClasses.h create mode 100644 3rdparty/unioncode-qscintilla214/src/ScintillaQt.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/ScintillaQt.h create mode 100644 3rdparty/unioncode-qscintilla214/src/features/qscintilla2.prf create mode 100644 3rdparty/unioncode-qscintilla214/src/features_staticlib/qscintilla2.prf create mode 100644 3rdparty/unioncode-qscintilla214/src/qsciabstractapis.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qsciapis.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscicommand.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscicommandset.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscidocument.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexer.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerasm.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexeravs.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerbash.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerbatch.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercmake.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercoffeescript.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercpp.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercsharp.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercss.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexercustom.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerd.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerdiff.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexeredifact.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerfortran.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerfortran77.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerhex.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerhtml.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexeridl.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerintelhex.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerjava.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerjavascript.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerjson.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerlua.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexermakefile.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexermarkdown.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexermasm.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexermatlab.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexernasm.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexeroctave.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerpascal.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerperl.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerpo.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerpostscript.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerpov.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerproperties.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerpython.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerruby.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerspice.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexersql.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexersrec.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexertcl.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexertekhex.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexertex.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerverilog.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexervhdl.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexerxml.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscilexeryaml.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscimacro.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla.pro create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla_cs.ts create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla_de.ts create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla_es.ts create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla_fr.ts create mode 100644 3rdparty/unioncode-qscintilla214/src/qscintilla_pt_br.ts create mode 100644 3rdparty/unioncode-qscintilla214/src/qsciprinter.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qsciscintilla.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qsciscintillabase.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscistyle.cpp create mode 100644 3rdparty/unioncode-qscintilla214/src/qscistyledtext.cpp delete mode 100644 3rdparty/unioncode-scintilla515.cmake delete mode 100644 3rdparty/unioncode-scintilla515/CMakeLists.txt delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/CONTRIBUTING delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/README delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/access/LexillaAccess.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/access/LexillaAccess.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/access/README delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/bin/empty.txt delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/cppcheck.suppress delete mode 100755 3rdparty/unioncode-scintilla515/lexilla/delbin.bat delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/Lexilla.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDoc.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDownload.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/LexillaHistory.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/LexillaLogo.png delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/doc/LexillaLogo2x.png delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/examples/CheckLexilla/CheckLexilla.c delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/examples/CheckLexilla/makefile delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/SimpleLexer.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/makefile delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/include/LexicalStyles.iface delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/include/Lexilla.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsciidoc.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBatch.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCIL.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexDataflex.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexFSharp.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexGDScript.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexHollywood.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexJAVA.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexJS.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexJulia.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexNim.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexRaku.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexers/LexX12.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexlib/CatalogueModules.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/HeaderOrder.txt delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/LexFacer.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaData.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaGen.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaLogo.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.bat delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.sh delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/CMakeLists.txt delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/DepGen.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.def delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.pro delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.vcxproj delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Info.plist delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.pbxproj delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/LexillaVersion.rc delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/deps.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/lexilla.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/makefile delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/src/nmdeps.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/README delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.h delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.vcxproj delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/css/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/d/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6 delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12 delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.folded delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.styled delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/makefile delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/testlexers.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/LICENSE_1_0.txt delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/README delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/Sci.natvis delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.vcxproj delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/catch.hpp delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/makefile delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/test.mak delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/testCharacterSet.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/testLexerSimple.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/testPropSetSimple.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/testSparseState.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/testWordList.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/test/unit/unitTest.cxx delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/tgzsrc delete mode 100644 3rdparty/unioncode-scintilla515/lexilla/version.txt delete mode 100755 3rdparty/unioncode-scintilla515/lexilla/zipsrc.bat delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/CONTRIBUTING delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/README delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/bin/empty.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/call/ScintillaCall.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/InfoBar.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/InfoBar.mm delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/InfoBarCommunicator.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/PlatCocoa.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/PlatCocoa.mm delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/QuartzTextLayout.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/QuartzTextStyle.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/QuartzTextStyleAttribute.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/Scintilla/Info.plist delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.pbxproj delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/Scintilla/Scintilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/Scintilla/module.modulemap delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaCocoa.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaCocoa.mm delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/AppController.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/AppController.mm delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/Info.plist delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/Scintilla-Info.plist delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/TestData.sql delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/en.lproj/InfoPlist.strings delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/en.lproj/MainMenu.xib delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaTest/main.m delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaView.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/ScintillaView.mm delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/cocoa/checkbuildosx.sh delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/info_bar_bg.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/info_bar_bg@2x.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/mac_cursor_busy.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/mac_cursor_busy@2x.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/mac_cursor_flipped.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cocoa/res/mac_cursor_flipped@2x.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/cppcheck.suppress delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/delbin.bat delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/AddSource.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Design.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Icons.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Indicators.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Lexer.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Markers.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Privacy.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/SciBreak.jpg delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/SciCoding.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/SciRest.jpg delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/SciTEIco.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/SciWord.jpg delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Scintilla5Migration.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaDoc.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaDownload.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaHistory.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaRelated.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaToDo.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/ScintillaUsage.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/StadiumVariants.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/Steps.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/StyleMetadata.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/annotations.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/eolannotation.png delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/index.html delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/doc/styledmargin.png delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/gtk/Converter.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/DepGen.py delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/gtk/PlatGTK.cxx delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/gtk/ScintillaGTK.cxx delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/gtk/ScintillaGTK.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/ScintillaGTKAccessible.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/ScintillaGTKAccessible.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/deps.mak delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/makefile delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/scintilla-marshal.c delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/scintilla-marshal.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/gtk/scintilla-marshal.list delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/include/ScintillaCall.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/include/ScintillaMessages.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/include/ScintillaStructures.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/include/ScintillaTypes.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/README delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaDocument.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/CMakeLists.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaDocument.cpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaDocument.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaEdit.cpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaEdit.cpp.template delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaEdit.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaEdit.h.template delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/ScintillaEdit.pro delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/WidgetGen.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEdit/WidgetGen.pyc delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/Notes.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/PlatQt.cpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/PlatQt.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/ScintillaEditBase.cpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/ScintillaEditBase.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/ScintillaEditBase.pro delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/ScintillaQt.cpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditBase/ScintillaQt.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/qt/ScintillaEditPy/ScintillaConstants.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/CheckMentioned.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/Dependencies.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/Face.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/FileGenerator.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/GenerateCaseConvert.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/GenerateCharacterCategory.py delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/scripts/HFacer.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/HeaderCheck.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/HeaderOrder.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/LexGen.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/ScintillaAPIFacer.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/ScintillaData.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/__init__.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/__pycache__/Face.cpython-36.pyc delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/__pycache__/FileGenerator.cpython-36.pyc delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/scripts/archive.sh delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CallTip.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CharClassify.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CharacterCategoryMap.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CharacterCategoryMap.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CharacterType.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/CharacterType.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Debugging.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/EditModel.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Geometry.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Geometry.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Indicator.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Indicator.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/KeyMap.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/KeyMap.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/LineMarker.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/LineMarker.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/MarginView.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Platform.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/PositionCache.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Selection.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Style.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/Style.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/UniqueString.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/UniqueString.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/ViewStyle.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/ViewStyle.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/src/XPM.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/MessageNumbers.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/README delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/ScintillaCallable.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/XiteMenu.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/XiteWin.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/gi/Scintilla-0.1.gir.good delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/gi/filter-scintilla-h.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/gi/gi-test.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/gi/makefile delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/performanceTests.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/simpleTests.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/LICENSE_1_0.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/README delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/Sci.natvis delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/UnitTester.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/UnitTester.vcxproj delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/catch.hpp delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/makefile delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/test.mak delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testCellBuffer.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testCharClassify.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testCharacterCategoryMap.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testContractionState.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testDecoration.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testDocument.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testGeometry.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testPartitioning.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testPerLine.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testRESearch.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testRunStyles.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testSparseVector.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testSplitVector.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/testUniConversion.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/unit/unitTest.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/win32Tests.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/test/xite.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/tgzsrc delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/version.txt delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/DepGen.py delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/HanjaDic.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/HanjaDic.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/PlatWin.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/PlatWin.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/SciTE.properties delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/ScintRes.rc delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/Scintilla.def delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/Scintilla.vcxproj delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/ScintillaDLL.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/ScintillaWin.cxx delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/ScintillaWin.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/WinTypes.h delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/deps.mak delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/makefile delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/nmdeps.mak delete mode 100644 3rdparty/unioncode-scintilla515/scintilla/win32/scintilla.mak delete mode 100755 3rdparty/unioncode-scintilla515/scintilla/zipsrc.bat diff --git a/.reuse/dep5 b/.reuse/dep5 index 58461e9d3..e6a01f544 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -148,13 +148,13 @@ Copyright: 2012, Luca Beltrame 2007-2014, Simon Edwards License: BSD-3-Clause -# scintilla -Files: 3rdparty/unioncode-scintilla515/scintilla/* -Copyright: 1998-2021 by Neil Hodgson -License: HPND +# qscintilla +Files: 3rdparty/unioncode-qscintilla214/src/* +Copyright: 2023 Riverbank Computing Limited +License: GPL-3.0-or-later -# lexilla -Files: 3rdparty/unioncode-scintilla515/lexilla/* +# scintilla +Files: 3rdparty/unioncode-qscintilla214/scintilla/* Copyright: 1998-2021 by Neil Hodgson License: HPND diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index cdcf63083..531eb9c0f 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory(cppdap) add_subdirectory(unioncode-GitQlient) -add_subdirectory(unioncode-scintilla515) +add_subdirectory(unioncode-qscintilla214) add_subdirectory(unioncode-qtermwidget-0.14.1) add_subdirectory(unioncode-jsonrpccpp) diff --git a/3rdparty/unioncode-lexilla514.cmake b/3rdparty/unioncode-lexilla514.cmake deleted file mode 100644 index ed51a1fde..000000000 --- a/3rdparty/unioncode-lexilla514.cmake +++ /dev/null @@ -1,11 +0,0 @@ -include_directories( - ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515/lexilla - ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515/lexilla/include - ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515/lexilla/lexers - ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515/lexilla/lexlib - ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-scintilla515/lexilla/src - ) - -set(CMAKE_CXX_STANDARD 17) - -link_libraries(unioncode-lexilla) diff --git a/3rdparty/unioncode-qscintilla214.cmake b/3rdparty/unioncode-qscintilla214.cmake new file mode 100644 index 000000000..d3f7033f8 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214.cmake @@ -0,0 +1,7 @@ +include_directories( + ${CMAKE_SOURCE_DIR}/3rdparty/unioncode-qscintilla214/src +) + +set(CMAKE_CXX_STANDARD 17) + +link_libraries(unioncode-qscintilla) diff --git a/3rdparty/unioncode-qscintilla214/CMakeLists.txt b/3rdparty/unioncode-qscintilla214/CMakeLists.txt new file mode 100644 index 000000000..ba2bd7960 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.10) + +project(unioncode-qscintilla) +set(CMAKE_CXX_STANDARD 17) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +find_package(Qt5 COMPONENTS + Widgets + PrintSupport + REQUIRED) +find_package(Dtk COMPONENTS Widget REQUIRED) + +file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci/*.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/scintilla/*/*.h" + "${CMAKE_CURRENT_SOURCE_DIR}/scintilla/*/*.cpp" +) + +add_definitions(-DSCINTILLA_QT -DSCI_LEXER -DINCLUDE_DEPRECATED_FEATURES) + +add_library(${PROJECT_NAME} ${SRCS}) + +target_include_directories(${PROJECT_NAME} + PRIVATE + ${DtkWidget_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/scintilla/include + ${CMAKE_CURRENT_SOURCE_DIR}/scintilla/src + ${CMAKE_CURRENT_SOURCE_DIR}/scintilla/lexlib + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_SOURCE_DIR}/src/Qsci +) + +target_link_libraries( + ${PROJECT_NAME} + Qt5::Widgets + Qt5::PrintSupport + ${DtkWidget_LIBRARIES} +) + +install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIBRARY_INSTALL_PREFIX}) diff --git a/3rdparty/unioncode-qscintilla214/LICENSE b/3rdparty/unioncode-qscintilla214/LICENSE new file mode 100755 index 000000000..94a9ed024 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/ILexer.h b/3rdparty/unioncode-qscintilla214/scintilla/include/ILexer.h similarity index 91% rename from 3rdparty/unioncode-scintilla515/scintilla/include/ILexer.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/ILexer.h index bc9ee1ab5..42f980f89 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/include/ILexer.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/ILexer.h @@ -12,7 +12,7 @@ namespace Scintilla { -enum { dvRelease4=2 }; +enum { dvOriginal=0, dvLineEnd=1 }; class IDocument { public: @@ -27,7 +27,7 @@ class IDocument { virtual int SCI_METHOD SetLevel(Sci_Position line, int level) = 0; virtual int SCI_METHOD GetLineState(Sci_Position line) const = 0; virtual int SCI_METHOD SetLineState(Sci_Position line, int state) = 0; - virtual void SCI_METHOD StartStyling(Sci_Position position) = 0; + virtual void SCI_METHOD StartStyling(Sci_Position position, char mask) = 0; virtual bool SCI_METHOD SetStyleFor(Sci_Position length, char style) = 0; virtual bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) = 0; virtual void SCI_METHOD DecorationSetCurrentIndicator(int indicator) = 0; @@ -37,14 +37,18 @@ class IDocument { virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0; virtual const char * SCI_METHOD BufferPointer() = 0; virtual int SCI_METHOD GetLineIndentation(Sci_Position line) = 0; +}; + +class IDocumentWithLineEnd : public IDocument { +public: virtual Sci_Position SCI_METHOD LineEnd(Sci_Position line) const = 0; virtual Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const = 0; virtual int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const = 0; }; -enum { lvRelease4=2, lvRelease5=3 }; +enum { lvOriginal=0, lvSubStyles=1, lvMetaData=2 }; -class ILexer4 { +class ILexer { public: virtual int SCI_METHOD Version() const = 0; virtual void SCI_METHOD Release() = 0; @@ -57,6 +61,10 @@ class ILexer4 { virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) = 0; virtual void * SCI_METHOD PrivateCall(int operation, void *pointer) = 0; +}; + +class ILexerWithSubStyles : public ILexer { +public: virtual int SCI_METHOD LineEndTypesSupported() = 0; virtual int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) = 0; virtual int SCI_METHOD SubStylesStart(int styleBase) = 0; @@ -67,19 +75,16 @@ class ILexer4 { virtual void SCI_METHOD SetIdentifiers(int style, const char *identifiers) = 0; virtual int SCI_METHOD DistanceToSecondaryStyles() = 0; virtual const char * SCI_METHOD GetSubStyleBases() = 0; +}; + +class ILexerWithMetaData : public ILexerWithSubStyles { +public: virtual int SCI_METHOD NamedStyles() = 0; virtual const char * SCI_METHOD NameOfStyle(int style) = 0; virtual const char * SCI_METHOD TagsOfStyle(int style) = 0; 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 diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/ILoader.h b/3rdparty/unioncode-qscintilla214/scintilla/include/ILoader.h similarity index 95% rename from 3rdparty/unioncode-scintilla515/scintilla/include/ILoader.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/ILoader.h index 2fa69f527..e989de873 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/include/ILoader.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/ILoader.h @@ -10,8 +10,6 @@ #include "Sci_Position.h" -namespace Scintilla { - class ILoader { public: virtual int SCI_METHOD Release() = 0; @@ -20,6 +18,4 @@ class ILoader { virtual void * SCI_METHOD ConvertToDocument() = 0; }; -} - #endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/License.txt b/3rdparty/unioncode-qscintilla214/scintilla/include/License.txt similarity index 88% rename from 3rdparty/unioncode-scintilla515/scintilla/License.txt rename to 3rdparty/unioncode-qscintilla214/scintilla/include/License.txt index e93ac62f2..47c792655 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/License.txt +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/License.txt @@ -1,6 +1,6 @@ -License for Lexilla, Scintilla, and SciTE +License for Scintilla and SciTE -Copyright 1998-2021 by Neil Hodgson +Copyright 1998-2003 by Neil Hodgson All Rights Reserved diff --git a/3rdparty/unioncode-qscintilla214/scintilla/include/Platform.h b/3rdparty/unioncode-qscintilla214/scintilla/include/Platform.h new file mode 100644 index 000000000..887ed4b8d --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/Platform.h @@ -0,0 +1,553 @@ +// Scintilla source code edit control +/** @file Platform.h + ** Interface to platform facilities. Also includes some basic utilities. + ** Implemented in PlatGTK.cxx for GTK+/Linux, PlatWin.cxx for Windows, and PlatWX.cxx for wxWindows. + **/ +// Copyright 1998-2009 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PLATFORM_H +#define PLATFORM_H + +// PLAT_GTK = GTK+ on Linux or Win32 +// PLAT_GTK_WIN32 is defined additionally when running PLAT_GTK under Win32 +// PLAT_WIN = Win32 API on Win32 OS +// PLAT_WX is wxWindows on any supported platform +// PLAT_TK = Tcl/TK on Linux or Win32 + +#define PLAT_GTK 0 +#define PLAT_GTK_WIN32 0 +#define PLAT_GTK_MACOSX 0 +#define PLAT_MACOSX 0 +#define PLAT_WIN 0 +#define PLAT_WX 0 +#define PLAT_QT 0 +#define PLAT_FOX 0 +#define PLAT_CURSES 0 +#define PLAT_TK 0 +#define PLAT_HAIKU 0 + +#if defined(FOX) +#undef PLAT_FOX +#define PLAT_FOX 1 + +#elif defined(__WX__) +#undef PLAT_WX +#define PLAT_WX 1 + +#elif defined(CURSES) +#undef PLAT_CURSES +#define PLAT_CURSES 1 + +#elif defined(__HAIKU__) +#undef PLAT_HAIKU +#define PLAT_HAIKU 1 + +#elif defined(SCINTILLA_QT) +#undef PLAT_QT +#define PLAT_QT 1 + +#include +QT_BEGIN_NAMESPACE +class QPainter; +QT_END_NAMESPACE + +// This is needed to work around an HP-UX bug with Qt4. +#include + +#elif defined(TK) +#undef PLAT_TK +#define PLAT_TK 1 + +#elif defined(GTK) +#undef PLAT_GTK +#define PLAT_GTK 1 + +#if defined(__WIN32__) || defined(_MSC_VER) +#undef PLAT_GTK_WIN32 +#define PLAT_GTK_WIN32 1 +#endif + +#if defined(__APPLE__) +#undef PLAT_GTK_MACOSX +#define PLAT_GTK_MACOSX 1 +#endif + +#elif defined(__APPLE__) + +#undef PLAT_MACOSX +#define PLAT_MACOSX 1 + +#else +#undef PLAT_WIN +#define PLAT_WIN 1 + +#endif + +namespace Scintilla { + +typedef float XYPOSITION; +typedef double XYACCUMULATOR; + +// Underlying the implementation of the platform classes are platform specific types. +// Sometimes these need to be passed around by client code so they are defined here + +typedef void *FontID; +typedef void *SurfaceID; +typedef void *WindowID; +typedef void *MenuID; +typedef void *TickerID; +typedef void *Function; +typedef void *IdlerID; + +/** + * A geometric point class. + * Point is similar to the Win32 POINT and GTK+ GdkPoint types. + */ +class Point { +public: + XYPOSITION x; + XYPOSITION y; + + constexpr explicit Point(XYPOSITION x_=0, XYPOSITION y_=0) noexcept : x(x_), y(y_) { + } + + static Point FromInts(int x_, int y_) noexcept { + return Point(static_cast(x_), static_cast(y_)); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine +}; + +/** + * A geometric rectangle class. + * PRectangle is similar to Win32 RECT. + * PRectangles contain their top and left sides, but not their right and bottom sides. + */ +class PRectangle { +public: + XYPOSITION left; + XYPOSITION top; + XYPOSITION right; + XYPOSITION bottom; + + constexpr explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) noexcept : + left(left_), top(top_), right(right_), bottom(bottom_) { + } + + static PRectangle FromInts(int left_, int top_, int right_, int bottom_) noexcept { + return PRectangle(static_cast(left_), static_cast(top_), + static_cast(right_), static_cast(bottom_)); + } + + // Other automatically defined methods (assignment, copy constructor, destructor) are fine + + 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 { + return (pt.x >= left) && (pt.x <= right) && + (pt.y >= top) && (pt.y <= bottom); + } + 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 { + return (rc.left >= left) && (rc.right <= right) && + (rc.top >= top) && (rc.bottom <= bottom); + } + bool Intersects(PRectangle other) const noexcept { + return (right > other.left) && (left < other.right) && + (bottom > other.top) && (top < other.bottom); + } + void Move(XYPOSITION xDelta, XYPOSITION yDelta) noexcept { + left += xDelta; + top += yDelta; + right += xDelta; + bottom += yDelta; + } + XYPOSITION Width() const noexcept { return right - left; } + XYPOSITION Height() const noexcept { return bottom - top; } + bool Empty() const noexcept { + return (Height() <= 0) || (Width() <= 0); + } +}; + +/** + * Holds an RGB colour with 8 bits for each component. + */ +constexpr const float componentMaximum = 255.0f; +class ColourDesired { + int co; +public: + explicit ColourDesired(int co_=0) noexcept : co(co_) { + } + + ColourDesired(unsigned int red, unsigned int green, unsigned int blue) noexcept : + co(red | (green << 8) | (blue << 16)) { + } + + bool operator==(const ColourDesired &other) const noexcept { + return co == other.co; + } + + int AsInteger() const noexcept { + return co; + } + + // Red, green and blue values as bytes 0..255 + unsigned char GetRed() const noexcept { + return co & 0xff; + } + unsigned char GetGreen() const noexcept { + return (co >> 8) & 0xff; + } + unsigned char GetBlue() const noexcept { + return (co >> 16) & 0xff; + } + + // Red, green and blue values as float 0..1.0 + float GetRedComponent() const noexcept { + return GetRed() / componentMaximum; + } + float GetGreenComponent() const noexcept { + return GetGreen() / componentMaximum; + } + float GetBlueComponent() const noexcept { + return GetBlue() / componentMaximum; + } +}; + +/** +* Holds an RGBA colour. +*/ +class ColourAlpha : public ColourDesired { +public: + explicit ColourAlpha(int co_ = 0) noexcept : ColourDesired(co_) { + } + + 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 : + ColourDesired(red | (green << 8) | (blue << 16) | (alpha << 24)) { + } + + ColourAlpha(ColourDesired cd, unsigned int alpha) noexcept : + ColourDesired(cd.AsInteger() | (alpha << 24)) { + } + + ColourDesired GetColour() const noexcept { + return ColourDesired(AsInteger() & 0xffffff); + } + + unsigned char GetAlpha() const noexcept { + return (AsInteger() >> 24) & 0xff; + } + + float GetAlphaComponent() const noexcept { + return GetAlpha() / componentMaximum; + } + + 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; + const unsigned int alpha = (GetAlpha() + other.GetAlpha()) / 2; + return ColourAlpha(red, green, blue, alpha); + } +}; + +/** +* Holds an element of a gradient with an RGBA colour and a relative position. +*/ +class ColourStop { +public: + float position; + ColourAlpha colour; + ColourStop(float position_, ColourAlpha colour_) noexcept : + position(position_), colour(colour_) { + } +}; + +/** + * Font management. + */ + +struct FontParameters { + const char *faceName; + float size; + int weight; + bool italic; + int extraFontFlag; + int technology; + int characterSet; + + FontParameters( + const char *faceName_, + float size_=10, + int weight_=400, + bool italic_=false, + int extraFontFlag_=0, + int technology_=0, + int characterSet_=0) noexcept : + + faceName(faceName_), + size(size_), + weight(weight_), + italic(italic_), + extraFontFlag(extraFontFlag_), + technology(technology_), + characterSet(characterSet_) + { + } + +}; + +class Font { +protected: + FontID fid; +public: + Font() noexcept; + // Deleted so Font objects can not be copied + Font(const Font &) = delete; + Font(Font &&) = delete; + Font &operator=(const Font &) = delete; + Font &operator=(Font &&) = delete; + virtual ~Font(); + + virtual void Create(const FontParameters &fp); + virtual void Release(); + + FontID GetID() const noexcept { return fid; } + // Alias another font - caller guarantees not to Release + void SetID(FontID fid_) noexcept { fid = fid_; } + friend class Surface; + friend class SurfaceImpl; +}; + +/** + * A surface abstracts a place to draw. + */ +#if defined(PLAT_QT) +class XPM; +#endif +class Surface { +public: + Surface() noexcept = default; + Surface(const Surface &) = delete; + Surface(Surface &&) = delete; + Surface &operator=(const Surface &) = delete; + Surface &operator=(Surface &&) = delete; + virtual ~Surface() {} + static Surface *Allocate(int technology); + + virtual void Init(WindowID wid)=0; + virtual void Init(SurfaceID sid, WindowID wid)=0; + virtual void InitPixMap(int width, int height, Surface *surface_, WindowID wid)=0; + + virtual void Release()=0; + virtual bool Initialised()=0; + virtual void PenColour(ColourDesired fore)=0; + virtual int LogPixelsY()=0; + virtual int DeviceHeightFont(int points)=0; + virtual void MoveTo(int x_, int y_)=0; + virtual void LineTo(int x_, int y_)=0; + virtual void Polygon(Point *pts, size_t npts, ColourDesired fore, ColourDesired back)=0; + virtual void RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back)=0; + virtual void FillRectangle(PRectangle rc, ColourDesired back)=0; + virtual void FillRectangle(PRectangle rc, Surface &surfacePattern)=0; + virtual void RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesired back)=0; + virtual void AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, + ColourDesired outline, int alphaOutline, int flags)=0; + enum class GradientOptions { leftToRight, topToBottom }; + virtual void GradientRectangle(PRectangle rc, const std::vector &stops, GradientOptions options)=0; + virtual void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) = 0; + virtual void Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back)=0; + virtual void Copy(PRectangle rc, Point from, Surface &surfaceSource)=0; + + virtual void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; + virtual void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back)=0; + virtual void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore)=0; + virtual void MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions)=0; + virtual XYPOSITION WidthText(Font &font_, const char *s, int len)=0; + virtual XYPOSITION Ascent(Font &font_)=0; + virtual XYPOSITION Descent(Font &font_)=0; + virtual XYPOSITION InternalLeading(Font &font_)=0; + virtual XYPOSITION Height(Font &font_)=0; + virtual XYPOSITION AverageCharWidth(Font &font_)=0; + + virtual void SetClip(PRectangle rc)=0; + virtual void FlushCachedState()=0; + + virtual void SetUnicodeMode(bool unicodeMode_)=0; + virtual void SetDBCSMode(int codePage)=0; + +#if defined(PLAT_QT) + virtual void Init(QPainter *p)=0; + virtual void DrawXPM(PRectangle rc, const XPM *xpm)=0; +#endif +}; + +/** + * Class to hide the details of window manipulation. + * Does not own the window which will normally have a longer life than this object. + */ +class Window { +protected: + WindowID wid; +public: + Window() noexcept : wid(nullptr), cursorLast(cursorInvalid) { + } + Window(const Window &source) = delete; + Window(Window &&) = delete; + Window &operator=(WindowID wid_) noexcept { + wid = wid_; + cursorLast = cursorInvalid; + return *this; + } + Window &operator=(const Window &) = delete; + Window &operator=(Window &&) = delete; + virtual ~Window(); + WindowID GetID() const noexcept { return wid; } + bool Created() const noexcept { return wid != nullptr; } + void Destroy(); + PRectangle GetPosition() const; + void SetPosition(PRectangle rc); + void SetPositionRelative(PRectangle rc, const Window *relativeTo); + PRectangle GetClientPosition() const; + void Show(bool show=true); + void InvalidateAll(); + void InvalidateRectangle(PRectangle rc); + virtual void SetFont(Font &font); + enum Cursor { cursorInvalid, cursorText, cursorArrow, cursorUp, cursorWait, cursorHoriz, cursorVert, cursorReverseArrow, cursorHand }; + void SetCursor(Cursor curs); + PRectangle GetMonitorRect(Point pt); +private: + Cursor cursorLast; +}; + +/** + * Listbox management. + */ + +// ScintillaBase implements IListBoxDelegate to receive ListBoxEvents from a ListBox + +struct ListBoxEvent { + enum class EventType { selectionChange, doubleClick } event; + ListBoxEvent(EventType event_) noexcept : event(event_) { + } +}; + +class IListBoxDelegate { +public: + virtual void ListNotify(ListBoxEvent *plbe)=0; +}; + +class ListBox : public Window { +public: + ListBox() noexcept; + ~ListBox() override; + static ListBox *Allocate(); + + void SetFont(Font &font) override =0; + virtual void Create(Window &parent, int ctrlID, Point location, int lineHeight_, bool unicodeMode_, int technology_)=0; + virtual void SetAverageCharWidth(int width)=0; + virtual void SetVisibleRows(int rows)=0; + virtual int GetVisibleRows() const=0; + virtual PRectangle GetDesiredRect()=0; + virtual int CaretFromEdge()=0; + virtual void Clear()=0; + virtual void Append(char *s, int type = -1)=0; + virtual int Length()=0; + virtual void Select(int n)=0; + virtual int GetSelection()=0; + virtual int Find(const char *prefix)=0; + virtual void GetValue(int n, char *value, int len)=0; + virtual void RegisterImage(int type, const char *xpm_data)=0; + virtual void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage) = 0; + virtual void ClearRegisteredImages()=0; + virtual void SetDelegate(IListBoxDelegate *lbDelegate)=0; + virtual void SetList(const char* list, char separator, char typesep)=0; +}; + +/** + * Menu management. + */ +class Menu { + MenuID mid; +public: + Menu() noexcept; + MenuID GetID() const noexcept { return mid; } + void CreatePopUp(); + void Destroy(); + void Show(Point pt, Window &w); +}; + +/** + * Dynamic Library (DLL/SO/...) loading + */ +class DynamicLibrary { +public: + virtual ~DynamicLibrary() = default; + + /// @return Pointer to function "name", or NULL on failure. + virtual Function FindFunction(const char *name) = 0; + + /// @return true if the library was loaded successfully. + virtual bool IsValid() = 0; + + /// @return An instance of a DynamicLibrary subclass with "modulePath" loaded. + static DynamicLibrary *Load(const char *modulePath); +}; + +#if defined(__clang__) +# if __has_feature(attribute_analyzer_noreturn) +# define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +# else +# define CLANG_ANALYZER_NORETURN +# endif +#else +# define CLANG_ANALYZER_NORETURN +#endif + +/** + * Platform class used to retrieve system wide parameters such as double click speed + * and chrome colour. Not a creatable object, more of a module with several functions. + */ +class Platform { +public: + Platform() = default; + Platform(const Platform &) = delete; + Platform(Platform &&) = delete; + Platform &operator=(const Platform &) = delete; + Platform &operator=(Platform &&) = delete; + ~Platform() = default; + static ColourDesired Chrome(); + static ColourDesired ChromeHighlight(); + static const char *DefaultFont(); + static int DefaultFontSize(); + static unsigned int DoubleClickTime(); + static void DebugDisplay(const char *s); + static constexpr long LongFromTwoShorts(short a,short b) noexcept { + return (a) | ((b) << 16); + } + + static void DebugPrintf(const char *format, ...); + static bool ShowAssertionPopUps(bool assertionPopUps_); + static void Assert(const char *c, const char *file, int line) CLANG_ANALYZER_NORETURN; +}; + +#ifdef NDEBUG +#define PLATFORM_ASSERT(c) ((void)0) +#else +#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__)) +#endif + +} + +#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/include/SciLexer.h b/3rdparty/unioncode-qscintilla214/scintilla/include/SciLexer.h similarity index 89% rename from 3rdparty/unioncode-scintilla515/lexilla/include/SciLexer.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/SciLexer.h index e30987b40..0335bf4dd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/include/SciLexer.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/SciLexer.h @@ -138,18 +138,7 @@ #define SCLEX_MAXIMA 123 #define SCLEX_STATA 124 #define SCLEX_SAS 125 -#define SCLEX_NIM 126 -#define SCLEX_CIL 127 -#define SCLEX_X12 128 -#define SCLEX_DATAFLEX 129 -#define SCLEX_HOLLYWOOD 130 -#define SCLEX_RAKU 131 -#define SCLEX_FSHARP 132 -#define SCLEX_JULIA 133 -#define SCLEX_ASCIIDOC 134 -#define SCLEX_GDSCRIPT 135 -#define SCLEX_JAVA 136 -#define SCLEX_JAVANOCASE 137 +#define SCLEX_LPEG 999 #define SCLEX_AUTOMATIC 1000 #define SCE_P_DEFAULT 0 #define SCE_P_COMMENTLINE 1 @@ -199,34 +188,6 @@ #define SCE_C_USERLITERAL 25 #define SCE_C_TASKMARKER 26 #define SCE_C_ESCAPESEQUENCE 27 -#define SCE_JAVA_DEFAULT 0 -#define SCE_JAVA_COMMENT 1 -#define SCE_JAVA_COMMENTLINE 2 -#define SCE_JAVA_COMMENTDOC 3 -#define SCE_JAVA_NUMBER 4 -#define SCE_JAVA_WORD 5 -#define SCE_JAVA_STRING 6 -#define SCE_JAVA_CHARACTER 7 -#define SCE_JAVA_UUID 8 -#define SCE_JAVA_PREPROCESSOR 9 -#define SCE_JAVA_OPERATOR 10 -#define SCE_JAVA_IDENTIFIER 11 -#define SCE_JAVA_STRINGEOL 12 -#define SCE_JAVA_VERBATIM 13 -#define SCE_JAVA_REGEX 14 -#define SCE_JAVA_COMMENTLINEDOC 15 -#define SCE_JAVA_WORD2 16 -#define SCE_JAVA_COMMENTDOCKEYWORD 17 -#define SCE_JAVA_COMMENTDOCKEYWORDERROR 18 -#define SCE_JAVA_GLOBALCLASS 19 -#define SCE_JAVA_STRINGRAW 20 -#define SCE_JAVA_TRIPLEVERBATIM 21 -#define SCE_JAVA_HASHQUOTEDSTRING 22 -#define SCE_JAVA_PREPROCESSORCOMMENT 23 -#define SCE_JAVA_PREPROCESSORCOMMENTDOC 24 -#define SCE_JAVA_USERLITERAL 25 -#define SCE_JAVA_TASKMARKER 26 -#define SCE_JAVA_ESCAPESEQUENCE 27 #define SCE_D_DEFAULT 0 #define SCE_D_COMMENT 1 #define SCE_D_COMMENTLINE 2 @@ -550,7 +511,6 @@ #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 @@ -797,7 +757,7 @@ #define SCE_CSS_EXTENDED_IDENTIFIER 19 #define SCE_CSS_EXTENDED_PSEUDOCLASS 20 #define SCE_CSS_EXTENDED_PSEUDOELEMENT 21 -#define SCE_CSS_GROUP_RULE 22 +#define SCE_CSS_MEDIA 22 #define SCE_CSS_VARIABLE 23 #define SCE_POV_DEFAULT 0 #define SCE_POV_COMMENT 1 @@ -965,28 +925,6 @@ #define SCE_ERLANG_MODULES 23 #define SCE_ERLANG_MODULES_ATT 24 #define SCE_ERLANG_UNKNOWN 31 -#define SCE_JULIA_DEFAULT 0 -#define SCE_JULIA_COMMENT 1 -#define SCE_JULIA_NUMBER 2 -#define SCE_JULIA_KEYWORD1 3 -#define SCE_JULIA_KEYWORD2 4 -#define SCE_JULIA_KEYWORD3 5 -#define SCE_JULIA_CHAR 6 -#define SCE_JULIA_OPERATOR 7 -#define SCE_JULIA_BRACKET 8 -#define SCE_JULIA_IDENTIFIER 9 -#define SCE_JULIA_STRING 10 -#define SCE_JULIA_SYMBOL 11 -#define SCE_JULIA_MACRO 12 -#define SCE_JULIA_STRINGINTERP 13 -#define SCE_JULIA_DOCSTRING 14 -#define SCE_JULIA_STRINGLITERAL 15 -#define SCE_JULIA_COMMAND 16 -#define SCE_JULIA_COMMANDLITERAL 17 -#define SCE_JULIA_TYPEANNOT 18 -#define SCE_JULIA_LEXERROR 19 -#define SCE_JULIA_KEYWORD4 20 -#define SCE_JULIA_TYPEOPERATOR 21 #define SCE_MSSQL_DEFAULT 0 #define SCE_MSSQL_COMMENT 1 #define SCE_MSSQL_LINE_COMMENT 2 @@ -1918,162 +1856,6 @@ #define SCE_SAS_BLOCK_KEYWORD 13 #define SCE_SAS_MACRO_FUNCTION 14 #define SCE_SAS_STATEMENT 15 -#define SCE_NIM_DEFAULT 0 -#define SCE_NIM_COMMENT 1 -#define SCE_NIM_COMMENTDOC 2 -#define SCE_NIM_COMMENTLINE 3 -#define SCE_NIM_COMMENTLINEDOC 4 -#define SCE_NIM_NUMBER 5 -#define SCE_NIM_STRING 6 -#define SCE_NIM_CHARACTER 7 -#define SCE_NIM_WORD 8 -#define SCE_NIM_TRIPLE 9 -#define SCE_NIM_TRIPLEDOUBLE 10 -#define SCE_NIM_BACKTICKS 11 -#define SCE_NIM_FUNCNAME 12 -#define SCE_NIM_STRINGEOL 13 -#define SCE_NIM_NUMERROR 14 -#define SCE_NIM_OPERATOR 15 -#define SCE_NIM_IDENTIFIER 16 -#define SCE_CIL_DEFAULT 0 -#define SCE_CIL_COMMENT 1 -#define SCE_CIL_COMMENTLINE 2 -#define SCE_CIL_WORD 3 -#define SCE_CIL_WORD2 4 -#define SCE_CIL_WORD3 5 -#define SCE_CIL_STRING 6 -#define SCE_CIL_LABEL 7 -#define SCE_CIL_OPERATOR 8 -#define SCE_CIL_IDENTIFIER 9 -#define SCE_CIL_STRINGEOL 10 -#define SCE_X12_DEFAULT 0 -#define SCE_X12_BAD 1 -#define SCE_X12_ENVELOPE 2 -#define SCE_X12_FUNCTIONGROUP 3 -#define SCE_X12_TRANSACTIONSET 4 -#define SCE_X12_SEGMENTHEADER 5 -#define SCE_X12_SEGMENTEND 6 -#define SCE_X12_SEP_ELEMENT 7 -#define SCE_X12_SEP_SUBELEMENT 8 -#define SCE_DF_DEFAULT 0 -#define SCE_DF_IDENTIFIER 1 -#define SCE_DF_METATAG 2 -#define SCE_DF_IMAGE 3 -#define SCE_DF_COMMENTLINE 4 -#define SCE_DF_PREPROCESSOR 5 -#define SCE_DF_PREPROCESSOR2 6 -#define SCE_DF_NUMBER 7 -#define SCE_DF_HEXNUMBER 8 -#define SCE_DF_WORD 9 -#define SCE_DF_STRING 10 -#define SCE_DF_STRINGEOL 11 -#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 -#define SCE_FSHARP_DEFAULT 0 -#define SCE_FSHARP_KEYWORD 1 -#define SCE_FSHARP_KEYWORD2 2 -#define SCE_FSHARP_KEYWORD3 3 -#define SCE_FSHARP_KEYWORD4 4 -#define SCE_FSHARP_KEYWORD5 5 -#define SCE_FSHARP_IDENTIFIER 6 -#define SCE_FSHARP_QUOT_IDENTIFIER 7 -#define SCE_FSHARP_COMMENT 8 -#define SCE_FSHARP_COMMENTLINE 9 -#define SCE_FSHARP_PREPROCESSOR 10 -#define SCE_FSHARP_LINENUM 11 -#define SCE_FSHARP_OPERATOR 12 -#define SCE_FSHARP_NUMBER 13 -#define SCE_FSHARP_CHARACTER 14 -#define SCE_FSHARP_STRING 15 -#define SCE_FSHARP_VERBATIM 16 -#define SCE_FSHARP_QUOTATION 17 -#define SCE_FSHARP_ATTRIBUTE 18 -#define SCE_FSHARP_FORMAT_SPEC 19 -#define SCE_ASCIIDOC_DEFAULT 0 -#define SCE_ASCIIDOC_STRONG1 1 -#define SCE_ASCIIDOC_STRONG2 2 -#define SCE_ASCIIDOC_EM1 3 -#define SCE_ASCIIDOC_EM2 4 -#define SCE_ASCIIDOC_HEADER1 5 -#define SCE_ASCIIDOC_HEADER2 6 -#define SCE_ASCIIDOC_HEADER3 7 -#define SCE_ASCIIDOC_HEADER4 8 -#define SCE_ASCIIDOC_HEADER5 9 -#define SCE_ASCIIDOC_HEADER6 10 -#define SCE_ASCIIDOC_ULIST_ITEM 11 -#define SCE_ASCIIDOC_OLIST_ITEM 12 -#define SCE_ASCIIDOC_BLOCKQUOTE 13 -#define SCE_ASCIIDOC_LINK 14 -#define SCE_ASCIIDOC_CODEBK 15 -#define SCE_ASCIIDOC_PASSBK 16 -#define SCE_ASCIIDOC_COMMENT 17 -#define SCE_ASCIIDOC_COMMENTBK 18 -#define SCE_ASCIIDOC_LITERAL 19 -#define SCE_ASCIIDOC_LITERALBK 20 -#define SCE_ASCIIDOC_ATTRIB 21 -#define SCE_ASCIIDOC_ATTRIBVAL 22 -#define SCE_ASCIIDOC_MACRO 23 -#define SCE_GD_DEFAULT 0 -#define SCE_GD_COMMENTLINE 1 -#define SCE_GD_NUMBER 2 -#define SCE_GD_STRING 3 -#define SCE_GD_CHARACTER 4 -#define SCE_GD_WORD 5 -#define SCE_GD_TRIPLE 6 -#define SCE_GD_TRIPLEDOUBLE 7 -#define SCE_GD_CLASSNAME 8 -#define SCE_GD_FUNCNAME 9 -#define SCE_GD_OPERATOR 10 -#define SCE_GD_IDENTIFIER 11 -#define SCE_GD_COMMENTBLOCK 12 -#define SCE_GD_STRINGEOL 13 -#define SCE_GD_WORD2 14 -#define SCE_GD_ANNOTATION 15 /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ #endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/Sci_Position.h b/3rdparty/unioncode-qscintilla214/scintilla/include/Sci_Position.h similarity index 100% rename from 3rdparty/unioncode-scintilla515/scintilla/include/Sci_Position.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/Sci_Position.h diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.h b/3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.h similarity index 88% rename from 3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.h index b46e886b6..298103cea 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.h @@ -20,6 +20,7 @@ extern "C" { int Scintilla_RegisterClasses(void *hInstance); int Scintilla_ReleaseResources(void); #endif +int Scintilla_LinkLexers(void); #ifdef __cplusplus } @@ -36,9 +37,6 @@ typedef intptr_t sptr_t; #include "Sci_Position.h" typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam); -typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus); - -#ifndef SCI_DISABLE_AUTOGENERATED /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ #define INVALID_POSITION -1 @@ -65,8 +63,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -97,26 +93,15 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 #define SC_CP_UTF8 65001 #define SCI_SETCODEPAGE 2037 -#define SCI_SETFONTLOCALE 2760 -#define SCI_GETFONTLOCALE 2761 #define SC_IME_WINDOWED 0 #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 @@ -150,7 +135,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_MARK_UNDERLINE 29 #define SC_MARK_RGBAIMAGE 30 #define SC_MARK_BOOKMARK 31 -#define SC_MARK_VERTICALBOOKMARK 32 #define SC_MARK_CHARACTER 10000 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 @@ -164,10 +148,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_MARKERSETFORE 2041 #define SCI_MARKERSETBACK 2042 #define SCI_MARKERSETBACKSELECTED 2292 -#define SCI_MARKERSETFORETRANSLUCENT 2294 -#define SCI_MARKERSETBACKTRANSLUCENT 2295 -#define SCI_MARKERSETBACKSELECTEDTRANSLUCENT 2296 -#define SCI_MARKERSETSTROKEWIDTH 2297 #define SCI_MARKERENABLEHIGHLIGHT 2293 #define SCI_MARKERADD 2043 #define SCI_MARKERDELETE 2044 @@ -178,8 +158,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_MARKERDEFINEPIXMAP 2049 #define SCI_MARKERADDSET 2466 #define SCI_MARKERSETALPHA 2476 -#define SCI_MARKERGETLAYER 2734 -#define SCI_MARKERSETLAYER 2735 #define SC_MAX_MARGIN 4 #define SC_MARGIN_SYMBOL 0 #define SC_MARGIN_NUMBER 1 @@ -272,50 +250,12 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_STYLEGETWEIGHT 2064 #define SCI_STYLESETCHARACTERSET 2066 #define SCI_STYLESETHOTSPOT 2409 -#define SCI_STYLESETCHECKMONOSPACED 2254 -#define SCI_STYLEGETCHECKMONOSPACED 2255 -#define SC_ELEMENT_LIST 0 -#define SC_ELEMENT_LIST_BACK 1 -#define SC_ELEMENT_LIST_SELECTED 2 -#define SC_ELEMENT_LIST_SELECTED_BACK 3 -#define SC_ELEMENT_SELECTION_TEXT 10 -#define SC_ELEMENT_SELECTION_BACK 11 -#define SC_ELEMENT_SELECTION_ADDITIONAL_TEXT 12 -#define SC_ELEMENT_SELECTION_ADDITIONAL_BACK 13 -#define SC_ELEMENT_SELECTION_SECONDARY_TEXT 14 -#define SC_ELEMENT_SELECTION_SECONDARY_BACK 15 -#define SC_ELEMENT_SELECTION_INACTIVE_TEXT 16 -#define SC_ELEMENT_SELECTION_INACTIVE_BACK 17 -#define SC_ELEMENT_CARET 40 -#define SC_ELEMENT_CARET_ADDITIONAL 41 -#define SC_ELEMENT_CARET_LINE_BACK 50 -#define SC_ELEMENT_WHITE_SPACE 60 -#define SC_ELEMENT_WHITE_SPACE_BACK 61 -#define SC_ELEMENT_HOT_SPOT_ACTIVE 70 -#define SC_ELEMENT_HOT_SPOT_ACTIVE_BACK 71 -#define SC_ELEMENT_FOLD_LINE 80 -#define SC_ELEMENT_HIDDEN_LINE 81 -#define SCI_SETELEMENTCOLOUR 2753 -#define SCI_GETELEMENTCOLOUR 2754 -#define SCI_RESETELEMENTCOLOUR 2755 -#define SCI_GETELEMENTISSET 2756 -#define SCI_GETELEMENTALLOWSTRANSLUCENT 2757 -#define SCI_GETELEMENTBASECOLOUR 2758 #define SCI_SETSELFORE 2067 #define SCI_SETSELBACK 2068 #define SCI_GETSELALPHA 2477 #define SCI_SETSELALPHA 2478 #define SCI_GETSELEOLFILLED 2479 #define SCI_SETSELEOLFILLED 2480 -#define SC_LAYER_BASE 0 -#define SC_LAYER_UNDER_TEXT 1 -#define SC_LAYER_OVER_TEXT 2 -#define SCI_GETSELECTIONLAYER 2762 -#define SCI_SETSELECTIONLAYER 2763 -#define SCI_GETCARETLINELAYER 2764 -#define SCI_SETCARETLINELAYER 2765 -#define SCI_GETCARETLINEHIGHLIGHTSUBLINE 2773 -#define SCI_SETCARETLINEHIGHLIGHTSUBLINE 2774 #define SCI_SETCARETFORE 2069 #define SCI_ASSIGNCMDKEY 2070 #define SCI_CLEARCMDKEY 2071 @@ -326,8 +266,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_SETCARETPERIOD 2076 #define SCI_SETWORDCHARS 2077 #define SCI_GETWORDCHARS 2646 -#define SCI_SETCHARACTERCATEGORYOPTIMIZATION 2720 -#define SCI_GETCHARACTERCATEGORYOPTIMIZATION 2721 #define SCI_BEGINUNDOACTION 2078 #define SCI_ENDUNDOACTION 2079 #define INDIC_PLAIN 0 @@ -352,14 +290,14 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define INDIC_POINTCHARACTER 19 #define INDIC_GRADIENT 20 #define INDIC_GRADIENTCENTRE 21 -#define INDIC_CONTAINER 8 #define INDIC_IME 32 #define INDIC_IME_MAX 35 #define INDIC_MAX 35 -#define INDICATOR_CONTAINER 8 -#define INDICATOR_IME 32 -#define INDICATOR_IME_MAX 35 -#define INDICATOR_MAX 35 +#define INDIC_CONTAINER 8 +#define INDIC0_MASK 0x20 +#define INDIC1_MASK 0x40 +#define INDIC2_MASK 0x80 +#define INDICS_MASK 0xE0 #define SCI_INDICSETSTYLE 2080 #define SCI_INDICGETSTYLE 2081 #define SCI_INDICSETFORE 2082 @@ -372,12 +310,9 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_INDICGETHOVERFORE 2683 #define SC_INDICVALUEBIT 0x1000000 #define SC_INDICVALUEMASK 0xFFFFFF -#define SC_INDICFLAG_NONE 0 #define SC_INDICFLAG_VALUEFORE 1 #define SCI_INDICSETFLAGS 2684 #define SCI_INDICGETFLAGS 2685 -#define SCI_INDICSETSTROKEWIDTH 2751 -#define SCI_INDICGETSTROKEWIDTH 2752 #define SCI_SETWHITESPACEFORE 2084 #define SCI_SETWHITESPACEBACK 2085 #define SCI_SETWHITESPACESIZE 2086 @@ -411,10 +346,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_USERLISTSHOW 2117 #define SCI_AUTOCSETAUTOHIDE 2118 #define SCI_AUTOCGETAUTOHIDE 2119 -#define SC_AUTOCOMPLETE_NORMAL 0 -#define SC_AUTOCOMPLETE_FIXED_SIZE 1 -#define SCI_AUTOCSETOPTIONS 2638 -#define SCI_AUTOCGETOPTIONS 2639 #define SCI_AUTOCSETDROPRESTOFWORD 2270 #define SCI_AUTOCGETDROPRESTOFWORD 2271 #define SCI_REGISTERIMAGE 2405 @@ -465,7 +396,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_PRINT_SCREENCOLOURS 5 #define SCI_SETPRINTCOLOURMODE 2148 #define SCI_GETPRINTCOLOURMODE 2149 -#define SCFIND_NONE 0x0 #define SCFIND_WHOLEWORD 0x2 #define SCFIND_MATCHCASE 0x4 #define SCFIND_WORDSTART 0x00100000 @@ -477,7 +407,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_GETFIRSTVISIBLELINE 2152 #define SCI_GETLINE 2153 #define SCI_GETLINECOUNT 2154 -#define SCI_ALLOCATELINES 2089 #define SCI_SETMARGINLEFT 2155 #define SCI_GETMARGINLEFT 2156 #define SCI_SETMARGINRIGHT 2157 @@ -509,7 +438,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_GETTEXT 2182 #define SCI_GETTEXTLENGTH 2183 #define SCI_GETDIRECTFUNCTION 2184 -#define SCI_GETDIRECTSTATUSFUNCTION 2772 #define SCI_GETDIRECTPOINTER 2185 #define SCI_SETOVERTYPE 2186 #define SCI_GETOVERTYPE 2187 @@ -517,12 +445,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -546,7 +470,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_VISIBLEFROMDOCLINE 2220 #define SCI_DOCLINEFROMVISIBLE 2221 #define SCI_WRAPCOUNT 2235 -#define SC_FOLDLEVELNONE 0x0 #define SC_FOLDLEVELBASE 0x400 #define SC_FOLDLEVELWHITEFLAG 0x1000 #define SC_FOLDLEVELHEADERFLAG 0x2000 @@ -567,9 +490,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_FOLDDISPLAYTEXT_STANDARD 1 #define SC_FOLDDISPLAYTEXT_BOXED 2 #define SCI_FOLDDISPLAYTEXTSETSTYLE 2701 -#define SCI_FOLDDISPLAYTEXTGETSTYLE 2707 -#define SCI_SETDEFAULTFOLDDISPLAYTEXT 2722 -#define SCI_GETDEFAULTFOLDDISPLAYTEXT 2723 #define SC_FOLDACTION_CONTRACT 0 #define SC_FOLDACTION_EXPAND 1 #define SC_FOLDACTION_TOGGLE 2 @@ -578,13 +498,11 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_EXPANDCHILDREN 2239 #define SCI_FOLDALL 2662 #define SCI_ENSUREVISIBLE 2232 -#define SC_AUTOMATICFOLD_NONE 0x0000 #define SC_AUTOMATICFOLD_SHOW 0x0001 #define SC_AUTOMATICFOLD_CLICK 0x0002 #define SC_AUTOMATICFOLD_CHANGE 0x0004 #define SCI_SETAUTOMATICFOLD 2663 #define SCI_GETAUTOMATICFOLD 2664 -#define SC_FOLDFLAG_NONE 0x0000 #define SC_FOLDFLAG_LINEBEFORE_EXPANDED 0x0002 #define SC_FOLDFLAG_LINEBEFORE_CONTRACTED 0x0004 #define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008 @@ -651,6 +569,8 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_SETVSCROLLBAR 2280 #define SCI_GETVSCROLLBAR 2281 #define SCI_APPENDTEXT 2282 +#define SCI_GETTWOPHASEDRAW 2283 +#define SCI_SETTWOPHASEDRAW 2284 #define SC_PHASES_ONE 0 #define SC_PHASES_TWO 1 #define SC_PHASES_MULTIPLE 2 @@ -743,7 +663,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -761,7 +680,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -796,6 +714,10 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -890,26 +812,23 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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_REPLACERECTANGULAR 2771 #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 #define CARETSTYLE_LINE 1 #define CARETSTYLE_BLOCK 2 -#define CARETSTYLE_OVERSTRIKE_BAR 0 -#define CARETSTYLE_OVERSTRIKE_BLOCK 0x10 -#define CARETSTYLE_CURSES 0x20 -#define CARETSTYLE_INS_MASK 0xF -#define CARETSTYLE_BLOCK_AFTER 0x100 #define SCI_SETCARETSTYLE 2512 #define SCI_GETCARETSTYLE 2513 #define SCI_SETINDICATORCURRENT 2500 @@ -968,7 +887,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_ANNOTATIONGETSTYLEOFFSET 2551 #define SCI_RELEASEALLEXTENDEDSTYLES 2552 #define SCI_ALLOCATEEXTENDEDSTYLES 2553 -#define UNDO_NONE 0 #define UNDO_MAY_COALESCE 1 #define SCI_ADDUNDOACTION 2560 #define SCI_CHARPOSITIONFROMPOINT 2561 @@ -1001,9 +919,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 @@ -1067,56 +983,16 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCI_SETREPRESENTATION 2665 #define SCI_GETREPRESENTATION 2666 #define SCI_CLEARREPRESENTATION 2667 -#define SCI_CLEARALLREPRESENTATIONS 2770 -#define SC_REPRESENTATION_PLAIN 0 -#define SC_REPRESENTATION_BLOB 1 -#define SC_REPRESENTATION_COLOUR 0x10 -#define SCI_SETREPRESENTATIONAPPEARANCE 2766 -#define SCI_GETREPRESENTATIONAPPEARANCE 2767 -#define SCI_SETREPRESENTATIONCOLOUR 2768 -#define SCI_GETREPRESENTATIONCOLOUR 2769 -#define SCI_EOLANNOTATIONSETTEXT 2740 -#define SCI_EOLANNOTATIONGETTEXT 2741 -#define SCI_EOLANNOTATIONSETSTYLE 2742 -#define SCI_EOLANNOTATIONGETSTYLE 2743 -#define SCI_EOLANNOTATIONCLEARALL 2744 -#define EOLANNOTATION_HIDDEN 0x0 -#define EOLANNOTATION_STANDARD 0x1 -#define EOLANNOTATION_BOXED 0x2 -#define EOLANNOTATION_STADIUM 0x100 -#define EOLANNOTATION_FLAT_CIRCLE 0x101 -#define EOLANNOTATION_ANGLE_CIRCLE 0x102 -#define EOLANNOTATION_CIRCLE_FLAT 0x110 -#define EOLANNOTATION_FLATS 0x111 -#define EOLANNOTATION_ANGLE_FLAT 0x112 -#define EOLANNOTATION_CIRCLE_ANGLE 0x120 -#define EOLANNOTATION_FLAT_ANGLE 0x121 -#define EOLANNOTATION_ANGLES 0x122 -#define SCI_EOLANNOTATIONSETVISIBLE 2745 -#define SCI_EOLANNOTATIONGETVISIBLE 2746 -#define SCI_EOLANNOTATIONSETSTYLEOFFSET 2747 -#define SCI_EOLANNOTATIONGETSTYLEOFFSET 2748 -#define SC_SUPPORTS_LINE_DRAWS_FINAL 0 -#define SC_SUPPORTS_PIXEL_DIVISIONS 1 -#define SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH 2 -#define SC_SUPPORTS_TRANSLUCENT_STROKE 3 -#define SC_SUPPORTS_PIXEL_MODIFICATION 4 -#define SCI_SUPPORTSFEATURE 2750 -#define SC_LINECHARACTERINDEX_NONE 0 -#define SC_LINECHARACTERINDEX_UTF32 1 -#define SC_LINECHARACTERINDEX_UTF16 2 -#define SCI_GETLINECHARACTERINDEX 2710 -#define SCI_ALLOCATELINECHARACTERINDEX 2711 -#define SCI_RELEASELINECHARACTERINDEX 2712 -#define SCI_LINEFROMINDEXPOSITION 2713 -#define SCI_INDEXPOSITIONFROMLINE 2714 #define SCI_STARTRECORD 3001 #define SCI_STOPRECORD 3002 +#define SCI_SETLEXER 4001 #define SCI_GETLEXER 4002 #define SCI_COLOURISE 4003 #define SCI_SETPROPERTY 4004 #define KEYWORDSET_MAX 8 #define SCI_SETKEYWORDS 4005 +#define SCI_SETLEXERLANGUAGE 4006 +#define SCI_LOADLEXERLIBRARY 4007 #define SCI_GETPROPERTY 4008 #define SCI_GETPROPERTYEXPANDED 4009 #define SCI_GETPROPERTYINT 4010 @@ -1143,8 +1019,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #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 #define SC_MOD_CHANGESTYLE 0x4 @@ -1167,9 +1041,7 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_MOD_LEXERSTATE 0x80000 #define SC_MOD_INSERTCHECK 0x100000 #define SC_MOD_CHANGETABSTOPS 0x200000 -#define SC_MOD_CHANGEEOLANNOTATION 0x400000 -#define SC_MODEVENTMASKALL 0x7FFFFF -#define SC_UPDATE_NONE 0x0 +#define SC_MODEVENTMASKALL 0x3FFFFF #define SC_UPDATE_CONTENT 0x1 #define SC_UPDATE_SELECTION 0x2 #define SC_UPDATE_V_SCROLL 0x4 @@ -1208,9 +1080,6 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SC_AC_TAB 3 #define SC_AC_NEWLINE 4 #define SC_AC_COMMAND 5 -#define SC_CHARACTERSOURCE_DIRECT_INPUT 0 -#define SC_CHARACTERSOURCE_TENTATIVE_INPUT 1 -#define SC_CHARACTERSOURCE_IME_RESULT 2 #define SCN_STYLENEEDED 2000 #define SCN_CHARADDED 2001 #define SCN_SAVEPOINTREACHED 2002 @@ -1244,16 +1113,17 @@ typedef sptr_t (*SciFnDirectStatus)(sptr_t ptr, unsigned int iMessage, uptr_t wP #define SCN_MARGINRIGHTCLICK 2031 #define SCN_AUTOCSELECTIONCHANGE 2032 #ifndef SCI_DISABLE_PROVISIONAL -#define SC_BIDIRECTIONAL_DISABLED 0 -#define SC_BIDIRECTIONAL_L2R 1 -#define SC_BIDIRECTIONAL_R2L 2 -#define SCI_GETBIDIRECTIONAL 2708 -#define SCI_SETBIDIRECTIONAL 2709 +#define SC_LINECHARACTERINDEX_NONE 0 +#define SC_LINECHARACTERINDEX_UTF32 1 +#define SC_LINECHARACTERINDEX_UTF16 2 +#define SCI_GETLINECHARACTERINDEX 2710 +#define SCI_ALLOCATELINECHARACTERINDEX 2711 +#define SCI_RELEASELINECHARACTERINDEX 2712 +#define SCI_LINEFROMINDEXPOSITION 2713 +#define SCI_INDEXPOSITIONFROMLINE 2714 #endif /* --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. */ @@ -1347,7 +1217,6 @@ struct SCNotification { int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION, */ - int characterSource; /* SCN_CHARADDED */ }; #ifdef INCLUDE_DEPRECATED_FEATURES @@ -1355,9 +1224,6 @@ struct SCNotification { #define SCI_SETKEYSUNICODE 2521 #define SCI_GETKEYSUNICODE 2522 -#define SCI_GETTWOPHASEDRAW 2283 -#define SCI_SETTWOPHASEDRAW 2284 - #define CharacterRange Sci_CharacterRange #define TextRange Sci_TextRange #define TextToFind Sci_TextToFind @@ -1368,11 +1234,6 @@ struct SCNotification { #define SCI_GETSTYLEBITS 2091 #define SCI_GETSTYLEBITSNEEDED 4011 -#define INDIC0_MASK 0x20 -#define INDIC1_MASK 0x40 -#define INDIC2_MASK 0x80 -#define INDICS_MASK 0xE0 - #endif #endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.iface b/3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.iface similarity index 57% rename from 3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.iface rename to 3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.iface index f2ef2d33e..0281f92f5 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/include/Scintilla.iface +++ b/3rdparty/unioncode-qscintilla214/scintilla/include/Scintilla.iface @@ -10,7 +10,7 @@ ## A line starting with # followed by a space is a documentation comment and refers ## to the next feature definition. -## Each feature is defined by a line starting with fun, get, set, val, evt, enu, lex, or ali. +## Each feature is defined by a line starting with fun, get, set, val or evt. ## cat -> start a category ## fun -> a function ## get -> a property get function @@ -19,7 +19,6 @@ ## evt -> an event ## enu -> associate an enumeration with a set of vals with a prefix ## lex -> associate a lexer with the lexical classes it produces -## ali -> add an alias for a val, commonly adding '_' to separate words ## ## All other feature names should be ignored. They may be defined in the future. ## A property may have a set function, a get function or both. Each will have @@ -47,23 +46,19 @@ ## to enu. The name may not be the same as that used within the lexer so the lexerVal ## should be used to tie these entities together. -## Types: Never start with a capital letter +## Types: ## void ## int ## bool -> integer, 1=true, 0=false -## position -> intptr_t position in a document -## line -> intptr_t line in a document -## colour -> colour integer containing red, green, and blue bytes with red as least-significant and blue as most. -## colouralpha -> colour integer containing red, green, blue, and alpha bytes with red as least-significant and alpha as most. +## position -> integer position in a document +## colour -> colour integer containing red, green and blue bytes. ## string -> pointer to const character ## stringresult -> pointer to character, NULL-> return size of result ## cells -> pointer to array of cells, each cell containing a style byte and character byte -## pointer -> void* pointer that may point to a document, loader, internal text storage or similar ## textrange -> range of a min and a max position with an output string ## findtext -> searchrange, text -> foundposition ## keymod -> integer containing key in low half and modifiers in high half ## formatrange -## Enumeration types always start with a capital letter ## Types no longer used: ## findtextex -> searchrange ## charrange -> range of a min and a max position @@ -95,28 +90,28 @@ val SCI_OPTIONAL_START=3000 val SCI_LEXER_START=4000 # Add text to the document at current position. -fun void AddText=2001(position length, string text) +fun void AddText=2001(int length, string text) # Add array of cells to document. -fun void AddStyledText=2002(position length, cells c) +fun void AddStyledText=2002(int length, cells c) # Insert string at a position. fun void InsertText=2003(position pos, string text) # Change the text that is being inserted in response to SC_MOD_INSERTCHECK -fun void ChangeInsertion=2672(position length, string text) +fun void ChangeInsertion=2672(int length, string text) # Delete all text in the document. fun void ClearAll=2004(,) # Delete a range of text in the document. -fun void DeleteRange=2645(position start, position lengthDelete) +fun void DeleteRange=2645(position start, int lengthDelete) # Set all style bytes to 0, remove all folding information. fun void ClearDocumentStyle=2005(,) # Returns the number of bytes in the document. -get position GetLength=2006(,) +get int GetLength=2006(,) # Returns the character byte at the position. get int GetCharAt=2007(position pos,) @@ -146,23 +141,17 @@ fun void SetSavePoint=2014(,) # Retrieve a buffer of cells. # Returns the number of bytes in the buffer not including terminating NULs. -fun position GetStyledText=2015(, textrange tr) +fun int GetStyledText=2015(, textrange tr) # Are there any redoable actions in the undo history? fun bool CanRedo=2016(,) # Retrieve the line number at which a particular marker is located. -fun line MarkerLineFromHandle=2017(int markerHandle,) +fun int 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(,) @@ -172,30 +161,23 @@ val SCWS_VISIBLEALWAYS=1 val SCWS_VISIBLEAFTERINDENT=2 val SCWS_VISIBLEONLYININDENT=3 -ali SCWS_VISIBLEALWAYS=VISIBLE_ALWAYS -ali SCWS_VISIBLEAFTERINDENT=VISIBLE_AFTER_INDENT -ali SCWS_VISIBLEONLYININDENT=VISIBLE_ONLY_IN_INDENT - # Are white space characters currently visible? # Returns one of SCWS_* constants. -get WhiteSpace GetViewWS=2020(,) +get int GetViewWS=2020(,) # Make white space characters invisible, always visible or visible outside indentation. -set void SetViewWS=2021(WhiteSpace viewWS,) +set void SetViewWS=2021(int viewWS,) enu TabDrawMode=SCTD_ val SCTD_LONGARROW=0 val SCTD_STRIKEOUT=1 -ali SCTD_LONGARROW=LONG_ARROW -ali SCTD_STRIKEOUT=STRIKE_OUT - # Retrieve the current tab draw mode. # Returns one of SCTD_* constants. -get TabDrawMode GetTabDrawMode=2698(,) +get int GetTabDrawMode=2698(,) # Set how tabs are drawn when visible. -set void SetTabDrawMode=2699(TabDrawMode tabDrawMode,) +set void SetTabDrawMode=2699(int tabDrawMode,) # Find the position from a point within the window. fun position PositionFromPoint=2022(int x, int y) @@ -205,7 +187,7 @@ fun position PositionFromPoint=2022(int x, int y) fun position PositionFromPointClose=2023(int x, int y) # Set caret to start of a line and ensure it is visible. -fun void GotoLine=2024(line line,) +fun void GotoLine=2024(int line,) # Set caret to a position and ensure it is visible. fun void GotoPos=2025(position caret,) @@ -217,7 +199,7 @@ set void SetAnchor=2026(position anchor,) # Retrieve the text of the line containing the caret. # Returns the index of the caret on the line. # Result is NUL-terminated. -fun position GetCurLine=2027(position length, stringresult text) +fun int GetCurLine=2027(int length, stringresult text) # Retrieve the position of the last correctly styled character. get position GetEndStyled=2028(,) @@ -227,16 +209,14 @@ val SC_EOL_CRLF=0 val SC_EOL_CR=1 val SC_EOL_LF=2 -ali SC_EOL_CRLF=CR_LF - # Convert all line endings in the document to one mode. -fun void ConvertEOLs=2029(EndOfLine eolMode,) +fun void ConvertEOLs=2029(int eolMode,) # Retrieve the current end of line mode - one of CRLF, CR, or LF. -get EndOfLine GetEOLMode=2030(,) +get int GetEOLMode=2030(,) # Set the current end of line mode. -set void SetEOLMode=2031(EndOfLine eolMode,) +set void SetEOLMode=2031(int eolMode,) # Set the current styling position to start. # The unused parameter is no longer used and should be set to 0. @@ -244,7 +224,7 @@ fun void StartStyling=2032(position start, int unused) # Change style from current styling position for length characters to a style # and move the current styling position to after this newly styled segment. -fun void SetStyling=2033(position length, int style) +fun void SetStyling=2033(int length, int style) # Is drawing done first into a buffer or direct to the screen? get bool GetBufferedDraw=2034(,) @@ -259,20 +239,14 @@ 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,) +fun void ClearTabStops=2675(int line,) # Add an explicit tab stop for a line. -fun void AddTabStop=2676(line line, int x) +fun void AddTabStop=2676(int line, int x) # Find the next explicit tab stop position on a line after a position. -fun int GetNextTabStop=2677(line line, int x) +fun int GetNextTabStop=2677(int line, int x) # The SC_CP_UTF8 value can be used to enter Unicode mode. # This is the same value as CP_UTF8 in Windows @@ -282,36 +256,15 @@ val SC_CP_UTF8=65001 # The SC_CP_UTF8 value can be used to enter Unicode mode. set void SetCodePage=2037(int codePage,) -# Set the locale for displaying text. -set void SetFontLocale=2760(, string localeName) - -# Get the locale for displaying text. -get int GetFontLocale=2761(, stringresult localeName) - enu IMEInteraction=SC_IME_ val SC_IME_WINDOWED=0 val SC_IME_INLINE=1 # Is the IME displayed in a window or inline? -get IMEInteraction GetIMEInteraction=2678(,) +get int GetIMEInteraction=2678(,) -# 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 +# Choose to display the the IME in a winow or inline. +set void SetIMEInteraction=2679(int imeInteraction,) enu MarkerSymbol=SC_MARK_ val MARKER_MAX=31 @@ -351,33 +304,9 @@ val SC_MARK_AVAILABLE=28 val SC_MARK_UNDERLINE=29 val SC_MARK_RGBAIMAGE=30 val SC_MARK_BOOKMARK=31 -val SC_MARK_VERTICALBOOKMARK=32 val SC_MARK_CHARACTER=10000 -ali SC_MARK_ROUNDRECT=ROUND_RECT -ali SC_MARK_SMALLRECT=SMALL_RECT -ali SC_MARK_SHORTARROW=SHORT_ARROW -ali SC_MARK_ARROWDOWN=ARROW_DOWN -ali SC_MARK_VLINE=V_LINE -ali SC_MARK_LCORNER=L_CORNER -ali SC_MARK_TCORNER=T_CORNER -ali SC_MARK_BOXPLUS=BOX_PLUS -ali SC_MARK_BOXPLUSCONNECTED=BOX_PLUS_CONNECTED -ali SC_MARK_BOXMINUS=BOX_MINUS -ali SC_MARK_BOXMINUSCONNECTED=BOX_MINUS_CONNECTED -ali SC_MARK_LCORNERCURVE=L_CORNER_CURVE -ali SC_MARK_TCORNERCURVE=T_CORNER_CURVE -ali SC_MARK_CIRCLEPLUS=CIRCLE_PLUS -ali SC_MARK_CIRCLEPLUSCONNECTED=CIRCLE_PLUS_CONNECTED -ali SC_MARK_CIRCLEMINUS=CIRCLE_MINUS -ali SC_MARK_CIRCLEMINUSCONNECTED=CIRCLE_MINUS_CONNECTED -ali SC_MARK_DOTDOTDOT=DOT_DOT_DOT -ali SC_MARK_FULLRECT=FULL_RECT -ali SC_MARK_LEFTRECT=LEFT_RECT -ali SC_MARK_RGBAIMAGE=RGBA_IMAGE -ali SC_MARK_VERTICALBOOKMARK=VERTICAL_BOOKMARK - enu MarkerOutline=SC_MARKNUM_ # Markers used for outlining column. val SC_MARKNUM_FOLDEREND=25 @@ -388,18 +317,10 @@ val SC_MARKNUM_FOLDERSUB=29 val SC_MARKNUM_FOLDER=30 val SC_MARKNUM_FOLDEROPEN=31 -ali SC_MARKNUM_FOLDEREND=FOLDER_END -ali SC_MARKNUM_FOLDEROPENMID=FOLDER_OPEN_MID -ali SC_MARKNUM_FOLDERMIDTAIL=FOLDER_MID_TAIL -ali SC_MARKNUM_FOLDERTAIL=FOLDER_TAIL -ali SC_MARKNUM_FOLDERSUB=FOLDER_SUB -ali SC_MARKNUM_FOLDEROPEN=FOLDER_OPEN - -# SC_MASK_FOLDERS doesn't go in an enumeration as larger than max 32-bit positive integer val SC_MASK_FOLDERS=0xFE000000 # Set the symbol used for a particular marker number. -fun void MarkerDefine=2040(int markerNumber, MarkerSymbol markerSymbol) +fun void MarkerDefine=2040(int markerNumber, int markerSymbol) # Set the foreground colour used for a particular marker number. set void MarkerSetFore=2041(int markerNumber, colour fore) @@ -410,54 +331,36 @@ 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) -# Set the foreground colour used for a particular marker number. -set void MarkerSetForeTranslucent=2294(int markerNumber, colouralpha fore) - -# Set the background colour used for a particular marker number. -set void MarkerSetBackTranslucent=2295(int markerNumber, colouralpha back) - -# Set the background colour used for a particular marker number when its folding block is selected. -set void MarkerSetBackSelectedTranslucent=2296(int markerNumber, colouralpha back) - -# Set the width of strokes used in .01 pixels so 50 = 1/2 pixel width. -set void MarkerSetStrokeWidth=2297(int markerNumber, int hundredths) - -# Enable/disable highlight for current folding block (smallest one that contains the caret) +# Enable/disable highlight for current folding bloc (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. -fun int MarkerAdd=2043(line line, int markerNumber) +fun int MarkerAdd=2043(int line, int markerNumber) # Delete a marker from a line. -fun void MarkerDelete=2044(line line, int markerNumber) +fun void MarkerDelete=2044(int line, int markerNumber) # Delete all markers with a particular number from all lines. fun void MarkerDeleteAll=2045(int markerNumber,) # Get a bit mask of all the markers set on a line. -fun int MarkerGet=2046(line line,) +fun int MarkerGet=2046(int line,) # Find the next line at or after lineStart that includes a marker in mask. # Return -1 when no more lines. -fun line MarkerNext=2047(line lineStart, int markerMask) +fun int MarkerNext=2047(int lineStart, int markerMask) # Find the previous line before lineStart that includes a marker in mask. -fun line MarkerPrevious=2048(line lineStart, int markerMask) +fun int MarkerPrevious=2048(int lineStart, int markerMask) # Define a marker from a pixmap. fun void MarkerDefinePixmap=2049(int markerNumber, string pixmap) # Add a set of markers to a line. -fun void MarkerAddSet=2466(line line, int markerSet) +fun void MarkerAddSet=2466(int line, int markerSet) # Set the alpha used for a marker that is drawn in the text area, not the margin. -set void MarkerSetAlpha=2476(int markerNumber, Alpha alpha) - -# Get the layer used for a marker that is drawn in the text area, not the margin. -get Layer MarkerGetLayer=2734(int markerNumber,) - -# Set the layer used for a marker that is drawn in the text area, not the margin. -set void MarkerSetLayer=2735(int markerNumber, Layer layer) +set void MarkerSetAlpha=2476(int markerNumber, int alpha) val SC_MAX_MARGIN=4 @@ -470,13 +373,11 @@ val SC_MARGIN_TEXT=4 val SC_MARGIN_RTEXT=5 val SC_MARGIN_COLOUR=6 -ali SC_MARGIN_RTEXT=R_TEXT - # Set a margin to be either numeric or symbolic. -set void SetMarginTypeN=2240(int margin, MarginType marginType) +set void SetMarginTypeN=2240(int margin, int marginType) # Retrieve the type of a margin. -get MarginType GetMarginTypeN=2241(int margin,) +get int GetMarginTypeN=2241(int margin,) # Set the width of a margin to a width expressed in pixels. set void SetMarginWidthN=2242(int margin, int pixelWidth) @@ -497,10 +398,10 @@ set void SetMarginSensitiveN=2246(int margin, bool sensitive) get bool GetMarginSensitiveN=2247(int margin,) # Set the cursor shown when the mouse is inside a margin. -set void SetMarginCursorN=2248(int margin, CursorShape cursor) +set void SetMarginCursorN=2248(int margin, int cursor) # Retrieve the cursor shown in a margin. -get CursorShape GetMarginCursorN=2249(int margin,) +get int GetMarginCursorN=2249(int margin,) # Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. set void SetMarginBackN=2250(int margin, colour back) @@ -527,15 +428,6 @@ val STYLE_FOLDDISPLAYTEXT=39 val STYLE_LASTPREDEFINED=39 val STYLE_MAX=255 -ali STYLE_LINENUMBER=LINE_NUMBER -ali STYLE_BRACELIGHT=BRACE_LIGHT -ali STYLE_BRACEBAD=BRACE_BAD -ali STYLE_CONTROLCHAR=CONTROL_CHAR -ali STYLE_INDENTGUIDE=INDENT_GUIDE -ali STYLE_CALLTIP=CALL_TIP -ali STYLE_FOLDDISPLAYTEXT=FOLD_DISPLAY_TEXT -ali STYLE_LASTPREDEFINED=LAST_PREDEFINED - # Character set identifiers are used in StyleSetCharacterSet. # The values are the same as the Windows *_CHARSET values. enu CharacterSet=SC_CHARSET_ @@ -562,13 +454,6 @@ val SC_CHARSET_VIETNAMESE=163 val SC_CHARSET_THAI=222 val SC_CHARSET_8859_15=1000 -ali SC_CHARSET_CHINESEBIG5=CHINESE_BIG5 -ali SC_CHARSET_EASTEUROPE=EAST_EUROPE -ali SC_CHARSET_GB2312=G_B_2312 -ali SC_CHARSET_OEM866=OEM_866 -ali SC_CHARSET_SHIFTJIS=SHIFT_JIS -ali SC_CHARSET_8859_15=ISO_8859_15 - # Clear all the styles and make equivalent to the global default style. fun void StyleClearAll=2050(,) @@ -632,10 +517,10 @@ get bool StyleGetEOLFilled=2487(int style,) get bool StyleGetUnderline=2488(int style,) # Get is a style mixed case, or to force upper or lower case. -get CaseVisible StyleGetCase=2489(int style,) +get int StyleGetCase=2489(int style,) # Get the character get of the font in a style. -get CharacterSet StyleGetCharacterSet=2490(int style,) +get int StyleGetCharacterSet=2490(int style,) # Get is a style visible or not. get bool StyleGetVisible=2491(int style,) @@ -648,7 +533,7 @@ get bool StyleGetChangeable=2492(int style,) get bool StyleGetHotSpot=2493(int style,) # Set a style to be mixed case, or to force upper or lower case. -set void StyleSetCase=2060(int style, CaseVisible caseVisible) +set void StyleSetCase=2060(int style, int caseVisible) val SC_FONT_SIZE_MULTIPLIER=100 @@ -663,69 +548,18 @@ val SC_WEIGHT_NORMAL=400 val SC_WEIGHT_SEMIBOLD=600 val SC_WEIGHT_BOLD=700 -ali SC_WEIGHT_SEMIBOLD=SEMI_BOLD - # Set the weight of characters of a style. -set void StyleSetWeight=2063(int style, FontWeight weight) +set void StyleSetWeight=2063(int style, int weight) # Get the weight of characters of a style. -get FontWeight StyleGetWeight=2064(int style,) +get int StyleGetWeight=2064(int style,) # Set the character set of the font in a style. -set void StyleSetCharacterSet=2066(int style, CharacterSet characterSet) +set void StyleSetCharacterSet=2066(int style, int characterSet) # Set a style to be a hotspot or not. set void StyleSetHotSpot=2409(int style, bool hotspot) -# Indicate that a style may be monospaced over ASCII graphics characters which enables optimizations. -set void StyleSetCheckMonospaced=2254(int style, bool checkMonospaced) - -# Get whether a style may be monospaced. -get bool StyleGetCheckMonospaced=2255(int style,) - -enu Element=SC_ELEMENT_ -val SC_ELEMENT_LIST=0 -val SC_ELEMENT_LIST_BACK=1 -val SC_ELEMENT_LIST_SELECTED=2 -val SC_ELEMENT_LIST_SELECTED_BACK=3 -val SC_ELEMENT_SELECTION_TEXT=10 -val SC_ELEMENT_SELECTION_BACK=11 -val SC_ELEMENT_SELECTION_ADDITIONAL_TEXT=12 -val SC_ELEMENT_SELECTION_ADDITIONAL_BACK=13 -val SC_ELEMENT_SELECTION_SECONDARY_TEXT=14 -val SC_ELEMENT_SELECTION_SECONDARY_BACK=15 -val SC_ELEMENT_SELECTION_INACTIVE_TEXT=16 -val SC_ELEMENT_SELECTION_INACTIVE_BACK=17 -val SC_ELEMENT_CARET=40 -val SC_ELEMENT_CARET_ADDITIONAL=41 -val SC_ELEMENT_CARET_LINE_BACK=50 -val SC_ELEMENT_WHITE_SPACE=60 -val SC_ELEMENT_WHITE_SPACE_BACK=61 -val SC_ELEMENT_HOT_SPOT_ACTIVE=70 -val SC_ELEMENT_HOT_SPOT_ACTIVE_BACK=71 -val SC_ELEMENT_FOLD_LINE=80 -val SC_ELEMENT_HIDDEN_LINE=81 - -# Set the colour of an element. Translucency (alpha) may or may not be significant -# and this may depend on the platform. The alpha byte should commonly be 0xff for opaque. -set void SetElementColour=2753(Element element, colouralpha colourElement) - -# Get the colour of an element. -get colouralpha GetElementColour=2754(Element element,) - -# Use the default or platform-defined colour for an element. -fun void ResetElementColour=2755(Element element,) - -# Get whether an element has been set by SetElementColour. -# When false, a platform-defined or default colour is used. -get bool GetElementIsSet=2756(Element element,) - -# Get whether an element supports translucency. -get bool GetElementAllowsTranslucent=2757(Element element,) - -# Get the colour of an element. -get colouralpha GetElementBaseColour=2758(Element element,) - # Set the foreground colour of the main and additional selections and whether to use this setting. fun void SetSelFore=2067(bool useSetting, colour fore) @@ -733,10 +567,10 @@ fun void SetSelFore=2067(bool useSetting, colour fore) fun void SetSelBack=2068(bool useSetting, colour back) # Get the alpha of the selection. -get Alpha GetSelAlpha=2477(,) +get int GetSelAlpha=2477(,) # Set the alpha of the selection. -set void SetSelAlpha=2478(Alpha alpha,) +set void SetSelAlpha=2478(int alpha,) # Is the selection end of line filled? get bool GetSelEOLFilled=2479(,) @@ -744,29 +578,6 @@ get bool GetSelEOLFilled=2479(,) # Set the selection to have its end of line filled or not. set void SetSelEOLFilled=2480(bool filled,) -enu Layer=SC_LAYER_ -val SC_LAYER_BASE=0 -val SC_LAYER_UNDER_TEXT=1 -val SC_LAYER_OVER_TEXT=2 - -# Get the layer for drawing selections -get Layer GetSelectionLayer=2762(,) - -# Set the layer for drawing selections: either opaquely on base layer or translucently over text -set void SetSelectionLayer=2763(Layer layer,) - -# Get the layer of the background of the line containing the caret. -get Layer GetCaretLineLayer=2764(,) - -# Set the layer of the background of the line containing the caret. -set void SetCaretLineLayer=2765(Layer layer,) - -# Get only highlighting subline instead of whole line. -get bool GetCaretLineHighlightSubLine=2773(,) - -# Set only highlighting subline instead of whole line. -set void SetCaretLineHighlightSubLine=2774(bool subLine,) - # Set the foreground colour of the caret. set void SetCaretFore=2069(colour fore,) @@ -780,7 +591,7 @@ fun void ClearCmdKey=2071(keymod keyDefinition,) fun void ClearAllCmdKeys=2072(,) # Set the styles for a segment of the document. -fun void SetStylingEx=2073(position length, string styles) +fun void SetStylingEx=2073(int length, string styles) # Set a style to be visible or not. set void StyleSetVisible=2074(int style, bool visible) @@ -799,12 +610,6 @@ set void SetWordChars=2077(, string characters) # Returns the number of characters get int GetWordChars=2646(, stringresult characters) -# Set the number of characters to have directly indexed categories -set void SetCharacterCategoryOptimization=2720(int countCharacters,) - -# Get the number of characters to have directly indexed categories -get int GetCharacterCategoryOptimization=2721(,) - # Start a sequence of actions that is undone and redone as a unit. # May be nested. fun void BeginUndoAction=2078(,) @@ -836,39 +641,20 @@ val INDIC_POINT=18 val INDIC_POINTCHARACTER=19 val INDIC_GRADIENT=20 val INDIC_GRADIENTCENTRE=21 - -# INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX are indicator numbers, -# not IndicatorStyles so should not really be in the INDIC_ enumeration. -# They are redeclared in IndicatorNumbers INDICATOR_. -val INDIC_CONTAINER=8 val INDIC_IME=32 val INDIC_IME_MAX=35 val INDIC_MAX=35 - -enu IndicatorNumbers=INDICATOR_ -val INDICATOR_CONTAINER=8 -val INDICATOR_IME=32 -val INDICATOR_IME_MAX=35 -val INDICATOR_MAX=35 - -ali INDIC_TT=T_T -ali INDIC_ROUNDBOX=ROUND_BOX -ali INDIC_STRAIGHTBOX=STRAIGHT_BOX -ali INDIC_SQUIGGLELOW=SQUIGGLE_LOW -ali INDIC_DOTBOX=DOT_BOX -ali INDIC_SQUIGGLEPIXMAP=SQUIGGLE_PIXMAP -ali INDIC_COMPOSITIONTHICK=COMPOSITION_THICK -ali INDIC_COMPOSITIONTHIN=COMPOSITION_THIN -ali INDIC_FULLBOX=FULL_BOX -ali INDIC_TEXTFORE=TEXT_FORE -ali INDIC_POINTCHARACTER=POINT_CHARACTER -ali INDIC_GRADIENTCENTRE=GRADIENT_CENTRE +val INDIC_CONTAINER=8 +val INDIC0_MASK=0x20 +val INDIC1_MASK=0x40 +val INDIC2_MASK=0x80 +val INDICS_MASK=0xE0 # Set an indicator to plain, squiggle or TT. -set void IndicSetStyle=2080(int indicator, IndicatorStyle indicatorStyle) +set void IndicSetStyle=2080(int indicator, int indicatorStyle) # Retrieve the style of an indicator. -get IndicatorStyle IndicGetStyle=2081(int indicator,) +get int IndicGetStyle=2081(int indicator,) # Set the foreground colour of an indicator. set void IndicSetFore=2082(int indicator, colour fore) @@ -883,10 +669,10 @@ set void IndicSetUnder=2510(int indicator, bool under) get bool IndicGetUnder=2511(int indicator,) # Set a hover indicator to plain, squiggle or TT. -set void IndicSetHoverStyle=2680(int indicator, IndicatorStyle indicatorStyle) +set void IndicSetHoverStyle=2680(int indicator, int indicatorStyle) # Retrieve the hover style of an indicator. -get IndicatorStyle IndicGetHoverStyle=2681(int indicator,) +get int IndicGetHoverStyle=2681(int indicator,) # Set the foreground hover colour of an indicator. set void IndicSetHoverFore=2682(int indicator, colour fore) @@ -894,27 +680,17 @@ set void IndicSetHoverFore=2682(int indicator, colour fore) # Retrieve the foreground hover colour of an indicator. get colour IndicGetHoverFore=2683(int indicator,) -enu IndicValue=SC_INDICVALUE val SC_INDICVALUEBIT=0x1000000 val SC_INDICVALUEMASK=0xFFFFFF enu IndicFlag=SC_INDICFLAG_ -val SC_INDICFLAG_NONE=0 val SC_INDICFLAG_VALUEFORE=1 -ali SC_INDICFLAG_VALUEFORE=VALUE_FORE - # Set the attributes of an indicator. -set void IndicSetFlags=2684(int indicator, IndicFlag flags) +set void IndicSetFlags=2684(int indicator, int flags) # Retrieve the attributes of an indicator. -get IndicFlag IndicGetFlags=2685(int indicator,) - -# Set the stroke width of an indicator in hundredths of a pixel. -set void IndicSetStrokeWidth=2751(int indicator, int hundredths) - -# Retrieve the stroke width of an indicator. -get int IndicGetStrokeWidth=2752(int indicator,) +get int IndicGetFlags=2685(int indicator,) # Set the foreground colour of all whitespace and whether to use this setting. fun void SetWhitespaceFore=2084(bool useSetting, colour fore) @@ -929,10 +705,10 @@ set void SetWhitespaceSize=2086(int size,) get int GetWhitespaceSize=2087(,) # Used to hold extra styling information for each line. -set void SetLineState=2092(line line, int state) +set void SetLineState=2092(int line, int state) # Retrieve the extra styling information for a line. -get int GetLineState=2093(line line,) +get int GetLineState=2093(int line,) # Retrieve the last line number that has line state. get int GetMaxLineState=2094(,) @@ -964,7 +740,7 @@ set void StyleSetChangeable=2099(int style, bool changeable) # Display a auto-completion list. # The lengthEntered parameter indicates how many characters before # the caret should be used to provide context. -fun void AutoCShow=2100(position lengthEntered, string itemList) +fun void AutoCShow=2100(int lengthEntered, string itemList) # Remove the auto-completion list from the screen. fun void AutoCCancel=2101(,) @@ -1023,18 +799,6 @@ set void AutoCSetAutoHide=2118(bool autoHide,) # Retrieve whether or not autocompletion is hidden automatically when nothing matches. get bool AutoCGetAutoHide=2119(,) -# Define option flags for autocompletion lists -enu AutoCompleteOption=SC_AUTOCOMPLETE_ -val SC_AUTOCOMPLETE_NORMAL=0 -# Win32 specific: -val SC_AUTOCOMPLETE_FIXED_SIZE=1 - -# Set autocompletion options. -set void AutoCSetOptions=2638(AutoCompleteOption options,) - -# Retrieve autocompletion options. -get AutoCompleteOption AutoCGetOptions=2639(,) - # Set whether or not autocompletion deletes any word characters # after the inserted text upon completion. set void AutoCSetDropRestOfWord=2270(bool dropRestOfWord,) @@ -1084,22 +848,22 @@ set void SetUseTabs=2124(bool useTabs,) get bool GetUseTabs=2125(,) # Change the indentation of a line to a number of columns. -set void SetLineIndentation=2126(line line, int indentation) +set void SetLineIndentation=2126(int line, int indentation) # Retrieve the number of columns that a line is indented. -get int GetLineIndentation=2127(line line,) +get int GetLineIndentation=2127(int line,) # Retrieve the position before the first non indentation character on a line. -get position GetLineIndentPosition=2128(line line,) +get position GetLineIndentPosition=2128(int line,) # Retrieve the column number of a position, taking tab width into account. -get position GetColumn=2129(position pos,) +get int GetColumn=2129(position pos,) # Count characters between two positions. -fun position CountCharacters=2633(position start, position end) +fun int CountCharacters=2633(position start, position end) # Count code units between two positions. -fun position CountCodeUnits=2715(position start, position end) +fun int CountCodeUnits=2715(position start, position end) # Show or hide the horizontal scroll bar. set void SetHScrollBar=2130(bool visible,) @@ -1112,24 +876,21 @@ val SC_IV_REAL=1 val SC_IV_LOOKFORWARD=2 val SC_IV_LOOKBOTH=3 -ali SC_IV_LOOKFORWARD=LOOK_FORWARD -ali SC_IV_LOOKBOTH=LOOK_BOTH - # Show or hide indentation guides. -set void SetIndentationGuides=2132(IndentView indentView,) +set void SetIndentationGuides=2132(int indentView,) # Are the indentation guides visible? -get IndentView GetIndentationGuides=2133(,) +get int GetIndentationGuides=2133(,) # Set the highlighted indentation guide column. # 0 = no highlighted guide. -set void SetHighlightGuide=2134(position column,) +set void SetHighlightGuide=2134(int column,) # Get the highlighted indentation guide column. -get position GetHighlightGuide=2135(,) +get int GetHighlightGuide=2135(,) # Get the position after the last visible characters on a line. -get position GetLineEndPosition=2136(line line,) +get position GetLineEndPosition=2136(int line,) # Get the code page used to interpret the bytes of the document as characters. get int GetCodePage=2137(,) @@ -1179,20 +940,13 @@ val SC_PRINT_COLOURONWHITEDEFAULTBG=4 # PrintColourMode - use same colours as screen, including line number margins. val SC_PRINT_SCREENCOLOURS=5 -ali SC_PRINT_INVERTLIGHT=INVERT_LIGHT -ali SC_PRINT_BLACKONWHITE=BLACK_ON_WHITE -ali SC_PRINT_COLOURONWHITE=COLOUR_ON_WHITE -ali SC_PRINT_COLOURONWHITEDEFAULTBG=COLOUR_ON_WHITE_DEFAULT_B_G -ali SC_PRINT_SCREENCOLOURS=SCREEN_COLOURS - # Modify colours when printing for clearer printed text. -set void SetPrintColourMode=2148(PrintOption mode,) +set void SetPrintColourMode=2148(int mode,) # Returns the print colour mode. -get PrintOption GetPrintColourMode=2149(,) +get int GetPrintColourMode=2149(,) enu FindOption=SCFIND_ -val SCFIND_NONE=0x0 val SCFIND_WHOLEWORD=0x2 val SCFIND_MATCHCASE=0x4 val SCFIND_WORDSTART=0x00100000 @@ -1200,30 +954,21 @@ val SCFIND_REGEXP=0x00200000 val SCFIND_POSIX=0x00400000 val SCFIND_CXX11REGEX=0x00800000 -ali SCFIND_WHOLEWORD=WHOLE_WORD -ali SCFIND_MATCHCASE=MATCH_CASE -ali SCFIND_WORDSTART=WORD_START -ali SCFIND_REGEXP=REG_EXP -ali SCFIND_CXX11REGEX=CXX11_REG_EX - # Find some text in the document. -fun position FindText=2150(FindOption searchFlags, findtext ft) +fun position FindText=2150(int searchFlags, findtext ft) # On Windows, will draw the document into a display context such as a printer. fun position FormatRange=2151(bool draw, formatrange fr) # Retrieve the display line at the top of the display. -get line GetFirstVisibleLine=2152(,) +get int GetFirstVisibleLine=2152(,) # Retrieve the contents of a line. # Returns the length of the line. -fun position GetLine=2153(line line, stringresult text) +fun int GetLine=2153(int line, stringresult text) # Returns the number of lines in the document. There is always at least one. -get line GetLineCount=2154(,) - -# Enlarge the number of lines allocated. -set void AllocateLines=2089(line lines,) +get int GetLineCount=2154(,) # Sets the size in pixels of the left margin. set void SetMarginLeft=2155(, int pixelWidth) @@ -1246,11 +991,11 @@ fun void SetSel=2160(position anchor, position caret) # Retrieve the selected text. # Return the length of the text. # Result is NUL-terminated. -fun position GetSelText=2161(, stringresult text) +fun int GetSelText=2161(, stringresult text) # Retrieve a range of text. # Return the length of the text. -fun position GetTextRange=2162(, textrange tr) +fun int GetTextRange=2162(, textrange tr) # Draw the selection either highlighted or in normal (non-highlighted) style. fun void HideSelection=2163(bool hide,) @@ -1262,13 +1007,13 @@ fun int PointXFromPosition=2164(, position pos) fun int PointYFromPosition=2165(, position pos) # Retrieve the line containing a position. -fun line LineFromPosition=2166(position pos,) +fun int LineFromPosition=2166(position pos,) # Retrieve the position at the start of a line. -fun position PositionFromLine=2167(line line,) +fun position PositionFromLine=2167(int line,) # Scroll horizontally and vertically. -fun void LineScroll=2168(position columns, line lines) +fun void LineScroll=2168(int columns, int lines) # Ensure the caret is visible. fun void ScrollCaret=2169(,) @@ -1317,20 +1062,17 @@ fun void SetText=2181(, string text) # Retrieve all the text in the document. # Returns number of characters retrieved. # Result is NUL-terminated. -fun position GetText=2182(position length, stringresult text) +fun int GetText=2182(int length, stringresult text) # Retrieve the number of characters in the document. -get position GetTextLength=2183(,) +get int GetTextLength=2183(,) # Retrieve a pointer to a function that processes messages for this Scintilla. -get pointer GetDirectFunction=2184(,) - -# Retrieve a pointer to a function that processes messages for this Scintilla and returns status. -get pointer GetDirectStatusFunction=2772(,) +get int GetDirectFunction=2184(,) # Retrieve a pointer value to use as the first argument when calling # the function returned by GetDirectFunction. -get pointer GetDirectPointer=2185(,) +get int GetDirectPointer=2185(,) # Set to overtype (true) or insert mode. set void SetOvertype=2186(bool overType,) @@ -1351,12 +1093,6 @@ 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,) @@ -1364,17 +1100,11 @@ 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) # Retrieve the text in the target. -get position GetTargetText=2687(, stringresult text) +get int GetTargetText=2687(, stringresult text) # Make the target range start and end be the same as the selection range start and end. fun void TargetFromSelection=2287(,) @@ -1385,7 +1115,7 @@ fun void TargetWholeDocument=2690(,) # Replace the target text with the argument text. # Text is counted so it can contain NULs. # Returns the length of the replacement text. -fun position ReplaceTarget=2194(position length, string text) +fun int ReplaceTarget=2194(int length, string text) # Replace the target text with the argument text after \d processing. # Text is counted so it can contain NULs. @@ -1393,18 +1123,18 @@ fun position ReplaceTarget=2194(position length, string text) # matched in the last search operation which were surrounded by \( and \). # Returns the length of the replacement text including any change # caused by processing the \d patterns. -fun position ReplaceTargetRE=2195(position length, string text) +fun int ReplaceTargetRE=2195(int length, string text) # Search for a counted string in the target and set the target to the found # range. Text is counted so it can contain NULs. -# Returns start of found range or -1 for failure in which case target is not moved. -fun position SearchInTarget=2197(position length, string text) +# Returns length of range or -1 for failure in which case target is not moved. +fun int SearchInTarget=2197(int length, string text) # Set the search flags used by SearchInTarget. -set void SetSearchFlags=2198(FindOption searchFlags,) +set void SetSearchFlags=2198(int searchFlags,) # Get the search flags used by SearchInTarget. -get FindOption GetSearchFlags=2199(,) +get int GetSearchFlags=2199(,) # Show a call tip containing a definition near position pos. fun void CallTipShow=2200(position pos, string definition) @@ -1419,10 +1149,10 @@ fun bool CallTipActive=2202(,) fun position CallTipPosStart=2203(,) # Set the start position in order to change when backspacing removes the calltip. -set void CallTipSetPosStart=2214(position posStart,) +set void CallTipSetPosStart=2214(int posStart,) # Highlight a segment of the definition. -fun void CallTipSetHlt=2204(position highlightStart, position highlightEnd) +fun void CallTipSetHlt=2204(int highlightStart, int highlightEnd) # Set the background colour for the call tip. set void CallTipSetBack=2205(colour back,) @@ -1440,79 +1170,65 @@ set void CallTipUseStyle=2212(int tabSize,) set void CallTipSetPosition=2213(bool above,) # Find the display line of a document line taking hidden lines into account. -fun line VisibleFromDocLine=2220(line docLine,) +fun int VisibleFromDocLine=2220(int docLine,) # Find the document line of a display line taking hidden lines into account. -fun line DocLineFromVisible=2221(line displayLine,) +fun int DocLineFromVisible=2221(int displayLine,) # The number of display lines needed to wrap a document line -fun line WrapCount=2235(line docLine,) +fun int WrapCount=2235(int docLine,) enu FoldLevel=SC_FOLDLEVEL -val SC_FOLDLEVELNONE=0x0 val SC_FOLDLEVELBASE=0x400 val SC_FOLDLEVELWHITEFLAG=0x1000 val SC_FOLDLEVELHEADERFLAG=0x2000 val SC_FOLDLEVELNUMBERMASK=0x0FFF -ali SC_FOLDLEVELWHITEFLAG=WHITE_FLAG -ali SC_FOLDLEVELHEADERFLAG=HEADER_FLAG -ali SC_FOLDLEVELNUMBERMASK=NUMBER_MASK - # Set the fold level of a line. # This encodes an integer level along with flags indicating whether the # line is a header and whether it is effectively white space. -set void SetFoldLevel=2222(line line, FoldLevel level) +set void SetFoldLevel=2222(int line, int level) # Retrieve the fold level of a line. -get FoldLevel GetFoldLevel=2223(line line,) +get int GetFoldLevel=2223(int line,) # Find the last child line of a header line. -get line GetLastChild=2224(line line, FoldLevel level) +get int GetLastChild=2224(int line, int level) # Find the parent line of a child line. -get line GetFoldParent=2225(line line,) +get int GetFoldParent=2225(int line,) # Make a range of lines visible. -fun void ShowLines=2226(line lineStart, line lineEnd) +fun void ShowLines=2226(int lineStart, int lineEnd) # Make a range of lines invisible. -fun void HideLines=2227(line lineStart, line lineEnd) +fun void HideLines=2227(int lineStart, int lineEnd) # Is a line visible? -get bool GetLineVisible=2228(line line,) +get bool GetLineVisible=2228(int line,) # Are all lines visible? get bool GetAllLinesVisible=2236(,) # Show the children of a header line. -set void SetFoldExpanded=2229(line line, bool expanded) +set void SetFoldExpanded=2229(int line, bool expanded) # Is a header line expanded? -get bool GetFoldExpanded=2230(line line,) +get bool GetFoldExpanded=2230(int line,) # Switch a header line between expanded and contracted. -fun void ToggleFold=2231(line line,) +fun void ToggleFold=2231(int line,) # Switch a header line between expanded and contracted and show some text after the line. -fun void ToggleFoldShowText=2700(line line, string text) +fun void ToggleFoldShowText=2700(int line, string text) enu FoldDisplayTextStyle=SC_FOLDDISPLAYTEXT_ val SC_FOLDDISPLAYTEXT_HIDDEN=0 val SC_FOLDDISPLAYTEXT_STANDARD=1 val SC_FOLDDISPLAYTEXT_BOXED=2 -# Set the style of fold display text. -set void FoldDisplayTextSetStyle=2701(FoldDisplayTextStyle style,) - -# Get the style of fold display text. -get FoldDisplayTextStyle FoldDisplayTextGetStyle=2707(,) - -# Set the default fold display text. -fun void SetDefaultFoldDisplayText=2722(, string text) - -# Get the default fold display text. -fun int GetDefaultFoldDisplayText=2723(, stringresult text) +# Set the style of fold display text +set void FoldDisplayTextSetStyle=2701(int style,) enu FoldAction=SC_FOLDACTION_ val SC_FOLDACTION_CONTRACT=0 @@ -1520,34 +1236,32 @@ val SC_FOLDACTION_EXPAND=1 val SC_FOLDACTION_TOGGLE=2 # Expand or contract a fold header. -fun void FoldLine=2237(line line, FoldAction action) +fun void FoldLine=2237(int line, int action) # Expand or contract a fold header and its children. -fun void FoldChildren=2238(line line, FoldAction action) +fun void FoldChildren=2238(int line, int action) # Expand a fold header and all children. Use the level argument instead of the line's current level. -fun void ExpandChildren=2239(line line, FoldLevel level) +fun void ExpandChildren=2239(int line, int level) # Expand or contract all fold headers. -fun void FoldAll=2662(FoldAction action,) +fun void FoldAll=2662(int action,) # Ensure a particular line is visible by expanding any header line hiding it. -fun void EnsureVisible=2232(line line,) +fun void EnsureVisible=2232(int line,) enu AutomaticFold=SC_AUTOMATICFOLD_ -val SC_AUTOMATICFOLD_NONE=0x0000 val SC_AUTOMATICFOLD_SHOW=0x0001 val SC_AUTOMATICFOLD_CLICK=0x0002 val SC_AUTOMATICFOLD_CHANGE=0x0004 # Set automatic folding behaviours. -set void SetAutomaticFold=2663(AutomaticFold automaticFold,) +set void SetAutomaticFold=2663(int automaticFold,) # Get automatic folding behaviours. -get AutomaticFold GetAutomaticFold=2664(,) +get int GetAutomaticFold=2664(,) enu FoldFlag=SC_FOLDFLAG_ -val SC_FOLDFLAG_NONE=0x0000 val SC_FOLDFLAG_LINEBEFORE_EXPANDED=0x0002 val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004 val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008 @@ -1555,19 +1269,12 @@ val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010 val SC_FOLDFLAG_LEVELNUMBERS=0x0040 val SC_FOLDFLAG_LINESTATE=0x0080 -ali SC_FOLDFLAG_LINEBEFORE_EXPANDED=LINE_BEFORE_EXPANDED -ali SC_FOLDFLAG_LINEBEFORE_CONTRACTED=LINE_BEFORE_CONTRACTED -ali SC_FOLDFLAG_LINEAFTER_EXPANDED=LINE_AFTER_EXPANDED -ali SC_FOLDFLAG_LINEAFTER_CONTRACTED=LINE_AFTER_CONTRACTED -ali SC_FOLDFLAG_LEVELNUMBERS=LEVEL_NUMBERS -ali SC_FOLDFLAG_LINESTATE=LINE_STATE - # Set some style options for folding. -set void SetFoldFlags=2233(FoldFlag flags,) +set void SetFoldFlags=2233(int flags,) # Ensure a particular line is visible by expanding any header line hiding it. # Use the currently set visibility policy to determine which range to display. -fun void EnsureVisibleEnforcePolicy=2234(line line,) +fun void EnsureVisibleEnforcePolicy=2234(int line,) # Sets whether a tab pressed when caret is within indentation indents. set void SetTabIndents=2260(bool tabIndents,) @@ -1590,10 +1297,10 @@ set void SetMouseDwellTime=2264(int periodMilliseconds,) get int GetMouseDwellTime=2265(,) # Get position of start of word. -fun position WordStartPosition=2266(position pos, bool onlyWordCharacters) +fun int WordStartPosition=2266(position pos, bool onlyWordCharacters) # Get position of end of word. -fun position WordEndPosition=2267(position pos, bool onlyWordCharacters) +fun int WordEndPosition=2267(position pos, bool onlyWordCharacters) # Is the range start..end considered a word? fun bool IsRangeWord=2691(position start, position end) @@ -1604,14 +1311,11 @@ val SC_IDLESTYLING_TOVISIBLE=1 val SC_IDLESTYLING_AFTERVISIBLE=2 val SC_IDLESTYLING_ALL=3 -ali SC_IDLESTYLING_TOVISIBLE=TO_VISIBLE -ali SC_IDLESTYLING_AFTERVISIBLE=AFTER_VISIBLE - # Sets limits to idle styling. -set void SetIdleStyling=2692(IdleStyling idleStyling,) +set void SetIdleStyling=2692(int idleStyling,) # Retrieve the limits to idle styling. -get IdleStyling GetIdleStyling=2693(,) +get int GetIdleStyling=2693(,) enu Wrap=SC_WRAP_ val SC_WRAP_NONE=0 @@ -1619,13 +1323,11 @@ val SC_WRAP_WORD=1 val SC_WRAP_CHAR=2 val SC_WRAP_WHITESPACE=3 -ali SC_WRAP_WHITESPACE=WHITE_SPACE - # Sets whether text is word wrapped. -set void SetWrapMode=2268(Wrap wrapMode,) +set void SetWrapMode=2268(int wrapMode,) # Retrieve whether text is word wrapped. -get Wrap GetWrapMode=2269(,) +get int GetWrapMode=2269(,) enu WrapVisualFlag=SC_WRAPVISUALFLAG_ val SC_WRAPVISUALFLAG_NONE=0x0000 @@ -1634,10 +1336,10 @@ val SC_WRAPVISUALFLAG_START=0x0002 val SC_WRAPVISUALFLAG_MARGIN=0x0004 # Set the display mode of visual flags for wrapped lines. -set void SetWrapVisualFlags=2460(WrapVisualFlag wrapVisualFlags,) +set void SetWrapVisualFlags=2460(int wrapVisualFlags,) # Retrive the display mode of visual flags for wrapped lines. -get WrapVisualFlag GetWrapVisualFlags=2461(,) +get int GetWrapVisualFlags=2461(,) enu WrapVisualLocation=SC_WRAPVISUALFLAGLOC_ val SC_WRAPVISUALFLAGLOC_DEFAULT=0x0000 @@ -1645,10 +1347,10 @@ val SC_WRAPVISUALFLAGLOC_END_BY_TEXT=0x0001 val SC_WRAPVISUALFLAGLOC_START_BY_TEXT=0x0002 # Set the location of visual flags for wrapped lines. -set void SetWrapVisualFlagsLocation=2462(WrapVisualLocation wrapVisualFlagsLocation,) +set void SetWrapVisualFlagsLocation=2462(int wrapVisualFlagsLocation,) # Retrive the location of visual flags for wrapped lines. -get WrapVisualLocation GetWrapVisualFlagsLocation=2463(,) +get int GetWrapVisualFlagsLocation=2463(,) # Set the start indent for wrapped lines. set void SetWrapStartIndent=2464(int indent,) @@ -1662,13 +1364,11 @@ val SC_WRAPINDENT_SAME=1 val SC_WRAPINDENT_INDENT=2 val SC_WRAPINDENT_DEEPINDENT=3 -ali SC_WRAPINDENT_DEEPINDENT=DEEP_INDENT - # Sets how wrapped sublines are placed. Default is fixed. -set void SetWrapIndentMode=2472(WrapIndentMode wrapIndentMode,) +set void SetWrapIndentMode=2472(int wrapIndentMode,) # Retrieve how wrapped sublines are placed. Default is fixed. -get WrapIndentMode GetWrapIndentMode=2473(,) +get int GetWrapIndentMode=2473(,) enu LineCache=SC_CACHE_ val SC_CACHE_NONE=0 @@ -1677,10 +1377,10 @@ val SC_CACHE_PAGE=2 val SC_CACHE_DOCUMENT=3 # Sets the degree of caching of layout information. -set void SetLayoutCache=2272(LineCache cacheMode,) +set void SetLayoutCache=2272(int cacheMode,) # Retrieve the degree of caching of layout information. -get LineCache GetLayoutCache=2273(,) +get int GetLayoutCache=2273(,) # Sets the document width assumed for scrolling. set void SetScrollWidth=2274(int pixelWidth,) @@ -1709,7 +1409,7 @@ set void SetEndAtLastLine=2277(bool endAtLastLine,) get bool GetEndAtLastLine=2278(,) # Retrieve the height of a particular line of text in pixels. -fun int TextHeight=2279(line line,) +fun int TextHeight=2279(int line,) # Show or hide the vertical scroll bar. set void SetVScrollBar=2280(bool visible,) @@ -1718,7 +1418,14 @@ set void SetVScrollBar=2280(bool visible,) get bool GetVScrollBar=2281(,) # Append a string to the end of the document without changing the selection. -fun void AppendText=2282(position length, string text) +fun void AppendText=2282(int length, string text) + +# Is drawing done in two phases with backgrounds drawn before foregrounds? +get bool GetTwoPhaseDraw=2283(,) + +# In twoPhaseDraw mode, drawing is performed in two phases, first the background +# and then the foreground. This avoids chopping off characters that overlap the next run. +set void SetTwoPhaseDraw=2284(bool twoPhase,) enu PhasesDraw=SC_PHASES_ val SC_PHASES_ONE=0 @@ -1726,13 +1433,13 @@ val SC_PHASES_TWO=1 val SC_PHASES_MULTIPLE=2 # How many phases is drawing done in? -get PhasesDraw GetPhasesDraw=2673(,) +get int GetPhasesDraw=2673(,) # In one phase draw, text is drawn in a series of rectangular blocks with no overlap. # In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. # In multiple phase draw, each element is drawn over the whole drawing area, allowing text # to overlap from one line to the next. -set void SetPhasesDraw=2674(PhasesDraw phases,) +set void SetPhasesDraw=2674(int phases,) # Control font anti-aliasing. @@ -1744,23 +1451,23 @@ val SC_EFF_QUALITY_ANTIALIASED=2 val SC_EFF_QUALITY_LCD_OPTIMIZED=3 # Choose the quality level for text from the FontQuality enumeration. -set void SetFontQuality=2611(FontQuality fontQuality,) +set void SetFontQuality=2611(int fontQuality,) # Retrieve the quality level for text. -get FontQuality GetFontQuality=2612(,) +get int GetFontQuality=2612(,) # Scroll so that a display line is at the top of the display. -set void SetFirstVisibleLine=2613(line displayLine,) +set void SetFirstVisibleLine=2613(int displayLine,) enu MultiPaste=SC_MULTIPASTE_ val SC_MULTIPASTE_ONCE=0 val SC_MULTIPASTE_EACH=1 # Change the effect of pasting when there are multiple selections. -set void SetMultiPaste=2614(MultiPaste multiPaste,) +set void SetMultiPaste=2614(int multiPaste,) # Retrieve the effect of pasting when there are multiple selections. -get MultiPaste GetMultiPaste=2615(,) +get int GetMultiPaste=2615(,) # Retrieve the value of a tag from a regular expression search. # Result is NUL-terminated. @@ -1783,10 +1490,10 @@ val SC_ACCESSIBILITY_DISABLED=0 val SC_ACCESSIBILITY_ENABLED=1 # Enable or disable accessibility. -set void SetAccessibility=2702(Accessibility accessibility,) +set void SetAccessibility=2702(int accessibility,) # Report accessibility status. -get Accessibility GetAccessibility=2703(,) +get int GetAccessibility=2703(,) ## New messages go here @@ -1983,7 +1690,7 @@ fun void LineCopy=2455(,) fun void MoveCaretInsideView=2401(,) # How many characters are on a line, including end of line characters? -fun position LineLength=2350(line line,) +fun int LineLength=2350(int line,) # Highlight the characters at two positions. fun void BraceHighlight=2351(position posA, position posB) @@ -2001,9 +1708,6 @@ 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(,) @@ -2011,13 +1715,13 @@ get bool GetViewEOL=2355(,) set void SetViewEOL=2356(bool visible,) # Retrieve a pointer to the document object. -get pointer GetDocPointer=2357(,) +get int GetDocPointer=2357(,) # Change the document object used. -set void SetDocPointer=2358(, pointer doc) +set void SetDocPointer=2358(, int doc) # Set which document modification events are sent to the container. -set void SetModEventMask=2359(ModificationFlags eventMask,) +set void SetModEventMask=2359(int eventMask,) enu EdgeVisualStyle=EDGE_ val EDGE_NONE=0 @@ -2025,21 +1729,19 @@ val EDGE_LINE=1 val EDGE_BACKGROUND=2 val EDGE_MULTILINE=3 -ali EDGE_MULTILINE=MULTI_LINE - # Retrieve the column number which text should be kept within. -get position GetEdgeColumn=2360(,) +get int GetEdgeColumn=2360(,) # Set the column number of the edge. # If text goes past the edge then it is highlighted. -set void SetEdgeColumn=2361(position column,) +set void SetEdgeColumn=2361(int column,) # Retrieve the edge highlight mode. -get EdgeVisualStyle GetEdgeMode=2362(,) +get int GetEdgeMode=2362(,) # The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that # goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). -set void SetEdgeMode=2363(EdgeVisualStyle edgeMode,) +set void SetEdgeMode=2363(int edgeMode,) # Retrieve the colour used in edge indication. get colour GetEdgeColour=2364(,) @@ -2048,27 +1750,24 @@ get colour GetEdgeColour=2364(,) set void SetEdgeColour=2365(colour edgeColour,) # Add a new vertical edge to the view. -fun void MultiEdgeAddLine=2694(position column, colour edgeColour) +fun void MultiEdgeAddLine=2694(int 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(,) # Find some text starting at the search anchor. # Does not ensure the selection is visible. -fun position SearchNext=2367(FindOption searchFlags, string text) +fun int SearchNext=2367(int searchFlags, string text) # Find some text starting at the search anchor and moving backwards. # Does not ensure the selection is visible. -fun position SearchPrev=2368(FindOption searchFlags, string text) +fun int SearchPrev=2368(int searchFlags, string text) # Retrieves the number of lines completely visible. -get line LinesOnScreen=2370(,) +get int LinesOnScreen=2370(,) enu PopUp=SC_POPUP_ val SC_POPUP_NEVER=0 @@ -2077,7 +1776,7 @@ val SC_POPUP_TEXT=2 # Set whether a pop up menu is displayed automatically when the user presses # the wrong mouse button on certain areas. -fun void UsePopUp=2371(PopUp popUpMode,) +fun void UsePopUp=2371(int popUpMode,) # Is the selection rectangular? The alternative is the more common stream selection. get bool SelectionIsRectangle=2372(,) @@ -2095,17 +1794,17 @@ val SC_DOCUMENTOPTION_TEXT_LARGE=0x100 # Create a new document object. # Starts with reference count of 1 and not selected into editor. -fun pointer CreateDocument=2375(position bytes, DocumentOption documentOptions) +fun int CreateDocument=2375(int bytes, int documentOptions) # Extend life of document. -fun void AddRefDocument=2376(, pointer doc) +fun void AddRefDocument=2376(, int doc) # Release a reference to the document, deleting document if it fades to black. -fun void ReleaseDocument=2377(, pointer doc) +fun void ReleaseDocument=2377(, int doc) # Get which document options are set. -get DocumentOption GetDocumentOptions=2379(,) +get int GetDocumentOptions=2379(,) # Get which document modification events are sent to the container. -get ModificationFlags GetModEventMask=2378(,) +get int GetModEventMask=2378(,) # Set whether command events are sent to the container. set void SetCommandEvents=2717(bool commandEvents,) @@ -2125,13 +1824,10 @@ val SC_STATUS_BADALLOC=2 val SC_STATUS_WARN_START=1000 val SC_STATUS_WARN_REGEX=1001 -ali SC_STATUS_BADALLOC=BAD_ALLOC -ali SC_STATUS_WARN_REGEX=REG_EX - # Change error status - 0 = OK. -set void SetStatus=2382(Status status,) +set void SetStatus=2382(int status,) # Get error status. -get Status GetStatus=2383(,) +get int GetStatus=2383(,) # Set whether the mouse is captured when its button is pressed. set void SetMouseDownCaptures=2384(bool captures,) @@ -2143,10 +1839,15 @@ 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 # Sets the cursor to one of the SC_CURSOR* values. -set void SetCursor=2386(CursorShape cursorType,) +set void SetCursor=2386(int cursorType,) # Get cursor type. -get CursorShape GetCursor=2387(,) +get int GetCursor=2387(,) # Change the way control characters are displayed: # If symbol is < 32, keep the drawn way, else, use the given character. @@ -2169,10 +1870,9 @@ 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) +fun void SetVisiblePolicy=2394(int visiblePolicy, int visibleSlop) # Delete back from the current position to the start of the line. fun void DelLineLeft=2395(,) @@ -2218,17 +1918,17 @@ val CARET_EVEN=0x08 # Set the way the caret is kept visible when going sideways. # The exclusion zone is given in pixels. -fun void SetXCaretPolicy=2402(CaretPolicy caretPolicy, int caretSlop) +fun void SetXCaretPolicy=2402(int caretPolicy, int caretSlop) # Set the way the line the caret is on is kept visible. # The exclusion zone is given in lines. -fun void SetYCaretPolicy=2403(CaretPolicy caretPolicy, int caretSlop) +fun void SetYCaretPolicy=2403(int caretPolicy, int caretSlop) # Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). -set void SetPrintWrapMode=2406(Wrap wrapMode,) +set void SetPrintWrapMode=2406(int wrapMode,) # Is printing line wrapped? -get Wrap GetPrintWrapMode=2407(,) +get int GetPrintWrapMode=2407(,) # Set a fore colour for active hotspots. set void SetHotspotActiveFore=2410(bool useSetting, colour fore) @@ -2256,13 +1956,10 @@ 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(,) @@ -2276,18 +1973,18 @@ fun position PositionAfter=2418(position pos,) # Given a valid document position, return a position that differs in a number # of characters. Returned value is always between 0 and last position in document. -fun position PositionRelative=2670(position pos, position relative) +fun position PositionRelative=2670(position pos, int relative) # Given a valid document position, return a position that differs in a number # of UTF-16 code units. Returned value is always between 0 and last position in document. # The result may point half way (2 bytes) inside a non-BMP character. -fun position PositionRelativeCodeUnits=2716(position pos, position relative) +fun position PositionRelativeCodeUnits=2716(position pos, int relative) # Copy a range of text to the clipboard. Positions are clipped into the document. fun void CopyRange=2419(position start, position end) # Copy argument text to the clipboard. -fun void CopyText=2420(position length, string text) +fun void CopyText=2420(int length, string text) enu SelectionMode=SC_SEL_ val SC_SEL_STREAM=0 @@ -2297,19 +1994,19 @@ val SC_SEL_THIN=3 # Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or # by lines (SC_SEL_LINES). -set void SetSelectionMode=2422(SelectionMode selectionMode,) +set void SetSelectionMode=2422(int selectionMode,) # Get the mode of the current selection. -get SelectionMode GetSelectionMode=2423(,) +get int GetSelectionMode=2423(,) # Get whether or not regular caret moves will extend or reduce the selection. get bool GetMoveExtendsSelection=2706(,) # Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). -fun position GetLineSelStartPosition=2424(line line,) +fun position GetLineSelStartPosition=2424(int line,) # Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). -fun position GetLineSelEndPosition=2425(line line,) +fun position GetLineSelEndPosition=2425(int line,) ## RectExtended rectangular selection moves # Move caret down one line, extending rectangular selection to new caret position. @@ -2396,72 +2093,64 @@ enu CaseInsensitiveBehaviour=SC_CASEINSENSITIVEBEHAVIOUR_ val SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=0 val SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=1 -ali SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE=RESPECT_CASE -ali SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE=IGNORE_CASE - # Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. -set void AutoCSetCaseInsensitiveBehaviour=2634(CaseInsensitiveBehaviour behaviour,) +set void AutoCSetCaseInsensitiveBehaviour=2634(int behaviour,) # Get auto-completion case insensitive behaviour. -get CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour=2635(,) +get int AutoCGetCaseInsensitiveBehaviour=2635(,) enu MultiAutoComplete=SC_MULTIAUTOC_ val SC_MULTIAUTOC_ONCE=0 val SC_MULTIAUTOC_EACH=1 # Change the effect of autocompleting when there are multiple selections. -set void AutoCSetMulti=2636(MultiAutoComplete multi,) +set void AutoCSetMulti=2636(int multi,) # Retrieve the effect of autocompleting when there are multiple selections. -get MultiAutoComplete AutoCGetMulti=2637(,) +get int AutoCGetMulti=2637(,) enu Ordering=SC_ORDER_ val SC_ORDER_PRESORTED=0 val SC_ORDER_PERFORMSORT=1 val SC_ORDER_CUSTOM=2 -ali SC_ORDER_PRESORTED=PRE_SORTED -ali SC_ORDER_PERFORMSORT=PERFORM_SORT - # Set the way autocompletion lists are ordered. -set void AutoCSetOrder=2660(Ordering order,) +set void AutoCSetOrder=2660(int order,) # Get the way autocompletion lists are ordered. -get Ordering AutoCGetOrder=2661(,) +get int AutoCGetOrder=2661(,) # Enlarge the document to a particular size of text bytes. -fun void Allocate=2446(position bytes,) +fun void Allocate=2446(int bytes,) # Returns the target converted to UTF8. # Return the length in bytes. -fun position TargetAsUTF8=2447(, stringresult s) +fun int TargetAsUTF8=2447(, stringresult s) # Set the length of the utf8 argument for calling EncodedFromUTF8. # Set to -1 and the string will be measured to the first nul. -fun void SetLengthForEncode=2448(position bytes,) +fun void SetLengthForEncode=2448(int bytes,) # Translates a UTF8 string into the document encoding. # Return the length of the result in bytes. # On error return 0. -fun position EncodedFromUTF8=2449(string utf8, stringresult encoded) +fun int EncodedFromUTF8=2449(string utf8, stringresult encoded) # Find the position of a column on a line taking into account tabs and # multi-byte characters. If beyond end of line, return line end position. -fun position FindColumn=2456(line line, position column) +fun int FindColumn=2456(int line, int column) + +# Can the caret preferred x position only be changed by explicit movement commands? +get int GetCaretSticky=2457(,) + +# Stop the caret preferred x position changing when the user types. +set void SetCaretSticky=2458(int useCaretStickyBehaviour,) enu CaretSticky=SC_CARETSTICKY_ val SC_CARETSTICKY_OFF=0 val SC_CARETSTICKY_ON=1 val SC_CARETSTICKY_WHITESPACE=2 -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(,) @@ -2471,33 +2160,30 @@ set void SetPasteConvertEndings=2467(bool convert,) # Get convert-on-paste setting get bool GetPasteConvertEndings=2468(,) -# Replace the selection with text like a rectangular paste. -fun void ReplaceRectangular=2771(position length, string text) - # 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 + # Set background alpha of the caret line. -set void SetCaretLineBackAlpha=2470(Alpha alpha,) +set void SetCaretLineBackAlpha=2470(int alpha,) # Get the background alpha of the caret line. -get Alpha GetCaretLineBackAlpha=2471(,) +get int GetCaretLineBackAlpha=2471(,) enu CaretStyle=CARETSTYLE_ val CARETSTYLE_INVISIBLE=0 val CARETSTYLE_LINE=1 val CARETSTYLE_BLOCK=2 -val CARETSTYLE_OVERSTRIKE_BAR=0 -val CARETSTYLE_OVERSTRIKE_BLOCK=0x10 -val CARETSTYLE_CURSES=0x20 -val CARETSTYLE_INS_MASK=0xF -val CARETSTYLE_BLOCK_AFTER=0x100 # Set the style of the caret to be drawn. -set void SetCaretStyle=2512(CaretStyle caretStyle,) +set void SetCaretStyle=2512(int caretStyle,) # Returns the current style of the caret. -get CaretStyle GetCaretStyle=2513(,) +get int GetCaretStyle=2513(,) # Set the indicator used for IndicatorFillRange and IndicatorClearRange set void SetIndicatorCurrent=2500(int indicator,) @@ -2512,10 +2198,10 @@ set void SetIndicatorValue=2502(int value,) get int GetIndicatorValue=2503(,) # Turn a indicator on over a range. -fun void IndicatorFillRange=2504(position start, position lengthFill) +fun void IndicatorFillRange=2504(position start, int lengthFill) # Turn a indicator off over a range. -fun void IndicatorClearRange=2505(position start, position lengthClear) +fun void IndicatorClearRange=2505(position start, int lengthClear) # Are any indicators present at pos? fun int IndicatorAllOnFor=2506(position pos,) @@ -2524,10 +2210,10 @@ fun int IndicatorAllOnFor=2506(position pos,) fun int IndicatorValueAt=2507(int indicator, position pos) # Where does a particular indicator start? -fun position IndicatorStart=2508(int indicator, position pos) +fun int IndicatorStart=2508(int indicator, position pos) # Where does a particular indicator end? -fun position IndicatorEnd=2509(int indicator, position pos) +fun int IndicatorEnd=2509(int indicator, position pos) # Set number of entries in position cache set void SetPositionCache=2514(int size,) @@ -2540,28 +2226,28 @@ fun void CopyAllowLine=2519(,) # Compact the document buffer and return a read-only pointer to the # characters in the document. -get pointer GetCharacterPointer=2520(,) +get int GetCharacterPointer=2520(,) # Return a read-only pointer to a range of characters in the document. # May move the gap so that the range is contiguous, but will only move up # to lengthRange bytes. -get pointer GetRangePointer=2643(position start, position lengthRange) +get int GetRangePointer=2643(position start, int lengthRange) # Return a position which, to avoid performance costs, should not be within # the range of a call to GetRangePointer. get position GetGapPosition=2644(,) # Set the alpha fill colour of the given indicator. -set void IndicSetAlpha=2523(int indicator, Alpha alpha) +set void IndicSetAlpha=2523(int indicator, int alpha) # Get the alpha fill colour of the given indicator. -get Alpha IndicGetAlpha=2524(int indicator,) +get int IndicGetAlpha=2524(int indicator,) # Set the alpha outline colour of the given indicator. -set void IndicSetOutlineAlpha=2558(int indicator, Alpha alpha) +set void IndicSetOutlineAlpha=2558(int indicator, int alpha) # Get the alpha outline colour of the given indicator. -get Alpha IndicGetOutlineAlpha=2559(int indicator,) +get int IndicGetOutlineAlpha=2559(int indicator,) # Set extra ascent for each line set void SetExtraAscent=2525(int extraAscent,) @@ -2579,22 +2265,22 @@ get int GetExtraDescent=2528(,) fun int MarkerSymbolDefined=2529(int markerNumber,) # Set the text in the text margin for a line -set void MarginSetText=2530(line line, string text) +set void MarginSetText=2530(int line, string text) # Get the text in the text margin for a line -get int MarginGetText=2531(line line, stringresult text) +get int MarginGetText=2531(int line, stringresult text) # Set the style number for the text margin for a line -set void MarginSetStyle=2532(line line, int style) +set void MarginSetStyle=2532(int line, int style) # Get the style number for the text margin for a line -get int MarginGetStyle=2533(line line,) +get int MarginGetStyle=2533(int line,) # Set the style in the text margin for a line -set void MarginSetStyles=2534(line line, string styles) +set void MarginSetStyles=2534(int line, string styles) # Get the styles in the text margin for a line -get int MarginGetStyles=2535(line line, stringresult styles) +get int MarginGetStyles=2535(int line, stringresult styles) # Clear the margin text on all lines fun void MarginTextClearAll=2536(,) @@ -2609,34 +2295,32 @@ enu MarginOption=SC_MARGINOPTION_ val SC_MARGINOPTION_NONE=0 val SC_MARGINOPTION_SUBLINESELECT=1 -ali SC_MARGINOPTION_SUBLINESELECT=SUB_LINE_SELECT - # Set the margin options. -set void SetMarginOptions=2539(MarginOption marginOptions,) +set void SetMarginOptions=2539(int marginOptions,) # Get the margin options. -get MarginOption GetMarginOptions=2557(,) +get int GetMarginOptions=2557(,) # Set the annotation text for a line -set void AnnotationSetText=2540(line line, string text) +set void AnnotationSetText=2540(int line, string text) # Get the annotation text for a line -get int AnnotationGetText=2541(line line, stringresult text) +get int AnnotationGetText=2541(int line, stringresult text) # Set the style number for the annotations for a line -set void AnnotationSetStyle=2542(line line, int style) +set void AnnotationSetStyle=2542(int line, int style) # Get the style number for the annotations for a line -get int AnnotationGetStyle=2543(line line,) +get int AnnotationGetStyle=2543(int line,) # Set the annotation styles for a line -set void AnnotationSetStyles=2544(line line, string styles) +set void AnnotationSetStyles=2544(int line, string styles) # Get the annotation styles for a line -get int AnnotationGetStyles=2545(line line, stringresult styles) +get int AnnotationGetStyles=2545(int line, stringresult styles) # Get the number of annotation lines for a line -get int AnnotationGetLines=2546(line line,) +get int AnnotationGetLines=2546(int line,) # Clear the annotations from all lines fun void AnnotationClearAll=2547(,) @@ -2648,10 +2332,10 @@ val ANNOTATION_BOXED=2 val ANNOTATION_INDENTED=3 # Set the visibility for the annotations for a view -set void AnnotationSetVisible=2548(AnnotationVisible visible,) +set void AnnotationSetVisible=2548(int visible,) # Get the visibility for the annotations for a view -get AnnotationVisible AnnotationGetVisible=2549(,) +get int AnnotationGetVisible=2549(,) # Get the start of the range of style numbers used for annotations set void AnnotationSetStyleOffset=2550(int style,) @@ -2665,12 +2349,10 @@ fun void ReleaseAllExtendedStyles=2552(,) # Allocate some extended (>255) style numbers and return the start of the range fun int AllocateExtendedStyles=2553(int numberStyles,) -enu UndoFlags=UNDO_ -val UNDO_NONE=0 val UNDO_MAY_COALESCE=1 # Add a container action to the undo stack -fun void AddUndoAction=2560(int token, UndoFlags flags) +fun void AddUndoAction=2560(int token, int flags) # Find the position of a character from a point within the window. fun position CharPositionFromPoint=2561(int x, int y) @@ -2735,27 +2417,20 @@ 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) - +set void SetSelectionNCaretVirtualSpace=2580(int selection, int space) # Return the virtual space of the caret of the nth selection. -get position GetSelectionNCaretVirtualSpace=2581(int selection,) - +get int GetSelectionNCaretVirtualSpace=2581(int selection,) # Set the virtual space of the anchor of the nth selection. -set void SetSelectionNAnchorVirtualSpace=2582(int selection, position space) - +set void SetSelectionNAnchorVirtualSpace=2582(int selection, int space) # Return the virtual space of the anchor of the nth selection. -get position GetSelectionNAnchorVirtualSpace=2583(int selection,) +get int GetSelectionNAnchorVirtualSpace=2583(int selection,) # Sets the position that starts the selection - this becomes the anchor. set void SetSelectionNStart=2584(int selection, position anchor) @@ -2763,41 +2438,28 @@ 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,) - +set void SetRectangularSelectionCaretVirtualSpace=2592(int space,) # Return the virtual space of the caret of the rectangular selection. -get position GetRectangularSelectionCaretVirtualSpace=2593(,) - +get int GetRectangularSelectionCaretVirtualSpace=2593(,) # Set the virtual space of the anchor of the rectangular selection. -set void SetRectangularSelectionAnchorVirtualSpace=2594(position space,) - +set void SetRectangularSelectionAnchorVirtualSpace=2594(int space,) # Return the virtual space of the anchor of the rectangular selection. -get position GetRectangularSelectionAnchorVirtualSpace=2595(,) +get int GetRectangularSelectionAnchorVirtualSpace=2595(,) enu VirtualSpace=SCVS_ val SCVS_NONE=0 @@ -2805,17 +2467,12 @@ val SCVS_RECTANGULARSELECTION=1 val SCVS_USERACCESSIBLE=2 val SCVS_NOWRAPLINESTART=4 -ali SCVS_RECTANGULARSELECTION=RECTANGULAR_SELECTION -ali SCVS_USERACCESSIBLE=USER_ACCESSIBLE -ali SCVS_NOWRAPLINESTART=NO_WRAP_LINE_START - # Set options for virtual space behaviour. -set void SetVirtualSpaceOptions=2596(VirtualSpace virtualSpaceOptions,) - +set void SetVirtualSpaceOptions=2596(int virtualSpaceOptions,) # Return options for virtual space behaviour. -get VirtualSpace GetVirtualSpaceOptions=2597(,) +get int GetVirtualSpaceOptions=2597(,) -# On GTK, allow selecting the modifier key to use for mouse-based +# On GTK+, allow selecting the modifier key to use for mouse-based # rectangular selection. Often the window manager requires Alt+Mouse Drag # for moving windows. # Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. @@ -2834,10 +2491,10 @@ set void SetAdditionalSelFore=2600(colour fore,) set void SetAdditionalSelBack=2601(colour back,) # Set the alpha of the selection. -set void SetAdditionalSelAlpha=2602(Alpha alpha,) +set void SetAdditionalSelAlpha=2602(int alpha,) # Get the alpha of the selection. -get Alpha GetAdditionalSelAlpha=2603(,) +get int GetAdditionalSelAlpha=2603(,) # Set the foreground colour of additional carets. set void SetAdditionalCaretFore=2604(colour fore,) @@ -2865,7 +2522,7 @@ fun int ChangeLexerState=2617(position start, position end) # Find the next line at or after lineStart that is a contracted fold header line. # Return -1 when no more lines. -fun line ContractedFoldNext=2618(line lineStart,) +fun int ContractedFoldNext=2618(int lineStart,) # Centre current line in window. fun void VerticalCentreCaret=2619(,) @@ -2911,18 +2568,14 @@ val SC_TECHNOLOGY_DIRECTWRITE=1 val SC_TECHNOLOGY_DIRECTWRITERETAIN=2 val SC_TECHNOLOGY_DIRECTWRITEDC=3 -ali SC_TECHNOLOGY_DIRECTWRITE=DIRECT_WRITE -ali SC_TECHNOLOGY_DIRECTWRITERETAIN=DIRECT_WRITE_RETAIN -ali SC_TECHNOLOGY_DIRECTWRITEDC=DIRECT_WRITE_D_C - # Set the technology used. -set void SetTechnology=2630(Technology technology,) +set void SetTechnology=2630(int technology,) # Get the tech. -get Technology GetTechnology=2631(,) +get int GetTechnology=2631(,) # Create an ILoader*. -fun pointer CreateLoader=2632(position bytes, DocumentOption documentOptions) +fun int CreateLoader=2632(int bytes, int documentOptions) # On OS X, show a find indicator. fun void FindIndicatorShow=2640(position start, position end) @@ -2954,122 +2607,33 @@ val SC_LINE_END_TYPE_DEFAULT=0 val SC_LINE_END_TYPE_UNICODE=1 # Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. -set void SetLineEndTypesAllowed=2656(LineEndType lineEndBitSet,) +set void SetLineEndTypesAllowed=2656(int lineEndBitSet,) # Get the line end types currently allowed. -get LineEndType GetLineEndTypesAllowed=2657(,) +get int GetLineEndTypesAllowed=2657(,) # Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. -get LineEndType GetLineEndTypesActive=2658(,) +get int GetLineEndTypesActive=2658(,) # Set the way a character is drawn. set void SetRepresentation=2665(string encodedCharacter, string representation) -# Get the way a character is drawn. +# Set the way a character is drawn. # Result is NUL-terminated. get int GetRepresentation=2666(string encodedCharacter, stringresult representation) # Remove a character representation. fun void ClearRepresentation=2667(string encodedCharacter,) -# Clear representations to default. -fun void ClearAllRepresentations=2770(,) - -# Can draw representations in various ways -enu RepresentationAppearance=SC_REPRESENTATION -val SC_REPRESENTATION_PLAIN=0 -val SC_REPRESENTATION_BLOB=1 -val SC_REPRESENTATION_COLOUR=0x10 - -# Set the appearance of a representation. -set void SetRepresentationAppearance=2766(string encodedCharacter, RepresentationAppearance appearance) - -# Get the appearance of a representation. -get RepresentationAppearance GetRepresentationAppearance=2767(string encodedCharacter,) - -# Set the colour of a representation. -set void SetRepresentationColour=2768(string encodedCharacter, colouralpha colour) - -# Get the colour of a representation. -get colouralpha GetRepresentationColour=2769(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=0x0 -val EOLANNOTATION_STANDARD=0x1 -val EOLANNOTATION_BOXED=0x2 -val EOLANNOTATION_STADIUM=0x100 -val EOLANNOTATION_FLAT_CIRCLE=0x101 -val EOLANNOTATION_ANGLE_CIRCLE=0x102 -val EOLANNOTATION_CIRCLE_FLAT=0x110 -val EOLANNOTATION_FLATS=0x111 -val EOLANNOTATION_ANGLE_FLAT=0x112 -val EOLANNOTATION_CIRCLE_ANGLE=0x120 -val EOLANNOTATION_FLAT_ANGLE=0x121 -val EOLANNOTATION_ANGLES=0x122 - -# 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(,) - -enu Supports=SC_SUPPORTS_ -val SC_SUPPORTS_LINE_DRAWS_FINAL=0 -val SC_SUPPORTS_PIXEL_DIVISIONS=1 -val SC_SUPPORTS_FRACTIONAL_STROKE_WIDTH=2 -val SC_SUPPORTS_TRANSLUCENT_STROKE=3 -val SC_SUPPORTS_PIXEL_MODIFICATION=4 - -# Get whether a feature is supported -get bool SupportsFeature=2750(Supports feature,) - -enu LineCharacterIndexType=SC_LINECHARACTERINDEX_ -val SC_LINECHARACTERINDEX_NONE=0 -val SC_LINECHARACTERINDEX_UTF32=1 -val SC_LINECHARACTERINDEX_UTF16=2 - -# Retrieve line character index state. -get LineCharacterIndexType GetLineCharacterIndex=2710(,) - -# Request line character index be created or its use count increased. -fun void AllocateLineCharacterIndex=2711(LineCharacterIndexType lineCharacterIndex,) - -# Decrease use count of line character index and remove if 0. -fun void ReleaseLineCharacterIndex=2712(LineCharacterIndexType lineCharacterIndex,) - -# Retrieve the document line containing a position measured in index units. -fun line LineFromIndexPosition=2713(position pos, LineCharacterIndexType lineCharacterIndex) - -# Retrieve the position measured in index units at the start of a document line. -fun position IndexPositionFromLine=2714(line line, LineCharacterIndexType lineCharacterIndex) - # Start notifying the container of all key presses and commands. fun void StartRecord=3001(,) # Stop notifying the container of all key presses and commands. fun void StopRecord=3002(,) +# Set the lexing language of the document. +set void SetLexer=4001(int lexer,) + # Retrieve the lexing language of the document. get int GetLexer=4002(,) @@ -3085,6 +2649,12 @@ val KEYWORDSET_MAX=8 # Set up the key words used by the lexer. set void SetKeyWords=4005(int keyWordSet, string keyWords) +# Set the lexing language of the document based on string name. +set void SetLexerLanguage=4006(, string language) + +# Load a lexer library (dll / so). +fun void LoadLexerLibrary=4007(, string path) + # Retrieve a "property" value previously set with SetProperty. # Result is NUL-terminated. get int GetProperty=4008(string key, stringresult value) @@ -3104,7 +2674,7 @@ get int GetPropertyInt=4010(string key, int defaultValue) get int GetLexerLanguage=4012(, stringresult language) # For private communication between an application and a known lexer. -fun pointer PrivateLexerCall=4013(int operation, pointer pointer) +fun int PrivateLexerCall=4013(int operation, int pointer) # Retrieve a '\n' separated list of properties understood by the current lexer. # Result is NUL-terminated. @@ -3116,7 +2686,7 @@ val SC_TYPE_INTEGER=1 val SC_TYPE_STRING=2 # Retrieve the type of a property. -fun TypeProperty PropertyType=4015(string name,) +fun int PropertyType=4015(string name,) # Describe a property. # Result is NUL-terminated. @@ -3128,7 +2698,7 @@ fun int DescribeKeyWordSets=4017(, stringresult descriptions) # Bit set of LineEndType enumertion for which line ends beyond the standard # LF, CR, and CRLF are supported by the lexer. -get LineEndType GetLineEndTypesSupported=4018(,) +get int GetLineEndTypesSupported=4018(,) # Allocate a set of sub styles for a particular base style, returning start of range fun int AllocateSubStyles=4020(int styleBase, int numberStyles) @@ -3174,15 +2744,11 @@ 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. # One bit is set from each of SC_MOD_* and SC_PERFORMED_*. enu ModificationFlags=SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL -val SC_MOD_NONE=0x0 val SC_MOD_INSERTTEXT=0x1 val SC_MOD_DELETETEXT=0x2 val SC_MOD_CHANGESTYLE=0x4 @@ -3205,32 +2771,9 @@ val SC_MOD_CONTAINER=0x40000 val SC_MOD_LEXERSTATE=0x80000 val SC_MOD_INSERTCHECK=0x100000 val SC_MOD_CHANGETABSTOPS=0x200000 -val SC_MOD_CHANGEEOLANNOTATION=0x400000 -val SC_MODEVENTMASKALL=0x7FFFFF - -ali SC_MOD_INSERTTEXT=INSERT_TEXT -ali SC_MOD_DELETETEXT=DELETE_TEXT -ali SC_MOD_CHANGESTYLE=CHANGE_STYLE -ali SC_MOD_CHANGEFOLD=CHANGE_FOLD -ali SC_MULTISTEPUNDOREDO=MULTI_STEP_UNDO_REDO -ali SC_LASTSTEPINUNDOREDO=LAST_STEP_IN_UNDO_REDO -ali SC_MOD_CHANGEMARKER=CHANGE_MARKER -ali SC_MOD_BEFOREINSERT=BEFORE_INSERT -ali SC_MOD_BEFOREDELETE=BEFORE_DELETE -ali SC_MULTILINEUNDOREDO=MULTILINE_UNDO_REDO -ali SC_STARTACTION=START_ACTION -ali SC_MOD_CHANGEINDICATOR=CHANGE_INDICATOR -ali SC_MOD_CHANGELINESTATE=CHANGE_LINE_STATE -ali SC_MOD_CHANGEMARGIN=CHANGE_MARGIN -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 +val SC_MODEVENTMASKALL=0x3FFFFF enu Update=SC_UPDATE_ -val SC_UPDATE_NONE=0x0 val SC_UPDATE_CONTENT=0x1 val SC_UPDATE_SELECTION=0x2 val SC_UPDATE_V_SCROLL=0x4 @@ -3240,7 +2783,6 @@ val SC_UPDATE_H_SCROLL=0x8 # and should have had exactly the same values as the EN_* constants. # Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_* # As clients depend on these constants, this will not be changed. -enu FocusChange=SCEN_ val SCEN_CHANGE=768 val SCEN_SETFOCUS=512 val SCEN_KILLFOCUS=256 @@ -3271,8 +2813,6 @@ val SCK_WIN=313 val SCK_RWIN=314 val SCK_MENU=315 -ali SCK_RWIN=R_WIN - enu KeyMod=SCMOD_ val SCMOD_NORM=0 val SCMOD_SHIFT=1 @@ -3288,26 +2828,2096 @@ val SC_AC_TAB=3 val SC_AC_NEWLINE=4 val SC_AC_COMMAND=5 -ali SC_AC_FILLUP=FILL_UP -ali SC_AC_DOUBLECLICK=DOUBLE_CLICK - -# characterSource for SCN_CHARADDED -enu CharacterSource=SC_CHARACTERSOURCE_ -# Direct input characters. -val SC_CHARACTERSOURCE_DIRECT_INPUT=0 -# IME (inline mode) or dead key tentative input characters. -val SC_CHARACTERSOURCE_TENTATIVE_INPUT=1 -# IME (either inline or windowed mode) full composited string. -val SC_CHARACTERSOURCE_IME_RESULT=2 +################################################ +# For SciLexer.h +enu Lexer=SCLEX_ +val SCLEX_CONTAINER=0 +val SCLEX_NULL=1 +val SCLEX_PYTHON=2 +val SCLEX_CPP=3 +val SCLEX_HTML=4 +val SCLEX_XML=5 +val SCLEX_PERL=6 +val SCLEX_SQL=7 +val SCLEX_VB=8 +val SCLEX_PROPERTIES=9 +val SCLEX_ERRORLIST=10 +val SCLEX_MAKEFILE=11 +val SCLEX_BATCH=12 +val SCLEX_XCODE=13 +val SCLEX_LATEX=14 +val SCLEX_LUA=15 +val SCLEX_DIFF=16 +val SCLEX_CONF=17 +val SCLEX_PASCAL=18 +val SCLEX_AVE=19 +val SCLEX_ADA=20 +val SCLEX_LISP=21 +val SCLEX_RUBY=22 +val SCLEX_EIFFEL=23 +val SCLEX_EIFFELKW=24 +val SCLEX_TCL=25 +val SCLEX_NNCRONTAB=26 +val SCLEX_BULLANT=27 +val SCLEX_VBSCRIPT=28 +val SCLEX_BAAN=31 +val SCLEX_MATLAB=32 +val SCLEX_SCRIPTOL=33 +val SCLEX_ASM=34 +val SCLEX_CPPNOCASE=35 +val SCLEX_FORTRAN=36 +val SCLEX_F77=37 +val SCLEX_CSS=38 +val SCLEX_POV=39 +val SCLEX_LOUT=40 +val SCLEX_ESCRIPT=41 +val SCLEX_PS=42 +val SCLEX_NSIS=43 +val SCLEX_MMIXAL=44 +val SCLEX_CLW=45 +val SCLEX_CLWNOCASE=46 +val SCLEX_LOT=47 +val SCLEX_YAML=48 +val SCLEX_TEX=49 +val SCLEX_METAPOST=50 +val SCLEX_POWERBASIC=51 +val SCLEX_FORTH=52 +val SCLEX_ERLANG=53 +val SCLEX_OCTAVE=54 +val SCLEX_MSSQL=55 +val SCLEX_VERILOG=56 +val SCLEX_KIX=57 +val SCLEX_GUI4CLI=58 +val SCLEX_SPECMAN=59 +val SCLEX_AU3=60 +val SCLEX_APDL=61 +val SCLEX_BASH=62 +val SCLEX_ASN1=63 +val SCLEX_VHDL=64 +val SCLEX_CAML=65 +val SCLEX_BLITZBASIC=66 +val SCLEX_PUREBASIC=67 +val SCLEX_HASKELL=68 +val SCLEX_PHPSCRIPT=69 +val SCLEX_TADS3=70 +val SCLEX_REBOL=71 +val SCLEX_SMALLTALK=72 +val SCLEX_FLAGSHIP=73 +val SCLEX_CSOUND=74 +val SCLEX_FREEBASIC=75 +val SCLEX_INNOSETUP=76 +val SCLEX_OPAL=77 +val SCLEX_SPICE=78 +val SCLEX_D=79 +val SCLEX_CMAKE=80 +val SCLEX_GAP=81 +val SCLEX_PLM=82 +val SCLEX_PROGRESS=83 +val SCLEX_ABAQUS=84 +val SCLEX_ASYMPTOTE=85 +val SCLEX_R=86 +val SCLEX_MAGIK=87 +val SCLEX_POWERSHELL=88 +val SCLEX_MYSQL=89 +val SCLEX_PO=90 +val SCLEX_TAL=91 +val SCLEX_COBOL=92 +val SCLEX_TACL=93 +val SCLEX_SORCUS=94 +val SCLEX_POWERPRO=95 +val SCLEX_NIMROD=96 +val SCLEX_SML=97 +val SCLEX_MARKDOWN=98 +val SCLEX_TXT2TAGS=99 +val SCLEX_A68K=100 +val SCLEX_MODULA=101 +val SCLEX_COFFEESCRIPT=102 +val SCLEX_TCMD=103 +val SCLEX_AVS=104 +val SCLEX_ECL=105 +val SCLEX_OSCRIPT=106 +val SCLEX_VISUALPROLOG=107 +val SCLEX_LITERATEHASKELL=108 +val SCLEX_STTXT=109 +val SCLEX_KVIRC=110 +val SCLEX_RUST=111 +val SCLEX_DMAP=112 +val SCLEX_AS=113 +val SCLEX_DMIS=114 +val SCLEX_REGISTRY=115 +val SCLEX_BIBTEX=116 +val SCLEX_SREC=117 +val SCLEX_IHEX=118 +val SCLEX_TEHEX=119 +val SCLEX_JSON=120 +val SCLEX_EDIFACT=121 +val SCLEX_INDENT=122 +val SCLEX_MAXIMA=123 +val SCLEX_STATA=124 +val SCLEX_SAS=125 +val SCLEX_LPEG=999 + +# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a +# value assigned in sequence from SCLEX_AUTOMATIC+1. +val SCLEX_AUTOMATIC=1000 +# Lexical states for SCLEX_PYTHON +lex Python=SCLEX_PYTHON SCE_P_ +lex Nimrod=SCLEX_NIMROD SCE_P_ +val SCE_P_DEFAULT=0 +val SCE_P_COMMENTLINE=1 +val SCE_P_NUMBER=2 +val SCE_P_STRING=3 +val SCE_P_CHARACTER=4 +val SCE_P_WORD=5 +val SCE_P_TRIPLE=6 +val SCE_P_TRIPLEDOUBLE=7 +val SCE_P_CLASSNAME=8 +val SCE_P_DEFNAME=9 +val SCE_P_OPERATOR=10 +val SCE_P_IDENTIFIER=11 +val SCE_P_COMMENTBLOCK=12 +val SCE_P_STRINGEOL=13 +val SCE_P_WORD2=14 +val SCE_P_DECORATOR=15 +val SCE_P_FSTRING=16 +val SCE_P_FCHARACTER=17 +val SCE_P_FTRIPLE=18 +val SCE_P_FTRIPLEDOUBLE=19 +# Lexical states for SCLEX_CPP +# Lexical states for SCLEX_BULLANT +# Lexical states for SCLEX_COBOL +# Lexical states for SCLEX_TACL +# Lexical states for SCLEX_TAL +lex Cpp=SCLEX_CPP SCE_C_ +lex BullAnt=SCLEX_BULLANT SCE_C_ +lex COBOL=SCLEX_COBOL SCE_C_ +lex TACL=SCLEX_TACL SCE_C_ +lex TAL=SCLEX_TAL SCE_C_ +val SCE_C_DEFAULT=0 +val SCE_C_COMMENT=1 +val SCE_C_COMMENTLINE=2 +val SCE_C_COMMENTDOC=3 +val SCE_C_NUMBER=4 +val SCE_C_WORD=5 +val SCE_C_STRING=6 +val SCE_C_CHARACTER=7 +val SCE_C_UUID=8 +val SCE_C_PREPROCESSOR=9 +val SCE_C_OPERATOR=10 +val SCE_C_IDENTIFIER=11 +val SCE_C_STRINGEOL=12 +val SCE_C_VERBATIM=13 +val SCE_C_REGEX=14 +val SCE_C_COMMENTLINEDOC=15 +val SCE_C_WORD2=16 +val SCE_C_COMMENTDOCKEYWORD=17 +val SCE_C_COMMENTDOCKEYWORDERROR=18 +val SCE_C_GLOBALCLASS=19 +val SCE_C_STRINGRAW=20 +val SCE_C_TRIPLEVERBATIM=21 +val SCE_C_HASHQUOTEDSTRING=22 +val SCE_C_PREPROCESSORCOMMENT=23 +val SCE_C_PREPROCESSORCOMMENTDOC=24 +val SCE_C_USERLITERAL=25 +val SCE_C_TASKMARKER=26 +val SCE_C_ESCAPESEQUENCE=27 +# Lexical states for SCLEX_D +lex D=SCLEX_D SCE_D_ +val SCE_D_DEFAULT=0 +val SCE_D_COMMENT=1 +val SCE_D_COMMENTLINE=2 +val SCE_D_COMMENTDOC=3 +val SCE_D_COMMENTNESTED=4 +val SCE_D_NUMBER=5 +val SCE_D_WORD=6 +val SCE_D_WORD2=7 +val SCE_D_WORD3=8 +val SCE_D_TYPEDEF=9 +val SCE_D_STRING=10 +val SCE_D_STRINGEOL=11 +val SCE_D_CHARACTER=12 +val SCE_D_OPERATOR=13 +val SCE_D_IDENTIFIER=14 +val SCE_D_COMMENTLINEDOC=15 +val SCE_D_COMMENTDOCKEYWORD=16 +val SCE_D_COMMENTDOCKEYWORDERROR=17 +val SCE_D_STRINGB=18 +val SCE_D_STRINGR=19 +val SCE_D_WORD5=20 +val SCE_D_WORD6=21 +val SCE_D_WORD7=22 +# Lexical states for SCLEX_TCL +lex TCL=SCLEX_TCL SCE_TCL_ +val SCE_TCL_DEFAULT=0 +val SCE_TCL_COMMENT=1 +val SCE_TCL_COMMENTLINE=2 +val SCE_TCL_NUMBER=3 +val SCE_TCL_WORD_IN_QUOTE=4 +val SCE_TCL_IN_QUOTE=5 +val SCE_TCL_OPERATOR=6 +val SCE_TCL_IDENTIFIER=7 +val SCE_TCL_SUBSTITUTION=8 +val SCE_TCL_SUB_BRACE=9 +val SCE_TCL_MODIFIER=10 +val SCE_TCL_EXPAND=11 +val SCE_TCL_WORD=12 +val SCE_TCL_WORD2=13 +val SCE_TCL_WORD3=14 +val SCE_TCL_WORD4=15 +val SCE_TCL_WORD5=16 +val SCE_TCL_WORD6=17 +val SCE_TCL_WORD7=18 +val SCE_TCL_WORD8=19 +val SCE_TCL_COMMENT_BOX=20 +val SCE_TCL_BLOCK_COMMENT=21 +# Lexical states for SCLEX_HTML, SCLEX_XML +lex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ +lex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ +val SCE_H_DEFAULT=0 +val SCE_H_TAG=1 +val SCE_H_TAGUNKNOWN=2 +val SCE_H_ATTRIBUTE=3 +val SCE_H_ATTRIBUTEUNKNOWN=4 +val SCE_H_NUMBER=5 +val SCE_H_DOUBLESTRING=6 +val SCE_H_SINGLESTRING=7 +val SCE_H_OTHER=8 +val SCE_H_COMMENT=9 +val SCE_H_ENTITY=10 +# XML and ASP +val SCE_H_TAGEND=11 +val SCE_H_XMLSTART=12 +val SCE_H_XMLEND=13 +val SCE_H_SCRIPT=14 +val SCE_H_ASP=15 +val SCE_H_ASPAT=16 +val SCE_H_CDATA=17 +val SCE_H_QUESTION=18 +# More HTML +val SCE_H_VALUE=19 +# X-Code +val SCE_H_XCCOMMENT=20 +# SGML +val SCE_H_SGML_DEFAULT=21 +val SCE_H_SGML_COMMAND=22 +val SCE_H_SGML_1ST_PARAM=23 +val SCE_H_SGML_DOUBLESTRING=24 +val SCE_H_SGML_SIMPLESTRING=25 +val SCE_H_SGML_ERROR=26 +val SCE_H_SGML_SPECIAL=27 +val SCE_H_SGML_ENTITY=28 +val SCE_H_SGML_COMMENT=29 +val SCE_H_SGML_1ST_PARAM_COMMENT=30 +val SCE_H_SGML_BLOCK_DEFAULT=31 +# Embedded Javascript +val SCE_HJ_START=40 +val SCE_HJ_DEFAULT=41 +val SCE_HJ_COMMENT=42 +val SCE_HJ_COMMENTLINE=43 +val SCE_HJ_COMMENTDOC=44 +val SCE_HJ_NUMBER=45 +val SCE_HJ_WORD=46 +val SCE_HJ_KEYWORD=47 +val SCE_HJ_DOUBLESTRING=48 +val SCE_HJ_SINGLESTRING=49 +val SCE_HJ_SYMBOLS=50 +val SCE_HJ_STRINGEOL=51 +val SCE_HJ_REGEX=52 +# ASP Javascript +val SCE_HJA_START=55 +val SCE_HJA_DEFAULT=56 +val SCE_HJA_COMMENT=57 +val SCE_HJA_COMMENTLINE=58 +val SCE_HJA_COMMENTDOC=59 +val SCE_HJA_NUMBER=60 +val SCE_HJA_WORD=61 +val SCE_HJA_KEYWORD=62 +val SCE_HJA_DOUBLESTRING=63 +val SCE_HJA_SINGLESTRING=64 +val SCE_HJA_SYMBOLS=65 +val SCE_HJA_STRINGEOL=66 +val SCE_HJA_REGEX=67 +# Embedded VBScript +val SCE_HB_START=70 +val SCE_HB_DEFAULT=71 +val SCE_HB_COMMENTLINE=72 +val SCE_HB_NUMBER=73 +val SCE_HB_WORD=74 +val SCE_HB_STRING=75 +val SCE_HB_IDENTIFIER=76 +val SCE_HB_STRINGEOL=77 +# ASP VBScript +val SCE_HBA_START=80 +val SCE_HBA_DEFAULT=81 +val SCE_HBA_COMMENTLINE=82 +val SCE_HBA_NUMBER=83 +val SCE_HBA_WORD=84 +val SCE_HBA_STRING=85 +val SCE_HBA_IDENTIFIER=86 +val SCE_HBA_STRINGEOL=87 +# Embedded Python +val SCE_HP_START=90 +val SCE_HP_DEFAULT=91 +val SCE_HP_COMMENTLINE=92 +val SCE_HP_NUMBER=93 +val SCE_HP_STRING=94 +val SCE_HP_CHARACTER=95 +val SCE_HP_WORD=96 +val SCE_HP_TRIPLE=97 +val SCE_HP_TRIPLEDOUBLE=98 +val SCE_HP_CLASSNAME=99 +val SCE_HP_DEFNAME=100 +val SCE_HP_OPERATOR=101 +val SCE_HP_IDENTIFIER=102 +# PHP +val SCE_HPHP_COMPLEX_VARIABLE=104 +# ASP Python +val SCE_HPA_START=105 +val SCE_HPA_DEFAULT=106 +val SCE_HPA_COMMENTLINE=107 +val SCE_HPA_NUMBER=108 +val SCE_HPA_STRING=109 +val SCE_HPA_CHARACTER=110 +val SCE_HPA_WORD=111 +val SCE_HPA_TRIPLE=112 +val SCE_HPA_TRIPLEDOUBLE=113 +val SCE_HPA_CLASSNAME=114 +val SCE_HPA_DEFNAME=115 +val SCE_HPA_OPERATOR=116 +val SCE_HPA_IDENTIFIER=117 +# PHP +val SCE_HPHP_DEFAULT=118 +val SCE_HPHP_HSTRING=119 +val SCE_HPHP_SIMPLESTRING=120 +val SCE_HPHP_WORD=121 +val SCE_HPHP_NUMBER=122 +val SCE_HPHP_VARIABLE=123 +val SCE_HPHP_COMMENT=124 +val SCE_HPHP_COMMENTLINE=125 +val SCE_HPHP_HSTRING_VARIABLE=126 +val SCE_HPHP_OPERATOR=127 +# Lexical states for SCLEX_PERL +lex Perl=SCLEX_PERL SCE_PL_ +val SCE_PL_DEFAULT=0 +val SCE_PL_ERROR=1 +val SCE_PL_COMMENTLINE=2 +val SCE_PL_POD=3 +val SCE_PL_NUMBER=4 +val SCE_PL_WORD=5 +val SCE_PL_STRING=6 +val SCE_PL_CHARACTER=7 +val SCE_PL_PUNCTUATION=8 +val SCE_PL_PREPROCESSOR=9 +val SCE_PL_OPERATOR=10 +val SCE_PL_IDENTIFIER=11 +val SCE_PL_SCALAR=12 +val SCE_PL_ARRAY=13 +val SCE_PL_HASH=14 +val SCE_PL_SYMBOLTABLE=15 +val SCE_PL_VARIABLE_INDEXER=16 +val SCE_PL_REGEX=17 +val SCE_PL_REGSUBST=18 +val SCE_PL_LONGQUOTE=19 +val SCE_PL_BACKTICKS=20 +val SCE_PL_DATASECTION=21 +val SCE_PL_HERE_DELIM=22 +val SCE_PL_HERE_Q=23 +val SCE_PL_HERE_QQ=24 +val SCE_PL_HERE_QX=25 +val SCE_PL_STRING_Q=26 +val SCE_PL_STRING_QQ=27 +val SCE_PL_STRING_QX=28 +val SCE_PL_STRING_QR=29 +val SCE_PL_STRING_QW=30 +val SCE_PL_POD_VERB=31 +val SCE_PL_SUB_PROTOTYPE=40 +val SCE_PL_FORMAT_IDENT=41 +val SCE_PL_FORMAT=42 +val SCE_PL_STRING_VAR=43 +val SCE_PL_XLAT=44 +val SCE_PL_REGEX_VAR=54 +val SCE_PL_REGSUBST_VAR=55 +val SCE_PL_BACKTICKS_VAR=57 +val SCE_PL_HERE_QQ_VAR=61 +val SCE_PL_HERE_QX_VAR=62 +val SCE_PL_STRING_QQ_VAR=64 +val SCE_PL_STRING_QX_VAR=65 +val SCE_PL_STRING_QR_VAR=66 +# Lexical states for SCLEX_RUBY +lex Ruby=SCLEX_RUBY SCE_RB_ +val SCE_RB_DEFAULT=0 +val SCE_RB_ERROR=1 +val SCE_RB_COMMENTLINE=2 +val SCE_RB_POD=3 +val SCE_RB_NUMBER=4 +val SCE_RB_WORD=5 +val SCE_RB_STRING=6 +val SCE_RB_CHARACTER=7 +val SCE_RB_CLASSNAME=8 +val SCE_RB_DEFNAME=9 +val SCE_RB_OPERATOR=10 +val SCE_RB_IDENTIFIER=11 +val SCE_RB_REGEX=12 +val SCE_RB_GLOBAL=13 +val SCE_RB_SYMBOL=14 +val SCE_RB_MODULE_NAME=15 +val SCE_RB_INSTANCE_VAR=16 +val SCE_RB_CLASS_VAR=17 +val SCE_RB_BACKTICKS=18 +val SCE_RB_DATASECTION=19 +val SCE_RB_HERE_DELIM=20 +val SCE_RB_HERE_Q=21 +val SCE_RB_HERE_QQ=22 +val SCE_RB_HERE_QX=23 +val SCE_RB_STRING_Q=24 +val SCE_RB_STRING_QQ=25 +val SCE_RB_STRING_QX=26 +val SCE_RB_STRING_QR=27 +val SCE_RB_STRING_QW=28 +val SCE_RB_WORD_DEMOTED=29 +val SCE_RB_STDIN=30 +val SCE_RB_STDOUT=31 +val SCE_RB_STDERR=40 +val SCE_RB_UPPER_BOUND=41 +# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC, SCLEX_BLITZBASIC, SCLEX_PUREBASIC, SCLEX_FREEBASIC +lex VB=SCLEX_VB SCE_B_ +lex VBScript=SCLEX_VBSCRIPT SCE_B_ +lex PowerBasic=SCLEX_POWERBASIC SCE_B_ +lex BlitzBasic=SCLEX_BLITZBASIC SCE_B_ +lex PureBasic=SCLEX_PUREBASIC SCE_B_ +lex FreeBasic=SCLEX_FREEBASIC SCE_B_ +val SCE_B_DEFAULT=0 +val SCE_B_COMMENT=1 +val SCE_B_NUMBER=2 +val SCE_B_KEYWORD=3 +val SCE_B_STRING=4 +val SCE_B_PREPROCESSOR=5 +val SCE_B_OPERATOR=6 +val SCE_B_IDENTIFIER=7 +val SCE_B_DATE=8 +val SCE_B_STRINGEOL=9 +val SCE_B_KEYWORD2=10 +val SCE_B_KEYWORD3=11 +val SCE_B_KEYWORD4=12 +val SCE_B_CONSTANT=13 +val SCE_B_ASM=14 +val SCE_B_LABEL=15 +val SCE_B_ERROR=16 +val SCE_B_HEXNUMBER=17 +val SCE_B_BINNUMBER=18 +val SCE_B_COMMENTBLOCK=19 +val SCE_B_DOCLINE=20 +val SCE_B_DOCBLOCK=21 +val SCE_B_DOCKEYWORD=22 +# Lexical states for SCLEX_PROPERTIES +lex Properties=SCLEX_PROPERTIES SCE_PROPS_ +val SCE_PROPS_DEFAULT=0 +val SCE_PROPS_COMMENT=1 +val SCE_PROPS_SECTION=2 +val SCE_PROPS_ASSIGNMENT=3 +val SCE_PROPS_DEFVAL=4 +val SCE_PROPS_KEY=5 +# Lexical states for SCLEX_LATEX +lex LaTeX=SCLEX_LATEX SCE_L_ +val SCE_L_DEFAULT=0 +val SCE_L_COMMAND=1 +val SCE_L_TAG=2 +val SCE_L_MATH=3 +val SCE_L_COMMENT=4 +val SCE_L_TAG2=5 +val SCE_L_MATH2=6 +val SCE_L_COMMENT2=7 +val SCE_L_VERBATIM=8 +val SCE_L_SHORTCMD=9 +val SCE_L_SPECIAL=10 +val SCE_L_CMDOPT=11 +val SCE_L_ERROR=12 +# Lexical states for SCLEX_LUA +lex Lua=SCLEX_LUA SCE_LUA_ +val SCE_LUA_DEFAULT=0 +val SCE_LUA_COMMENT=1 +val SCE_LUA_COMMENTLINE=2 +val SCE_LUA_COMMENTDOC=3 +val SCE_LUA_NUMBER=4 +val SCE_LUA_WORD=5 +val SCE_LUA_STRING=6 +val SCE_LUA_CHARACTER=7 +val SCE_LUA_LITERALSTRING=8 +val SCE_LUA_PREPROCESSOR=9 +val SCE_LUA_OPERATOR=10 +val SCE_LUA_IDENTIFIER=11 +val SCE_LUA_STRINGEOL=12 +val SCE_LUA_WORD2=13 +val SCE_LUA_WORD3=14 +val SCE_LUA_WORD4=15 +val SCE_LUA_WORD5=16 +val SCE_LUA_WORD6=17 +val SCE_LUA_WORD7=18 +val SCE_LUA_WORD8=19 +val SCE_LUA_LABEL=20 +# Lexical states for SCLEX_ERRORLIST +lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ +val SCE_ERR_DEFAULT=0 +val SCE_ERR_PYTHON=1 +val SCE_ERR_GCC=2 +val SCE_ERR_MS=3 +val SCE_ERR_CMD=4 +val SCE_ERR_BORLAND=5 +val SCE_ERR_PERL=6 +val SCE_ERR_NET=7 +val SCE_ERR_LUA=8 +val SCE_ERR_CTAG=9 +val SCE_ERR_DIFF_CHANGED=10 +val SCE_ERR_DIFF_ADDITION=11 +val SCE_ERR_DIFF_DELETION=12 +val SCE_ERR_DIFF_MESSAGE=13 +val SCE_ERR_PHP=14 +val SCE_ERR_ELF=15 +val SCE_ERR_IFC=16 +val SCE_ERR_IFORT=17 +val SCE_ERR_ABSF=18 +val SCE_ERR_TIDY=19 +val SCE_ERR_JAVA_STACK=20 +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_ES_BLACK=40 +val SCE_ERR_ES_RED=41 +val SCE_ERR_ES_GREEN=42 +val SCE_ERR_ES_BROWN=43 +val SCE_ERR_ES_BLUE=44 +val SCE_ERR_ES_MAGENTA=45 +val SCE_ERR_ES_CYAN=46 +val SCE_ERR_ES_GRAY=47 +val SCE_ERR_ES_DARK_GRAY=48 +val SCE_ERR_ES_BRIGHT_RED=49 +val SCE_ERR_ES_BRIGHT_GREEN=50 +val SCE_ERR_ES_YELLOW=51 +val SCE_ERR_ES_BRIGHT_BLUE=52 +val SCE_ERR_ES_BRIGHT_MAGENTA=53 +val SCE_ERR_ES_BRIGHT_CYAN=54 +val SCE_ERR_ES_WHITE=55 +# Lexical states for SCLEX_BATCH +lex Batch=SCLEX_BATCH SCE_BAT_ +val SCE_BAT_DEFAULT=0 +val SCE_BAT_COMMENT=1 +val SCE_BAT_WORD=2 +val SCE_BAT_LABEL=3 +val SCE_BAT_HIDE=4 +val SCE_BAT_COMMAND=5 +val SCE_BAT_IDENTIFIER=6 +val SCE_BAT_OPERATOR=7 +# Lexical states for SCLEX_TCMD +lex TCMD=SCLEX_TCMD SCE_TCMD_ +val SCE_TCMD_DEFAULT=0 +val SCE_TCMD_COMMENT=1 +val SCE_TCMD_WORD=2 +val SCE_TCMD_LABEL=3 +val SCE_TCMD_HIDE=4 +val SCE_TCMD_COMMAND=5 +val SCE_TCMD_IDENTIFIER=6 +val SCE_TCMD_OPERATOR=7 +val SCE_TCMD_ENVIRONMENT=8 +val SCE_TCMD_EXPANSION=9 +val SCE_TCMD_CLABEL=10 +# Lexical states for SCLEX_MAKEFILE +lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ +val SCE_MAKE_DEFAULT=0 +val SCE_MAKE_COMMENT=1 +val SCE_MAKE_PREPROCESSOR=2 +val SCE_MAKE_IDENTIFIER=3 +val SCE_MAKE_OPERATOR=4 +val SCE_MAKE_TARGET=5 +val SCE_MAKE_IDEOL=9 +# Lexical states for SCLEX_DIFF +lex Diff=SCLEX_DIFF SCE_DIFF_ +val SCE_DIFF_DEFAULT=0 +val SCE_DIFF_COMMENT=1 +val SCE_DIFF_COMMAND=2 +val SCE_DIFF_HEADER=3 +val SCE_DIFF_POSITION=4 +val SCE_DIFF_DELETED=5 +val SCE_DIFF_ADDED=6 +val SCE_DIFF_CHANGED=7 +val SCE_DIFF_PATCH_ADD=8 +val SCE_DIFF_PATCH_DELETE=9 +val SCE_DIFF_REMOVED_PATCH_ADD=10 +val SCE_DIFF_REMOVED_PATCH_DELETE=11 +# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) +lex Conf=SCLEX_CONF SCE_CONF_ +val SCE_CONF_DEFAULT=0 +val SCE_CONF_COMMENT=1 +val SCE_CONF_NUMBER=2 +val SCE_CONF_IDENTIFIER=3 +val SCE_CONF_EXTENSION=4 +val SCE_CONF_PARAMETER=5 +val SCE_CONF_STRING=6 +val SCE_CONF_OPERATOR=7 +val SCE_CONF_IP=8 +val SCE_CONF_DIRECTIVE=9 +# Lexical states for SCLEX_AVE, Avenue +lex Avenue=SCLEX_AVE SCE_AVE_ +val SCE_AVE_DEFAULT=0 +val SCE_AVE_COMMENT=1 +val SCE_AVE_NUMBER=2 +val SCE_AVE_WORD=3 +val SCE_AVE_STRING=6 +val SCE_AVE_ENUM=7 +val SCE_AVE_STRINGEOL=8 +val SCE_AVE_IDENTIFIER=9 +val SCE_AVE_OPERATOR=10 +val SCE_AVE_WORD1=11 +val SCE_AVE_WORD2=12 +val SCE_AVE_WORD3=13 +val SCE_AVE_WORD4=14 +val SCE_AVE_WORD5=15 +val SCE_AVE_WORD6=16 +# Lexical states for SCLEX_ADA +lex Ada=SCLEX_ADA SCE_ADA_ +val SCE_ADA_DEFAULT=0 +val SCE_ADA_WORD=1 +val SCE_ADA_IDENTIFIER=2 +val SCE_ADA_NUMBER=3 +val SCE_ADA_DELIMITER=4 +val SCE_ADA_CHARACTER=5 +val SCE_ADA_CHARACTEREOL=6 +val SCE_ADA_STRING=7 +val SCE_ADA_STRINGEOL=8 +val SCE_ADA_LABEL=9 +val SCE_ADA_COMMENTLINE=10 +val SCE_ADA_ILLEGAL=11 +# Lexical states for SCLEX_BAAN +lex Baan=SCLEX_BAAN SCE_BAAN_ +val SCE_BAAN_DEFAULT=0 +val SCE_BAAN_COMMENT=1 +val SCE_BAAN_COMMENTDOC=2 +val SCE_BAAN_NUMBER=3 +val SCE_BAAN_WORD=4 +val SCE_BAAN_STRING=5 +val SCE_BAAN_PREPROCESSOR=6 +val SCE_BAAN_OPERATOR=7 +val SCE_BAAN_IDENTIFIER=8 +val SCE_BAAN_STRINGEOL=9 +val SCE_BAAN_WORD2=10 +val SCE_BAAN_WORD3=11 +val SCE_BAAN_WORD4=12 +val SCE_BAAN_WORD5=13 +val SCE_BAAN_WORD6=14 +val SCE_BAAN_WORD7=15 +val SCE_BAAN_WORD8=16 +val SCE_BAAN_WORD9=17 +val SCE_BAAN_TABLEDEF=18 +val SCE_BAAN_TABLESQL=19 +val SCE_BAAN_FUNCTION=20 +val SCE_BAAN_DOMDEF=21 +val SCE_BAAN_FUNCDEF=22 +val SCE_BAAN_OBJECTDEF=23 +val SCE_BAAN_DEFINEDEF=24 +# Lexical states for SCLEX_LISP +lex Lisp=SCLEX_LISP SCE_LISP_ +val SCE_LISP_DEFAULT=0 +val SCE_LISP_COMMENT=1 +val SCE_LISP_NUMBER=2 +val SCE_LISP_KEYWORD=3 +val SCE_LISP_KEYWORD_KW=4 +val SCE_LISP_SYMBOL=5 +val SCE_LISP_STRING=6 +val SCE_LISP_STRINGEOL=8 +val SCE_LISP_IDENTIFIER=9 +val SCE_LISP_OPERATOR=10 +val SCE_LISP_SPECIAL=11 +val SCE_LISP_MULTI_COMMENT=12 +# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW +lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ +lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ +val SCE_EIFFEL_DEFAULT=0 +val SCE_EIFFEL_COMMENTLINE=1 +val SCE_EIFFEL_NUMBER=2 +val SCE_EIFFEL_WORD=3 +val SCE_EIFFEL_STRING=4 +val SCE_EIFFEL_CHARACTER=5 +val SCE_EIFFEL_OPERATOR=6 +val SCE_EIFFEL_IDENTIFIER=7 +val SCE_EIFFEL_STRINGEOL=8 +# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) +lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ +val SCE_NNCRONTAB_DEFAULT=0 +val SCE_NNCRONTAB_COMMENT=1 +val SCE_NNCRONTAB_TASK=2 +val SCE_NNCRONTAB_SECTION=3 +val SCE_NNCRONTAB_KEYWORD=4 +val SCE_NNCRONTAB_MODIFIER=5 +val SCE_NNCRONTAB_ASTERISK=6 +val SCE_NNCRONTAB_NUMBER=7 +val SCE_NNCRONTAB_STRING=8 +val SCE_NNCRONTAB_ENVIRONMENT=9 +val SCE_NNCRONTAB_IDENTIFIER=10 +# Lexical states for SCLEX_FORTH (Forth Lexer) +lex Forth=SCLEX_FORTH SCE_FORTH_ +val SCE_FORTH_DEFAULT=0 +val SCE_FORTH_COMMENT=1 +val SCE_FORTH_COMMENT_ML=2 +val SCE_FORTH_IDENTIFIER=3 +val SCE_FORTH_CONTROL=4 +val SCE_FORTH_KEYWORD=5 +val SCE_FORTH_DEFWORD=6 +val SCE_FORTH_PREWORD1=7 +val SCE_FORTH_PREWORD2=8 +val SCE_FORTH_NUMBER=9 +val SCE_FORTH_STRING=10 +val SCE_FORTH_LOCALE=11 +# Lexical states for SCLEX_MATLAB +lex MatLab=SCLEX_MATLAB SCE_MATLAB_ +val SCE_MATLAB_DEFAULT=0 +val SCE_MATLAB_COMMENT=1 +val SCE_MATLAB_COMMAND=2 +val SCE_MATLAB_NUMBER=3 +val SCE_MATLAB_KEYWORD=4 +# single quoted string +val SCE_MATLAB_STRING=5 +val SCE_MATLAB_OPERATOR=6 +val SCE_MATLAB_IDENTIFIER=7 +val SCE_MATLAB_DOUBLEQUOTESTRING=8 +# Lexical states for SCLEX_MAXIMA +lex Maxima=SCLEX_MAXIMA SCE_MAXIMA_ +val SCE_MAXIMA_OPERATOR=0 +val SCE_MAXIMA_COMMANDENDING=1 +val SCE_MAXIMA_COMMENT=2 +val SCE_MAXIMA_NUMBER=3 +val SCE_MAXIMA_STRING=4 +val SCE_MAXIMA_COMMAND=5 +val SCE_MAXIMA_VARIABLE=6 +val SCE_MAXIMA_UNKNOWN=7 +# Lexical states for SCLEX_SCRIPTOL +lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ +val SCE_SCRIPTOL_DEFAULT=0 +val SCE_SCRIPTOL_WHITE=1 +val SCE_SCRIPTOL_COMMENTLINE=2 +val SCE_SCRIPTOL_PERSISTENT=3 +val SCE_SCRIPTOL_CSTYLE=4 +val SCE_SCRIPTOL_COMMENTBLOCK=5 +val SCE_SCRIPTOL_NUMBER=6 +val SCE_SCRIPTOL_STRING=7 +val SCE_SCRIPTOL_CHARACTER=8 +val SCE_SCRIPTOL_STRINGEOL=9 +val SCE_SCRIPTOL_KEYWORD=10 +val SCE_SCRIPTOL_OPERATOR=11 +val SCE_SCRIPTOL_IDENTIFIER=12 +val SCE_SCRIPTOL_TRIPLE=13 +val SCE_SCRIPTOL_CLASSNAME=14 +val SCE_SCRIPTOL_PREPROCESSOR=15 +# Lexical states for SCLEX_ASM, SCLEX_AS +lex Asm=SCLEX_ASM SCE_ASM_ +lex As=SCLEX_AS SCE_ASM_ +val SCE_ASM_DEFAULT=0 +val SCE_ASM_COMMENT=1 +val SCE_ASM_NUMBER=2 +val SCE_ASM_STRING=3 +val SCE_ASM_OPERATOR=4 +val SCE_ASM_IDENTIFIER=5 +val SCE_ASM_CPUINSTRUCTION=6 +val SCE_ASM_MATHINSTRUCTION=7 +val SCE_ASM_REGISTER=8 +val SCE_ASM_DIRECTIVE=9 +val SCE_ASM_DIRECTIVEOPERAND=10 +val SCE_ASM_COMMENTBLOCK=11 +val SCE_ASM_CHARACTER=12 +val SCE_ASM_STRINGEOL=13 +val SCE_ASM_EXTINSTRUCTION=14 +val SCE_ASM_COMMENTDIRECTIVE=15 +# Lexical states for SCLEX_FORTRAN +lex Fortran=SCLEX_FORTRAN SCE_F_ +lex F77=SCLEX_F77 SCE_F_ +val SCE_F_DEFAULT=0 +val SCE_F_COMMENT=1 +val SCE_F_NUMBER=2 +val SCE_F_STRING1=3 +val SCE_F_STRING2=4 +val SCE_F_STRINGEOL=5 +val SCE_F_OPERATOR=6 +val SCE_F_IDENTIFIER=7 +val SCE_F_WORD=8 +val SCE_F_WORD2=9 +val SCE_F_WORD3=10 +val SCE_F_PREPROCESSOR=11 +val SCE_F_OPERATOR2=12 +val SCE_F_LABEL=13 +val SCE_F_CONTINUATION=14 +# Lexical states for SCLEX_CSS +lex CSS=SCLEX_CSS SCE_CSS_ +val SCE_CSS_DEFAULT=0 +val SCE_CSS_TAG=1 +val SCE_CSS_CLASS=2 +val SCE_CSS_PSEUDOCLASS=3 +val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 +val SCE_CSS_OPERATOR=5 +val SCE_CSS_IDENTIFIER=6 +val SCE_CSS_UNKNOWN_IDENTIFIER=7 +val SCE_CSS_VALUE=8 +val SCE_CSS_COMMENT=9 +val SCE_CSS_ID=10 +val SCE_CSS_IMPORTANT=11 +val SCE_CSS_DIRECTIVE=12 +val SCE_CSS_DOUBLESTRING=13 +val SCE_CSS_SINGLESTRING=14 +val SCE_CSS_IDENTIFIER2=15 +val SCE_CSS_ATTRIBUTE=16 +val SCE_CSS_IDENTIFIER3=17 +val SCE_CSS_PSEUDOELEMENT=18 +val SCE_CSS_EXTENDED_IDENTIFIER=19 +val SCE_CSS_EXTENDED_PSEUDOCLASS=20 +val SCE_CSS_EXTENDED_PSEUDOELEMENT=21 +val SCE_CSS_MEDIA=22 +val SCE_CSS_VARIABLE=23 +# Lexical states for SCLEX_POV +lex POV=SCLEX_POV SCE_POV_ +val SCE_POV_DEFAULT=0 +val SCE_POV_COMMENT=1 +val SCE_POV_COMMENTLINE=2 +val SCE_POV_NUMBER=3 +val SCE_POV_OPERATOR=4 +val SCE_POV_IDENTIFIER=5 +val SCE_POV_STRING=6 +val SCE_POV_STRINGEOL=7 +val SCE_POV_DIRECTIVE=8 +val SCE_POV_BADDIRECTIVE=9 +val SCE_POV_WORD2=10 +val SCE_POV_WORD3=11 +val SCE_POV_WORD4=12 +val SCE_POV_WORD5=13 +val SCE_POV_WORD6=14 +val SCE_POV_WORD7=15 +val SCE_POV_WORD8=16 +# Lexical states for SCLEX_LOUT +lex LOUT=SCLEX_LOUT SCE_LOUT_ +val SCE_LOUT_DEFAULT=0 +val SCE_LOUT_COMMENT=1 +val SCE_LOUT_NUMBER=2 +val SCE_LOUT_WORD=3 +val SCE_LOUT_WORD2=4 +val SCE_LOUT_WORD3=5 +val SCE_LOUT_WORD4=6 +val SCE_LOUT_STRING=7 +val SCE_LOUT_OPERATOR=8 +val SCE_LOUT_IDENTIFIER=9 +val SCE_LOUT_STRINGEOL=10 +# Lexical states for SCLEX_ESCRIPT +lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ +val SCE_ESCRIPT_DEFAULT=0 +val SCE_ESCRIPT_COMMENT=1 +val SCE_ESCRIPT_COMMENTLINE=2 +val SCE_ESCRIPT_COMMENTDOC=3 +val SCE_ESCRIPT_NUMBER=4 +val SCE_ESCRIPT_WORD=5 +val SCE_ESCRIPT_STRING=6 +val SCE_ESCRIPT_OPERATOR=7 +val SCE_ESCRIPT_IDENTIFIER=8 +val SCE_ESCRIPT_BRACE=9 +val SCE_ESCRIPT_WORD2=10 +val SCE_ESCRIPT_WORD3=11 +# Lexical states for SCLEX_PS +lex PS=SCLEX_PS SCE_PS_ +val SCE_PS_DEFAULT=0 +val SCE_PS_COMMENT=1 +val SCE_PS_DSC_COMMENT=2 +val SCE_PS_DSC_VALUE=3 +val SCE_PS_NUMBER=4 +val SCE_PS_NAME=5 +val SCE_PS_KEYWORD=6 +val SCE_PS_LITERAL=7 +val SCE_PS_IMMEVAL=8 +val SCE_PS_PAREN_ARRAY=9 +val SCE_PS_PAREN_DICT=10 +val SCE_PS_PAREN_PROC=11 +val SCE_PS_TEXT=12 +val SCE_PS_HEXSTRING=13 +val SCE_PS_BASE85STRING=14 +val SCE_PS_BADSTRINGCHAR=15 +# Lexical states for SCLEX_NSIS +lex NSIS=SCLEX_NSIS SCE_NSIS_ +val SCE_NSIS_DEFAULT=0 +val SCE_NSIS_COMMENT=1 +val SCE_NSIS_STRINGDQ=2 +val SCE_NSIS_STRINGLQ=3 +val SCE_NSIS_STRINGRQ=4 +val SCE_NSIS_FUNCTION=5 +val SCE_NSIS_VARIABLE=6 +val SCE_NSIS_LABEL=7 +val SCE_NSIS_USERDEFINED=8 +val SCE_NSIS_SECTIONDEF=9 +val SCE_NSIS_SUBSECTIONDEF=10 +val SCE_NSIS_IFDEFINEDEF=11 +val SCE_NSIS_MACRODEF=12 +val SCE_NSIS_STRINGVAR=13 +val SCE_NSIS_NUMBER=14 +val SCE_NSIS_SECTIONGROUP=15 +val SCE_NSIS_PAGEEX=16 +val SCE_NSIS_FUNCTIONDEF=17 +val SCE_NSIS_COMMENTBOX=18 +# Lexical states for SCLEX_MMIXAL +lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ +val SCE_MMIXAL_LEADWS=0 +val SCE_MMIXAL_COMMENT=1 +val SCE_MMIXAL_LABEL=2 +val SCE_MMIXAL_OPCODE=3 +val SCE_MMIXAL_OPCODE_PRE=4 +val SCE_MMIXAL_OPCODE_VALID=5 +val SCE_MMIXAL_OPCODE_UNKNOWN=6 +val SCE_MMIXAL_OPCODE_POST=7 +val SCE_MMIXAL_OPERANDS=8 +val SCE_MMIXAL_NUMBER=9 +val SCE_MMIXAL_REF=10 +val SCE_MMIXAL_CHAR=11 +val SCE_MMIXAL_STRING=12 +val SCE_MMIXAL_REGISTER=13 +val SCE_MMIXAL_HEX=14 +val SCE_MMIXAL_OPERATOR=15 +val SCE_MMIXAL_SYMBOL=16 +val SCE_MMIXAL_INCLUDE=17 +# Lexical states for SCLEX_CLW +lex Clarion=SCLEX_CLW SCE_CLW_ +val SCE_CLW_DEFAULT=0 +val SCE_CLW_LABEL=1 +val SCE_CLW_COMMENT=2 +val SCE_CLW_STRING=3 +val SCE_CLW_USER_IDENTIFIER=4 +val SCE_CLW_INTEGER_CONSTANT=5 +val SCE_CLW_REAL_CONSTANT=6 +val SCE_CLW_PICTURE_STRING=7 +val SCE_CLW_KEYWORD=8 +val SCE_CLW_COMPILER_DIRECTIVE=9 +val SCE_CLW_RUNTIME_EXPRESSIONS=10 +val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 +val SCE_CLW_STRUCTURE_DATA_TYPE=12 +val SCE_CLW_ATTRIBUTE=13 +val SCE_CLW_STANDARD_EQUATE=14 +val SCE_CLW_ERROR=15 +val SCE_CLW_DEPRECATED=16 +# Lexical states for SCLEX_LOT +lex LOT=SCLEX_LOT SCE_LOT_ +val SCE_LOT_DEFAULT=0 +val SCE_LOT_HEADER=1 +val SCE_LOT_BREAK=2 +val SCE_LOT_SET=3 +val SCE_LOT_PASS=4 +val SCE_LOT_FAIL=5 +val SCE_LOT_ABORT=6 +# Lexical states for SCLEX_YAML +lex YAML=SCLEX_YAML SCE_YAML_ +val SCE_YAML_DEFAULT=0 +val SCE_YAML_COMMENT=1 +val SCE_YAML_IDENTIFIER=2 +val SCE_YAML_KEYWORD=3 +val SCE_YAML_NUMBER=4 +val SCE_YAML_REFERENCE=5 +val SCE_YAML_DOCUMENT=6 +val SCE_YAML_TEXT=7 +val SCE_YAML_ERROR=8 +val SCE_YAML_OPERATOR=9 +# Lexical states for SCLEX_TEX +lex TeX=SCLEX_TEX SCE_TEX_ +val SCE_TEX_DEFAULT=0 +val SCE_TEX_SPECIAL=1 +val SCE_TEX_GROUP=2 +val SCE_TEX_SYMBOL=3 +val SCE_TEX_COMMAND=4 +val SCE_TEX_TEXT=5 +lex Metapost=SCLEX_METAPOST SCE_METAPOST_ +val SCE_METAPOST_DEFAULT=0 +val SCE_METAPOST_SPECIAL=1 +val SCE_METAPOST_GROUP=2 +val SCE_METAPOST_SYMBOL=3 +val SCE_METAPOST_COMMAND=4 +val SCE_METAPOST_TEXT=5 +val SCE_METAPOST_EXTRA=6 +# Lexical states for SCLEX_ERLANG +lex Erlang=SCLEX_ERLANG SCE_ERLANG_ +val SCE_ERLANG_DEFAULT=0 +val SCE_ERLANG_COMMENT=1 +val SCE_ERLANG_VARIABLE=2 +val SCE_ERLANG_NUMBER=3 +val SCE_ERLANG_KEYWORD=4 +val SCE_ERLANG_STRING=5 +val SCE_ERLANG_OPERATOR=6 +val SCE_ERLANG_ATOM=7 +val SCE_ERLANG_FUNCTION_NAME=8 +val SCE_ERLANG_CHARACTER=9 +val SCE_ERLANG_MACRO=10 +val SCE_ERLANG_RECORD=11 +val SCE_ERLANG_PREPROC=12 +val SCE_ERLANG_NODE_NAME=13 +val SCE_ERLANG_COMMENT_FUNCTION=14 +val SCE_ERLANG_COMMENT_MODULE=15 +val SCE_ERLANG_COMMENT_DOC=16 +val SCE_ERLANG_COMMENT_DOC_MACRO=17 +val SCE_ERLANG_ATOM_QUOTED=18 +val SCE_ERLANG_MACRO_QUOTED=19 +val SCE_ERLANG_RECORD_QUOTED=20 +val SCE_ERLANG_NODE_NAME_QUOTED=21 +val SCE_ERLANG_BIFS=22 +val SCE_ERLANG_MODULES=23 +val SCE_ERLANG_MODULES_ATT=24 +val SCE_ERLANG_UNKNOWN=31 +# Lexical states for SCLEX_OCTAVE are identical to MatLab +lex Octave=SCLEX_OCTAVE SCE_MATLAB_ +# Lexical states for SCLEX_MSSQL +lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ +val SCE_MSSQL_DEFAULT=0 +val SCE_MSSQL_COMMENT=1 +val SCE_MSSQL_LINE_COMMENT=2 +val SCE_MSSQL_NUMBER=3 +val SCE_MSSQL_STRING=4 +val SCE_MSSQL_OPERATOR=5 +val SCE_MSSQL_IDENTIFIER=6 +val SCE_MSSQL_VARIABLE=7 +val SCE_MSSQL_COLUMN_NAME=8 +val SCE_MSSQL_STATEMENT=9 +val SCE_MSSQL_DATATYPE=10 +val SCE_MSSQL_SYSTABLE=11 +val SCE_MSSQL_GLOBAL_VARIABLE=12 +val SCE_MSSQL_FUNCTION=13 +val SCE_MSSQL_STORED_PROCEDURE=14 +val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 +val SCE_MSSQL_COLUMN_NAME_2=16 +# Lexical states for SCLEX_VERILOG +lex Verilog=SCLEX_VERILOG SCE_V_ +val SCE_V_DEFAULT=0 +val SCE_V_COMMENT=1 +val SCE_V_COMMENTLINE=2 +val SCE_V_COMMENTLINEBANG=3 +val SCE_V_NUMBER=4 +val SCE_V_WORD=5 +val SCE_V_STRING=6 +val SCE_V_WORD2=7 +val SCE_V_WORD3=8 +val SCE_V_PREPROCESSOR=9 +val SCE_V_OPERATOR=10 +val SCE_V_IDENTIFIER=11 +val SCE_V_STRINGEOL=12 +val SCE_V_USER=19 +val SCE_V_COMMENT_WORD=20 +val SCE_V_INPUT=21 +val SCE_V_OUTPUT=22 +val SCE_V_INOUT=23 +val SCE_V_PORT_CONNECT=24 +# Lexical states for SCLEX_KIX +lex Kix=SCLEX_KIX SCE_KIX_ +val SCE_KIX_DEFAULT=0 +val SCE_KIX_COMMENT=1 +val SCE_KIX_STRING1=2 +val SCE_KIX_STRING2=3 +val SCE_KIX_NUMBER=4 +val SCE_KIX_VAR=5 +val SCE_KIX_MACRO=6 +val SCE_KIX_KEYWORD=7 +val SCE_KIX_FUNCTIONS=8 +val SCE_KIX_OPERATOR=9 +val SCE_KIX_COMMENTSTREAM=10 +val SCE_KIX_IDENTIFIER=31 +# Lexical states for SCLEX_GUI4CLI +lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_ +val SCE_GC_DEFAULT=0 +val SCE_GC_COMMENTLINE=1 +val SCE_GC_COMMENTBLOCK=2 +val SCE_GC_GLOBAL=3 +val SCE_GC_EVENT=4 +val SCE_GC_ATTRIBUTE=5 +val SCE_GC_CONTROL=6 +val SCE_GC_COMMAND=7 +val SCE_GC_STRING=8 +val SCE_GC_OPERATOR=9 +# Lexical states for SCLEX_SPECMAN +lex Specman=SCLEX_SPECMAN SCE_SN_ +val SCE_SN_DEFAULT=0 +val SCE_SN_CODE=1 +val SCE_SN_COMMENTLINE=2 +val SCE_SN_COMMENTLINEBANG=3 +val SCE_SN_NUMBER=4 +val SCE_SN_WORD=5 +val SCE_SN_STRING=6 +val SCE_SN_WORD2=7 +val SCE_SN_WORD3=8 +val SCE_SN_PREPROCESSOR=9 +val SCE_SN_OPERATOR=10 +val SCE_SN_IDENTIFIER=11 +val SCE_SN_STRINGEOL=12 +val SCE_SN_REGEXTAG=13 +val SCE_SN_SIGNAL=14 +val SCE_SN_USER=19 +# Lexical states for SCLEX_AU3 +lex Au3=SCLEX_AU3 SCE_AU3_ +val SCE_AU3_DEFAULT=0 +val SCE_AU3_COMMENT=1 +val SCE_AU3_COMMENTBLOCK=2 +val SCE_AU3_NUMBER=3 +val SCE_AU3_FUNCTION=4 +val SCE_AU3_KEYWORD=5 +val SCE_AU3_MACRO=6 +val SCE_AU3_STRING=7 +val SCE_AU3_OPERATOR=8 +val SCE_AU3_VARIABLE=9 +val SCE_AU3_SENT=10 +val SCE_AU3_PREPROCESSOR=11 +val SCE_AU3_SPECIAL=12 +val SCE_AU3_EXPAND=13 +val SCE_AU3_COMOBJ=14 +val SCE_AU3_UDF=15 +# Lexical states for SCLEX_APDL +lex APDL=SCLEX_APDL SCE_APDL_ +val SCE_APDL_DEFAULT=0 +val SCE_APDL_COMMENT=1 +val SCE_APDL_COMMENTBLOCK=2 +val SCE_APDL_NUMBER=3 +val SCE_APDL_STRING=4 +val SCE_APDL_OPERATOR=5 +val SCE_APDL_WORD=6 +val SCE_APDL_PROCESSOR=7 +val SCE_APDL_COMMAND=8 +val SCE_APDL_SLASHCOMMAND=9 +val SCE_APDL_STARCOMMAND=10 +val SCE_APDL_ARGUMENT=11 +val SCE_APDL_FUNCTION=12 +# Lexical states for SCLEX_BASH +lex Bash=SCLEX_BASH SCE_SH_ +val SCE_SH_DEFAULT=0 +val SCE_SH_ERROR=1 +val SCE_SH_COMMENTLINE=2 +val SCE_SH_NUMBER=3 +val SCE_SH_WORD=4 +val SCE_SH_STRING=5 +val SCE_SH_CHARACTER=6 +val SCE_SH_OPERATOR=7 +val SCE_SH_IDENTIFIER=8 +val SCE_SH_SCALAR=9 +val SCE_SH_PARAM=10 +val SCE_SH_BACKTICKS=11 +val SCE_SH_HERE_DELIM=12 +val SCE_SH_HERE_Q=13 +# Lexical states for SCLEX_ASN1 +lex Asn1=SCLEX_ASN1 SCE_ASN1_ +val SCE_ASN1_DEFAULT=0 +val SCE_ASN1_COMMENT=1 +val SCE_ASN1_IDENTIFIER=2 +val SCE_ASN1_STRING=3 +val SCE_ASN1_OID=4 +val SCE_ASN1_SCALAR=5 +val SCE_ASN1_KEYWORD=6 +val SCE_ASN1_ATTRIBUTE=7 +val SCE_ASN1_DESCRIPTOR=8 +val SCE_ASN1_TYPE=9 +val SCE_ASN1_OPERATOR=10 +# Lexical states for SCLEX_VHDL +lex VHDL=SCLEX_VHDL SCE_VHDL_ +val SCE_VHDL_DEFAULT=0 +val SCE_VHDL_COMMENT=1 +val SCE_VHDL_COMMENTLINEBANG=2 +val SCE_VHDL_NUMBER=3 +val SCE_VHDL_STRING=4 +val SCE_VHDL_OPERATOR=5 +val SCE_VHDL_IDENTIFIER=6 +val SCE_VHDL_STRINGEOL=7 +val SCE_VHDL_KEYWORD=8 +val SCE_VHDL_STDOPERATOR=9 +val SCE_VHDL_ATTRIBUTE=10 +val SCE_VHDL_STDFUNCTION=11 +val SCE_VHDL_STDPACKAGE=12 +val SCE_VHDL_STDTYPE=13 +val SCE_VHDL_USERWORD=14 +val SCE_VHDL_BLOCK_COMMENT=15 +# Lexical states for SCLEX_CAML +lex Caml=SCLEX_CAML SCE_CAML_ +val SCE_CAML_DEFAULT=0 +val SCE_CAML_IDENTIFIER=1 +val SCE_CAML_TAGNAME=2 +val SCE_CAML_KEYWORD=3 +val SCE_CAML_KEYWORD2=4 +val SCE_CAML_KEYWORD3=5 +val SCE_CAML_LINENUM=6 +val SCE_CAML_OPERATOR=7 +val SCE_CAML_NUMBER=8 +val SCE_CAML_CHAR=9 +val SCE_CAML_WHITE=10 +val SCE_CAML_STRING=11 +val SCE_CAML_COMMENT=12 +val SCE_CAML_COMMENT1=13 +val SCE_CAML_COMMENT2=14 +val SCE_CAML_COMMENT3=15 +# Lexical states for SCLEX_HASKELL +lex Haskell=SCLEX_HASKELL SCE_HA_ +val SCE_HA_DEFAULT=0 +val SCE_HA_IDENTIFIER=1 +val SCE_HA_KEYWORD=2 +val SCE_HA_NUMBER=3 +val SCE_HA_STRING=4 +val SCE_HA_CHARACTER=5 +val SCE_HA_CLASS=6 +val SCE_HA_MODULE=7 +val SCE_HA_CAPITAL=8 +val SCE_HA_DATA=9 +val SCE_HA_IMPORT=10 +val SCE_HA_OPERATOR=11 +val SCE_HA_INSTANCE=12 +val SCE_HA_COMMENTLINE=13 +val SCE_HA_COMMENTBLOCK=14 +val SCE_HA_COMMENTBLOCK2=15 +val SCE_HA_COMMENTBLOCK3=16 +val SCE_HA_PRAGMA=17 +val SCE_HA_PREPROCESSOR=18 +val SCE_HA_STRINGEOL=19 +val SCE_HA_RESERVED_OPERATOR=20 +val SCE_HA_LITERATE_COMMENT=21 +val SCE_HA_LITERATE_CODEDELIM=22 +# Lexical states of SCLEX_TADS3 +lex TADS3=SCLEX_TADS3 SCE_T3_ +val SCE_T3_DEFAULT=0 +val SCE_T3_X_DEFAULT=1 +val SCE_T3_PREPROCESSOR=2 +val SCE_T3_BLOCK_COMMENT=3 +val SCE_T3_LINE_COMMENT=4 +val SCE_T3_OPERATOR=5 +val SCE_T3_KEYWORD=6 +val SCE_T3_NUMBER=7 +val SCE_T3_IDENTIFIER=8 +val SCE_T3_S_STRING=9 +val SCE_T3_D_STRING=10 +val SCE_T3_X_STRING=11 +val SCE_T3_LIB_DIRECTIVE=12 +val SCE_T3_MSG_PARAM=13 +val SCE_T3_HTML_TAG=14 +val SCE_T3_HTML_DEFAULT=15 +val SCE_T3_HTML_STRING=16 +val SCE_T3_USER1=17 +val SCE_T3_USER2=18 +val SCE_T3_USER3=19 +val SCE_T3_BRACE=20 +# Lexical states for SCLEX_REBOL +lex Rebol=SCLEX_REBOL SCE_REBOL_ +val SCE_REBOL_DEFAULT=0 +val SCE_REBOL_COMMENTLINE=1 +val SCE_REBOL_COMMENTBLOCK=2 +val SCE_REBOL_PREFACE=3 +val SCE_REBOL_OPERATOR=4 +val SCE_REBOL_CHARACTER=5 +val SCE_REBOL_QUOTEDSTRING=6 +val SCE_REBOL_BRACEDSTRING=7 +val SCE_REBOL_NUMBER=8 +val SCE_REBOL_PAIR=9 +val SCE_REBOL_TUPLE=10 +val SCE_REBOL_BINARY=11 +val SCE_REBOL_MONEY=12 +val SCE_REBOL_ISSUE=13 +val SCE_REBOL_TAG=14 +val SCE_REBOL_FILE=15 +val SCE_REBOL_EMAIL=16 +val SCE_REBOL_URL=17 +val SCE_REBOL_DATE=18 +val SCE_REBOL_TIME=19 +val SCE_REBOL_IDENTIFIER=20 +val SCE_REBOL_WORD=21 +val SCE_REBOL_WORD2=22 +val SCE_REBOL_WORD3=23 +val SCE_REBOL_WORD4=24 +val SCE_REBOL_WORD5=25 +val SCE_REBOL_WORD6=26 +val SCE_REBOL_WORD7=27 +val SCE_REBOL_WORD8=28 +# Lexical states for SCLEX_SQL +lex SQL=SCLEX_SQL SCE_SQL_ +val SCE_SQL_DEFAULT=0 +val SCE_SQL_COMMENT=1 +val SCE_SQL_COMMENTLINE=2 +val SCE_SQL_COMMENTDOC=3 +val SCE_SQL_NUMBER=4 +val SCE_SQL_WORD=5 +val SCE_SQL_STRING=6 +val SCE_SQL_CHARACTER=7 +val SCE_SQL_SQLPLUS=8 +val SCE_SQL_SQLPLUS_PROMPT=9 +val SCE_SQL_OPERATOR=10 +val SCE_SQL_IDENTIFIER=11 +val SCE_SQL_SQLPLUS_COMMENT=13 +val SCE_SQL_COMMENTLINEDOC=15 +val SCE_SQL_WORD2=16 +val SCE_SQL_COMMENTDOCKEYWORD=17 +val SCE_SQL_COMMENTDOCKEYWORDERROR=18 +val SCE_SQL_USER1=19 +val SCE_SQL_USER2=20 +val SCE_SQL_USER3=21 +val SCE_SQL_USER4=22 +val SCE_SQL_QUOTEDIDENTIFIER=23 +val SCE_SQL_QOPERATOR=24 +# Lexical states for SCLEX_SMALLTALK +lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ +val SCE_ST_DEFAULT=0 +val SCE_ST_STRING=1 +val SCE_ST_NUMBER=2 +val SCE_ST_COMMENT=3 +val SCE_ST_SYMBOL=4 +val SCE_ST_BINARY=5 +val SCE_ST_BOOL=6 +val SCE_ST_SELF=7 +val SCE_ST_SUPER=8 +val SCE_ST_NIL=9 +val SCE_ST_GLOBAL=10 +val SCE_ST_RETURN=11 +val SCE_ST_SPECIAL=12 +val SCE_ST_KWSEND=13 +val SCE_ST_ASSIGN=14 +val SCE_ST_CHARACTER=15 +val SCE_ST_SPEC_SEL=16 +# Lexical states for SCLEX_FLAGSHIP (clipper) +lex FlagShip=SCLEX_FLAGSHIP SCE_FS_ +val SCE_FS_DEFAULT=0 +val SCE_FS_COMMENT=1 +val SCE_FS_COMMENTLINE=2 +val SCE_FS_COMMENTDOC=3 +val SCE_FS_COMMENTLINEDOC=4 +val SCE_FS_COMMENTDOCKEYWORD=5 +val SCE_FS_COMMENTDOCKEYWORDERROR=6 +val SCE_FS_KEYWORD=7 +val SCE_FS_KEYWORD2=8 +val SCE_FS_KEYWORD3=9 +val SCE_FS_KEYWORD4=10 +val SCE_FS_NUMBER=11 +val SCE_FS_STRING=12 +val SCE_FS_PREPROCESSOR=13 +val SCE_FS_OPERATOR=14 +val SCE_FS_IDENTIFIER=15 +val SCE_FS_DATE=16 +val SCE_FS_STRINGEOL=17 +val SCE_FS_CONSTANT=18 +val SCE_FS_WORDOPERATOR=19 +val SCE_FS_DISABLEDCODE=20 +val SCE_FS_DEFAULT_C=21 +val SCE_FS_COMMENTDOC_C=22 +val SCE_FS_COMMENTLINEDOC_C=23 +val SCE_FS_KEYWORD_C=24 +val SCE_FS_KEYWORD2_C=25 +val SCE_FS_NUMBER_C=26 +val SCE_FS_STRING_C=27 +val SCE_FS_PREPROCESSOR_C=28 +val SCE_FS_OPERATOR_C=29 +val SCE_FS_IDENTIFIER_C=30 +val SCE_FS_STRINGEOL_C=31 +# Lexical states for SCLEX_CSOUND +lex Csound=SCLEX_CSOUND SCE_CSOUND_ +val SCE_CSOUND_DEFAULT=0 +val SCE_CSOUND_COMMENT=1 +val SCE_CSOUND_NUMBER=2 +val SCE_CSOUND_OPERATOR=3 +val SCE_CSOUND_INSTR=4 +val SCE_CSOUND_IDENTIFIER=5 +val SCE_CSOUND_OPCODE=6 +val SCE_CSOUND_HEADERSTMT=7 +val SCE_CSOUND_USERKEYWORD=8 +val SCE_CSOUND_COMMENTBLOCK=9 +val SCE_CSOUND_PARAM=10 +val SCE_CSOUND_ARATE_VAR=11 +val SCE_CSOUND_KRATE_VAR=12 +val SCE_CSOUND_IRATE_VAR=13 +val SCE_CSOUND_GLOBAL_VAR=14 +val SCE_CSOUND_STRINGEOL=15 +# Lexical states for SCLEX_INNOSETUP +lex Inno=SCLEX_INNOSETUP SCE_INNO_ +val SCE_INNO_DEFAULT=0 +val SCE_INNO_COMMENT=1 +val SCE_INNO_KEYWORD=2 +val SCE_INNO_PARAMETER=3 +val SCE_INNO_SECTION=4 +val SCE_INNO_PREPROC=5 +val SCE_INNO_INLINE_EXPANSION=6 +val SCE_INNO_COMMENT_PASCAL=7 +val SCE_INNO_KEYWORD_PASCAL=8 +val SCE_INNO_KEYWORD_USER=9 +val SCE_INNO_STRING_DOUBLE=10 +val SCE_INNO_STRING_SINGLE=11 +val SCE_INNO_IDENTIFIER=12 +# Lexical states for SCLEX_OPAL +lex Opal=SCLEX_OPAL SCE_OPAL_ +val SCE_OPAL_SPACE=0 +val SCE_OPAL_COMMENT_BLOCK=1 +val SCE_OPAL_COMMENT_LINE=2 +val SCE_OPAL_INTEGER=3 +val SCE_OPAL_KEYWORD=4 +val SCE_OPAL_SORT=5 +val SCE_OPAL_STRING=6 +val SCE_OPAL_PAR=7 +val SCE_OPAL_BOOL_CONST=8 +val SCE_OPAL_DEFAULT=32 +# Lexical states for SCLEX_SPICE +lex Spice=SCLEX_SPICE SCE_SPICE_ +val SCE_SPICE_DEFAULT=0 +val SCE_SPICE_IDENTIFIER=1 +val SCE_SPICE_KEYWORD=2 +val SCE_SPICE_KEYWORD2=3 +val SCE_SPICE_KEYWORD3=4 +val SCE_SPICE_NUMBER=5 +val SCE_SPICE_DELIMITER=6 +val SCE_SPICE_VALUE=7 +val SCE_SPICE_COMMENTLINE=8 +# Lexical states for SCLEX_CMAKE +lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ +val SCE_CMAKE_DEFAULT=0 +val SCE_CMAKE_COMMENT=1 +val SCE_CMAKE_STRINGDQ=2 +val SCE_CMAKE_STRINGLQ=3 +val SCE_CMAKE_STRINGRQ=4 +val SCE_CMAKE_COMMANDS=5 +val SCE_CMAKE_PARAMETERS=6 +val SCE_CMAKE_VARIABLE=7 +val SCE_CMAKE_USERDEFINED=8 +val SCE_CMAKE_WHILEDEF=9 +val SCE_CMAKE_FOREACHDEF=10 +val SCE_CMAKE_IFDEFINEDEF=11 +val SCE_CMAKE_MACRODEF=12 +val SCE_CMAKE_STRINGVAR=13 +val SCE_CMAKE_NUMBER=14 +# Lexical states for SCLEX_GAP +lex Gap=SCLEX_GAP SCE_GAP_ +val SCE_GAP_DEFAULT=0 +val SCE_GAP_IDENTIFIER=1 +val SCE_GAP_KEYWORD=2 +val SCE_GAP_KEYWORD2=3 +val SCE_GAP_KEYWORD3=4 +val SCE_GAP_KEYWORD4=5 +val SCE_GAP_STRING=6 +val SCE_GAP_CHAR=7 +val SCE_GAP_OPERATOR=8 +val SCE_GAP_COMMENT=9 +val SCE_GAP_NUMBER=10 +val SCE_GAP_STRINGEOL=11 +# Lexical state for SCLEX_PLM +lex PLM=SCLEX_PLM SCE_PLM_ +val SCE_PLM_DEFAULT=0 +val SCE_PLM_COMMENT=1 +val SCE_PLM_STRING=2 +val SCE_PLM_NUMBER=3 +val SCE_PLM_IDENTIFIER=4 +val SCE_PLM_OPERATOR=5 +val SCE_PLM_CONTROL=6 +val SCE_PLM_KEYWORD=7 +# Lexical state for SCLEX_PROGRESS +lex Progress=SCLEX_PROGRESS SCE_ABL_ +val SCE_ABL_DEFAULT=0 +val SCE_ABL_NUMBER=1 +val SCE_ABL_WORD=2 +val SCE_ABL_STRING=3 +val SCE_ABL_CHARACTER=4 +val SCE_ABL_PREPROCESSOR=5 +val SCE_ABL_OPERATOR=6 +val SCE_ABL_IDENTIFIER=7 +val SCE_ABL_BLOCK=8 +val SCE_ABL_END=9 +val SCE_ABL_COMMENT=10 +val SCE_ABL_TASKMARKER=11 +val SCE_ABL_LINECOMMENT=12 +# Lexical states for SCLEX_ABAQUS +lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_ +val SCE_ABAQUS_DEFAULT=0 +val SCE_ABAQUS_COMMENT=1 +val SCE_ABAQUS_COMMENTBLOCK=2 +val SCE_ABAQUS_NUMBER=3 +val SCE_ABAQUS_STRING=4 +val SCE_ABAQUS_OPERATOR=5 +val SCE_ABAQUS_WORD=6 +val SCE_ABAQUS_PROCESSOR=7 +val SCE_ABAQUS_COMMAND=8 +val SCE_ABAQUS_SLASHCOMMAND=9 +val SCE_ABAQUS_STARCOMMAND=10 +val SCE_ABAQUS_ARGUMENT=11 +val SCE_ABAQUS_FUNCTION=12 +# Lexical states for SCLEX_ASYMPTOTE +lex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_ +val SCE_ASY_DEFAULT=0 +val SCE_ASY_COMMENT=1 +val SCE_ASY_COMMENTLINE=2 +val SCE_ASY_NUMBER=3 +val SCE_ASY_WORD=4 +val SCE_ASY_STRING=5 +val SCE_ASY_CHARACTER=6 +val SCE_ASY_OPERATOR=7 +val SCE_ASY_IDENTIFIER=8 +val SCE_ASY_STRINGEOL=9 +val SCE_ASY_COMMENTLINEDOC=10 +val SCE_ASY_WORD2=11 +# Lexical states for SCLEX_R +lex R=SCLEX_R SCE_R_ +val SCE_R_DEFAULT=0 +val SCE_R_COMMENT=1 +val SCE_R_KWORD=2 +val SCE_R_BASEKWORD=3 +val SCE_R_OTHERKWORD=4 +val SCE_R_NUMBER=5 +val SCE_R_STRING=6 +val SCE_R_STRING2=7 +val SCE_R_OPERATOR=8 +val SCE_R_IDENTIFIER=9 +val SCE_R_INFIX=10 +val SCE_R_INFIXEOL=11 +# Lexical state for SCLEX_MAGIK +lex MagikSF=SCLEX_MAGIK SCE_MAGIK_ +val SCE_MAGIK_DEFAULT=0 +val SCE_MAGIK_COMMENT=1 +val SCE_MAGIK_HYPER_COMMENT=16 +val SCE_MAGIK_STRING=2 +val SCE_MAGIK_CHARACTER=3 +val SCE_MAGIK_NUMBER=4 +val SCE_MAGIK_IDENTIFIER=5 +val SCE_MAGIK_OPERATOR=6 +val SCE_MAGIK_FLOW=7 +val SCE_MAGIK_CONTAINER=8 +val SCE_MAGIK_BRACKET_BLOCK=9 +val SCE_MAGIK_BRACE_BLOCK=10 +val SCE_MAGIK_SQBRACKET_BLOCK=11 +val SCE_MAGIK_UNKNOWN_KEYWORD=12 +val SCE_MAGIK_KEYWORD=13 +val SCE_MAGIK_PRAGMA=14 +val SCE_MAGIK_SYMBOL=15 +# Lexical state for SCLEX_POWERSHELL +lex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_ +val SCE_POWERSHELL_DEFAULT=0 +val SCE_POWERSHELL_COMMENT=1 +val SCE_POWERSHELL_STRING=2 +val SCE_POWERSHELL_CHARACTER=3 +val SCE_POWERSHELL_NUMBER=4 +val SCE_POWERSHELL_VARIABLE=5 +val SCE_POWERSHELL_OPERATOR=6 +val SCE_POWERSHELL_IDENTIFIER=7 +val SCE_POWERSHELL_KEYWORD=8 +val SCE_POWERSHELL_CMDLET=9 +val SCE_POWERSHELL_ALIAS=10 +val SCE_POWERSHELL_FUNCTION=11 +val SCE_POWERSHELL_USER1=12 +val SCE_POWERSHELL_COMMENTSTREAM=13 +val SCE_POWERSHELL_HERE_STRING=14 +val SCE_POWERSHELL_HERE_CHARACTER=15 +val SCE_POWERSHELL_COMMENTDOCKEYWORD=16 +# Lexical state for SCLEX_MYSQL +lex MySQL=SCLEX_MYSQL SCE_MYSQL_ +val SCE_MYSQL_DEFAULT=0 +val SCE_MYSQL_COMMENT=1 +val SCE_MYSQL_COMMENTLINE=2 +val SCE_MYSQL_VARIABLE=3 +val SCE_MYSQL_SYSTEMVARIABLE=4 +val SCE_MYSQL_KNOWNSYSTEMVARIABLE=5 +val SCE_MYSQL_NUMBER=6 +val SCE_MYSQL_MAJORKEYWORD=7 +val SCE_MYSQL_KEYWORD=8 +val SCE_MYSQL_DATABASEOBJECT=9 +val SCE_MYSQL_PROCEDUREKEYWORD=10 +val SCE_MYSQL_STRING=11 +val SCE_MYSQL_SQSTRING=12 +val SCE_MYSQL_DQSTRING=13 +val SCE_MYSQL_OPERATOR=14 +val SCE_MYSQL_FUNCTION=15 +val SCE_MYSQL_IDENTIFIER=16 +val SCE_MYSQL_QUOTEDIDENTIFIER=17 +val SCE_MYSQL_USER1=18 +val SCE_MYSQL_USER2=19 +val SCE_MYSQL_USER3=20 +val SCE_MYSQL_HIDDENCOMMAND=21 +val SCE_MYSQL_PLACEHOLDER=22 +# Lexical state for SCLEX_PO +lex Po=SCLEX_PO SCE_PO_ +val SCE_PO_DEFAULT=0 +val SCE_PO_COMMENT=1 +val SCE_PO_MSGID=2 +val SCE_PO_MSGID_TEXT=3 +val SCE_PO_MSGSTR=4 +val SCE_PO_MSGSTR_TEXT=5 +val SCE_PO_MSGCTXT=6 +val SCE_PO_MSGCTXT_TEXT=7 +val SCE_PO_FUZZY=8 +val SCE_PO_PROGRAMMER_COMMENT=9 +val SCE_PO_REFERENCE=10 +val SCE_PO_FLAGS=11 +val SCE_PO_MSGID_TEXT_EOL=12 +val SCE_PO_MSGSTR_TEXT_EOL=13 +val SCE_PO_MSGCTXT_TEXT_EOL=14 +val SCE_PO_ERROR=15 +# Lexical states for SCLEX_PASCAL +lex Pascal=SCLEX_PASCAL SCE_PAS_ +val SCE_PAS_DEFAULT=0 +val SCE_PAS_IDENTIFIER=1 +val SCE_PAS_COMMENT=2 +val SCE_PAS_COMMENT2=3 +val SCE_PAS_COMMENTLINE=4 +val SCE_PAS_PREPROCESSOR=5 +val SCE_PAS_PREPROCESSOR2=6 +val SCE_PAS_NUMBER=7 +val SCE_PAS_HEXNUMBER=8 +val SCE_PAS_WORD=9 +val SCE_PAS_STRING=10 +val SCE_PAS_STRINGEOL=11 +val SCE_PAS_CHARACTER=12 +val SCE_PAS_OPERATOR=13 +val SCE_PAS_ASM=14 +# Lexical state for SCLEX_SORCUS +lex SORCUS=SCLEX_SORCUS SCE_SORCUS_ +val SCE_SORCUS_DEFAULT=0 +val SCE_SORCUS_COMMAND=1 +val SCE_SORCUS_PARAMETER=2 +val SCE_SORCUS_COMMENTLINE=3 +val SCE_SORCUS_STRING=4 +val SCE_SORCUS_STRINGEOL=5 +val SCE_SORCUS_IDENTIFIER=6 +val SCE_SORCUS_OPERATOR=7 +val SCE_SORCUS_NUMBER=8 +val SCE_SORCUS_CONSTANT=9 +# Lexical state for SCLEX_POWERPRO +lex PowerPro=SCLEX_POWERPRO SCE_POWERPRO_ +val SCE_POWERPRO_DEFAULT=0 +val SCE_POWERPRO_COMMENTBLOCK=1 +val SCE_POWERPRO_COMMENTLINE=2 +val SCE_POWERPRO_NUMBER=3 +val SCE_POWERPRO_WORD=4 +val SCE_POWERPRO_WORD2=5 +val SCE_POWERPRO_WORD3=6 +val SCE_POWERPRO_WORD4=7 +val SCE_POWERPRO_DOUBLEQUOTEDSTRING=8 +val SCE_POWERPRO_SINGLEQUOTEDSTRING=9 +val SCE_POWERPRO_LINECONTINUE=10 +val SCE_POWERPRO_OPERATOR=11 +val SCE_POWERPRO_IDENTIFIER=12 +val SCE_POWERPRO_STRINGEOL=13 +val SCE_POWERPRO_VERBATIM=14 +val SCE_POWERPRO_ALTQUOTE=15 +val SCE_POWERPRO_FUNCTION=16 +# Lexical states for SCLEX_SML +lex SML=SCLEX_SML SCE_SML_ +val SCE_SML_DEFAULT=0 +val SCE_SML_IDENTIFIER=1 +val SCE_SML_TAGNAME=2 +val SCE_SML_KEYWORD=3 +val SCE_SML_KEYWORD2=4 +val SCE_SML_KEYWORD3=5 +val SCE_SML_LINENUM=6 +val SCE_SML_OPERATOR=7 +val SCE_SML_NUMBER=8 +val SCE_SML_CHAR=9 +val SCE_SML_STRING=11 +val SCE_SML_COMMENT=12 +val SCE_SML_COMMENT1=13 +val SCE_SML_COMMENT2=14 +val SCE_SML_COMMENT3=15 +# Lexical state for SCLEX_MARKDOWN +lex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_ +val SCE_MARKDOWN_DEFAULT=0 +val SCE_MARKDOWN_LINE_BEGIN=1 +val SCE_MARKDOWN_STRONG1=2 +val SCE_MARKDOWN_STRONG2=3 +val SCE_MARKDOWN_EM1=4 +val SCE_MARKDOWN_EM2=5 +val SCE_MARKDOWN_HEADER1=6 +val SCE_MARKDOWN_HEADER2=7 +val SCE_MARKDOWN_HEADER3=8 +val SCE_MARKDOWN_HEADER4=9 +val SCE_MARKDOWN_HEADER5=10 +val SCE_MARKDOWN_HEADER6=11 +val SCE_MARKDOWN_PRECHAR=12 +val SCE_MARKDOWN_ULIST_ITEM=13 +val SCE_MARKDOWN_OLIST_ITEM=14 +val SCE_MARKDOWN_BLOCKQUOTE=15 +val SCE_MARKDOWN_STRIKEOUT=16 +val SCE_MARKDOWN_HRULE=17 +val SCE_MARKDOWN_LINK=18 +val SCE_MARKDOWN_CODE=19 +val SCE_MARKDOWN_CODE2=20 +val SCE_MARKDOWN_CODEBK=21 +# Lexical state for SCLEX_TXT2TAGS +lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_ +val SCE_TXT2TAGS_DEFAULT=0 +val SCE_TXT2TAGS_LINE_BEGIN=1 +val SCE_TXT2TAGS_STRONG1=2 +val SCE_TXT2TAGS_STRONG2=3 +val SCE_TXT2TAGS_EM1=4 +val SCE_TXT2TAGS_EM2=5 +val SCE_TXT2TAGS_HEADER1=6 +val SCE_TXT2TAGS_HEADER2=7 +val SCE_TXT2TAGS_HEADER3=8 +val SCE_TXT2TAGS_HEADER4=9 +val SCE_TXT2TAGS_HEADER5=10 +val SCE_TXT2TAGS_HEADER6=11 +val SCE_TXT2TAGS_PRECHAR=12 +val SCE_TXT2TAGS_ULIST_ITEM=13 +val SCE_TXT2TAGS_OLIST_ITEM=14 +val SCE_TXT2TAGS_BLOCKQUOTE=15 +val SCE_TXT2TAGS_STRIKEOUT=16 +val SCE_TXT2TAGS_HRULE=17 +val SCE_TXT2TAGS_LINK=18 +val SCE_TXT2TAGS_CODE=19 +val SCE_TXT2TAGS_CODE2=20 +val SCE_TXT2TAGS_CODEBK=21 +val SCE_TXT2TAGS_COMMENT=22 +val SCE_TXT2TAGS_OPTION=23 +val SCE_TXT2TAGS_PREPROC=24 +val SCE_TXT2TAGS_POSTPROC=25 +# Lexical states for SCLEX_A68K +lex A68k=SCLEX_A68K SCE_A68K_ +val SCE_A68K_DEFAULT=0 +val SCE_A68K_COMMENT=1 +val SCE_A68K_NUMBER_DEC=2 +val SCE_A68K_NUMBER_BIN=3 +val SCE_A68K_NUMBER_HEX=4 +val SCE_A68K_STRING1=5 +val SCE_A68K_OPERATOR=6 +val SCE_A68K_CPUINSTRUCTION=7 +val SCE_A68K_EXTINSTRUCTION=8 +val SCE_A68K_REGISTER=9 +val SCE_A68K_DIRECTIVE=10 +val SCE_A68K_MACRO_ARG=11 +val SCE_A68K_LABEL=12 +val SCE_A68K_STRING2=13 +val SCE_A68K_IDENTIFIER=14 +val SCE_A68K_MACRO_DECLARATION=15 +val SCE_A68K_COMMENT_WORD=16 +val SCE_A68K_COMMENT_SPECIAL=17 +val SCE_A68K_COMMENT_DOXYGEN=18 +# Lexical states for SCLEX_MODULA +lex Modula=SCLEX_MODULA SCE_MODULA_ +val SCE_MODULA_DEFAULT=0 +val SCE_MODULA_COMMENT=1 +val SCE_MODULA_DOXYCOMM=2 +val SCE_MODULA_DOXYKEY=3 +val SCE_MODULA_KEYWORD=4 +val SCE_MODULA_RESERVED=5 +val SCE_MODULA_NUMBER=6 +val SCE_MODULA_BASENUM=7 +val SCE_MODULA_FLOAT=8 +val SCE_MODULA_STRING=9 +val SCE_MODULA_STRSPEC=10 +val SCE_MODULA_CHAR=11 +val SCE_MODULA_CHARSPEC=12 +val SCE_MODULA_PROC=13 +val SCE_MODULA_PRAGMA=14 +val SCE_MODULA_PRGKEY=15 +val SCE_MODULA_OPERATOR=16 +val SCE_MODULA_BADSTR=17 +# Lexical states for SCLEX_COFFEESCRIPT +lex CoffeeScript=SCLEX_COFFEESCRIPT SCE_COFFEESCRIPT_ +val SCE_COFFEESCRIPT_DEFAULT=0 +val SCE_COFFEESCRIPT_COMMENT=1 +val SCE_COFFEESCRIPT_COMMENTLINE=2 +val SCE_COFFEESCRIPT_COMMENTDOC=3 +val SCE_COFFEESCRIPT_NUMBER=4 +val SCE_COFFEESCRIPT_WORD=5 +val SCE_COFFEESCRIPT_STRING=6 +val SCE_COFFEESCRIPT_CHARACTER=7 +val SCE_COFFEESCRIPT_UUID=8 +val SCE_COFFEESCRIPT_PREPROCESSOR=9 +val SCE_COFFEESCRIPT_OPERATOR=10 +val SCE_COFFEESCRIPT_IDENTIFIER=11 +val SCE_COFFEESCRIPT_STRINGEOL=12 +val SCE_COFFEESCRIPT_VERBATIM=13 +val SCE_COFFEESCRIPT_REGEX=14 +val SCE_COFFEESCRIPT_COMMENTLINEDOC=15 +val SCE_COFFEESCRIPT_WORD2=16 +val SCE_COFFEESCRIPT_COMMENTDOCKEYWORD=17 +val SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR=18 +val SCE_COFFEESCRIPT_GLOBALCLASS=19 +val SCE_COFFEESCRIPT_STRINGRAW=20 +val SCE_COFFEESCRIPT_TRIPLEVERBATIM=21 +val SCE_COFFEESCRIPT_COMMENTBLOCK=22 +val SCE_COFFEESCRIPT_VERBOSE_REGEX=23 +val SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT=24 +val SCE_COFFEESCRIPT_INSTANCEPROPERTY=25 +# Lexical states for SCLEX_AVS +lex AVS=SCLEX_AVS SCE_AVS_ +val SCE_AVS_DEFAULT=0 +val SCE_AVS_COMMENTBLOCK=1 +val SCE_AVS_COMMENTBLOCKN=2 +val SCE_AVS_COMMENTLINE=3 +val SCE_AVS_NUMBER=4 +val SCE_AVS_OPERATOR=5 +val SCE_AVS_IDENTIFIER=6 +val SCE_AVS_STRING=7 +val SCE_AVS_TRIPLESTRING=8 +val SCE_AVS_KEYWORD=9 +val SCE_AVS_FILTER=10 +val SCE_AVS_PLUGIN=11 +val SCE_AVS_FUNCTION=12 +val SCE_AVS_CLIPPROP=13 +val SCE_AVS_USERDFN=14 +# Lexical states for SCLEX_ECL +lex ECL=SCLEX_ECL SCE_ECL_ +val SCE_ECL_DEFAULT=0 +val SCE_ECL_COMMENT=1 +val SCE_ECL_COMMENTLINE=2 +val SCE_ECL_NUMBER=3 +val SCE_ECL_STRING=4 +val SCE_ECL_WORD0=5 +val SCE_ECL_OPERATOR=6 +val SCE_ECL_CHARACTER=7 +val SCE_ECL_UUID=8 +val SCE_ECL_PREPROCESSOR=9 +val SCE_ECL_UNKNOWN=10 +val SCE_ECL_IDENTIFIER=11 +val SCE_ECL_STRINGEOL=12 +val SCE_ECL_VERBATIM=13 +val SCE_ECL_REGEX=14 +val SCE_ECL_COMMENTLINEDOC=15 +val SCE_ECL_WORD1=16 +val SCE_ECL_COMMENTDOCKEYWORD=17 +val SCE_ECL_COMMENTDOCKEYWORDERROR=18 +val SCE_ECL_WORD2=19 +val SCE_ECL_WORD3=20 +val SCE_ECL_WORD4=21 +val SCE_ECL_WORD5=22 +val SCE_ECL_COMMENTDOC=23 +val SCE_ECL_ADDED=24 +val SCE_ECL_DELETED=25 +val SCE_ECL_CHANGED=26 +val SCE_ECL_MOVED=27 +# Lexical states for SCLEX_OSCRIPT +lex OScript=SCLEX_OSCRIPT SCE_OSCRIPT_ +val SCE_OSCRIPT_DEFAULT=0 +val SCE_OSCRIPT_LINE_COMMENT=1 +val SCE_OSCRIPT_BLOCK_COMMENT=2 +val SCE_OSCRIPT_DOC_COMMENT=3 +val SCE_OSCRIPT_PREPROCESSOR=4 +val SCE_OSCRIPT_NUMBER=5 +val SCE_OSCRIPT_SINGLEQUOTE_STRING=6 +val SCE_OSCRIPT_DOUBLEQUOTE_STRING=7 +val SCE_OSCRIPT_CONSTANT=8 +val SCE_OSCRIPT_IDENTIFIER=9 +val SCE_OSCRIPT_GLOBAL=10 +val SCE_OSCRIPT_KEYWORD=11 +val SCE_OSCRIPT_OPERATOR=12 +val SCE_OSCRIPT_LABEL=13 +val SCE_OSCRIPT_TYPE=14 +val SCE_OSCRIPT_FUNCTION=15 +val SCE_OSCRIPT_OBJECT=16 +val SCE_OSCRIPT_PROPERTY=17 +val SCE_OSCRIPT_METHOD=18 +# Lexical states for SCLEX_VISUALPROLOG +lex VisualProlog=SCLEX_VISUALPROLOG SCE_VISUALPROLOG_ +val SCE_VISUALPROLOG_DEFAULT=0 +val SCE_VISUALPROLOG_KEY_MAJOR=1 +val SCE_VISUALPROLOG_KEY_MINOR=2 +val SCE_VISUALPROLOG_KEY_DIRECTIVE=3 +val SCE_VISUALPROLOG_COMMENT_BLOCK=4 +val SCE_VISUALPROLOG_COMMENT_LINE=5 +val SCE_VISUALPROLOG_COMMENT_KEY=6 +val SCE_VISUALPROLOG_COMMENT_KEY_ERROR=7 +val SCE_VISUALPROLOG_IDENTIFIER=8 +val SCE_VISUALPROLOG_VARIABLE=9 +val SCE_VISUALPROLOG_ANONYMOUS=10 +val SCE_VISUALPROLOG_NUMBER=11 +val SCE_VISUALPROLOG_OPERATOR=12 +val SCE_VISUALPROLOG_CHARACTER=13 +val SCE_VISUALPROLOG_CHARACTER_TOO_MANY=14 +val SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR=15 +val SCE_VISUALPROLOG_STRING=16 +val SCE_VISUALPROLOG_STRING_ESCAPE=17 +val SCE_VISUALPROLOG_STRING_ESCAPE_ERROR=18 +val SCE_VISUALPROLOG_STRING_EOL_OPEN=19 +val SCE_VISUALPROLOG_STRING_VERBATIM=20 +val SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL=21 +val SCE_VISUALPROLOG_STRING_VERBATIM_EOL=22 +# Lexical states for SCLEX_STTXT +lex StructuredText=SCLEX_STTXT SCE_STTXT_ +val SCE_STTXT_DEFAULT=0 +val SCE_STTXT_COMMENT=1 +val SCE_STTXT_COMMENTLINE=2 +val SCE_STTXT_KEYWORD=3 +val SCE_STTXT_TYPE=4 +val SCE_STTXT_FUNCTION=5 +val SCE_STTXT_FB=6 +val SCE_STTXT_NUMBER=7 +val SCE_STTXT_HEXNUMBER=8 +val SCE_STTXT_PRAGMA=9 +val SCE_STTXT_OPERATOR=10 +val SCE_STTXT_CHARACTER=11 +val SCE_STTXT_STRING1=12 +val SCE_STTXT_STRING2=13 +val SCE_STTXT_STRINGEOL=14 +val SCE_STTXT_IDENTIFIER=15 +val SCE_STTXT_DATETIME=16 +val SCE_STTXT_VARS=17 +val SCE_STTXT_PRAGMAS=18 +# Lexical states for SCLEX_KVIRC +lex KVIrc=SCLEX_KVIRC SCE_KVIRC_ +val SCE_KVIRC_DEFAULT=0 +val SCE_KVIRC_COMMENT=1 +val SCE_KVIRC_COMMENTBLOCK=2 +val SCE_KVIRC_STRING=3 +val SCE_KVIRC_WORD=4 +val SCE_KVIRC_KEYWORD=5 +val SCE_KVIRC_FUNCTION_KEYWORD=6 +val SCE_KVIRC_FUNCTION=7 +val SCE_KVIRC_VARIABLE=8 +val SCE_KVIRC_NUMBER=9 +val SCE_KVIRC_OPERATOR=10 +val SCE_KVIRC_STRING_FUNCTION=11 +val SCE_KVIRC_STRING_VARIABLE=12 +# Lexical states for SCLEX_RUST +lex Rust=SCLEX_RUST SCE_RUST_ +val SCE_RUST_DEFAULT=0 +val SCE_RUST_COMMENTBLOCK=1 +val SCE_RUST_COMMENTLINE=2 +val SCE_RUST_COMMENTBLOCKDOC=3 +val SCE_RUST_COMMENTLINEDOC=4 +val SCE_RUST_NUMBER=5 +val SCE_RUST_WORD=6 +val SCE_RUST_WORD2=7 +val SCE_RUST_WORD3=8 +val SCE_RUST_WORD4=9 +val SCE_RUST_WORD5=10 +val SCE_RUST_WORD6=11 +val SCE_RUST_WORD7=12 +val SCE_RUST_STRING=13 +val SCE_RUST_STRINGR=14 +val SCE_RUST_CHARACTER=15 +val SCE_RUST_OPERATOR=16 +val SCE_RUST_IDENTIFIER=17 +val SCE_RUST_LIFETIME=18 +val SCE_RUST_MACRO=19 +val SCE_RUST_LEXERROR=20 +val SCE_RUST_BYTESTRING=21 +val SCE_RUST_BYTESTRINGR=22 +val SCE_RUST_BYTECHARACTER=23 +# Lexical states for SCLEX_DMAP +lex DMAP=SCLEX_DMAP SCE_DMAP_ +val SCE_DMAP_DEFAULT=0 +val SCE_DMAP_COMMENT=1 +val SCE_DMAP_NUMBER=2 +val SCE_DMAP_STRING1=3 +val SCE_DMAP_STRING2=4 +val SCE_DMAP_STRINGEOL=5 +val SCE_DMAP_OPERATOR=6 +val SCE_DMAP_IDENTIFIER=7 +val SCE_DMAP_WORD=8 +val SCE_DMAP_WORD2=9 +val SCE_DMAP_WORD3=10 +# Lexical states for SCLEX_DMIS +lex DMIS=SCLEX_DMIS SCE_DMIS_ +val SCE_DMIS_DEFAULT=0 +val SCE_DMIS_COMMENT=1 +val SCE_DMIS_STRING=2 +val SCE_DMIS_NUMBER=3 +val SCE_DMIS_KEYWORD=4 +val SCE_DMIS_MAJORWORD=5 +val SCE_DMIS_MINORWORD=6 +val SCE_DMIS_UNSUPPORTED_MAJOR=7 +val SCE_DMIS_UNSUPPORTED_MINOR=8 +val SCE_DMIS_LABEL=9 +# Lexical states for SCLEX_REGISTRY +lex REG=SCLEX_REGISTRY SCE_REG_ +val SCE_REG_DEFAULT=0 +val SCE_REG_COMMENT=1 +val SCE_REG_VALUENAME=2 +val SCE_REG_STRING=3 +val SCE_REG_HEXDIGIT=4 +val SCE_REG_VALUETYPE=5 +val SCE_REG_ADDEDKEY=6 +val SCE_REG_DELETEDKEY=7 +val SCE_REG_ESCAPED=8 +val SCE_REG_KEYPATH_GUID=9 +val SCE_REG_STRING_GUID=10 +val SCE_REG_PARAMETER=11 +val SCE_REG_OPERATOR=12 +# Lexical state for SCLEX_BIBTEX +lex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_ +val SCE_BIBTEX_DEFAULT=0 +val SCE_BIBTEX_ENTRY=1 +val SCE_BIBTEX_UNKNOWN_ENTRY=2 +val SCE_BIBTEX_KEY=3 +val SCE_BIBTEX_PARAMETER=4 +val SCE_BIBTEX_VALUE=5 +val SCE_BIBTEX_COMMENT=6 +# Lexical state for SCLEX_SREC +lex Srec=SCLEX_SREC SCE_HEX_ +val SCE_HEX_DEFAULT=0 +val SCE_HEX_RECSTART=1 +val SCE_HEX_RECTYPE=2 +val SCE_HEX_RECTYPE_UNKNOWN=3 +val SCE_HEX_BYTECOUNT=4 +val SCE_HEX_BYTECOUNT_WRONG=5 +val SCE_HEX_NOADDRESS=6 +val SCE_HEX_DATAADDRESS=7 +val SCE_HEX_RECCOUNT=8 +val SCE_HEX_STARTADDRESS=9 +val SCE_HEX_ADDRESSFIELD_UNKNOWN=10 +val SCE_HEX_EXTENDEDADDRESS=11 +val SCE_HEX_DATA_ODD=12 +val SCE_HEX_DATA_EVEN=13 +val SCE_HEX_DATA_UNKNOWN=14 +val SCE_HEX_DATA_EMPTY=15 +val SCE_HEX_CHECKSUM=16 +val SCE_HEX_CHECKSUM_WRONG=17 +val SCE_HEX_GARBAGE=18 +# Lexical state for SCLEX_IHEX (shared with Srec) +lex IHex=SCLEX_IHEX SCE_HEX_ +# Lexical state for SCLEX_TEHEX (shared with Srec) +lex TEHex=SCLEX_TEHEX SCE_HEX_ +# Lexical states for SCLEX_JSON +lex JSON=SCLEX_JSON SCE_JSON_ +val SCE_JSON_DEFAULT=0 +val SCE_JSON_NUMBER=1 +val SCE_JSON_STRING=2 +val SCE_JSON_STRINGEOL=3 +val SCE_JSON_PROPERTYNAME=4 +val SCE_JSON_ESCAPESEQUENCE=5 +val SCE_JSON_LINECOMMENT=6 +val SCE_JSON_BLOCKCOMMENT=7 +val SCE_JSON_OPERATOR=8 +val SCE_JSON_URI=9 +val SCE_JSON_COMPACTIRI=10 +val SCE_JSON_KEYWORD=11 +val SCE_JSON_LDKEYWORD=12 +val SCE_JSON_ERROR=13 +lex EDIFACT=SCLEX_EDIFACT SCE_EDI_ +val SCE_EDI_DEFAULT=0 +val SCE_EDI_SEGMENTSTART=1 +val SCE_EDI_SEGMENTEND=2 +val SCE_EDI_SEP_ELEMENT=3 +val SCE_EDI_SEP_COMPOSITE=4 +val SCE_EDI_SEP_RELEASE=5 +val SCE_EDI_UNA=6 +val SCE_EDI_UNH=7 +val SCE_EDI_BADSEGMENT=8 +# Lexical states for SCLEX_STATA +lex STATA=SCLEX_STATA SCE_STATA_ +val SCE_STATA_DEFAULT=0 +val SCE_STATA_COMMENT=1 +val SCE_STATA_COMMENTLINE=2 +val SCE_STATA_COMMENTBLOCK=3 +val SCE_STATA_NUMBER=4 +val SCE_STATA_OPERATOR=5 +val SCE_STATA_IDENTIFIER=6 +val SCE_STATA_STRING=7 +val SCE_STATA_TYPE=8 +val SCE_STATA_WORD=9 +val SCE_STATA_GLOBAL_MACRO=10 +val SCE_STATA_MACRO=11 +# Lexical states for SCLEX_SAS +lex SAS=SCLEX_SAS SCE_SAS_ +val SCE_SAS_DEFAULT=0 +val SCE_SAS_COMMENT=1 +val SCE_SAS_COMMENTLINE=2 +val SCE_SAS_COMMENTBLOCK=3 +val SCE_SAS_NUMBER=4 +val SCE_SAS_OPERATOR=5 +val SCE_SAS_IDENTIFIER=6 +val SCE_SAS_STRING=7 +val SCE_SAS_TYPE=8 +val SCE_SAS_WORD=9 +val SCE_SAS_GLOBAL_MACRO=10 +val SCE_SAS_MACRO=11 +val SCE_SAS_MACRO_KEYWORD=12 +val SCE_SAS_BLOCK_KEYWORD=13 +val SCE_SAS_MACRO_FUNCTION=14 +val SCE_SAS_STATEMENT=15 # Events evt void StyleNeeded=2000(int position) -evt void CharAdded=2001(int ch, int characterSource) +evt void CharAdded=2001(int ch) evt void SavePointReached=2002(void) evt void SavePointLeft=2003(void) evt void ModifyAttemptRO=2004(void) -# GTK Specific to work around focus and accelerator problems: +# GTK+ Specific to work around focus and accelerator problems: evt void Key=2005(int ch, int modifiers) evt void DoubleClick=2006(int modifiers, int position, int line) evt void UpdateUI=2007(int updated) @@ -3338,16 +4948,25 @@ evt void AutoCSelectionChange=2032(int listType, string text, int position) cat Provisional -enu Bidirectional=SC_BIDIRECTIONAL_ -val SC_BIDIRECTIONAL_DISABLED=0 -val SC_BIDIRECTIONAL_L2R=1 -val SC_BIDIRECTIONAL_R2L=2 +enu LineCharacterIndexType=SC_LINECHARACTERINDEX_ +val SC_LINECHARACTERINDEX_NONE=0 +val SC_LINECHARACTERINDEX_UTF32=1 +val SC_LINECHARACTERINDEX_UTF16=2 -# Retrieve bidirectional text display state. -get Bidirectional GetBidirectional=2708(,) +# Retrieve line character index state. +get int GetLineCharacterIndex=2710(,) -# Set bidirectional text display state. -set void SetBidirectional=2709(Bidirectional bidirectional,) +# Request line character index be created or its use count increased. +fun void AllocateLineCharacterIndex=2711(int lineCharacterIndex,) + +# Decrease use count of line character index and remove if 0. +fun void ReleaseLineCharacterIndex=2712(int lineCharacterIndex,) + +# Retrieve the document line containing a position measured in index units. +fun int LineFromIndexPosition=2713(position pos, int lineCharacterIndex) + +# Retrieve the position measured in index units at the start of a document line. +fun position IndexPositionFromLine=2714(int line, int lineCharacterIndex) cat Deprecated @@ -3369,15 +4988,3 @@ set void SetKeysUnicode=2521(bool keysUnicode,) # Are keys always interpreted as Unicode? get bool GetKeysUnicode=2522(,) - -# Is drawing done in two phases with backgrounds drawn before foregrounds? -get bool GetTwoPhaseDraw=2283(,) - -# In twoPhaseDraw mode, drawing is performed in two phases, first the background -# and then the foreground. This avoids chopping off characters that overlap the next run. -set void SetTwoPhaseDraw=2284(bool twoPhase,) - -val INDIC0_MASK=0x20 -val INDIC1_MASK=0x40 -val INDIC2_MASK=0x80 -val INDICS_MASK=0xE0 diff --git a/3rdparty/unioncode-scintilla515/scintilla/include/ScintillaWidget.h b/3rdparty/unioncode-qscintilla214/scintilla/include/ScintillaWidget.h similarity index 100% rename from 3rdparty/unioncode-scintilla515/scintilla/include/ScintillaWidget.h rename to 3rdparty/unioncode-qscintilla214/scintilla/include/ScintillaWidget.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexA68k.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexA68k.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexA68k.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexA68k.cpp index 1ecefa586..1475ad078 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexA68k.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexA68k.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Return values for GetOperatorType diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAPDL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAPDL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAPDL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAPDL.cpp index 9f632a36e..447e40d58 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAPDL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAPDL.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80 && (isalnum(ch) || ch == '_')); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexASY.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexASY.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexASY.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexASY.cpp index 6ad682fd9..3ec522729 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexASY.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexASY.cpp @@ -1,5 +1,4 @@ // Scintilla source code edit control -// @file LexASY.cxx //Author: instanton (email: soft_share126com) // The License.txt file describes the conditions under which this software may be distributed. @@ -9,9 +8,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -23,7 +19,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseAsyDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAU3.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAU3.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAU3.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAU3.cpp index 897375459..b4029413c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAU3.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAU3.cpp @@ -1,6 +1,6 @@ // Scintilla source code edit control // @file LexAU3.cxx -// Lexer for AutoIt3 https://www.autoitscript.com/site/ +// Lexer for AutoIt3 http://www.hiddensoft.com/autoit3 // by Jos van der Zande, jvdzande@yahoo.com // // Changes: @@ -57,9 +57,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -71,7 +68,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsTypeCharacter(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVE.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVE.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVE.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVE.cpp index 014b3090a..b976734ae 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVE.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVE.cpp @@ -14,9 +14,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -28,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVS.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVS.cpp index 0ea47ca53..df5223f8d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAVS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAVS.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAbaqus.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAbaqus.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAbaqus.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAbaqus.cpp index e9aba9c9e..96a7b886e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAbaqus.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAbaqus.cpp @@ -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 @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAKeywordChar(const int ch) { return (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == ' '))); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAda.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAda.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAda.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAda.cpp index 4c2b5d15c..9d7f5d0f7 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAda.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAda.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -26,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /* * Interface diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsm.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsm.cpp similarity index 94% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsm.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsm.cpp index 44f399a26..bd82b1621 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsm.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsm.cpp @@ -17,10 +17,8 @@ #include #include -#include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -35,7 +33,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || @@ -83,7 +80,6 @@ struct OptionsAsm { std::string foldExplicitEnd; bool foldExplicitAnywhere; bool foldCompact; - std::string commentChar; OptionsAsm() { delimiter = ""; fold = false; @@ -94,7 +90,6 @@ struct OptionsAsm { foldExplicitEnd = ""; foldExplicitAnywhere = false; foldCompact = true; - commentChar = ""; } }; @@ -139,9 +134,6 @@ struct OptionSetAsm : public OptionSet { 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); } }; @@ -159,7 +151,7 @@ class LexerAsm : public DefaultLexer { OptionSetAsm osAsm; int commentChar; public: - LexerAsm(const char *languageName_, int language_, int commentChar_) : DefaultLexer(languageName_, language_) { + LexerAsm(int commentChar_) { commentChar = commentChar_; } virtual ~LexerAsm() { @@ -168,7 +160,7 @@ class LexerAsm : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osAsm.PropertyNames(); @@ -180,9 +172,6 @@ class LexerAsm : public DefaultLexer { 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(); } @@ -194,12 +183,12 @@ class LexerAsm : public DefaultLexer { return 0; } - static ILexer5 *LexerFactoryAsm() { - return new LexerAsm("asm", SCLEX_ASM, ';'); + static ILexer *LexerFactoryAsm() { + return new LexerAsm(';'); } - static ILexer5 *LexerFactoryAs() { - return new LexerAsm("as", SCLEX_AS, '#'); + static ILexer *LexerFactoryAs() { + return new LexerAsm('#'); } }; @@ -253,9 +242,6 @@ 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; @@ -361,7 +347,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 == commentCharacter) { + if (sc.ch == commentChar){ 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); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsn1.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsn1.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsn1.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsn1.cpp index be19a9f81..0ec2a0636 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsn1.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexAsn1.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Some char test functions static bool isAsn1Number(int ch) diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBaan.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBaan.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBaan.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBaan.cpp index f3c14fa5b..fa8b46302 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBaan.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBaan.cpp @@ -16,9 +16,7 @@ // C++ standard library #include -#include #include -#include // Scintilla headers @@ -39,7 +37,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts @@ -396,14 +393,14 @@ class LexerBaan : public DefaultLexer { OptionsBaan options; OptionSetBaan osBaan; public: - LexerBaan() : DefaultLexer("baan", SCLEX_BAAN) { + LexerBaan() { } virtual ~LexerBaan() { } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { @@ -424,10 +421,6 @@ class LexerBaan : public DefaultLexer { 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(); } @@ -442,7 +435,7 @@ class LexerBaan : public DefaultLexer { return NULL; } - static ILexer5 * LexerFactoryBaan() { + static ILexer * LexerFactoryBaan() { return new LexerBaan(); } }; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBash.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBash.cpp similarity index 80% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBash.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBash.cpp index be66ad9f4..5bbd563d5 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBash.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBash.cpp @@ -12,28 +12,18 @@ #include #include -#include -#include -#include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" -#include "StringCopy.h" #include "WordList.h" #include "LexAccessor.h" +#include "Accessor.h" #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" -#include "OptionSet.h" -#include "SubStyles.h" -#include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; #define HERE_DELIM_MAX 256 @@ -68,9 +58,7 @@ using namespace Lexilla; #define BASH_DELIM_STACK_MAX 7 -namespace { - -inline int translateBashDigit(int ch) { +static inline int translateBashDigit(int ch) { if (ch >= '0' && ch <= '9') { return ch - '0'; } else if (ch >= 'a' && ch <= 'z') { @@ -85,7 +73,7 @@ inline int translateBashDigit(int ch) { return BASH_BASE_ERROR; } -inline int getBashNumberBase(char *s) { +static inline int getBashNumberBase(char *s) { int i = 0; int base = 0; while (*s) { @@ -98,7 +86,7 @@ inline int getBashNumberBase(char *s) { return base; } -int opposite(int ch) { +static int opposite(int ch) { if (ch == '(') return ')'; if (ch == '[') return ']'; if (ch == '{') return '}'; @@ -106,7 +94,7 @@ int opposite(int ch) { return ch; } -int GlobScan(StyleContext &sc) { +static int GlobScan(StyleContext &sc) { // forward scan for zsh globs, disambiguate versus bash arrays // complex expressions may still fail, e.g. unbalanced () '' "" etc int c, sLen = 0; @@ -132,174 +120,10 @@ int GlobScan(StyleContext &sc) { return 0; } -bool IsCommentLine(Sci_Position line, LexAccessor &styler) { - Sci_Position pos = styler.LineStart(line); - Sci_Position eol_pos = styler.LineStart(line + 1) - 1; - for (Sci_Position i = pos; i < eol_pos; i++) { - char ch = styler[i]; - if (ch == '#') - return true; - else if (ch != ' ' && ch != '\t') - return false; - } - return false; -} - -struct OptionsBash { - bool fold; - bool foldComment; - bool foldCompact; - - OptionsBash() { - fold = false; - foldComment = false; - foldCompact = true; - } -}; - -const char * const bashWordListDesc[] = { - "Keywords", - 0 -}; - -struct OptionSetBash : public OptionSet { - OptionSetBash() { - DefineProperty("fold", &OptionsBash::fold); - - DefineProperty("fold.comment", &OptionsBash::foldComment); - - DefineProperty("fold.compact", &OptionsBash::foldCompact); - - DefineWordListSets(bashWordListDesc); - } -}; - -const char styleSubable[] = { SCE_SH_IDENTIFIER, SCE_SH_SCALAR, 0 }; - -LexicalClass lexicalClasses[] = { - // Lexer Bash SCLEX_BASH SCE_SH_: - 0, "SCE_SH_DEFAULT", "default", "White space", - 1, "SCE_SH_ERROR", "error", "Error", - 2, "SCE_SH_COMMENTLINE", "comment line", "Line comment: #", - 3, "SCE_SH_NUMBER", "literal numeric", "Number", - 4, "SCE_SH_WORD", "keyword", "Keyword", - 5, "SCE_SH_STRING", "literal string", "String", - 6, "SCE_SH_CHARACTER", "literal string", "Single quoted string", - 7, "SCE_SH_OPERATOR", "operator", "Operators", - 8, "SCE_SH_IDENTIFIER", "identifier", "Identifiers", - 9, "SCE_SH_SCALAR", "identifier", "Scalar variable", - 10, "SCE_SH_PARAM", "identifier", "Parameter", - 11, "SCE_SH_BACKTICKS", "literal string", "Backtick quoted command", - 12, "SCE_SH_HERE_DELIM", "operator", "Heredoc delimiter", - 13, "SCE_SH_HERE_Q", "literal string", "Heredoc quoted string", -}; - -} - -class LexerBash : public DefaultLexer { - WordList keywords; - OptionsBash options; - OptionSetBash osBash; - enum { ssIdentifier, ssScalar }; - SubStyles subStyles; -public: - LexerBash() : - DefaultLexer("bash", SCLEX_BASH, lexicalClasses, ELEMENTS(lexicalClasses)), - subStyles(styleSubable, 0x80, 0x40, 0) { - } - virtual ~LexerBash() { - } - void SCI_METHOD Release() override { - delete this; - } - int SCI_METHOD Version() const override { - return lvRelease5; - } - const char * SCI_METHOD PropertyNames() override { - return osBash.PropertyNames(); - } - int SCI_METHOD PropertyType(const char* name) override { - return osBash.PropertyType(name); - } - const char * SCI_METHOD DescribeProperty(const char *name) override { - 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(); - } - 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 void ColouriseBashDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, + WordList *keywordlists[], Accessor &styler) { - int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override { - return subStyles.Allocate(styleBase, numberStyles); - } - int SCI_METHOD SubStylesStart(int styleBase) override { - return subStyles.Start(styleBase); - } - int SCI_METHOD SubStylesLength(int styleBase) override { - return subStyles.Length(styleBase); - } - int SCI_METHOD StyleFromSubStyle(int subStyle) override { - const int styleBase = subStyles.BaseStyle(subStyle); - return styleBase; - } - int SCI_METHOD PrimaryStyleFromStyle(int style) override { - return style; - } - void SCI_METHOD FreeSubStyles() override { - subStyles.Free(); - } - void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { - subStyles.SetIdentifiers(style, identifiers); - } - int SCI_METHOD DistanceToSecondaryStyles() override { - return 0; - } - const char *SCI_METHOD GetSubStyleBases() override { - return styleSubable; - } - - static ILexer5 *LexerFactoryBash() { - return new LexerBash(); - } -}; - -Sci_Position SCI_METHOD LexerBash::PropertySet(const char *key, const char *val) { - if (osBash.PropertySet(&options, key, val)) { - return 0; - } - return -1; -} - -Sci_Position SCI_METHOD LexerBash::WordListSet(int n, const char *wl) { - WordList *wordListN = 0; - switch (n) { - case 0: - wordListN = &keywords; - 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 LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { + WordList &keywords = *keywordlists[0]; WordList cmdDelimiter, bashStruct, bashStruct_in; cmdDelimiter.Set("| || |& & && ; ;; ( ) { }"); bashStruct.Set("if elif fi while until else then do done esac eval"); @@ -413,15 +237,11 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int }; QuoteStackCls QuoteStack; - const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_SH_IDENTIFIER); - const WordClassifier &classifierScalars = subStyles.Classifier(SCE_SH_SCALAR); - int numBase = 0; int digit; Sci_PositionU endPos = startPos + length; int cmdState = BASH_CMD_START; int testExprType = 0; - LexAccessor styler(pAccess); // Always backtracks to the start of a line that is not a continuation // of the previous line (i.e. start of a bash command segment) @@ -486,11 +306,6 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int char s[500]; char s2[10]; sc.GetCurrent(s, sizeof(s)); - int identifierStyle = SCE_SH_IDENTIFIER; - int subStyle = classifierIdentifiers.ValueFor(s); - if (subStyle >= 0) { - identifierStyle = subStyle; - } // allow keywords ending in a whitespace or command delimiter s2[0] = static_cast(sc.ch); s2[1] = '\0'; @@ -502,7 +317,7 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int else if (strcmp(s, "do") == 0 && keywordEnds) cmdStateNew = BASH_CMD_START; else - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); sc.SetState(SCE_SH_DEFAULT); break; } @@ -512,49 +327,42 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int cmdStateNew = BASH_CMD_TEST; testExprType = 0; } else - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); } // detect bash construct keywords else if (bashStruct.InList(s)) { if (cmdState == BASH_CMD_START && keywordEnds) cmdStateNew = BASH_CMD_START; else - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); } // 'for'|'case'|'select' needs 'in'|'do' to be highlighted later else if (bashStruct_in.InList(s)) { if (cmdState == BASH_CMD_START && keywordEnds) cmdStateNew = BASH_CMD_WORD; else - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); } // disambiguate option items and file test operators else if (s[0] == '-') { if (cmdState != BASH_CMD_TEST) - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); } // disambiguate keywords and identifiers else if (cmdState != BASH_CMD_START || !(keywords.InList(s) && keywordEnds)) { - sc.ChangeState(identifierStyle); + sc.ChangeState(SCE_SH_IDENTIFIER); } sc.SetState(SCE_SH_DEFAULT); } break; case SCE_SH_IDENTIFIER: - if (sc.chPrev == '\\' || !setWord.Contains(sc.ch) || - (cmdState == BASH_CMD_ARITH && !setWordStart.Contains(sc.ch))) { - char s[500]; - sc.GetCurrent(s, sizeof(s)); - int subStyle = classifierIdentifiers.ValueFor(s); - if (subStyle >= 0) { - sc.ChangeState(subStyle); - } - if (sc.chPrev == '\\') { // for escaped chars - sc.ForwardSetState(SCE_SH_DEFAULT); - } else { - sc.SetState(SCE_SH_DEFAULT); - } + if (sc.chPrev == '\\') { // for escaped chars + sc.ForwardSetState(SCE_SH_DEFAULT); + } else if (!setWord.Contains(sc.ch)) { + sc.SetState(SCE_SH_DEFAULT); + } else if (cmdState == BASH_CMD_ARITH && !setWordStart.Contains(sc.ch)) { + sc.SetState(SCE_SH_DEFAULT); } break; case SCE_SH_NUMBER: @@ -708,12 +516,6 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int break; case SCE_SH_SCALAR: // variable names if (!setParam.Contains(sc.ch)) { - char s[500]; - sc.GetCurrent(s, sizeof(s)); - int subStyle = classifierScalars.ValueFor(&s[1]); // skip the $ - if (subStyle >= 0) { - sc.ChangeState(subStyle); - } if (sc.LengthCurrent() == 1) { // Special variable: $(, $_ etc. sc.ForwardSetState(SCE_SH_DEFAULT); @@ -997,12 +799,23 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int sc.Complete(); } -void SCI_METHOD LexerBash::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) { - if(!options.fold) - return; - - LexAccessor styler(pAccess); +static bool IsCommentLine(Sci_Position line, Accessor &styler) { + Sci_Position pos = styler.LineStart(line); + Sci_Position eol_pos = styler.LineStart(line + 1) - 1; + for (Sci_Position i = pos; i < eol_pos; i++) { + char ch = styler[i]; + if (ch == '#') + return true; + else if (ch != ' ' && ch != '\t') + return false; + } + return false; +} +static void FoldBashDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], + Accessor &styler) { + bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; Sci_PositionU endPos = startPos + length; int visibleChars = 0; int skipHereCh = 0; @@ -1020,7 +833,7 @@ void SCI_METHOD LexerBash::Fold(Sci_PositionU startPos, Sci_Position length, int styleNext = styler.StyleAt(i + 1); bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); // Comment folding - if (options.foldComment && atEOL && IsCommentLine(lineCurrent, styler)) + if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) { if (!IsCommentLine(lineCurrent - 1, styler) && IsCommentLine(lineCurrent + 1, styler)) @@ -1067,7 +880,7 @@ void SCI_METHOD LexerBash::Fold(Sci_PositionU startPos, Sci_Position length, int } if (atEOL) { int lev = levelPrev; - if (visibleChars == 0 && options.foldCompact) + if (visibleChars == 0 && foldCompact) lev |= SC_FOLDLEVELWHITEFLAG; if ((levelCurrent > levelPrev) && (visibleChars > 0)) lev |= SC_FOLDLEVELHEADERFLAG; @@ -1086,4 +899,9 @@ void SCI_METHOD LexerBash::Fold(Sci_PositionU startPos, Sci_Position length, int styler.SetLevel(lineCurrent, levelPrev | flagsNext); } -LexerModule lmBash(SCLEX_BASH, LexerBash::LexerFactoryBash, "bash", bashWordListDesc); +static const char * const bashWordListDesc[] = { + "Keywords", + 0 +}; + +LexerModule lmBash(SCLEX_BASH, ColouriseBashDoc, "bash", FoldBashDoc, bashWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBasic.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBasic.cpp similarity index 94% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBasic.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBasic.cpp index 5057fa7d9..4ec58dcdd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBasic.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBasic.cpp @@ -25,9 +25,7 @@ #include #include -#include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -42,7 +40,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; /* Bits: * 1 - whitespace @@ -235,9 +232,7 @@ class LexerBasic : public DefaultLexer { OptionsBasic options; OptionSetBasic osBasic; public: - LexerBasic(const char *languageName_, int language_, char comment_char_, - int (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) : - DefaultLexer(languageName_, language_), + LexerBasic(char comment_char_, int (*CheckFoldPoint_)(char const *, int &), const char * const wordListDescriptions[]) : comment_char(comment_char_), CheckFoldPoint(CheckFoldPoint_), osBasic(wordListDescriptions) { @@ -248,7 +243,7 @@ class LexerBasic : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osBasic.PropertyNames(); @@ -260,9 +255,6 @@ class LexerBasic : public DefaultLexer { 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(); } @@ -273,14 +265,14 @@ class LexerBasic : public DefaultLexer { void * SCI_METHOD PrivateCall(int, void *) override { return 0; } - static ILexer5 *LexerFactoryBlitzBasic() { - return new LexerBasic("blitzbasic", SCLEX_BLITZBASIC, ';', CheckBlitzFoldPoint, blitzbasicWordListDesc); + static ILexer *LexerFactoryBlitzBasic() { + return new LexerBasic(';', CheckBlitzFoldPoint, blitzbasicWordListDesc); } - static ILexer5 *LexerFactoryPureBasic() { - return new LexerBasic("purebasic", SCLEX_PUREBASIC, ';', CheckPureFoldPoint, purebasicWordListDesc); + static ILexer *LexerFactoryPureBasic() { + return new LexerBasic(';', CheckPureFoldPoint, purebasicWordListDesc); } - static ILexer5 *LexerFactoryFreeBasic() { - return new LexerBasic("freebasic", SCLEX_FREEBASIC, '\'', CheckFreeFoldPoint, freebasicWordListDesc ); + static ILexer *LexerFactoryFreeBasic() { + return new LexerBasic('\'', CheckFreeFoldPoint, freebasicWordListDesc ); } }; diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBatch.cpp b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBatch.cpp new file mode 100644 index 000000000..db7e37688 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBatch.cpp @@ -0,0 +1,498 @@ +// Scintilla source code edit control +/** @file LexBatch.cxx + ** Lexer for batch files. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "StyleContext.h" +#include "CharacterSet.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static bool Is0To9(char ch) { + return (ch >= '0') && (ch <= '9'); +} + +static bool IsAlphabetic(int ch) { + return IsASCII(ch) && isalpha(ch); +} + +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { + return (styler[i] == '\n') || + ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); +} + +// Tests for BATCH Operators +static bool IsBOperator(char ch) { + return (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') || + (ch == '|') || (ch == '?') || (ch == '*'); +} + +// Tests for BATCH Separators +static bool IsBSeparator(char ch) { + return (ch == '\\') || (ch == '.') || (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++; + } + // 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); + } + 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; + } + + // 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(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(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); +} + +static void ColouriseBatchDoc( + Sci_PositionU startPos, + Sci_Position length, + int /*initStyle*/, + WordList *keywordlists[], + Accessor &styler) { + + char lineBuffer[1024]; + + styler.StartAt(startPos); + styler.StartSegment(startPos); + Sci_PositionU linePos = 0; + Sci_PositionU startLine = startPos; + 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'; + ColouriseBatchLine(lineBuffer, linePos, startLine, i, keywordlists, styler); + 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[] = { + "Internal Commands", + "External Commands", + 0 +}; + +LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBibTeX.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBibTeX.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBibTeX.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBibTeX.cpp index 7c14684ef..7e4cb9fc1 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBibTeX.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBibTeX.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -31,7 +30,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; namespace { bool IsAlphabetic(unsigned int ch) diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBullant.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBullant.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexBullant.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBullant.cpp index 19e99e083..2386d2252 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBullant.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexBullant.cpp @@ -8,9 +8,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -22,7 +19,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static int classifyWordBullant(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) { char s[100]; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCLW.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCLW.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCLW.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCLW.cpp index 0e86f4c2a..d469d6bfd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCLW.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCLW.cpp @@ -1,5 +1,5 @@ // Scintilla source code edit control -/** @file LexCLW.cxx +/** @file LexClw.cxx ** Lexer for Clarion. ** 2004/12/17 Updated Lexer **/ @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Is an end of line character inline bool IsEOL(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCOBOL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCOBOL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCOBOL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCOBOL.cpp index 39682f55d..f0374824f 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCOBOL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCOBOL.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; #define IN_DIVISION 0x01 #define IN_DECLARATIVES 0x02 diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCPP.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCPP.cpp similarity index 84% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCPP.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCPP.cpp index e1a75f457..3dac142ab 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCPP.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCPP.cpp @@ -6,18 +6,18 @@ // Copyright 1998-2005 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -#include #include #include #include -#include -#include #include "ILexer.h" #include "Scintilla.h" @@ -35,12 +35,11 @@ #include "SubStyles.h" using namespace Scintilla; -using namespace Lexilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts -constexpr bool IsSpaceEquiv(int state) noexcept { +bool IsSpaceEquiv(int state) noexcept { return (state <= SCE_C_COMMENTDOC) || // including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE (state == SCE_C_COMMENTLINEDOC) || (state == SCE_C_COMMENTDOCKEYWORD) || @@ -87,7 +86,7 @@ bool followsReturnKeyword(const StyleContext &sc, LexAccessor &styler) { return !*s; } -constexpr bool IsSpaceOrTab(int ch) noexcept { +bool IsSpaceOrTab(int ch) noexcept { return ch == ' ' || ch == '\t'; } @@ -144,10 +143,10 @@ BracketPair FindBracketPair(std::vector &tokens) { void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, int activity, const WordList &markerList, bool caseSensitive){ if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) { - constexpr Sci_PositionU lengthMarker = 50; + const int lengthMarker = 50; char marker[lengthMarker+1] = ""; - const Sci_PositionU currPos = sc.currentPos; - Sci_PositionU i = 0; + const Sci_Position currPos = static_cast(sc.currentPos); + int i = 0; while (i < lengthMarker) { const char ch = styler.SafeGetCharAt(currPos + i); if (IsASpace(ch) || isoperator(ch)) { @@ -166,14 +165,18 @@ void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, } } -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; +struct EscapeSequence { + int digitsLeft; + CharacterSet setHexDigits; + CharacterSet setOctDigits; + CharacterSet setNoneNumeric; + CharacterSet *escapeSetValid; + EscapeSequence() { + digitsLeft = 0; + escapeSetValid = 0; + setHexDigits = CharacterSet(CharacterSet::setDigits, "ABCDEFabcdef"); + setOctDigits = CharacterSet(CharacterSet::setNone, "01234567"); + } void resetEscapeState(int nextChar) { digitsLeft = 0; escapeSetValid = &setNoneNumeric; @@ -194,39 +197,26 @@ class 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) { std::string restOfLine; - Sci_Position line = styler.GetLine(start); - Sci_Position pos = start; - Sci_Position endLine = styler.LineEnd(line); + Sci_Position i =0; char ch = styler.SafeGetCharAt(start, '\n'); - while (pos < endLine) { - if (ch == '\\' && ((pos + 1) == endLine)) { - // Continuation line - line++; - pos = styler.LineStart(line); - endLine = styler.LineEnd(line); - ch = styler.SafeGetCharAt(pos, '\n'); - } else { - const char chNext = styler.SafeGetCharAt(pos + 1, '\n'); - if (ch == '/' && (chNext == '/' || chNext == '*')) - break; - if (allowSpace || (ch != ' ')) { - restOfLine += ch; - } - pos++; - ch = chNext; - } + const Sci_Position endLine = styler.LineEnd(styler.GetLine(start)); + while (((start+i) < endLine) && (ch != '\r')) { + const char chNext = styler.SafeGetCharAt(start + i + 1, '\n'); + if (ch == '/' && (chNext == '/' || chNext == '*')) + break; + if (allowSpace || (ch != ' ')) + restOfLine += ch; + i++; + ch = chNext; } return restOfLine; } -constexpr bool IsStreamCommentStyle(int style) noexcept { +bool IsStreamCommentStyle(int style) noexcept { return style == SCE_C_COMMENT || style == SCE_C_COMMENTDOC || style == SCE_C_COMMENTDOCKEYWORD || @@ -244,22 +234,13 @@ struct PPDefinition { } }; -constexpr int inactiveFlag = 0x40; - class LinePPState { - // Track the state of preprocessor conditionals to allow showing active and inactive - // code in different styles. - // Only works up to 31 levels of conditional nesting. - - // state is a bit mask with 1 bit per level - // bit is 1 for level if section inactive, so any bits set = inactive style - int state = 0; - // ifTaken is a bit mask with 1 bit per level - // bit is 1 for level if some branch at this level has been taken - int ifTaken = 0; - // level is the nesting level of #if constructs - int level = -1; - static const int maximumNestingLevel = 31; + int state; + int ifTaken; + int level; + bool ValidLevel() const noexcept { + return level >= 0 && level < 32; + } int maskLevel() const noexcept { if (level >= 0) { return 1 << level; @@ -268,20 +249,11 @@ class LinePPState { } } public: - LinePPState() noexcept { - } - bool ValidLevel() const noexcept { - return level >= 0 && level < maximumNestingLevel; - } - bool IsActive() const noexcept { - return state == 0; + LinePPState() : state(0), ifTaken(0), level(-1) { } bool IsInactive() const noexcept { return state != 0; } - int ActiveState() const noexcept { - return state ? inactiveFlag : 0; - } bool CurrentIfTaken() const noexcept { return (ifTaken & maskLevel()) != 0; } @@ -317,7 +289,7 @@ class LinePPState { class PPStates { std::vector vlls; public: - LinePPState ForLine(Sci_Position line) const noexcept { + LinePPState ForLine(Sci_Position line) const { if ((line > 0) && (vlls.size() > static_cast(line))) { return vlls[line]; } else { @@ -387,7 +359,7 @@ const char *const cppWordLists[] = { "Global classes and typedefs", "Preprocessor definitions", "Task marker and error marker keywords", - nullptr, + 0, }; struct OptionSetCPP : public OptionSet { @@ -493,19 +465,16 @@ LexicalClass lexicalClasses[] = { 24, "SCE_C_PREPROCESSORCOMMENTDOC", "comment preprocessor documentation", "Preprocessor stream doc comment", 25, "SCE_C_USERLITERAL", "literal", "User defined literals", 26, "SCE_C_TASKMARKER", "comment taskmarker", "Task Marker", - 27, "SCE_C_ESCAPESEQUENCE", "literal string escapesequence", "Escape sequence", + 27, "SCE_C_ESCAPESEQUENCE", "literal string escapesequence", "Escape sequence", }; -const int sizeLexicalClasses = static_cast(std::size(lexicalClasses)); - } -class LexerCPP : public ILexer5 { +class LexerCPP : public ILexerWithMetaData { bool caseSensitive; CharacterSet setWord; CharacterSet setNegationOp; - CharacterSet setAddOp; - CharacterSet setMultOp; + CharacterSet setArithmethicOp; CharacterSet setRelOp; CharacterSet setLogicalOp; CharacterSet setWordStart; @@ -520,8 +489,7 @@ class LexerCPP : public ILexer5 { struct SymbolValue { std::string value; std::string arguments; - SymbolValue() noexcept = default; - SymbolValue(const std::string &value_, const std::string &arguments_) : value(value_), arguments(arguments_) { + SymbolValue(const std::string &value_="", const std::string &arguments_="") : value(value_), arguments(arguments_) { } SymbolValue &operator = (const std::string &value_) { value = value_; @@ -538,32 +506,27 @@ class LexerCPP : public ILexer5 { OptionSetCPP osCPP; EscapeSequence escapeSeq; SparseState rawStringTerminators; + enum { activeFlag = 0x40 }; enum { ssIdentifier, ssDocKeyword }; SubStyles subStyles; std::string returnBuffer; public: explicit LexerCPP(bool caseSensitive_) : caseSensitive(caseSensitive_), - setWord(CharacterSet::setAlphaNum, "._", true), + setWord(CharacterSet::setAlphaNum, "._", 0x80, true), setNegationOp(CharacterSet::setNone, "!"), - setAddOp(CharacterSet::setNone, "+-"), - setMultOp(CharacterSet::setNone, "*/%"), + setArithmethicOp(CharacterSet::setNone, "+-/*%"), setRelOp(CharacterSet::setNone, "=!<>"), setLogicalOp(CharacterSet::setNone, "|&"), - subStyles(styleSubable, 0x80, 0x40, inactiveFlag) { + subStyles(styleSubable, 0x80, 0x40, activeFlag) { } - // Deleted so LexerCPP objects can not be copied. - LexerCPP(const LexerCPP &) = delete; - LexerCPP(LexerCPP &&) = delete; - void operator=(const LexerCPP &) = delete; - void operator=(LexerCPP &&) = delete; virtual ~LexerCPP() { } - void SCI_METHOD Release() noexcept override { + void SCI_METHOD Release() override { delete this; } - int SCI_METHOD Version() const noexcept override { - return lvRelease5; + int SCI_METHOD Version() const override { + return lvMetaData; } const char * SCI_METHOD PropertyNames() override { return osCPP.PropertyNames(); @@ -582,11 +545,11 @@ class LexerCPP : public ILexer5 { 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 *) noexcept override { - return nullptr; + void * SCI_METHOD PrivateCall(int, void *) override { + return 0; } - int SCI_METHOD LineEndTypesSupported() noexcept override { + int SCI_METHOD LineEndTypesSupported() override { return SC_LINE_END_TYPE_UNICODE; } @@ -601,10 +564,10 @@ class LexerCPP : public ILexer5 { } int SCI_METHOD StyleFromSubStyle(int subStyle) override { const int styleBase = subStyles.BaseStyle(MaskActive(subStyle)); - const int inactive = subStyle & inactiveFlag; - return styleBase | inactive; + const int active = subStyle & activeFlag; + return styleBase | active; } - int SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override { + int SCI_METHOD PrimaryStyleFromStyle(int style) override { return MaskActive(style); } void SCI_METHOD FreeSubStyles() override { @@ -613,21 +576,21 @@ class LexerCPP : public ILexer5 { void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { subStyles.SetIdentifiers(style, identifiers); } - int SCI_METHOD DistanceToSecondaryStyles() noexcept override { - return inactiveFlag; + int SCI_METHOD DistanceToSecondaryStyles() override { + return activeFlag; } - const char * SCI_METHOD GetSubStyleBases() noexcept override { + const char * SCI_METHOD GetSubStyleBases() override { return styleSubable; } int SCI_METHOD NamedStyles() override { return std::max(subStyles.LastAllocated() + 1, - sizeLexicalClasses) + - inactiveFlag; + static_cast(ELEMENTS(lexicalClasses))) + + activeFlag; } const char * SCI_METHOD NameOfStyle(int style) override { if (style >= NamedStyles()) return ""; - if (style < sizeLexicalClasses) + if (style < static_cast(ELEMENTS(lexicalClasses))) return lexicalClasses[style].name; // TODO: inactive and substyles return ""; @@ -640,23 +603,23 @@ class LexerCPP : public ILexer5 { if (firstSubStyle >= 0) { const int lastSubStyle = subStyles.LastAllocated(); if (((style >= firstSubStyle) && (style <= (lastSubStyle))) || - ((style >= firstSubStyle + inactiveFlag) && (style <= (lastSubStyle + inactiveFlag)))) { + ((style >= firstSubStyle + activeFlag) && (style <= (lastSubStyle + activeFlag)))) { int styleActive = style; if (style > lastSubStyle) { returnBuffer = "inactive "; - styleActive -= inactiveFlag; + styleActive -= activeFlag; } const int styleMain = StyleFromSubStyle(styleActive); returnBuffer += lexicalClasses[styleMain].tags; return returnBuffer.c_str(); } } - if (style < sizeLexicalClasses) + if (style < static_cast(ELEMENTS(lexicalClasses))) return lexicalClasses[style].tags; - if (style >= inactiveFlag) { + if (style >= activeFlag) { returnBuffer = "inactive "; - const int styleActive = style - inactiveFlag; - if (styleActive < sizeLexicalClasses) + const int styleActive = style - activeFlag; + if (styleActive < static_cast(ELEMENTS(lexicalClasses))) returnBuffer += lexicalClasses[styleActive].tags; else returnBuffer = ""; @@ -667,29 +630,20 @@ class LexerCPP : public ILexer5 { const char * SCI_METHOD DescriptionOfStyle(int style) override { if (style >= NamedStyles()) return ""; - if (style < sizeLexicalClasses) + if (style < static_cast(ELEMENTS(lexicalClasses))) return lexicalClasses[style].description; // TODO: inactive and substyles return ""; } - // 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() { + static ILexer *LexerFactoryCPP() { return new LexerCPP(true); } - static ILexer5 *LexerFactoryCPPInsensitive() { + static ILexer *LexerFactoryCPPInsensitive() { return new LexerCPP(false); } - constexpr static int MaskActive(int style) noexcept { - return style & ~inactiveFlag; + static int MaskActive(int style) noexcept { + return style & ~activeFlag; } void EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions); std::vector Tokenize(const std::string &expr) const; @@ -699,7 +653,7 @@ class LexerCPP : public ILexer5 { Sci_Position SCI_METHOD LexerCPP::PropertySet(const char *key, const char *val) { if (osCPP.PropertySet(&options, key, val)) { if (strcmp(key, "lexer.cpp.allow.dollars") == 0) { - setWord = CharacterSet(CharacterSet::setAlphaNum, "._", true); + setWord = CharacterSet(CharacterSet::setAlphaNum, "._", 0x80, true); if (options.identifiersAllowDollars) { setWord.Add('$'); } @@ -709,12 +663,8 @@ 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; + WordList *wordListN = 0; switch (n) { case 0: wordListN = &keywords; @@ -781,7 +731,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i CharacterSet setDoxygen(CharacterSet::setAlpha, "$@\\&<>#{}[]"); - setWordStart = CharacterSet(CharacterSet::setAlpha, "_", true); + setWordStart = CharacterSet(CharacterSet::setAlpha, "_", 0x80, true); CharacterSet setInvalidRawFirst(CharacterSet::setNone, " )\\\t\v\f\n"); @@ -834,7 +784,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i ppDefineHistory.clear(); std::vector::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), - [lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; }); + [lineCurrent](const PPDefinition &p) { return p.line >= lineCurrent; }); if (itInvalid != ppDefineHistory.end()) { ppDefineHistory.erase(itInvalid, ppDefineHistory.end()); definitionsChanged = true; @@ -851,12 +801,12 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i std::string rawStringTerminator = rawStringTerminators.ValueAt(lineCurrent-1); SparseState rawSTNew(lineCurrent); - int activitySet = preproc.ActiveState(); + int activitySet = preproc.IsInactive() ? activeFlag : 0; const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_C_IDENTIFIER); const WordClassifier &classifierDocKeyWords = subStyles.Classifier(SCE_C_COMMENTDOCKEYWORD); - Sci_PositionU lineEndNext = styler.LineEnd(lineCurrent); + Sci_Position lineEndNext = styler.LineEnd(lineCurrent); for (; sc.More();) { @@ -878,7 +828,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i isIncludePreprocessor = false; inRERange = false; if (preproc.IsInactive()) { - activitySet = inactiveFlag; + activitySet = activeFlag; sc.SetState(sc.state | activitySet); } } @@ -894,7 +844,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i // Handle line continuation generically. if (sc.ch == '\\') { - if ((sc.currentPos+1) >= lineEndNext) { + if (static_cast((sc.currentPos+1)) >= lineEndNext) { lineCurrent++; lineEndNext = styler.LineEnd(lineCurrent); vlls.Add(lineCurrent, preproc); @@ -988,7 +938,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i break; case SCE_C_PREPROCESSOR: if (options.stylingWithinPreprocessor) { - if (IsASpace(sc.ch) || (sc.ch == '(')) { + if (IsASpace(sc.ch)) { sc.SetState(SCE_C_DEFAULT|activitySet); } } else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\"') || sc.atLineEnd)) { @@ -1035,10 +985,6 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i styleBeforeDCKeyword = SCE_C_COMMENTDOC; sc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet); } - } else if ((sc.ch == '<' && sc.chNext != '/') - || (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style - styleBeforeDCKeyword = SCE_C_COMMENTDOC; - sc.ForwardSetState(SCE_C_COMMENTDOCKEYWORD | activitySet); } break; case SCE_C_COMMENTLINE: @@ -1058,10 +1004,6 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i styleBeforeDCKeyword = SCE_C_COMMENTLINEDOC; sc.SetState(SCE_C_COMMENTDOCKEYWORD|activitySet); } - } else if ((sc.ch == '<' && sc.chNext != '/') - || (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style - styleBeforeDCKeyword = SCE_C_COMMENTLINEDOC; - sc.ForwardSetState(SCE_C_COMMENTDOCKEYWORD | activitySet); } break; case SCE_C_COMMENTDOCKEYWORD: @@ -1082,7 +1024,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } if (!(IsASpace(sc.ch) || (sc.ch == 0))) { sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR|activitySet); - } else if (!keywords3.InList(s + 1) && !keywords3.InList(s)) { + } else if (!keywords3.InList(s + 1)) { int subStyleCDKW = classifierDocKeyWords.ValueFor(s+1); if (subStyleCDKW >= 0) { sc.ChangeState(subStyleCDKW|activitySet); @@ -1092,23 +1034,6 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } sc.SetState(styleBeforeDCKeyword|activitySet); seenDocKeyBrace = false; - } else if (sc.ch == '>') { - char s[100]; - if (caseSensitive) { - sc.GetCurrent(s, sizeof(s)); - } else { - sc.GetCurrentLowered(s, sizeof(s)); - } - if (!keywords3.InList(s)) { - int subStyleCDKW = classifierDocKeyWords.ValueFor(s + 1); - if (subStyleCDKW >= 0) { - sc.ChangeState(subStyleCDKW | activitySet); - } else { - sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR | activitySet); - } - } - sc.SetState(styleBeforeDCKeyword | activitySet); - seenDocKeyBrace = false; } break; case SCE_C_STRING: @@ -1134,7 +1059,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } break; case SCE_C_ESCAPESEQUENCE: - escapeSeq.consumeDigit(); + escapeSeq.digitsLeft--; if (!escapeSeq.atEscapeEnd(sc.ch)) { break; } @@ -1186,12 +1111,12 @@ 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 (IsLowerCase(sc.ch)) + while ((sc.ch < 0x80) && islower(sc.ch)) sc.Forward(); // gobble regex flags sc.SetState(SCE_C_DEFAULT|activitySet); - } else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) { + } else if (sc.ch == '\\' && (static_cast(sc.currentPos+1) < lineEndNext)) { // Gobble up the escaped character sc.Forward(); } else if (sc.ch == '[') { @@ -1243,8 +1168,6 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i vlls.Add(lineCurrent, preproc); } - const bool atLineEndBeforeStateEntry = sc.atLineEnd; - // Determine if a new state should be entered. if (MaskActive(sc.state) == SCE_C_DEFAULT) { if (sc.Match('@', '\"')) { @@ -1324,12 +1247,12 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i do { sc.Forward(); } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); - if (sc.Match("include")) { + if (sc.atLineEnd) { + sc.SetState(SCE_C_DEFAULT|activitySet); + } else if (sc.Match("include")) { isIncludePreprocessor = true; } else { - if (options.trackPreprocessor && IsAlphaNumeric(sc.ch)) { - // If #if is nested too deeply (>31 levels) the active/inactive appearance - // will stop reflecting the code. + if (options.trackPreprocessor) { if (sc.Match("ifdef") || sc.Match("ifndef")) { const bool isIfDef = sc.Match("ifdef"); const int startRest = isIfDef ? 5 : 6; @@ -1341,63 +1264,47 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); preproc.StartSection(ifGood); } else if (sc.Match("else")) { - // #else is shown as active if either preceding or following section is active - // as that means that it contributed to the result. - if (preproc.ValidLevel()) { - // If #else has no corresponding #if then take no action as invalid - if (!preproc.CurrentIfTaken()) { - // Inactive, may become active if parent scope active - assert(sc.state == (SCE_C_PREPROCESSOR | inactiveFlag)); - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // If following is active then show "else" as active - if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR); - } else if (preproc.IsActive()) { - // Active -> inactive - assert(sc.state == SCE_C_PREPROCESSOR); - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // Continue to show "else" as active as it ends active section. - } + if (!preproc.CurrentIfTaken()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); + } else if (!preproc.IsInactive()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); } } else if (sc.Match("elif")) { // Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif - // #elif is shown as active if either preceding or following section is active - // as that means that it contributed to the result. - if (preproc.ValidLevel()) { - if (!preproc.CurrentIfTaken()) { - // Inactive, if expression true then may become active if parent scope active - assert(sc.state == (SCE_C_PREPROCESSOR | inactiveFlag)); - // Similar to #if - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true); - const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); - if (ifGood) { - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - if (!activitySet) - sc.ChangeState(SCE_C_PREPROCESSOR); - } - } else if (preproc.IsActive()) { - // Active -> inactive - assert(sc.state == SCE_C_PREPROCESSOR); + if (!preproc.CurrentIfTaken()) { + // Similar to #if + std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true); + const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); + if (ifGood) { preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // Continue to show "elif" as active as it ends active section. + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); } + } else if (!preproc.IsInactive()) { + preproc.InvertCurrentLevel(); + activitySet = preproc.IsInactive() ? activeFlag : 0; + if (!activitySet) + sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); } } else if (sc.Match("endif")) { preproc.EndSection(); - activitySet = preproc.ActiveState(); + activitySet = preproc.IsInactive() ? activeFlag : 0; sc.ChangeState(SCE_C_PREPROCESSOR|activitySet); } else if (sc.Match("define")) { - if (options.updatePreprocessor && preproc.IsActive()) { + if (options.updatePreprocessor && !preproc.IsInactive()) { std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true); size_t startName = 0; while ((startName < restOfLine.length()) && IsSpaceOrTab(restOfLine[startName])) startName++; size_t endName = startName; - while ((endName < restOfLine.length()) && setWord.Contains(restOfLine[endName])) + while ((endName < restOfLine.length()) && setWord.Contains(static_cast(restOfLine[endName]))) endName++; std::string key = restOfLine.substr(startName, endName-startName); if ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) { @@ -1429,7 +1336,7 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } } } else if (sc.Match("undef")) { - if (options.updatePreprocessor && preproc.IsActive()) { + if (options.updatePreprocessor && !preproc.IsInactive()) { const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false); std::vector tokens = Tokenize(restOfLine); if (tokens.size() >= 1) { @@ -1447,13 +1354,6 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i } } - if (sc.atLineEnd && !atLineEndBeforeStateEntry) { - // State entry processing consumed characters up to end of line. - lineCurrent++; - lineEndNext = styler.LineEnd(lineCurrent); - vlls.Add(lineCurrent, preproc); - } - if (!IsASpace(sc.ch) && !IsSpaceEquiv(MaskActive(sc.state))) { chPrevNonWhite = sc.ch; visibleChars++; @@ -1626,11 +1526,11 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl } // Evaluate identifiers - constexpr size_t maxIterations = 100; + const 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[i][0]))) { SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i]); if (it != preprocessorDefinitions.end()) { // Tokenize value @@ -1657,7 +1557,7 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl macroTokens.erase(std::remove_if(macroTokens.begin(), macroTokens.end(), OnlySpaceOrTab), macroTokens.end()); for (size_t iMacro = 0; iMacro < macroTokens.size();) { - if (setWordStart.Contains(macroTokens[iMacro][0])) { + if (setWordStart.Contains(static_cast(macroTokens[iMacro][0]))) { std::map::const_iterator itFind = arguments.find(macroTokens[iMacro]); if (itFind != arguments.end()) { // TODO: Possible that value will be expression so should insert tokenized form @@ -1718,15 +1618,13 @@ void LexerCPP::EvaluateTokens(std::vector &tokens, const SymbolTabl } // Evaluate expressions in precedence order - enum precedence { precMult, precAdd, precRelative - , precLogical, /* end marker */ precLast }; - for (int prec = precMult; prec < precLast; prec++) { + enum precedence { precArithmetic, precRelative, precLogical }; + for (int prec=precArithmetic; prec <= precLogical; prec++) { // Looking at 3 tokens at a time so end at 2 before end for (size_t k=0; (k+2) &tokens, const SymbolTabl result = valA || valB; else if (tokens[k+1] == "&&") result = valA && valB; + char sResult[30]; + sprintf(sResult, "%d", result); std::vector::iterator itInsert = tokens.erase(tokens.begin() + k, tokens.begin() + k + 3); - tokens.insert(itInsert, std::to_string(result)); + tokens.insert(itInsert, sResult); } else { k++; } @@ -1775,9 +1675,9 @@ std::vector LexerCPP::Tokenize(const std::string &expr) const { const char *cp = expr.c_str(); while (*cp) { std::string word; - if (setWord.Contains(*cp)) { + if (setWord.Contains(static_cast(*cp))) { // Identifiers and numbers - while (setWord.Contains(*cp)) { + while (setWord.Contains(static_cast(*cp))) { word += *cp; cp++; } @@ -1786,17 +1686,17 @@ std::vector LexerCPP::Tokenize(const std::string &expr) const { word += *cp; cp++; } - } else if (setRelOp.Contains(*cp)) { + } else if (setRelOp.Contains(static_cast(*cp))) { word += *cp; cp++; - if (setRelOp.Contains(*cp)) { + if (setRelOp.Contains(static_cast(*cp))) { word += *cp; cp++; } - } else if (setLogicalOp.Contains(*cp)) { + } else if (setLogicalOp.Contains(static_cast(*cp))) { word += *cp; cp++; - if (setLogicalOp.Contains(*cp)) { + if (setLogicalOp.Contains(static_cast(*cp))) { word += *cp; cp++; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCSS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCSS.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCSS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCSS.cpp index b50fbaf25..c1a86f537 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCSS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCSS.cpp @@ -21,9 +21,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -35,7 +32,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const unsigned int ch) { @@ -209,7 +206,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini case '{': nestingLevel++; switch (lastState) { - case SCE_CSS_GROUP_RULE: + case SCE_CSS_MEDIA: sc.SetState(SCE_CSS_DEFAULT); break; case SCE_CSS_TAG: @@ -458,8 +455,8 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini sc.ChangeState(SCE_CSS_VALUE); break; case SCE_CSS_DIRECTIVE: - if (op == '@' && (strcmp(s2, "media") == 0 || strcmp(s2, "supports") == 0 || strcmp(s2, "document") == 0 || strcmp(s2, "-moz-document") == 0)) - sc.ChangeState(SCE_CSS_GROUP_RULE); + if (op == '@' && strcmp(s2, "media") == 0) + sc.ChangeState(SCE_CSS_MEDIA); break; } } @@ -492,7 +489,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini } else if (IsCssOperator(sc.ch) && (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']') && (sc.state != SCE_CSS_VALUE || sc.ch == ';' || sc.ch == '}' || sc.ch == '!') - && ((sc.state != SCE_CSS_DIRECTIVE && sc.state != SCE_CSS_GROUP_RULE) || sc.ch == ';' || sc.ch == '{') + && ((sc.state != SCE_CSS_DIRECTIVE && sc.state != SCE_CSS_MEDIA) || sc.ch == ';' || sc.ch == '{') ) { if (sc.state != SCE_CSS_OPERATOR) lastState = sc.state; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCaml.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCaml.cpp similarity index 73% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCaml.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCaml.cpp index 72bb3f39a..1339b5dcc 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCaml.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCaml.cpp @@ -25,13 +25,11 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" +#include "PropSetSimple.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" @@ -52,9 +50,138 @@ static const int baseT[24] = { 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */ }; -using namespace Lexilla; +using namespace Scintilla; + +#ifdef BUILD_AS_EXTERNAL_LEXER +/* + (actually seems to work!) +*/ +#include +#include "WindowAccessor.h" +#include "ExternalLexer.h" + +#undef EXT_LEXER_DECL +#define EXT_LEXER_DECL __declspec( dllexport ) __stdcall + +#if PLAT_WIN +#include +#endif static void ColouriseCamlDoc( + Sci_PositionU startPos, Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void FoldCamlDoc( + Sci_PositionU startPos, Sci_Position length, + int initStyle, + WordList *keywordlists[], + Accessor &styler); + +static void InternalLexOrFold(int lexOrFold, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props); + +static const char* LexerName = "caml"; + +#ifdef TRACE +void Platform::DebugPrintf(const char *format, ...) { + char buffer[2000]; + va_list pArguments; + va_start(pArguments, format); + vsprintf(buffer,format,pArguments); + va_end(pArguments); + Platform::DebugDisplay(buffer); +} +#else +void Platform::DebugPrintf(const char *, ...) { +} +#endif + +bool Platform::IsDBCSLeadByte(int codePage, char ch) { + return ::IsDBCSLeadByteEx(codePage, ch) != 0; +} + +long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, lParam); +} + +long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam) { + return ::SendMessage(reinterpret_cast(w), msg, wParam, + reinterpret_cast(lParam)); +} + +void EXT_LEXER_DECL Fold(unsigned int lexer, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Fold + InternalLexOrFold(1, startPos, length, initStyle, words, window, props); + +} + +int EXT_LEXER_DECL GetLexerCount() +{ + return 1; // just us [Objective] Caml lexers here! +} + +void EXT_LEXER_DECL GetLexerName(unsigned int Index, char *name, int buflength) +{ + // below useless evaluation(s) to supress "not used" warnings + Index; + // return as much of our lexer name as will fit (what's up with Index?) + if (buflength > 0) { + buflength--; + int n = strlen(LexerName); + if (n > buflength) + n = buflength; + memcpy(name, LexerName, n), name[n] = '\0'; + } +} + +void EXT_LEXER_DECL Lex(unsigned int lexer, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // below useless evaluation(s) to supress "not used" warnings + lexer; + // build expected data structures and do the Lex + InternalLexOrFold(0, startPos, length, initStyle, words, window, props); +} + +static void InternalLexOrFold(int foldOrLex, Sci_PositionU startPos, Sci_Position length, + int initStyle, char *words[], WindowID window, char *props) +{ + // create and initialize a WindowAccessor (including contained PropSet) + PropSetSimple ps; + ps.SetMultiple(props); + WindowAccessor wa(window, ps); + // create and initialize WordList(s) + int nWL = 0; + for (; words[nWL]; nWL++) ; // count # of WordList PTRs needed + WordList** wl = new WordList* [nWL + 1];// alloc WordList PTRs + int i = 0; + for (; i < nWL; i++) { + wl[i] = new WordList(); // (works or THROWS bad_alloc EXCEPTION) + wl[i]->Set(words[i]); + } + wl[i] = 0; + // call our "internal" folder/lexer (... then do Flush!) + if (foldOrLex) + FoldCamlDoc(startPos, length, initStyle, wl, wa); + else + ColouriseCamlDoc(startPos, length, initStyle, wl, wa); + wa.Flush(); + // clean up before leaving + for (i = nWL - 1; i >= 0; i--) + delete wl[i]; + delete [] wl; +} + +static +#endif /* BUILD_AS_EXTERNAL_LEXER */ + +void ColouriseCamlDoc( Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], @@ -310,7 +437,9 @@ static void ColouriseCamlDoc( sc.Complete(); } +#ifdef BUILD_AS_EXTERNAL_LEXER static +#endif /* BUILD_AS_EXTERNAL_LEXER */ void FoldCamlDoc( Sci_PositionU, Sci_Position, int, @@ -326,4 +455,6 @@ static const char * const camlWordListDesc[] = { 0 }; +#ifndef BUILD_AS_EXTERNAL_LEXER LexerModule lmCaml(SCLEX_CAML, ColouriseCamlDoc, "caml", FoldCamlDoc, camlWordListDesc); +#endif /* BUILD_AS_EXTERNAL_LEXER */ diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCmake.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCmake.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCmake.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCmake.cpp index 5302c2096..b8fe15496 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCmake.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCmake.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static bool isCmakeNumber(char ch) { @@ -88,11 +85,10 @@ static int calculateFoldCmake(Sci_PositionU start, Sci_PositionU end, int foldle if ( CompareCaseInsensitive(s, "IF") == 0 || CompareCaseInsensitive(s, "WHILE") == 0 || CompareCaseInsensitive(s, "MACRO") == 0 || CompareCaseInsensitive(s, "FOREACH") == 0 - || CompareCaseInsensitive(s, "FUNCTION") == 0 || CompareCaseInsensitive(s, "ELSEIF") == 0) + || CompareCaseInsensitive(s, "ELSEIF") == 0 ) newFoldlevel++; else if ( CompareCaseInsensitive(s, "ENDIF") == 0 || CompareCaseInsensitive(s, "ENDWHILE") == 0 - || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0 - || CompareCaseInsensitive(s, "ENDFUNCTION") == 0) + || CompareCaseInsensitive(s, "ENDMACRO") == 0 || CompareCaseInsensitive(s, "ENDFOREACH") == 0) newFoldlevel--; else if ( bElse && CompareCaseInsensitive(s, "ELSEIF") == 0 ) newFoldlevel++; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCoffeeScript.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCoffeeScript.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCoffeeScript.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCoffeeScript.cpp index 317497a20..a00162335 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCoffeeScript.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCoffeeScript.cpp @@ -14,9 +14,6 @@ #include #include -#include -#include - #include #include "ILexer.h" @@ -30,7 +27,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static bool IsSpaceEquiv(int state) { return (state == SCE_COFFEESCRIPT_DEFAULT diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexConf.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexConf.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexConf.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexConf.cpp index f49a3fcce..73fbe46ef 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexConf.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexConf.cpp @@ -16,9 +16,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -30,7 +27,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseConfDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCrontab.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCrontab.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCrontab.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCrontab.cpp index 907c4a5e6..7f6d5fb0c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCrontab.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCrontab.cpp @@ -14,9 +14,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -28,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseNncrontabDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCsound.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCsound.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexCsound.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCsound.cpp index 524abb6e0..24603801e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCsound.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexCsound.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexD.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexD.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexD.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexD.cpp index 5b8dab9b8..acbf462ed 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexD.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexD.cpp @@ -15,9 +15,7 @@ #include #include -#include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -32,7 +30,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; /* Nested comments require keeping the value of the nesting level for every position in the document. But since scintilla always styles line by line, @@ -160,7 +157,6 @@ class LexerD : public DefaultLexer { OptionSetD osD; public: LexerD(bool caseSensitive_) : - DefaultLexer("D", SCLEX_D), caseSensitive(caseSensitive_) { } virtual ~LexerD() { @@ -169,7 +165,7 @@ class LexerD : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osD.PropertyNames(); @@ -181,9 +177,6 @@ class LexerD : public DefaultLexer { 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(); } @@ -195,10 +188,10 @@ class LexerD : public DefaultLexer { return 0; } - static ILexer5 *LexerFactoryD() { + static ILexer *LexerFactoryD() { return new LexerD(true); } - static ILexer5 *LexerFactoryDInsensitive() { + static ILexer *LexerFactoryDInsensitive() { return new LexerD(false); } }; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMAP.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMAP.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMAP.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMAP.cpp index ef71ee15d..91b10c29b 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMAP.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMAP.cpp @@ -12,9 +12,6 @@ #include #include #include - -#include -#include /***************************************/ #include "ILexer.h" #include "Scintilla.h" @@ -28,7 +25,7 @@ #include "LexerModule.h" /***************************************/ -using namespace Lexilla; +using namespace Scintilla; /***********************************************/ static inline bool IsAWordChar(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMIS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMIS.cpp similarity index 93% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMIS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMIS.cpp index be117ad07..fa024e9e7 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDMIS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDMIS.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "LexerModule.h" #include "DefaultLexer.h" -using namespace Lexilla; +using namespace Scintilla; static const char *const DMISWordListDesc[] = { @@ -59,7 +56,7 @@ class LexerDMIS : public DefaultLexer virtual ~LexerDMIS(void); int SCI_METHOD Version() const override { - return Scintilla::lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { @@ -82,23 +79,19 @@ 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 ILexer5 *LexerFactoryDMIS() { + static ILexer *LexerFactoryDMIS() { return new LexerDMIS; } const char * SCI_METHOD DescribeWordListSets() override; - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; }; @@ -136,7 +129,7 @@ void SCI_METHOD LexerDMIS::InitWordListSets(void) } -LexerDMIS::LexerDMIS(void) : DefaultLexer("DMIS", SCLEX_DMIS) { +LexerDMIS::LexerDMIS(void) { this->InitWordListSets(); this->m_majorWords.Clear(); @@ -191,7 +184,7 @@ const char * SCI_METHOD LexerDMIS::DescribeWordListSets() return this->m_wordListSets; } -void SCI_METHOD LexerDMIS::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) +void SCI_METHOD LexerDMIS::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { const Sci_PositionU MAX_STR_LEN = 100; @@ -287,7 +280,7 @@ void SCI_METHOD LexerDMIS::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, i scCTX.Complete(); } -void SCI_METHOD LexerDMIS::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, Scintilla::IDocument *pAccess) +void SCI_METHOD LexerDMIS::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) { const int MAX_STR_LEN = 100; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDiff.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDiff.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexDiff.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDiff.cpp index 9fdd7e4f4..dd008c5cb 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDiff.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexDiff.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { return (styler[i] == '\n') || diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexECL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexECL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexECL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexECL.cpp index 052753ac3..6c916bce4 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexECL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexECL.cpp @@ -21,11 +21,9 @@ #endif #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -44,7 +42,7 @@ #define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ" #define SET_DIGITS "0123456789" -using namespace Lexilla; +using namespace Scintilla; static bool IsSpaceEquiv(int state) { switch (state) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEDIFACT.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEDIFACT.cpp similarity index 75% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexEDIFACT.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEDIFACT.cpp index c65122836..6da0759a0 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEDIFACT.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEDIFACT.cpp @@ -1,5 +1,4 @@ // 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 @@ -13,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -25,7 +21,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; class LexerEDIFACT : public DefaultLexer { @@ -33,13 +28,13 @@ class LexerEDIFACT : public DefaultLexer LexerEDIFACT(); virtual ~LexerEDIFACT() {} // virtual destructor, as we inherit from ILexer - static ILexer5 *Factory() { + static ILexer *Factory() { return new LexerEDIFACT; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { @@ -77,21 +72,6 @@ class LexerEDIFACT : public DefaultLexer } 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; @@ -100,8 +80,8 @@ class LexerEDIFACT : public DefaultLexer { return -1; } - 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 Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; void * SCI_METHOD PrivateCall(int, void *) override { return NULL; @@ -124,8 +104,6 @@ class LexerEDIFACT : public DefaultLexer char m_chDecimal; char m_chRelease; char m_chSegment; - - std::string m_lastPropertyValue; }; LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact"); @@ -136,7 +114,7 @@ LexerModule lmEDIFACT(SCLEX_EDIFACT, LexerEDIFACT::Factory, "edifact"); /////////////////////////////////////////////////////////////////////////////// -LexerEDIFACT::LexerEDIFACT() : DefaultLexer("edifact", SCLEX_EDIFACT) +LexerEDIFACT::LexerEDIFACT() { m_bFold = false; m_bHighlightAllUN = false; @@ -147,9 +125,9 @@ LexerEDIFACT::LexerEDIFACT() : DefaultLexer("edifact", SCLEX_EDIFACT) m_chSegment = '\''; } -void LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) +void LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) { - Sci_PositionU posFinish = startPos + length; + Sci_PositionU posFinish = startPos + lengthDoc; InitialiseFromUNA(pAccess, posFinish); // Look backwards for a ' or a document beginning @@ -160,7 +138,7 @@ void LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocume // Style buffer, so we're not issuing loads of notifications LexAccessor styler (pAccess); - pAccess->StartStyling(posCurrent); + pAccess->StartStyling(posCurrent, '\377'); styler.StartSegment(posCurrent); Sci_Position posSegmentStart = -1; @@ -223,89 +201,44 @@ void LexerEDIFACT::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocume if (posSegmentStart == -1) return; - pAccess->StartStyling(posSegmentStart); + pAccess->StartStyling(posSegmentStart, -1); pAccess->SetStyleFor(posFinish - posSegmentStart, SCE_EDI_BADSEGMENT); } -void LexerEDIFACT::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) +void LexerEDIFACT::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int, IDocument *pAccess) { if (!m_bFold) return; - Sci_PositionU endPos = startPos + length; - startPos = FindPreviousEnd(pAccess, startPos); - char c; + // Fold at UNx lines. ie, UNx segments = 0, other segments = 1. + // There's no sub folding, so we can be quite simple. + Sci_Position endPos = startPos + lengthDoc; char SegmentHeader[4] = { 0 }; - bool AwaitingSegment = true; - Sci_PositionU currLine = pAccess->LineFromPosition(startPos); - int levelCurrentStyle = SC_FOLDLEVELBASE; - if (currLine > 0) - levelCurrentStyle = pAccess->GetLevel(currLine - 1); // bottom 12 bits are level - int indentCurrent = levelCurrentStyle & SC_FOLDLEVELNUMBERMASK; - int indentNext = indentCurrent; + int iIndentPrevious = 0; + Sci_Position lineLast = pAccess->LineFromPosition(endPos); - while (startPos < endPos) + for (Sci_Position lineCurrent = pAccess->LineFromPosition(startPos); lineCurrent <= lineLast; lineCurrent++) { - pAccess->GetCharRange(&c, startPos, 1); - switch (c) - { - case '\t': - case '\r': - case ' ': - startPos++; - continue; - case '\n': - currLine = pAccess->LineFromPosition(startPos); - pAccess->SetLevel(currLine, levelCurrentStyle | indentCurrent); - startPos++; - levelCurrentStyle = SC_FOLDLEVELBASE; - indentCurrent = indentNext; - continue; - } - if (c == m_chRelease) - { - startPos += 2; - continue; - } - if (c == m_chSegment) - { - AwaitingSegment = true; - startPos++; - continue; - } - - if (!AwaitingSegment) - { - startPos++; - continue; - } - - // Segment! - pAccess->GetCharRange(SegmentHeader, startPos, 3); - if (SegmentHeader[0] != 'U' || SegmentHeader[1] != 'N') - { - startPos++; - continue; - } - - AwaitingSegment = false; - switch (SegmentHeader[2]) - { - case 'H': - case 'G': - indentNext++; - levelCurrentStyle = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; - break; - - case 'T': - case 'E': - if (indentNext > 0) - indentNext--; - break; - } - - startPos += 3; + Sci_Position posLineStart = pAccess->LineStart(lineCurrent); + posLineStart = ForwardPastWhitespace(pAccess, posLineStart, endPos); + Sci_Position lineDataStart = pAccess->LineFromPosition(posLineStart); + // Fill in whitespace lines? + for (; lineCurrent < lineDataStart; lineCurrent++) + pAccess->SetLevel(lineCurrent, SC_FOLDLEVELBASE | SC_FOLDLEVELWHITEFLAG | iIndentPrevious); + pAccess->GetCharRange(SegmentHeader, posLineStart, 3); + //if (DetectSegmentHeader(SegmentHeader) == SCE_EDI_BADSEGMENT) // Abort if this is not a proper segment header + + int level = 0; + if (memcmp(SegmentHeader, "UNH", 3) == 0) // UNH starts blocks + level = SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG; + // Check for UNA,B and Z. All others are inside messages + else if (!memcmp(SegmentHeader, "UNA", 3) || !memcmp(SegmentHeader, "UNB", 3) || !memcmp(SegmentHeader, "UNZ", 3)) + level = SC_FOLDLEVELBASE; + else + level = SC_FOLDLEVELBASE | 1; + pAccess->SetLevel(lineCurrent, level); + iIndentPrevious = level & SC_FOLDLEVELNUMBERMASK; } } @@ -381,9 +314,7 @@ int LexerEDIFACT::DetectSegmentHeader(char SegmentHeader[3]) const if (m_bHighlightAllUN && !memcmp(SegmentHeader, "UN", 2)) return SCE_EDI_UNH; - else if (!memcmp(SegmentHeader, "UNH", 3)) - return SCE_EDI_UNH; - else if (!memcmp(SegmentHeader, "UNG", 3)) + else if (memcmp(SegmentHeader, "UNH", 3) == 0) return SCE_EDI_UNH; return SCE_EDI_SEGMENTSTART; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEScript.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEScript.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexEScript.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEScript.cpp index f7d4c23ce..0cba29858 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEScript.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEScript.cpp @@ -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) @@ -11,9 +11,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -25,7 +22,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEiffel.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEiffel.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexEiffel.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEiffel.cpp index 9fed91962..d1d42a960 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexEiffel.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexEiffel.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool isEiffelOperator(unsigned int ch) { // '.' left out as it is used to make up numbers diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexErlang.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErlang.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexErlang.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErlang.cpp index b08f99b2a..4ca5962c3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexErlang.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErlang.cpp @@ -16,9 +16,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -30,7 +27,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static int is_radix(int radix, int ch) { int digit; @@ -145,7 +142,7 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int } // All comments types fall here. - if (sc.MatchLineEnd()) { + if (sc.atLineEnd) { to_late_to_comment = false; sc.SetState(SCE_ERLANG_DEFAULT); parse_state = STATE_NULL; @@ -176,7 +173,7 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int parse_state = old_parse_state; } - if (sc.MatchLineEnd()) { + if (sc.atLineEnd) { to_late_to_comment = false; sc.ChangeState(old_style); sc.SetState(SCE_ERLANG_DEFAULT); @@ -197,15 +194,11 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int parse_state = STATE_NULL; } else { sc.Forward(); - if (isalnum(sc.ch) || (sc.ch == '\'')) { + if (isalnum(sc.ch)) { sc.GetCurrent(cur, sizeof(cur)); sc.ChangeState(SCE_ERLANG_MODULES); sc.SetState(SCE_ERLANG_MODULES); } - if (sc.ch == '\'') { - parse_state = ATOM_QUOTED; - } - } } else if (!IsAWordChar(sc.ch)) { @@ -232,7 +225,7 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int if ( '@' == sc.ch ){ parse_state = NODE_NAME_QUOTED; } else if ('\'' == sc.ch && '\\' != sc.chPrev) { - sc.ChangeState(SCE_ERLANG_ATOM_QUOTED); + sc.ChangeState(SCE_ERLANG_ATOM); sc.ForwardSetState(SCE_ERLANG_DEFAULT); parse_state = STATE_NULL; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexErrorList.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErrorList.cpp similarity index 83% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexErrorList.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErrorList.cpp index 24eec8f74..b3dcd2a59 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexErrorList.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexErrorList.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,45 +23,30 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; - -namespace { +using namespace Scintilla; -bool strstart(const char *haystack, const char *needle) noexcept { +static bool strstart(const char *haystack, const char *needle) { return strncmp(haystack, needle, strlen(needle)) == 0; } -constexpr bool Is0To9(char ch) noexcept { +static bool Is0To9(char ch) { return (ch >= '0') && (ch <= '9'); } -constexpr bool Is1To9(char ch) noexcept { +static bool Is1To9(char ch) { return (ch >= '1') && (ch <= '9'); } -bool IsAlphabetic(int ch) { +static bool IsAlphabetic(int ch) { return IsASCII(ch) && isalpha(ch); } -inline bool AtEOL(Accessor &styler, Sci_PositionU i) { +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { return (styler[i] == '\n') || ((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) { +static int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci_Position &startValue) { if (lineBuffer[0] == '>') { // Command or return status return SCE_ERR_CMD; @@ -144,20 +126,10 @@ int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci strstart(lineBuffer, " from ")) { // GCC showing include path to following error return SCE_ERR_GCC_INCLUDED_FROM; - } else if (strstart(lineBuffer, "NMAKE : fatal error")) { - // Microsoft nmake fatal error: - // NMAKE : fatal error : : return code - return SCE_ERR_MS; - } else if (strstr(lineBuffer, "warning LNK") || - strstr(lineBuffer, "error LNK")) { + } else if (strstr(lineBuffer, "warning LNK")) { // Microsoft linker warning: - // { : } (warning|error) LNK9999 + // { : } 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: :: @@ -203,7 +175,7 @@ int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci canBeCtags = false; } } else if (state == stGccStart) { // : - state = ((ch == '-') || Is0To9(ch)) ? stGccDigit : stUnrecognized; + state = Is0To9(ch) ? stGccDigit : stUnrecognized; } else if (state == stGccDigit) { // : if (ch == ':') { state = stGccColumn; // :9.*: is GCC @@ -234,13 +206,14 @@ int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci } else if ((ch == ':' && chNext == ' ') || (ch == ' ')) { // Possibly Delphi.. don't test against chNext as it's one of the strings below. char word[512]; + Sci_PositionU j, chPos; unsigned numstep; + chPos = 0; if (ch == ' ') numstep = 1; // ch was ' ', handle as if it's a delphi errorline, only add 1 to i. else numstep = 2; // otherwise add 2. - Sci_PositionU chPos = 0; - for (Sci_PositionU j = i + numstep; j < lengthLine && IsAlphabetic(lineBuffer[j]) && chPos < sizeof(word) - 1; j++) + for (j = i + numstep; j < lengthLine && IsAlphabetic(lineBuffer[j]) && chPos < sizeof(word) - 1; j++) word[chPos++] = lineBuffer[j]; word[chPos] = 0; if (!CompareCaseInsensitive(word, "error") || !CompareCaseInsensitive(word, "warning") || @@ -295,11 +268,13 @@ int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLine, Sci #define CSI "\033[" -constexpr bool SequenceEnd(int ch) noexcept { +namespace { + +bool SequenceEnd(int ch) { return (ch == 0) || ((ch >= '@') && (ch <= '~')); } -int StyleFromSequence(const char *seq) noexcept { +int StyleFromSequence(const char *seq) { int bold = 0; int colour = 0; while (!SequenceEnd(*seq)) { @@ -326,18 +301,20 @@ int StyleFromSequence(const char *seq) noexcept { return SCE_ERR_ES_BLACK + bold * 8 + colour; } -void ColouriseErrorListLine( - const std::string &lineBuffer, +} + +static void ColouriseErrorListLine( + char *lineBuffer, + Sci_PositionU lengthLine, Sci_PositionU endPos, Accessor &styler, bool valueSeparate, bool escapeSequences) { Sci_Position startValue = -1; - const Sci_PositionU lengthLine = lineBuffer.length(); - const int style = RecogniseErrorListLine(lineBuffer.c_str(), lengthLine, startValue); - if (escapeSequences && strstr(lineBuffer.c_str(), CSI)) { + int style = RecogniseErrorListLine(lineBuffer, lengthLine, startValue); + if (escapeSequences && strstr(lineBuffer, CSI)) { const Sci_Position startPos = endPos - lengthLine; - const char *linePortion = lineBuffer.c_str(); + const char *linePortion = lineBuffer; Sci_Position startPortion = startPos; int portionStyle = style; while (const char *startSeq = strstr(linePortion, CSI)) { @@ -377,10 +354,11 @@ void ColouriseErrorListLine( } } -void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { - std::string lineBuffer; +static void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { + char lineBuffer[10000]; 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 @@ -394,22 +372,22 @@ 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.push_back(styler[i]); - if (AtEOL(styler, i)) { - // End of line met, colourise it - ColouriseErrorListLine(lineBuffer, i, styler, valueSeparate, escapeSequences); - lineBuffer.clear(); + 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; } } - if (!lineBuffer.empty()) { // Last line does not have ending characters - ColouriseErrorListLine(lineBuffer, startPos + length - 1, styler, valueSeparate, escapeSequences); + if (linePos > 0) { // Last line does not have ending characters + lineBuffer[linePos] = '\0'; + ColouriseErrorListLine(lineBuffer, linePos, startPos + length - 1, styler, valueSeparate, escapeSequences); } } -const char *const emptyWordListDesc[] = { - nullptr +static const char *const emptyWordListDesc[] = { + 0 }; -} - LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist", 0, emptyWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFlagship.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFlagship.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexFlagship.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFlagship.cpp index 10d3ff579..b73c1aa1e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFlagship.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFlagship.cpp @@ -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.) **/ @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Extended to accept accented characters static inline bool IsAWordChar(int ch) diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexForth.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexForth.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexForth.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexForth.cpp index bea525681..80842097d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexForth.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexForth.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordStart(int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFortran.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFortran.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexFortran.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFortran.cpp index a7d79cb80..28298b3ed 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFortran.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexFortran.cpp @@ -12,9 +12,6 @@ #include #include #include - -#include -#include /***************************************/ #include "ILexer.h" #include "Scintilla.h" @@ -28,7 +25,7 @@ #include "LexerModule.h" /***************************************/ -using namespace Lexilla; +using namespace Scintilla; /***********************************************/ static inline bool IsAWordChar(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGAP.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGAP.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexGAP.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGAP.cpp index 394707284..a2eca95ab 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGAP.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGAP.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsGAPOperator(char ch) { if (IsASCII(ch) && isalnum(ch)) return false; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGui4Cli.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGui4Cli.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexGui4Cli.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGui4Cli.cpp index 44c432bbc..e321a5b85 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGui4Cli.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexGui4Cli.cpp @@ -1,6 +1,5 @@ // Scintilla source code edit control // Copyright 1998-2002 by Neil Hodgson -// @file LexGui4Cli.cxx /* This is the Lexer for Gui4Cli, included in SciLexer.dll - by d. Keletsekis, 2/10/2003 @@ -29,9 +28,6 @@ val SCE_GC_OPERATOR=9 #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -43,7 +39,7 @@ val SCE_GC_OPERATOR=9 #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; #define debug Platform::DebugPrintf diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHTML.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHTML.cpp similarity index 92% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexHTML.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHTML.cpp index 44f75db8d..650112220 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHTML.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHTML.cpp @@ -11,16 +11,14 @@ #include #include #include - #include -#include #include #include -#include #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" +#include "StringCopy.h" #include "WordList.h" #include "LexAccessor.h" #include "Accessor.h" @@ -31,7 +29,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; namespace { @@ -270,30 +267,14 @@ 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 &nonFoldingTags) { std::string tag; - // Copy after the '<' and stop before ' ' + // Copy after the '<' 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)); } @@ -308,12 +289,8 @@ 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 @@ -524,119 +501,6 @@ bool isDjangoBlockEnd(const int ch, const int chNext, const std::string &blockTy } } -class PhpNumberState { - enum NumberBase { BASE_10 = 0, BASE_2, BASE_8, BASE_16 }; - static constexpr const char *const digitList[] = { "_0123456789", "_01", "_01234567", "_0123456789abcdefABCDEF" }; - - NumberBase base = BASE_10; - bool decimalPart = false; - bool exponentPart = false; - bool invalid = false; - bool finished = false; - - bool leadingZero = false; - bool invalidBase8 = false; - - bool betweenDigits = false; - bool decimalChar = false; - bool exponentChar = false; - -public: - inline bool isInvalid() { return invalid; } - inline bool isFinished() { return finished; } - - bool init(int ch, int chPlus1, int chPlus2) { - base = BASE_10; - decimalPart = false; - exponentPart = false; - invalid = false; - finished = false; - - leadingZero = false; - invalidBase8 = false; - - betweenDigits = false; - decimalChar = false; - exponentChar = false; - - if (ch == '.' && strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr) { - decimalPart = true; - betweenDigits = true; - } else if (ch == '0' && (chPlus1 == 'b' || chPlus1 == 'B')) { - base = BASE_2; - } else if (ch == '0' && (chPlus1 == 'o' || chPlus1 == 'O')) { - base = BASE_8; - } else if (ch == '0' && (chPlus1 == 'x' || chPlus1 == 'X')) { - base = BASE_16; - } else if (strchr(digitList[BASE_10] + !betweenDigits, ch) != nullptr) { - leadingZero = ch == '0'; - betweenDigits = true; - check(chPlus1, chPlus2); - if (finished && leadingZero) { - // single zero should be base 10 - base = BASE_10; - } - } else { - return false; - } - return true; - } - - bool check(int ch, int chPlus1) { - if (strchr(digitList[base] + !betweenDigits, ch) != nullptr) { - if (leadingZero) { - invalidBase8 = invalidBase8 || strchr(digitList[BASE_8] + !betweenDigits, ch) == nullptr; - } - - betweenDigits = ch != '_'; - decimalChar = false; - exponentChar = false; - } else if (ch == '_') { - invalid = true; - - betweenDigits = false; - decimalChar = false; - // exponentChar is unchanged - } else if (base == BASE_10 && ch == '.' && ( - !(decimalPart || exponentPart) || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr) - ) { - invalid = invalid || !betweenDigits || decimalPart || exponentPart; - decimalPart = true; - - betweenDigits = false; - decimalChar = true; - exponentChar = false; - } else if (base == BASE_10 && (ch == 'e' || ch == 'E')) { - invalid = invalid || !(betweenDigits || decimalChar) || exponentPart; - exponentPart = true; - - betweenDigits = false; - decimalChar = false; - exponentChar = true; - } else if (base == BASE_10 && (ch == '-' || ch == '+') && exponentChar) { - invalid = invalid || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) == nullptr; - - betweenDigits = false; - decimalChar = false; - // exponentChar is unchanged - } else if (IsPhpWordChar(ch)) { - invalid = true; - - betweenDigits = false; - decimalChar = false; - exponentChar = false; - } else { - invalid = invalid || !(betweenDigits || decimalChar); - finished = true; - if (base == BASE_10 && leadingZero && !decimalPart && !exponentPart) { - base = BASE_8; - invalid = invalid || invalidBase8; - } - } - return finished; - } -}; - bool isPHPStringState(int state) { return (state == SCE_HPHP_HSTRING) || @@ -648,7 +512,7 @@ bool isPHPStringState(int state) { Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Position i, const Sci_Position lengthDoc, Accessor &styler, bool &isSimpleString) { Sci_Position j; const Sci_Position beginning = i - 1; - bool isQuoted = false; + bool isValidSimpleString = false; while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) i++; @@ -656,11 +520,10 @@ Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Positio const char chNext = styler.SafeGetCharAt(i + 1); phpStringDelimiter.clear(); if (!IsPhpWordStart(ch)) { - if ((ch == '\'' || ch == '\"') && IsPhpWordStart(chNext)) { - isSimpleString = ch == '\''; - isQuoted = true; + if (ch == '\'' && IsPhpWordStart(chNext)) { i++; ch = chNext; + isSimpleString = true; } else { return beginning; } @@ -668,9 +531,9 @@ Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Positio phpStringDelimiter.push_back(ch); i++; for (j = i; j < lengthDoc && !isLineEnd(styler[j]); j++) { - if (!IsPhpWordChar(styler[j]) && isQuoted) { - if (((isSimpleString && styler[j] == '\'') || (!isSimpleString && styler[j] == '\"')) && isLineEnd(styler.SafeGetCharAt(j + 1))) { - isQuoted = false; + if (!IsPhpWordChar(styler[j])) { + if (isSimpleString && (styler[j] == '\'') && isLineEnd(styler.SafeGetCharAt(j + 1))) { + isValidSimpleString = true; j++; break; } else { @@ -680,7 +543,7 @@ Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Positio } phpStringDelimiter.push_back(styler[j]); } - if (isQuoted) { + if (isSimpleString && !isValidSimpleString) { phpStringDelimiter.clear(); return beginning; } @@ -700,7 +563,6 @@ struct OptionsHTML { bool foldCompact = true; bool foldComment = false; bool foldHeredoc = false; - bool foldXmlAtTagOpen = false; OptionsHTML() noexcept { } }; @@ -765,10 +627,6 @@ struct OptionSetHTML : public OptionSet { "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); } }; @@ -964,7 +822,6 @@ const char *tagsThatDoNotFold[] = { }; } - class LexerHTML : public DefaultLexer { bool isXml; bool isPHPScript; @@ -979,11 +836,8 @@ class LexerHTML : public DefaultLexer { std::set nonFoldingTags; public: explicit LexerHTML(bool isXml_, bool isPHPScript_) : - DefaultLexer( - isXml_ ? "xml" : (isPHPScript_ ? "phpscript" : "hypertext"), - isXml_ ? SCLEX_XML : (isPHPScript_ ? SCLEX_PHPSCRIPT : SCLEX_HTML), - isXml_ ? lexicalClassesXML : lexicalClassesHTML, - isXml_ ? std::size(lexicalClassesXML) : std::size(lexicalClassesHTML)), + DefaultLexer(isXml_ ? lexicalClassesHTML : lexicalClassesXML, + isXml_ ? ELEMENTS(lexicalClassesHTML) : ELEMENTS(lexicalClassesXML)), isXml(isXml_), isPHPScript(isPHPScript_), osHTML(isPHPScript_), @@ -1004,9 +858,6 @@ class LexerHTML : public DefaultLexer { 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(); } @@ -1014,13 +865,13 @@ class LexerHTML : public DefaultLexer { void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; // No Fold as all folding performs in Lex. - static ILexer5 *LexerFactoryHTML() { + static ILexer *LexerFactoryHTML() { return new LexerHTML(false, false); } - static ILexer5 *LexerFactoryXML() { + static ILexer *LexerFactoryXML() { return new LexerHTML(true, false); } - static ILexer5 *LexerFactoryPHPScript() { + static ILexer *LexerFactoryPHPScript() { return new LexerHTML(false, true); } }; @@ -1073,7 +924,6 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } styler.StartAt(startPos); std::string prevWord; - PhpNumberState phpNumber; std::string phpStringDelimiter; int StateToPrint = initStyle; int state = stateForPrintState(StateToPrint); @@ -1142,14 +992,13 @@ 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; const bool isDjango = options.isDjango; - const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", true); - const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", true); - const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", true); + const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", 0x80, true); + const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", 0x80, true); + const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", 0x80, true); // TODO: also handle + and - (except if they're part of ++ or --) and return keywords const CharacterSet setOKBeforeJSRE(CharacterSet::setNone, "([{=,:;!%^&*|?~"); @@ -1358,9 +1207,6 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int i += 2; visibleChars += 2; tagClosing = true; - if (foldXmlAtTagOpen) { - levelCurrent--; - } continue; } } @@ -1368,7 +1214,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int ///////////////////////////////////// // handle the start of PHP pre-processor = Non-HTML else if ((state != SCE_H_ASPAT) && - !isPHPStringState(state) && + !isStringState(state) && (state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (ch == '<') && @@ -1511,7 +1357,6 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int i += 2; // place as if it was the second next char treated visibleChars += 2; state = SCE_H_ASPAT; - scriptLanguage = eScriptVBS; } else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) { styler.ColourTo(i + 3, SCE_H_ASP); state = SCE_H_XCCOMMENT; @@ -1527,8 +1372,8 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } state = StateForScript(aspScript); - scriptLanguage = aspScript; } + scriptLanguage = eScriptVBS; styler.ColourTo(i, SCE_H_ASP); // fold whole script if (foldHTMLPreprocessor) @@ -1544,7 +1389,6 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int (chPrev == '<') && (ch == '!') && (StateToPrint != SCE_H_CDATA) && - (!isStringState(StateToPrint)) && (!IsCommentState(StateToPrint)) && (!IsScriptCommentState(StateToPrint))) { beforePreProc = state; @@ -1688,12 +1532,6 @@ 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; @@ -1890,7 +1728,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int state = SCE_H_DEFAULT; } tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { + if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { @@ -1909,9 +1747,6 @@ 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) { @@ -1941,7 +1776,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int state = SCE_H_DEFAULT; } tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { + if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { @@ -1967,7 +1802,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int state = SCE_H_DEFAULT; } tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { + if (!tagDontFold) { if (tagClosing) { levelCurrent--; } else { @@ -1991,9 +1826,6 @@ 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); @@ -2154,6 +1986,10 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } else if (ch == '\"') { styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); state = SCE_HJ_DEFAULT; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; } else if (isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); state = SCE_HJ_STRINGEOL; @@ -2167,6 +2003,10 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } else if (ch == '\'') { styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); state = SCE_HJ_DEFAULT; + } else if ((inScriptType == eNonHtmlScript) && (ch == '-') && (chNext == '-') && (chNext2 == '>')) { + styler.ColourTo(i - 1, StateToPrint); + state = SCE_HJ_COMMENTLINE; + i += 2; } else if (isLineEnd(ch)) { styler.ColourTo(i - 1, StateToPrint); if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) { @@ -2388,7 +2228,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int break; ///////////// start - PHP state handling case SCE_HPHP_WORD: - if (!IsPhpWordChar(ch)) { + if (!IsAWordChar(ch)) { classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); if (ch == '/' && chNext == '*') { i++; @@ -2396,7 +2236,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } else if (ch == '/' && chNext == '/') { i++; state = SCE_HPHP_COMMENTLINE; - } else if (ch == '#' && chNext != '[') { + } else if (ch == '#') { state = SCE_HPHP_COMMENTLINE; } else if (ch == '\"') { state = SCE_HPHP_HSTRING; @@ -2421,9 +2261,15 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } break; case SCE_HPHP_NUMBER: - if (phpNumber.check(chNext, chNext2)) { - styler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER); - state = SCE_HPHP_DEFAULT; + // recognize bases 8,10 or 16 integers OR floating-point numbers + if (!IsADigit(ch) + && strchr(".xXabcdefABCDEF", ch) == NULL + && ((ch != '-' && ch != '+') || (chPrev != 'e' && chPrev != 'E'))) { + styler.ColourTo(i - 1, SCE_HPHP_NUMBER); + if (IsOperator(ch)) + state = SCE_HPHP_OPERATOR; + else + state = SCE_HPHP_DEFAULT; } break; case SCE_HPHP_VARIABLE: @@ -2459,10 +2305,13 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int if (phpStringDelimiter == "\"") { styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; - } else if (lineStartVisibleChars == 1) { + } else if (isLineEnd(chPrev)) { const int psdLength = static_cast(phpStringDelimiter.length()); - if (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) { - i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; + const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); + const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); + if (isLineEnd(chAfterPsd) || + (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { + i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; if (foldHeredoc) levelCurrent--; @@ -2479,9 +2328,12 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; } - } else if (lineStartVisibleChars == 1 && styler.Match(i, phpStringDelimiter.c_str())) { + } else if (isLineEnd(chPrev) && styler.Match(i, phpStringDelimiter.c_str())) { const int psdLength = static_cast(phpStringDelimiter.length()); - if (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) { + const char chAfterPsd = styler.SafeGetCharAt(i + psdLength); + const char chAfterPsd2 = styler.SafeGetCharAt(i + psdLength + 1); + if (isLineEnd(chAfterPsd) || + (chAfterPsd == ';' && isLineEnd(chAfterPsd2))) { i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; styler.ColourTo(i, StateToPrint); state = SCE_HPHP_DEFAULT; @@ -2504,13 +2356,8 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int case SCE_HPHP_OPERATOR: case SCE_HPHP_DEFAULT: styler.ColourTo(i - 1, StateToPrint); - if (phpNumber.init(ch, chNext, chNext2)) { - if (phpNumber.isFinished()) { - styler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER); - state = SCE_HPHP_DEFAULT; - } else { - state = SCE_HPHP_NUMBER; - } + if (IsADigit(ch) || (ch == '.' && IsADigit(chNext))) { + state = SCE_HPHP_NUMBER; } else if (IsAWordStart(ch)) { state = SCE_HPHP_WORD; } else if (ch == '/' && chNext == '*') { @@ -2519,7 +2366,7 @@ void SCI_METHOD LexerHTML::Lex(Sci_PositionU startPos, Sci_Position length, int } else if (ch == '/' && chNext == '/') { i++; state = SCE_HPHP_COMMENTLINE; - } else if (ch == '#' && chNext != '[') { + } else if (ch == '#') { state = SCE_HPHP_COMMENTLINE; } else if (ch == '\"') { state = SCE_HPHP_HSTRING; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHaskell.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHaskell.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexHaskell.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHaskell.cpp index 8f8ce7525..680a0f296 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHaskell.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHaskell.cpp @@ -26,10 +26,7 @@ #include #include -#include -#include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -47,7 +44,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; // See https://github.com/ghc/ghc/blob/master/compiler/parser/Lexer.x#L1682 // Note, letter modifiers are prohibited. @@ -393,8 +389,7 @@ class LexerHaskell : public DefaultLexer { public: LexerHaskell(bool literate_) - : DefaultLexer(literate_ ? "literatehaskell" : "haskell", literate_ ? SCLEX_LITERATEHASKELL : SCLEX_HASKELL) - , literate(literate_) + : literate(literate_) , firstImportLine(-1) , firstImportIndent(0) {} @@ -405,7 +400,7 @@ class LexerHaskell : public DefaultLexer { } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { @@ -422,10 +417,6 @@ class LexerHaskell : public DefaultLexer { 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(); } @@ -440,11 +431,11 @@ class LexerHaskell : public DefaultLexer { return 0; } - static ILexer5 *LexerFactoryHaskell() { + static ILexer *LexerFactoryHaskell() { return new LexerHaskell(false); } - static ILexer5 *LexerFactoryLiterateHaskell() { + static ILexer *LexerFactoryLiterateHaskell() { return new LexerHaskell(true); } }; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHex.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHex.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexHex.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHex.cpp index 1ca89c2f8..6e1099786 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHex.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexHex.cpp @@ -107,9 +107,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -121,7 +118,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // prototypes for general helper functions static inline bool IsNewline(const int ch); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexIndent.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexIndent.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexIndent.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexIndent.cpp index dfb21fb9f..053bdd928 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexIndent.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexIndent.cpp @@ -11,9 +11,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -25,7 +22,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseIndentDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexInno.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexInno.cpp similarity index 79% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexInno.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexInno.cpp index 911d39508..5d01c0588 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexInno.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexInno.cpp @@ -3,7 +3,6 @@ ** Lexer for Inno Setup scripts. **/ // Written by Friedrich Vedder , using code from LexOthers.cxx. -// Modified by Michael Heath. // The License.txt file describes the conditions under which this software may be distributed. #include @@ -13,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,28 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; - -static bool innoIsBlank(int ch) { - return (ch == ' ') || (ch == '\t'); -} - -static bool innoNextNotBlankIs(Sci_Position i, Accessor &styler, char needle) { - char ch; - - while (i < styler.Length()) { - ch = styler.SafeGetCharAt(i); - - if (ch == needle) - return true; - - if (!innoIsBlank(ch)) - return false; - - i++; - } - return false; -} +using namespace Scintilla; static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) { int state = SCE_INNO_DEFAULT; @@ -60,7 +35,6 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W Sci_Position bufferCount = 0; bool isBOL, isEOL, isWS, isBOLWS = 0; bool isCStyleComment = false; - enum section{None, Code, Messages}; WordList §ionKeywords = *keywordLists[0]; WordList &standardKeywords = *keywordLists[1]; @@ -71,8 +45,7 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W Sci_Position curLine = styler.GetLine(startPos); int curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0; - bool isCode = (curLineState == section::Code); - bool isMessages = (curLineState == section::Messages); + bool isCode = (curLineState == 1); // Go through all provided text segment // using the hand-written state machine shown below @@ -97,14 +70,7 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { // Remember the line state for future incremental lexing curLine = styler.GetLine(i); - - if (isCode) { - styler.SetLineState(curLine, section::Code); - } else if (isMessages) { - styler.SetLineState(curLine, section::Messages); - } else { - styler.SetLineState(curLine, section::None); - } + styler.SetLineState(curLine, (isCode ? 1 : 0)); } switch(state) { @@ -130,13 +96,13 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W // Apparently, C-style comments are legal, too state = SCE_INNO_COMMENT_PASCAL; isCStyleComment = true; - } else if (!isMessages && ch == '"') { + } else if (ch == '"') { // Start of a double-quote string state = SCE_INNO_STRING_DOUBLE; - } else if (!isMessages && ch == '\'') { + } else if (ch == '\'') { // Start of a single-quote string state = SCE_INNO_STRING_SINGLE; - } else if (!isMessages && IsASCII(ch) && (isalpha(ch) || (ch == '_'))) { + } else if (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) { // Start of an identifier bufferCount = 0; buffer[bufferCount++] = static_cast(tolower(ch)); @@ -150,11 +116,7 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W case SCE_INNO_COMMENT: if (isEOL) { state = SCE_INNO_DEFAULT; - styler.ColourTo(i-1,SCE_INNO_COMMENT); - - // Push back the faulty character - chNext = styler[i--]; - ch = chPrev; + styler.ColourTo(i,SCE_INNO_COMMENT); } break; @@ -166,9 +128,9 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W buffer[bufferCount] = '\0'; // Check if the buffer contains a keyword - if (!isCode && standardKeywords.InList(buffer) && innoNextNotBlankIs(i, styler, '=')) { + if (!isCode && standardKeywords.InList(buffer)) { styler.ColourTo(i-1,SCE_INNO_KEYWORD); - } else if (!isCode && parameterKeywords.InList(buffer) && innoNextNotBlankIs(i, styler, ':')) { + } else if (!isCode && parameterKeywords.InList(buffer)) { styler.ColourTo(i-1,SCE_INNO_PARAMETER); } else if (isCode && pascalKeywords.InList(buffer)) { styler.ColourTo(i-1,SCE_INNO_KEYWORD_PASCAL); @@ -193,10 +155,6 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W if (sectionKeywords.InList(buffer)) { styler.ColourTo(i,SCE_INNO_SECTION); isCode = !CompareCaseInsensitive(buffer, "code"); - - isMessages = isCode ? false : ( - !CompareCaseInsensitive(buffer, "custommessages") - || !CompareCaseInsensitive(buffer, "messages")); } else { styler.ColourTo(i,SCE_INNO_DEFAULT); } @@ -233,30 +191,16 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W break; case SCE_INNO_STRING_DOUBLE: - if (ch == '"') { + if (ch == '"' || isEOL) { state = SCE_INNO_DEFAULT; styler.ColourTo(i,SCE_INNO_STRING_DOUBLE); - } else if (isEOL) { - state = SCE_INNO_DEFAULT; - styler.ColourTo(i-1,SCE_INNO_STRING_DOUBLE); - - // Push back the faulty character - chNext = styler[i--]; - ch = chPrev; } break; case SCE_INNO_STRING_SINGLE: - if (ch == '\'') { + if (ch == '\'' || isEOL) { state = SCE_INNO_DEFAULT; styler.ColourTo(i,SCE_INNO_STRING_SINGLE); - } else if (isEOL) { - state = SCE_INNO_DEFAULT; - styler.ColourTo(i-1,SCE_INNO_STRING_SINGLE); - - // Push back the faulty character - chNext = styler[i--]; - ch = chPrev; } break; @@ -274,11 +218,7 @@ static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, W if (isCStyleComment) { if (isEOL) { state = SCE_INNO_DEFAULT; - styler.ColourTo(i-1,SCE_INNO_COMMENT_PASCAL); - - // Push back the faulty character - chNext = styler[i--]; - ch = chPrev; + styler.ColourTo(i,SCE_INNO_COMMENT_PASCAL); } } else { if (ch == '}' || (ch == ')' && chPrev == '*')) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJSON.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexJSON.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexJSON.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexJSON.cpp index 92616715a..3c754f888 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJSON.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexJSON.cpp @@ -14,12 +14,9 @@ #include #include #include - #include -#include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -33,7 +30,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; static const char *const JSONWordListDesc[] = { "JSON Keywords", @@ -205,7 +201,6 @@ class LexerJSON : public DefaultLexer { public: LexerJSON() : - DefaultLexer("json", SCLEX_JSON), setOperators(CharacterSet::setNone, "[{}]:,"), setURL(CharacterSet::setAlphaNum, "-._~:/?#[]@!$&'()*+,),="), setKeywordJSONLD(CharacterSet::setAlpha, ":@"), @@ -213,7 +208,7 @@ class LexerJSON : public DefaultLexer { } virtual ~LexerJSON() {} int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { delete this; @@ -233,9 +228,6 @@ 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) { @@ -260,7 +252,7 @@ class LexerJSON : public DefaultLexer { void *SCI_METHOD PrivateCall(int, void *) override { return 0; } - static ILexer5 *LexerFactoryJSON() { + static ILexer *LexerFactoryJSON() { return new LexerJSON; } const char *SCI_METHOD DescribeWordListSets() override { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexKVIrc.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKVIrc.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexKVIrc.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKVIrc.cpp index ec36db9f4..0cae2a234 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexKVIrc.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKVIrc.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /* KVIrc Script syntactic rules: http://www.kvirc.net/doc/doc_syntactic_rules.html */ diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexKix.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKix.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexKix.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKix.cpp index f7004d196..bcd68137e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexKix.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexKix.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Extended to accept accented characters static inline bool IsAWordChar(int ch) { diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLPeg.cpp b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLPeg.cpp new file mode 100644 index 000000000..dfba76188 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLPeg.cpp @@ -0,0 +1,799 @@ +/** + * Copyright 2006-2018 Mitchell mitchell.att.foicica.com. See License.txt. + * + * Lua-powered dynamic language lexer for Scintilla. + * + * For documentation on writing lexers, see *../doc/LPegLexer.html*. + */ + +#if LPEG_LEXER + +#include +#include +#include +#include +#include +#if CURSES +#include +#endif + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "PropSetSimple.h" +#include "LexAccessor.h" +#include "LexerModule.h" + +extern "C" { +#include "lua.h" +#include "lualib.h" +#include "lauxlib.h" +LUALIB_API int luaopen_lpeg(lua_State *L); +} + +#if _WIN32 +#define strcasecmp _stricmp +#endif +#define streq(s1, s2) (strcasecmp((s1), (s2)) == 0) + +using namespace Scintilla; + +#define l_setmetatable(l, k, mtf) \ + if (luaL_newmetatable(l, k)) { \ + lua_pushcfunction(l, mtf), lua_setfield(l, -2, "__index"); \ + lua_pushcfunction(l, mtf), lua_setfield(l, -2, "__newindex"); \ + } \ + lua_setmetatable(l, -2); +#define l_pushlexerp(l, mtf) do { \ + lua_newtable(l); \ + lua_pushvalue(l, 2), lua_setfield(l, -2, "property"); \ + l_setmetatable(l, "sci_lexerp", mtf); \ +} while(0) +#define l_getlexerobj(l) \ + lua_getfield(l, LUA_REGISTRYINDEX, "sci_lexers"); \ + lua_pushlightuserdata(l, reinterpret_cast(this)); \ + lua_gettable(l, -2), lua_replace(l, -2); +#define l_getlexerfield(l, k) \ + l_getlexerobj(l); \ + lua_getfield(l, -1, k), lua_replace(l, -2); +#if LUA_VERSION_NUM < 502 +#define l_openlib(f, s) \ + (lua_pushcfunction(L, f), lua_pushstring(L, s), lua_call(L, 1, 0)) +#define LUA_BASELIBNAME "" +#define lua_rawlen lua_objlen +#define LUA_OK 0 +#define lua_compare(l, a, b, _) lua_equal(l, a, b) +#define LUA_OPEQ 0 +#else +#define l_openlib(f, s) (luaL_requiref(L, s, f, 1), lua_pop(L, 1)) +#define LUA_BASELIBNAME "_G" +#endif +#define l_setfunction(l, f, k) (lua_pushcfunction(l, f), lua_setfield(l, -2, k)) +#define l_setconstant(l, c, k) (lua_pushinteger(l, c), lua_setfield(l, -2, k)) + +#if CURSES +#define A_COLORCHAR (A_COLOR | A_CHARTEXT) +#endif + +/** The LPeg Scintilla lexer. */ +class LexerLPeg : public ILexer { + /** + * The lexer's Lua state. + * It is cleared each time the lexer language changes unless `own_lua` is + * `true`. + */ + lua_State *L; + /** + * The flag indicating whether or not an existing Lua state was supplied as + * the lexer's Lua state. + */ + bool own_lua; + /** + * The set of properties for the lexer. + * The `lexer.name`, `lexer.lpeg.home`, and `lexer.lpeg.color.theme` + * properties must be defined before running the lexer. + */ + PropSetSimple props; + /** The function to send Scintilla messages with. */ + SciFnDirect SS; + /** The Scintilla object the lexer belongs to. */ + sptr_t sci; + /** + * The flag indicating whether or not the lexer needs to be re-initialized. + * Re-initialization is required after the lexer language changes. + */ + bool reinit; + /** + * The flag indicating whether or not the lexer language has embedded lexers. + */ + bool multilang; + /** + * The list of style numbers considered to be whitespace styles. + * This is used in multi-language lexers when backtracking to whitespace to + * determine which lexer grammar to use. + */ + bool ws[STYLE_MAX + 1]; + + /** + * Logs the given error message or a Lua error message, prints it, and clears + * the stack. + * Error messages are logged to the "lexer.lpeg.error" property. + * @param str The error message to log and print. If `NULL`, logs and prints + * the Lua error message at the top of the stack. + */ + static void l_error(lua_State *L, const char *str=NULL) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_props"); + PropSetSimple *props = static_cast(lua_touserdata(L, -1)); + lua_pop(L, 1); // props + const char *key = "lexer.lpeg.error"; + const char *value = str ? str : lua_tostring(L, -1); + props->Set(key, value, strlen(key), strlen(value)); + fprintf(stderr, "Lua Error: %s.\n", str ? str : lua_tostring(L, -1)); + lua_settop(L, 0); + } + + /** The lexer's `line_from_position` Lua function. */ + static int l_line_from_position(lua_State *L) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + IDocument *buffer = static_cast(lua_touserdata(L, -1)); + lua_pushinteger(L, buffer->LineFromPosition(luaL_checkinteger(L, 1) - 1)); + return 1; + } + + /** The lexer's `__index` Lua metatable. */ + static int llexer_property(lua_State *L) { + int newindex = (lua_gettop(L) == 3); + luaL_getmetatable(L, "sci_lexer"); + lua_getmetatable(L, 1); // metatable can be either sci_lexer or sci_lexerp + int is_lexer = lua_compare(L, -1, -2, LUA_OPEQ); + lua_pop(L, 2); // metatable, metatable + + lua_getfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + IDocument *buffer = static_cast(lua_touserdata(L, -1)); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_props"); + PropSetSimple *props = static_cast(lua_touserdata(L, -1)); + lua_pop(L, 2); // sci_props and sci_buffer + + if (is_lexer) + lua_pushvalue(L, 2); // key is given + else + lua_getfield(L, 1, "property"); // indexible property + const char *key = lua_tostring(L, -1); + if (strcmp(key, "fold_level") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else + lua_pushinteger(L, buffer->GetLevel(luaL_checkinteger(L, 2))); + } else if (strcmp(key, "indent_amount") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else + lua_pushinteger(L, buffer->GetLineIndentation(luaL_checkinteger(L, 2))); + } else if (strcmp(key, "property") == 0) { + luaL_argcheck(L, !is_lexer || !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else if (!newindex) + lua_pushstring(L, props->Get(luaL_checkstring(L, 2))); + else + props->Set(luaL_checkstring(L, 2), luaL_checkstring(L, 3), + lua_rawlen(L, 2), lua_rawlen(L, 3)); + } else if (strcmp(key, "property_int") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else { + lua_pushstring(L, props->Get(luaL_checkstring(L, 2))); + lua_pushinteger(L, lua_tointeger(L, -1)); + } + } else if (strcmp(key, "style_at") == 0) { + luaL_argcheck(L, !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else { + int style = buffer->StyleAt(luaL_checkinteger(L, 2) - 1); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexer_obj"); + lua_getfield(L, -1, "_TOKENSTYLES"), lua_replace(L, -2); + lua_pushnil(L); + while (lua_next(L, -2)) { + if (luaL_checkinteger(L, -1) == style) break; + lua_pop(L, 1); // value + } + lua_pop(L, 1); // style_num + } + } else if (strcmp(key, "line_state") == 0) { + luaL_argcheck(L, !is_lexer || !newindex, 3, "read-only property"); + if (is_lexer) + l_pushlexerp(L, llexer_property); + else if (!newindex) + lua_pushinteger(L, buffer->GetLineState(luaL_checkinteger(L, 2))); + else + buffer->SetLineState(luaL_checkinteger(L, 2), + luaL_checkinteger(L, 3)); + } else return !newindex ? (lua_rawget(L, 1), 1) : (lua_rawset(L, 1), 0); + return 1; + } + + /** + * Expands value of the string property key at index *index* and pushes the + * result onto the stack. + * @param L The Lua State. + * @param index The index the string property key. + */ + void lL_getexpanded(lua_State *L, int index) { + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"), lua_getfield(L, -1, "lexer"); + lua_getfield(L, -1, "property_expanded"); + lua_pushvalue(L, (index > 0) ? index : index - 3), lua_gettable(L, -2); + lua_replace(L, -4), lua_pop(L, 2); // property_expanded and lexer module + } + + /** + * Parses the given style string to set the properties for the given style + * number. + * @param num The style number to set properties for. + * @param style The style string containing properties to set. + */ + void SetStyle(int num, const char *style) { + char *style_copy = static_cast(malloc(strlen(style) + 1)); + char *option = strcpy(style_copy, style), *next = NULL, *p = NULL; + while (option) { + if ((next = strchr(option, ','))) *next++ = '\0'; + if ((p = strchr(option, ':'))) *p++ = '\0'; + if (streq(option, "font") && p) + SS(sci, SCI_STYLESETFONT, num, reinterpret_cast(p)); + else if (streq(option, "size") && p) + SS(sci, SCI_STYLESETSIZE, num, static_cast(atoi(p))); + else if (streq(option, "bold") || streq(option, "notbold") || + streq(option, "weight")) { +#if !CURSES + int weight = SC_WEIGHT_NORMAL; + if (*option == 'b') + weight = SC_WEIGHT_BOLD; + else if (*option == 'w' && p) + weight = atoi(p); + SS(sci, SCI_STYLESETWEIGHT, num, weight); +#else + // Scintilla curses requires font attributes to be stored in the "font + // weight" style attribute. + // First, clear any existing SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD, or + // SC_WEIGHT_BOLD values stored in the lower 16 bits. Then set the + // appropriate curses attr. + sptr_t weight = SS(sci, SCI_STYLEGETWEIGHT, num, 0) & ~A_COLORCHAR; + int bold = *option == 'b' || + (*option == 'w' && p && atoi(p) > SC_WEIGHT_NORMAL); + SS(sci, SCI_STYLESETWEIGHT, num, + bold ? weight | A_BOLD : weight & ~A_BOLD); +#endif + } else if (streq(option, "italics") || streq(option, "notitalics")) + SS(sci, SCI_STYLESETITALIC, num, *option == 'i'); + else if (streq(option, "underlined") || streq(option, "notunderlined")) { +#if !CURSES + SS(sci, SCI_STYLESETUNDERLINE, num, *option == 'u'); +#else + // Scintilla curses requires font attributes to be stored in the "font + // weight" style attribute. + // First, clear any existing SC_WEIGHT_NORMAL, SC_WEIGHT_SEMIBOLD, or + // SC_WEIGHT_BOLD values stored in the lower 16 bits. Then set the + // appropriate curses attr. + sptr_t weight = SS(sci, SCI_STYLEGETWEIGHT, num, 0) & ~A_COLORCHAR; + SS(sci, SCI_STYLESETWEIGHT, num, + (*option == 'u') ? weight | A_UNDERLINE : weight & ~A_UNDERLINE); +#endif + } else if ((streq(option, "fore") || streq(option, "back")) && p) { + int msg = (*option == 'f') ? SCI_STYLESETFORE : SCI_STYLESETBACK; + int color = static_cast(strtol(p, NULL, 0)); + if (*p == '#') { // #RRGGBB format; Scintilla format is 0xBBGGRR + color = static_cast(strtol(p + 1, NULL, 16)); + color = ((color & 0xFF0000) >> 16) | (color & 0xFF00) | + ((color & 0xFF) << 16); // convert to 0xBBGGRR + } + SS(sci, msg, num, color); + } else if (streq(option, "eolfilled") || streq(option, "noteolfilled")) + SS(sci, SCI_STYLESETEOLFILLED, num, *option == 'e'); + else if (streq(option, "characterset") && p) + SS(sci, SCI_STYLESETCHARACTERSET, num, static_cast(atoi(p))); + else if (streq(option, "case") && p) { + if (*p == 'u') + SS(sci, SCI_STYLESETCASE, num, SC_CASE_UPPER); + else if (*p == 'l') + SS(sci, SCI_STYLESETCASE, num, SC_CASE_LOWER); + } else if (streq(option, "visible") || streq(option, "notvisible")) + SS(sci, SCI_STYLESETVISIBLE, num, *option == 'v'); + else if (streq(option, "changeable") || streq(option, "notchangeable")) + SS(sci, SCI_STYLESETCHANGEABLE, num, *option == 'c'); + else if (streq(option, "hotspot") || streq(option, "nothotspot")) + SS(sci, SCI_STYLESETHOTSPOT, num, *option == 'h'); + option = next; + } + free(style_copy); + } + + /** + * Iterates through the lexer's `_TOKENSTYLES`, setting the style properties + * for all defined styles. + */ + bool SetStyles() { + // If the lexer defines additional styles, set their properties first (if + // the user has not already defined them). + l_getlexerfield(L, "_EXTRASTYLES"); + lua_pushnil(L); + while (lua_next(L, -2)) { + if (lua_isstring(L, -2) && lua_isstring(L, -1)) { + lua_pushstring(L, "style."), lua_pushvalue(L, -3), lua_concat(L, 2); + if (!*props.Get(lua_tostring(L, -1))) + props.Set(lua_tostring(L, -1), lua_tostring(L, -2), lua_rawlen(L, -1), + lua_rawlen(L, -2)); + lua_pop(L, 1); // style name + } + lua_pop(L, 1); // value + } + lua_pop(L, 1); // _EXTRASTYLES + + l_getlexerfield(L, "_TOKENSTYLES"); + if (!SS || !sci) { + lua_pop(L, 1); // _TOKENSTYLES + // Skip, but do not report an error since `reinit` would remain `false` + // and subsequent calls to `Lex()` and `Fold()` would repeatedly call this + // function and error. + return true; + } + lua_pushstring(L, "style.default"), lL_getexpanded(L, -1); + SetStyle(STYLE_DEFAULT, lua_tostring(L, -1)); + lua_pop(L, 2); // style and "style.default" + SS(sci, SCI_STYLECLEARALL, 0, 0); // set default styles + lua_pushnil(L); + while (lua_next(L, -2)) { + if (lua_isstring(L, -2) && lua_isnumber(L, -1) && + lua_tointeger(L, -1) != STYLE_DEFAULT) { + lua_pushstring(L, "style."), lua_pushvalue(L, -3), lua_concat(L, 2); + lL_getexpanded(L, -1), lua_replace(L, -2); + SetStyle(lua_tointeger(L, -2), lua_tostring(L, -1)); + lua_pop(L, 1); // style + } + lua_pop(L, 1); // value + } + lua_pop(L, 1); // _TOKENSTYLES + return true; + } + + /** + * Returns the style name for the given style number. + * @param style The style number to get the style name for. + * @return style name or NULL + */ + const char *GetStyleName(int style) { + if (!L) return NULL; + const char *name = NULL; + l_getlexerfield(L, "_TOKENSTYLES"); + lua_pushnil(L); + while (lua_next(L, -2)) + if (lua_tointeger(L, -1) == style) { + name = lua_tostring(L, -2); + lua_pop(L, 2); // value and key + break; + } else lua_pop(L, 1); // value + lua_pop(L, 1); // _TOKENSTYLES + return name; + } + + /** + * Initializes the lexer once the `lexer.lpeg.home` and `lexer.name` + * properties are set. + */ + bool Init() { + char home[FILENAME_MAX], lexer[50], theme[FILENAME_MAX]; + props.GetExpanded("lexer.lpeg.home", home); + props.GetExpanded("lexer.name", lexer); + props.GetExpanded("lexer.lpeg.color.theme", theme); + if (!*home || !*lexer || !L) return false; + + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + + // If necessary, load the lexer module and theme. + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"), lua_getfield(L, -1, "lexer"); + if (lua_isnil(L, -1)) { + lua_pop(L, 2); // nil and _LOADED + + // Modify `package.path` to find lexers. + lua_getglobal(L, "package"), lua_getfield(L, -1, "path"); + int orig_path = luaL_ref(L, LUA_REGISTRYINDEX); // restore later + lua_pushstring(L, home), lua_pushstring(L, "/?.lua"), lua_concat(L, 2); + lua_setfield(L, -2, "path"), lua_pop(L, 1); // package + + // Load the lexer module. + lua_getglobal(L, "require"); + lua_pushstring(L, "lexer"); + if (lua_pcall(L, 1, 1, 0) != LUA_OK) return (l_error(L), false); + l_setfunction(L, l_line_from_position, "line_from_position"); + l_setconstant(L, SC_FOLDLEVELBASE, "FOLD_BASE"); + l_setconstant(L, SC_FOLDLEVELWHITEFLAG, "FOLD_BLANK"); + l_setconstant(L, SC_FOLDLEVELHEADERFLAG, "FOLD_HEADER"); + l_setmetatable(L, "sci_lexer", llexer_property); + if (*theme) { + // Load the theme. + if (!(strstr(theme, "/") || strstr(theme, "\\"))) { // theme name + lua_pushstring(L, home); + lua_pushstring(L, "/themes/"); + lua_pushstring(L, theme); + lua_pushstring(L, ".lua"); + lua_concat(L, 4); + } else lua_pushstring(L, theme); // path to theme + if (luaL_loadfile(L, lua_tostring(L, -1)) != LUA_OK || + lua_pcall(L, 0, 0, 0) != LUA_OK) return (l_error(L), false); + lua_pop(L, 1); // theme + } + + // Restore `package.path`. + lua_getglobal(L, "package"); + lua_getfield(L, -1, "path"), lua_setfield(L, -3, "path"); // lexer.path = + lua_rawgeti(L, LUA_REGISTRYINDEX, orig_path), lua_setfield(L, -2, "path"); + luaL_unref(L, LUA_REGISTRYINDEX, orig_path), lua_pop(L, 1); // package + } else lua_remove(L, -2); // _LOADED + + // Load the language lexer. + lua_getfield(L, -1, "load"); + if (lua_isfunction(L, -1)) { + lua_pushstring(L, lexer), lua_pushnil(L), lua_pushboolean(L, 1); + if (lua_pcall(L, 3, 1, 0) != LUA_OK) return (l_error(L), false); + } else return (l_error(L, "'lexer.load' function not found"), false); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pushlightuserdata(L, reinterpret_cast(this)); + lua_pushvalue(L, -3), lua_settable(L, -3), lua_pop(L, 1); // sci_lexers + lua_pushvalue(L, -1), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexer_obj"); + lua_remove(L, -2); // lexer module + if (!SetStyles()) return false; + + // If the lexer is a parent, it will have children in its _CHILDREN table. + lua_getfield(L, -1, "_CHILDREN"); + if (lua_istable(L, -1)) { + multilang = true; + // Determine which styles are language whitespace styles + // ([lang]_whitespace). This is necessary for determining which language + // to start lexing with. + char style_name[50]; + for (int i = 0; i <= STYLE_MAX; i++) { + PrivateCall(i, reinterpret_cast(style_name)); + ws[i] = strstr(style_name, "whitespace") ? true : false; + } + } + lua_pop(L, 2); // _CHILDREN and lexer object + + reinit = false; + props.Set("lexer.lpeg.error", "", strlen("lexer.lpeg.error"), 0); + return true; + } + + /** + * When *lparam* is `0`, returns the size of the buffer needed to store the + * given string *str* in; otherwise copies *str* into the buffer *lparam* and + * returns the number of bytes copied. + * @param lparam `0` to get the number of bytes needed to store *str* or a + * pointer to a buffer large enough to copy *str* into. + * @param str The string to copy. + * @return number of bytes needed to hold *str* + */ + void *StringResult(long lparam, const char *str) { + if (lparam) strcpy(reinterpret_cast(lparam), str); + return reinterpret_cast(strlen(str)); + } + +public: + /** Constructor. */ + LexerLPeg() : own_lua(true), reinit(true), multilang(false) { + // Initialize the Lua state, load libraries, and set platform variables. + if ((L = luaL_newstate())) { + l_openlib(luaopen_base, LUA_BASELIBNAME); + l_openlib(luaopen_table, LUA_TABLIBNAME); + l_openlib(luaopen_string, LUA_STRLIBNAME); +#if LUA_VERSION_NUM < 502 + l_openlib(luaopen_io, LUA_IOLIBNAME); // for `package.searchpath()` +#endif + l_openlib(luaopen_package, LUA_LOADLIBNAME); + l_openlib(luaopen_lpeg, "lpeg"); +#if _WIN32 + lua_pushboolean(L, 1), lua_setglobal(L, "WIN32"); +#endif +#if __APPLE__ + lua_pushboolean(L, 1), lua_setglobal(L, "OSX"); +#endif +#if GTK + lua_pushboolean(L, 1), lua_setglobal(L, "GTK"); +#endif +#if CURSES + lua_pushboolean(L, 1), lua_setglobal(L, "CURSES"); +#endif + lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + } else fprintf(stderr, "Lua failed to initialize.\n"); + SS = NULL, sci = 0; + } + + /** Destructor. */ + virtual ~LexerLPeg() {} + + /** Destroys the lexer object. */ + virtual void SCI_METHOD Release() { + if (own_lua && L) + lua_close(L); + else if (!own_lua) { + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pushlightuserdata(L, reinterpret_cast(this)); + lua_pushnil(L), lua_settable(L, -3), lua_pop(L, 1); // sci_lexers + } + L = NULL; + delete this; + } + + /** + * Lexes the Scintilla document. + * @param startPos The position in the document to start lexing at. + * @param lengthDoc The number of bytes in the document to lex. + * @param initStyle The initial style at position *startPos* in the document. + * @param buffer The document interface. + */ + virtual void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, + int initStyle, IDocument *buffer) { + LexAccessor styler(buffer); + if ((reinit && !Init()) || !L) { + // Style everything in the default style. + styler.StartAt(startPos); + styler.StartSegment(startPos); + styler.ColourTo(startPos + lengthDoc - 1, STYLE_DEFAULT); + styler.Flush(); + return; + } + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + lua_pushlightuserdata(L, reinterpret_cast(buffer)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + + // Ensure the lexer has a grammar. + // This could be done in the lexer module's `lex()`, but for large files, + // passing string arguments from C to Lua is expensive. + l_getlexerfield(L, "_GRAMMAR"); + int has_grammar = !lua_isnil(L, -1); + lua_pop(L, 1); // _GRAMMAR + if (!has_grammar) { + // Style everything in the default style. + styler.StartAt(startPos); + styler.StartSegment(startPos); + styler.ColourTo(startPos + lengthDoc - 1, STYLE_DEFAULT); + styler.Flush(); + return; + } + + // Start from the beginning of the current style so LPeg matches it. + // For multilang lexers, start at whitespace since embedded languages have + // [lang]_whitespace styles. This is so LPeg can start matching child + // languages instead of parent ones if necessary. + if (startPos > 0) { + Sci_PositionU i = startPos; + while (i > 0 && styler.StyleAt(i - 1) == initStyle) i--; + if (multilang) + while (i > 0 && !ws[static_cast(styler.StyleAt(i))]) i--; + lengthDoc += startPos - i, startPos = i; + } + + Sci_PositionU startSeg = startPos, endSeg = startPos + lengthDoc; + int style = 0; + l_getlexerfield(L, "lex") + if (lua_isfunction(L, -1)) { + l_getlexerobj(L); + lua_pushlstring(L, buffer->BufferPointer() + startPos, lengthDoc); + lua_pushinteger(L, styler.StyleAt(startPos)); + if (lua_pcall(L, 3, 1, 0) != LUA_OK) l_error(L); + // Style the text from the token table returned. + if (lua_istable(L, -1)) { + int len = lua_rawlen(L, -1); + if (len > 0) { + styler.StartAt(startPos); + styler.StartSegment(startPos); + l_getlexerfield(L, "_TOKENSTYLES"); + // Loop through token-position pairs. + for (int i = 1; i < len; i += 2) { + style = STYLE_DEFAULT; + lua_rawgeti(L, -2, i), lua_rawget(L, -2); // _TOKENSTYLES[token] + if (!lua_isnil(L, -1)) style = lua_tointeger(L, -1); + lua_pop(L, 1); // _TOKENSTYLES[token] + lua_rawgeti(L, -2, i + 1); // pos + unsigned int position = lua_tointeger(L, -1) - 1; + lua_pop(L, 1); // pos + if (style >= 0 && style <= STYLE_MAX) + styler.ColourTo(startSeg + position - 1, style); + else + l_error(L, "Bad style number"); + if (position > endSeg) break; + } + lua_pop(L, 2); // _TOKENSTYLES and token table returned + styler.ColourTo(endSeg - 1, style); + styler.Flush(); + } + } else l_error(L, "Table of tokens expected from 'lexer.lex'"); + } else l_error(L, "'lexer.lex' function not found"); + } + + /** + * Folds the Scintilla document. + * @param startPos The position in the document to start folding at. + * @param lengthDoc The number of bytes in the document to fold. + * @param initStyle The initial style at position *startPos* in the document. + * @param buffer The document interface. + */ + virtual void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, + int, IDocument *buffer) { + if ((reinit && !Init()) || !L) return; + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + lua_pushlightuserdata(L, reinterpret_cast(buffer)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_buffer"); + LexAccessor styler(buffer); + + l_getlexerfield(L, "fold"); + if (lua_isfunction(L, -1)) { + l_getlexerobj(L); + Sci_Position currentLine = styler.GetLine(startPos); + lua_pushlstring(L, buffer->BufferPointer() + startPos, lengthDoc); + lua_pushinteger(L, startPos); + lua_pushinteger(L, currentLine); + lua_pushinteger(L, styler.LevelAt(currentLine) & SC_FOLDLEVELNUMBERMASK); + if (lua_pcall(L, 5, 1, 0) != LUA_OK) l_error(L); + // Fold the text from the fold table returned. + if (lua_istable(L, -1)) { + lua_pushnil(L); + while (lua_next(L, -2)) { // line = level + styler.SetLevel(lua_tointeger(L, -2), lua_tointeger(L, -1)); + lua_pop(L, 1); // level + } + lua_pop(L, 1); // fold table returned + } else l_error(L, "Table of folds expected from 'lexer.fold'"); + } else l_error(L, "'lexer.fold' function not found"); + } + + /** This lexer implements the original lexer interface. */ + virtual int SCI_METHOD Version() const { return lvOriginal; } + /** Returning property names is not implemented. */ + virtual const char * SCI_METHOD PropertyNames() { return ""; } + /** Returning property types is not implemented. */ + virtual int SCI_METHOD PropertyType(const char *) { return 0; } + /** Returning property descriptions is not implemented. */ + virtual const char * SCI_METHOD DescribeProperty(const char *) { + return ""; + } + + /** + * Sets the *key* lexer property to *value*. + * If *key* starts with "style.", also set the style for the token. + * @param key The string keyword. + * @param val The string value. + */ + virtual Sci_Position SCI_METHOD PropertySet(const char *key, + const char *value) { + props.Set(key, value, strlen(key), strlen(value)); + if (reinit) + Init(); + else if (L && SS && sci && strncmp(key, "style.", 6) == 0) { + lua_pushlightuserdata(L, reinterpret_cast(&props)); + lua_setfield(L, LUA_REGISTRYINDEX, "sci_props"); + l_getlexerfield(L, "_TOKENSTYLES"); + lua_pushstring(L, key + 6), lua_rawget(L, -2); + lua_pushstring(L, key), lL_getexpanded(L, -1), lua_replace(L, -2); + if (lua_isnumber(L, -2)) { + int style_num = lua_tointeger(L, -2); + SetStyle(style_num, lua_tostring(L, -1)); + if (style_num == STYLE_DEFAULT) + // Assume a theme change, with the default style being set first. + // Subsequent style settings will be based on the default. + SS(sci, SCI_STYLECLEARALL, 0, 0); + } + lua_pop(L, 3); // style, style number, _TOKENSTYLES + } + return -1; // no need to re-lex + } + + /** Returning keyword list descriptions is not implemented. */ + virtual const char * SCI_METHOD DescribeWordListSets() { return ""; } + /** Setting keyword lists is not applicable. */ + virtual Sci_Position SCI_METHOD WordListSet(int, const char *) { + return -1; + } + + /** + * Allows for direct communication between the application and the lexer. + * The application uses this to set `SS`, `sci`, `L`, and lexer properties, + * and to retrieve style names. + * @param code The communication code. + * @param arg The argument. + * @return void *data + */ + virtual void * SCI_METHOD PrivateCall(int code, void *arg) { + sptr_t lParam = reinterpret_cast(arg); + const char *val = NULL; + switch(code) { + case SCI_GETDIRECTFUNCTION: + SS = reinterpret_cast(lParam); + return NULL; + case SCI_SETDOCPOINTER: + sci = lParam; + return NULL; + case SCI_CHANGELEXERSTATE: + if (own_lua) lua_close(L); + L = reinterpret_cast(lParam); + lua_getfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + if (lua_isnil(L, -1)) + lua_newtable(L), lua_setfield(L, LUA_REGISTRYINDEX, "sci_lexers"); + lua_pop(L, 1); // sci_lexers or nil + own_lua = false; + return NULL; + case SCI_SETLEXERLANGUAGE: + char lexer_name[50]; + props.GetExpanded("lexer.name", lexer_name); + if (strcmp(lexer_name, reinterpret_cast(arg)) != 0) { + reinit = true; + props.Set("lexer.lpeg.error", "", strlen("lexer.lpeg.error"), 0); + PropertySet("lexer.name", reinterpret_cast(arg)); + } else if (L) + own_lua ? SetStyles() : Init(); + return NULL; + case SCI_GETLEXERLANGUAGE: + if (L) { + l_getlexerfield(L, "_NAME"); + if (SS && sci && multilang) { + int pos = SS(sci, SCI_GETCURRENTPOS, 0, 0); + while (pos >= 0 && !ws[SS(sci, SCI_GETSTYLEAT, pos, 0)]) pos--; + const char *name = NULL, *p = NULL; + if (pos >= 0) { + name = GetStyleName(SS(sci, SCI_GETSTYLEAT, pos, 0)); + if (name) p = strstr(name, "_whitespace"); + } + if (!name) name = lua_tostring(L, -1); // "lexer:lexer" fallback + if (!p) p = name + strlen(name); // "lexer:lexer" fallback + lua_pushstring(L, "/"); + lua_pushlstring(L, name, p - name); + lua_concat(L, 3); + } + val = lua_tostring(L, -1); + lua_pop(L, 1); // lexer_name or lexer language string + } + return StringResult(lParam, val ? val : "null"); + case SCI_GETSTATUS: + return StringResult(lParam, props.Get("lexer.lpeg.error")); + default: // style-related + if (code >= 0 && code <= STYLE_MAX) { // retrieve style names + val = GetStyleName(code); + return StringResult(lParam, val ? val : "Not Available"); + } else return NULL; + } + } + + /** Constructs a new instance of the lexer. */ + static ILexer *LexerFactoryLPeg() { return new LexerLPeg(); } +}; + +LexerModule lmLPeg(SCLEX_LPEG, LexerLPeg::LexerFactoryLPeg, "lpeg"); + +#else + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "WordList.h" +#include "LexAccessor.h" +#include "Accessor.h" +#include "LexerModule.h" + +using namespace Scintilla; + +static void LPegLex(Sci_PositionU, Sci_Position, int, WordList*[], Accessor&) { + return; +} + +LexerModule lmLPeg(SCLEX_LPEG, LPegLex, "lpeg"); + +#endif // LPEG_LEXER diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLaTeX.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLaTeX.cpp similarity index 95% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexLaTeX.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLaTeX.cpp index c4e1cf4b9..ed9e6a6b3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLaTeX.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLaTeX.cpp @@ -13,9 +13,6 @@ #include #include #include - -#include -#include #include #include "ILexer.h" @@ -29,11 +26,9 @@ #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" -#include "DefaultLexer.h" #include "LexerBase.h" using namespace Scintilla; -using namespace Lexilla; using namespace std; @@ -44,13 +39,6 @@ struct latexFoldSave { latexFoldSave(const latexFoldSave &save) : structLev(save.structLev) { for (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i]; } - latexFoldSave &operator=(const latexFoldSave &save) { - if (this != &save) { - structLev = save.structLev; - for (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i]; - } - return *this; - } int openBegins[8]; Sci_Position structLev; }; @@ -88,19 +76,11 @@ class LexerLaTeX : public LexerBase { saves.resize(numLines + 128); } public: - static ILexer5 *LexerFactoryLaTeX() { + static ILexer *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) { @@ -309,8 +289,6 @@ 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) { @@ -459,9 +437,6 @@ 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; } } } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLisp.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLisp.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexLisp.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLisp.cpp index d482541a6..8e7586355 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLisp.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLisp.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; #define SCE_LISP_CHARACTER 29 #define SCE_LISP_MACRO 30 diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLout.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLout.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexLout.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLout.cpp index 98435c6cc..abba91ad1 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLout.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLout.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalpha(ch) || ch == '@' || ch == '_'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLua.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLua.cpp similarity index 93% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexLua.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLua.cpp index fc9cef97d..9e6e8a70c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexLua.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexLua.cpp @@ -15,7 +15,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -29,7 +28,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ], // return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on. @@ -60,8 +59,8 @@ static void ColouriseLuaDoc( const WordList &keywords8 = *keywordlists[7]; // Accepts accented characters - CharacterSet setWordStart(CharacterSet::setAlpha, "_", true); - CharacterSet setWord(CharacterSet::setAlphaNum, "_", true); + CharacterSet setWordStart(CharacterSet::setAlpha, "_", 0x80, true); + CharacterSet setWord(CharacterSet::setAlphaNum, "_", 0x80, true); // Not exactly following number definition (several dots are seen as OK, etc.) // but probably enough in most cases. [pP] is for hex floats. CharacterSet setNumber(CharacterSet::setDigits, ".-+abcdefpABCDEFP"); @@ -70,15 +69,17 @@ static void ColouriseLuaDoc( CharacterSet setEscapeSkip(CharacterSet::setNone, "\"'\\"); Sci_Position currentLine = styler.GetLine(startPos); - // Initialize long string [[ ... ]] or block comment --[[ ... ]], + // Initialize long string [[ ... ]] or block comment --[[ ... ]] nesting level, // if we are inside such a string. Block comment was introduced in Lua 5.0, // blocks with separators [=[ ... ]=] in Lua 5.1. // Continuation of a string (\z whitespace escaping) is controlled by stringWs. + int nestLevel = 0; int sepCount = 0; int stringWs = 0; if (initStyle == SCE_LUA_LITERALSTRING || initStyle == SCE_LUA_COMMENT || initStyle == SCE_LUA_STRING || initStyle == SCE_LUA_CHARACTER) { const int lineState = styler.GetLineState(currentLine - 1); + nestLevel = lineState >> 9; sepCount = lineState & 0xFF; stringWs = lineState & 0x100; } @@ -109,7 +110,7 @@ static void ColouriseLuaDoc( case SCE_LUA_STRING: case SCE_LUA_CHARACTER: // Inside a literal string, block comment or string, we set the line state - styler.SetLineState(currentLine, stringWs | sepCount); + styler.SetLineState(currentLine, (nestLevel << 9) | stringWs | sepCount); break; default: // Reset the line state @@ -253,11 +254,25 @@ static void ColouriseLuaDoc( sc.ChangeState(SCE_LUA_STRINGEOL); sc.ForwardSetState(SCE_LUA_DEFAULT); } - } else if (sc.ch == ']' && (sc.state == SCE_LUA_LITERALSTRING || sc.state == SCE_LUA_COMMENT)) { - const int sep = LongDelimCheck(sc); - if (sep == sepCount) { // ]=]-style delim - sc.Forward(sep); - sc.ForwardSetState(SCE_LUA_DEFAULT); + } else if (sc.state == SCE_LUA_LITERALSTRING || sc.state == SCE_LUA_COMMENT) { + if (sc.ch == '[') { + const int sep = LongDelimCheck(sc); + if (sep == 1 && sepCount == 1) { // [[-only allowed to nest + nestLevel++; + sc.Forward(); + } + } else if (sc.ch == ']') { + int sep = LongDelimCheck(sc); + if (sep == 1 && sepCount == 1) { // un-nest with ]]-only + nestLevel--; + sc.Forward(); + if (nestLevel == 0) { + sc.ForwardSetState(SCE_LUA_DEFAULT); + } + } else if (sep > 1 && sep == sepCount) { // ]=]-style delim + sc.Forward(sep); + sc.ForwardSetState(SCE_LUA_DEFAULT); + } } } @@ -341,6 +356,7 @@ static void ColouriseLuaDoc( if (sepCount == 0) { sc.SetState(SCE_LUA_OPERATOR); } else { + nestLevel = 1; sc.SetState(SCE_LUA_LITERALSTRING); sc.Forward(sepCount); } @@ -350,6 +366,7 @@ static void ColouriseLuaDoc( sc.Forward(2); sepCount = LongDelimCheck(sc); if (sepCount > 0) { + nestLevel = 1; sc.ChangeState(SCE_LUA_COMMENT); sc.Forward(sepCount); } @@ -367,7 +384,7 @@ static void ColouriseLuaDoc( sc.Complete(); } -static void FoldLuaDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], +static void FoldLuaDoc(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, WordList *[], Accessor &styler) { const Sci_PositionU lengthDoc = startPos + length; int visibleChars = 0; @@ -376,14 +393,12 @@ static void FoldLuaDoc(Sci_PositionU startPos, Sci_Position length, int initStyl int levelCurrent = levelPrev; char chNext = styler[startPos]; const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; - int style = initStyle; int styleNext = styler.StyleAt(startPos); for (Sci_PositionU i = startPos; i < lengthDoc; i++) { const char ch = chNext; chNext = styler.SafeGetCharAt(i + 1); - const int stylePrev = style; - style = styleNext; + const int style = styleNext; styleNext = styler.StyleAt(i + 1); const bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_LUA_WORD) { @@ -411,9 +426,9 @@ static void FoldLuaDoc(Sci_PositionU startPos, Sci_Position length, int initStyl levelCurrent--; } } else if (style == SCE_LUA_LITERALSTRING || style == SCE_LUA_COMMENT) { - if (stylePrev != style) { + if (ch == '[') { levelCurrent++; - } else if (styleNext != style) { + } else if (ch == ']') { levelCurrent--; } } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMMIXAL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMMIXAL.cpp similarity index 94% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMMIXAL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMMIXAL.cpp index f0b779c9a..9e428caf5 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMMIXAL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMMIXAL.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,14 +26,14 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == ':' || ch == '_'); } -static inline bool isMMIXALOperator(char ch) { +inline bool isMMIXALOperator(char ch) { if (IsASCII(ch) && isalnum(ch)) return false; if (ch == '+' || ch == '-' || ch == '|' || ch == '^' || @@ -88,6 +85,8 @@ 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 { @@ -100,11 +99,12 @@ static void ColouriseMMIXALDoc(Sci_PositionU startPos, Sci_Position length, int } } else if (sc.state == SCE_MMIXAL_REF) { // REF if (!IsAWordChar(sc.ch) ) { - char s0[100]; - sc.GetCurrent(s0, sizeof(s0)); - const char *s = s0; + char s[100]; + sc.GetCurrent(s, sizeof(s)); if (*s == ':') { // ignore base prefix for match - ++s; + for (size_t i = 0; i != sizeof(s); ++i) { + *(s+i) = *(s+i+1); + } } if (special_register.InList(s)) { sc.ChangeState(SCE_MMIXAL_REGISTER); @@ -154,7 +154,9 @@ 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)) { - sc.SetState(SCE_MMIXAL_COMMENT); + if (!sc.atLineEnd) { + sc.SetState(SCE_MMIXAL_COMMENT); + } } else if (isdigit(sc.ch)) { sc.SetState(SCE_MMIXAL_NUMBER); } else if (IsAWordChar(sc.ch) || sc.Match('@')) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMPT.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMPT.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMPT.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMPT.cpp index f54b01310..0f5469840 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMPT.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMPT.cpp @@ -15,7 +15,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -28,7 +27,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static int GetLotLineState(std::string &line) { if (line.length()) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMSSQL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMSSQL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMSSQL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMSSQL.cpp index d0b563732..a06ff32c3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMSSQL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMSSQL.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; #define KW_MSSQL_STATEMENTS 0 #define KW_MSSQL_DATA_TYPES 1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMagik.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMagik.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMagik.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMagik.cpp index ca2aba3f1..057b90657 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMagik.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMagik.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /** * Is it a core character (C isalpha(), exclamation and question mark) @@ -85,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 keywordlists The keywordslists, currently, number 5 is used + * \param keywordslists The keywordslists, currently, number 5 is used * \param styler The styler */ static void ColouriseMagikDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, @@ -331,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 keyword The actual keyword + * \param The actual keyword * \return 1 if it is a folding start-keyword, -1 if it is a folding end-keyword * 0 otherwise */ diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMake.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMake.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMake.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMake.cpp index 3e8451255..b3dc12aa1 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMake.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMake.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { return (styler[i] == '\n') || diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMarkdown.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMarkdown.cpp similarity index 86% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMarkdown.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMarkdown.cpp index 36346398b..e3410f6ca 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMarkdown.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMarkdown.cpp @@ -40,9 +40,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -54,20 +51,15 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; - -namespace { - -constexpr bool IsNewline(const int ch) { - // sc.GetRelative(i) returns '\0' if out of range - return (ch == '\n' || ch == '\r' || ch == '\0'); -} +using namespace Scintilla; +static inline bool IsNewline(const int ch) { + return (ch == '\n' || ch == '\r'); } // True if can follow ch down to the end with possibly trailing whitespace static bool FollowToLineEnd(const int ch, const int state, const Sci_PositionU endPos, StyleContext &sc) { - Sci_Position i = 0; + Sci_PositionU i = 0; while (sc.GetRelative(++i) == ch) ; // Skip over whitespace @@ -111,10 +103,9 @@ static bool HasPrevLineContent(StyleContext &sc) { while ((--i + (Sci_Position)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i))) ; while ((--i + (Sci_Position)sc.currentPos) >= 0) { - const int ch = sc.GetRelative(i); - if (ch == '\n') + if (IsNewline(sc.GetRelative(i))) break; - if (!((ch == '\r' || IsASpaceOrTab(ch)))) + if (!IsASpaceOrTab(sc.GetRelative(i))) return true; } return false; @@ -124,25 +115,9 @@ static bool AtTermStart(StyleContext &sc) { return sc.currentPos == 0 || sc.chPrev == 0 || isspacechar(sc.chPrev); } -static bool IsCompleteStyleRegion(StyleContext &sc, const char *token) { - bool found = false; - const size_t start = strlen(token); - Sci_Position i = static_cast(start); - while (!IsNewline(sc.GetRelative(i))) { - // make sure an empty pair of single-char tokens doesn't match - // with a longer token: {*}{*} != {**} - if (sc.GetRelative(i) == *token && sc.GetRelative(i - 1) != *token) { - found = start > 1U ? sc.GetRelative(i + 1) == token[1] : true; - break; - } - i++; - } - return AtTermStart(sc) && found; -} - static bool IsValidHrule(const Sci_PositionU endPos, StyleContext &sc) { int count = 1; - Sci_Position i = 0; + Sci_PositionU i = 0; for (;;) { ++i; int c = sc.GetRelative(i); @@ -176,7 +151,7 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int // in the default state. bool freezeCursor = false; - StyleContext sc(startPos, static_cast(length), initStyle, styler); + StyleContext sc(startPos, length, initStyle, styler); while (sc.More()) { // Skip past escaped characters @@ -191,9 +166,8 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int // Conditional state-based actions if (sc.state == SCE_MARKDOWN_CODE2) { - if (sc.Match("``")) { - const int closingSpan = (sc.GetRelative(2) == '`') ? 3 : 2; - sc.Forward(closingSpan); + if (sc.Match("``") && sc.GetRelative(-2) != ' ') { + sc.Forward(2); sc.SetState(SCE_MARKDOWN_DEFAULT); } } @@ -228,24 +202,24 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int */ // Strong else if (sc.state == SCE_MARKDOWN_STRONG1) { - if ((sc.Match("**") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) { + if (sc.Match("**") && sc.chPrev != ' ') { sc.Forward(2); sc.SetState(SCE_MARKDOWN_DEFAULT); } } else if (sc.state == SCE_MARKDOWN_STRONG2) { - if ((sc.Match("__") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) { + if (sc.Match("__") && sc.chPrev != ' ') { sc.Forward(2); sc.SetState(SCE_MARKDOWN_DEFAULT); } } // Emphasis else if (sc.state == SCE_MARKDOWN_EM1) { - if ((sc.ch == '*' && sc.chPrev != ' ') || IsNewline(sc.chNext)) + if (sc.ch == '*' && sc.chPrev != ' ') sc.ForwardSetState(SCE_MARKDOWN_DEFAULT); } else if (sc.state == SCE_MARKDOWN_EM2) { - if ((sc.ch == '_' && sc.chPrev != ' ') || IsNewline(sc.chNext)) + if (sc.ch == '_' && sc.chPrev != ' ') sc.ForwardSetState(SCE_MARKDOWN_DEFAULT); } else if (sc.state == SCE_MARKDOWN_CODEBK) { @@ -258,7 +232,7 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int } } else if (sc.state == SCE_MARKDOWN_STRIKEOUT) { - if ((sc.Match("~~") && sc.chPrev != ' ') || IsNewline(sc.GetRelative(2))) { + if (sc.Match("~~") && sc.chPrev != ' ') { sc.Forward(2); sc.SetState(SCE_MARKDOWN_DEFAULT); } @@ -394,38 +368,38 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int // Links and Images if (sc.Match("![")) { sc.SetState(SCE_MARKDOWN_LINK); - sc.Forward(1); + sc.Forward(2); } else if (sc.ch == '[' && sc.GetRelative(-1) != '\\') { sc.SetState(SCE_MARKDOWN_LINK); + sc.Forward(); } // Code - also a special case for alternate inside spacing else if (sc.Match("``") && sc.GetRelative(3) != ' ' && AtTermStart(sc)) { - const int openingSpan = (sc.GetRelative(2) == '`') ? 2 : 1; sc.SetState(SCE_MARKDOWN_CODE2); - sc.Forward(openingSpan); + sc.Forward(); } - else if (sc.ch == '`' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, "`")) { + else if (sc.ch == '`' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_CODE); } // Strong - else if (sc.Match("**") && sc.GetRelative(2) != ' ' && IsCompleteStyleRegion(sc, "**")) { + else if (sc.Match("**") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRONG1); sc.Forward(); } - else if (sc.Match("__") && sc.GetRelative(2) != ' ' && IsCompleteStyleRegion(sc, "__")) { + else if (sc.Match("__") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRONG2); sc.Forward(); } // Emphasis - else if (sc.ch == '*' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, "*")) { + else if (sc.ch == '*' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_EM1); - } else if (sc.ch == '_' && sc.chNext != ' ' && IsCompleteStyleRegion(sc, "_")) { + } + else if (sc.ch == '_' && sc.chNext != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_EM2); } // Strikeout - else if (sc.Match("~~") && !(sc.GetRelative(2) == '~' || sc.GetRelative(2) == ' ') && - IsCompleteStyleRegion(sc, "~~")) { + else if (sc.Match("~~") && sc.GetRelative(2) != ' ' && AtTermStart(sc)) { sc.SetState(SCE_MARKDOWN_STRIKEOUT); sc.Forward(); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMatlab.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMatlab.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMatlab.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMatlab.cpp index e9b2409fd..a36a99502 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMatlab.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMatlab.cpp @@ -33,9 +33,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -47,7 +44,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static bool IsMatlabCommentChar(int c) { return (c == '%') ; @@ -158,7 +155,7 @@ static void ColouriseMatlabOctaveDoc( } else if (sc.state == SCE_MATLAB_KEYWORD) { if (!isalnum(sc.ch) && sc.ch != '_') { char s[100]; - sc.GetCurrent(s, sizeof(s)); + sc.GetCurrentLowered(s, sizeof(s)); if (keywords.InList(s)) { if (strcmp ("end", s) == 0 && allow_end_op) { @@ -188,7 +185,7 @@ static void ColouriseMatlabOctaveDoc( } } } else if (sc.state == SCE_MATLAB_DOUBLEQUOTESTRING) { - if (sc.ch == '\\' && !ismatlab) { + if (sc.ch == '\\') { if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { sc.Forward(); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMaxima.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMaxima.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMaxima.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMaxima.cpp index 75d1405cd..4897c995e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMaxima.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMaxima.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "StyleContext.h" #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool isMaximaoperator(char ch) { return (ch == '\'' || ch == '`' || ch == '(' || diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMetapost.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMetapost.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMetapost.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMetapost.cpp index 9c21037b4..315a1eab0 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMetapost.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMetapost.cpp @@ -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 @@ -19,9 +19,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -33,7 +30,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // val SCE_METAPOST_DEFAULT = 0 // val SCE_METAPOST_SPECIAL = 1 @@ -180,8 +177,7 @@ static void ColouriseMETAPOSTDoc( } WordList &keywords = *keywordlists[0] ; - WordList kwEmpty; - WordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty; + WordList &keywords2 = *keywordlists[extraInterface-1] ; StyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexModula.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexModula.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexModula.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexModula.cpp index 6347db7e5..af4b8dd1b 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexModula.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexModula.cpp @@ -16,9 +16,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -31,7 +28,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; #ifdef DEBUG_LEX_MODULA #define DEBUG_STATE( p, c )\ diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMySQL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMySQL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexMySQL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMySQL.cpp index 887ec8d56..7ba52a3e2 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexMySQL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexMySQL.cpp @@ -17,9 +17,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -31,7 +28,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '_'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNimrod.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNimrod.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexNimrod.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNimrod.cpp index b19a3dded..5526ff843 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNimrod.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNimrod.cpp @@ -14,9 +14,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -28,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(int ch) { return (ch >= 0x80) || isalnum(ch) || ch == '_'; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNsis.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNsis.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexNsis.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNsis.cpp index e9fa5fdb6..3b2b8a3ad 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNsis.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNsis.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /* // located in SciLexer.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNull.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNull.cpp similarity index 94% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexNull.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNull.cpp index 92f12c19f..15a3a50aa 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNull.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexNull.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexOScript.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOScript.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexOScript.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOScript.cpp index b97d7870d..3fe407063 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexOScript.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOScript.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // ----------------------------------------- // Functions classifying a single character. diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexOpal.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOpal.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexOpal.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOpal.cpp index 2e5ce06e4..c23620405 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexOpal.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexOpal.cpp @@ -11,9 +11,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -25,7 +22,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; inline static void getRange( Sci_PositionU start, Sci_PositionU end, Accessor & styler, char * s, Sci_PositionU len ) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPB.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPB.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPB.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPB.cpp index c8522a012..582a5899d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPB.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPB.cpp @@ -40,9 +40,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -54,7 +51,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsTypeCharacter(const int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPLM.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPLM.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPLM.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPLM.cpp index d703afadf..9cac8b6cd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPLM.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPLM.cpp @@ -1,5 +1,4 @@ // 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. @@ -10,9 +9,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -24,7 +20,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void GetRange(Sci_PositionU start, Sci_PositionU end, diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPO.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPO.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPO.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPO.cpp index d5dbeb639..875c334f8 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPO.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPO.cpp @@ -20,9 +20,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -34,7 +31,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) { StyleContext sc(startPos, length, initStyle, styler); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPOV.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPOV.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPOV.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPOV.cpp index fafb78a74..40d0d2e9d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPOV.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPOV.cpp @@ -21,9 +21,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -35,7 +32,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(int ch) { return ch < 0x80 && (isalnum(ch) || ch == '_'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPS.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPS.cpp index a70ea71c9..b7158e9bb 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPS.cpp @@ -19,9 +19,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -33,7 +30,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsASelfDelimitingChar(const int ch) { return (ch == '[' || ch == ']' || ch == '{' || ch == '}' || diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPascal.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPascal.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPascal.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPascal.cpp index 4aa88a96c..426b3c3f3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPascal.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPascal.cpp @@ -117,9 +117,6 @@ contains requires #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -131,7 +128,7 @@ contains requires #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void GetRangeLowered(Sci_PositionU start, Sci_PositionU end, diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPerl.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPerl.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPerl.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPerl.cpp index 1ba426e17..3bf205f70 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPerl.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPerl.cpp @@ -15,9 +15,7 @@ #include #include -#include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -32,7 +30,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; // Info for HERE document handling from perldata.pod (reformatted): // ---------------------------------------------------------------- @@ -40,8 +37,6 @@ using namespace Lexilla; // 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 @@ -53,18 +48,6 @@ using namespace Lexilla; // (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 @@ -426,7 +409,6 @@ 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, "\"$;<>&`'+,./\\%:=~!?@[]"), @@ -438,7 +420,7 @@ class LexerPerl : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char *SCI_METHOD PropertyNames() override { return osPerl.PropertyNames(); @@ -450,9 +432,6 @@ class LexerPerl : public DefaultLexer { 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(); } @@ -464,7 +443,7 @@ class LexerPerl : public DefaultLexer { return 0; } - static ILexer5 *LexerFactoryPerl() { + static ILexer *LexerFactoryPerl() { return new LexerPerl(); } int InputSymbolScan(StyleContext &sc); @@ -640,14 +619,12 @@ 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'; } @@ -908,7 +885,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.atLineStart) { + if (sc.atLineEnd) { sc.SetState(SCE_PL_DEFAULT); } break; @@ -919,14 +896,8 @@ 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; @@ -993,11 +964,6 @@ 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 @@ -1735,12 +1701,6 @@ 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) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerPro.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerPro.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerPro.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerPro.cpp index bfa58b2f0..34debff24 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerPro.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerPro.cpp @@ -32,9 +32,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -46,7 +43,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsStreamCommentStyle(int style) { return style == SCE_POWERPRO_COMMENTBLOCK; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerShell.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerShell.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerShell.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerShell.cpp index 4e652787d..9969df35d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPowerShell.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPowerShell.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Extended to accept accented characters static inline bool IsAWordChar(int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexProgress.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProgress.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexProgress.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProgress.cpp index e95e95e81..0d27fdcdb 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexProgress.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProgress.cpp @@ -23,11 +23,9 @@ Differentiate between labels and variables #include #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -43,7 +41,6 @@ Differentiate between labels and variables #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts @@ -139,7 +136,6 @@ class LexerABL : public DefaultLexer { OptionSetABL osABL; public: LexerABL() : - DefaultLexer("abl", SCLEX_PROGRESS), setWord(CharacterSet::setAlphaNum, "_", 0x80, true), setNegationOp(CharacterSet::setNone, "!"), setArithmethicOp(CharacterSet::setNone, "+-/*%"), @@ -152,7 +148,7 @@ class LexerABL : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osABL.PropertyNames(); @@ -164,9 +160,6 @@ class LexerABL : public DefaultLexer { 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(); @@ -181,7 +174,7 @@ class LexerABL : public DefaultLexer { int SCI_METHOD LineEndTypesSupported() override { return SC_LINE_END_TYPE_DEFAULT; } - static ILexer5 *LexerFactoryABL() { + static ILexer *LexerFactoryABL() { return new LexerABL(); } }; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexProps.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProps.cpp similarity index 91% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexProps.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProps.cpp index 7dadb2c6e..1aebdbb06 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexProps.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexProps.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { return (styler[i] == '\n') || @@ -82,9 +79,10 @@ static void ColourisePropsLine( } static void ColourisePropsDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { - std::string lineBuffer; + char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); + Sci_PositionU linePos = 0; Sci_PositionU startLine = startPos; // property lexer.props.allow.initial.spaces @@ -94,16 +92,17 @@ 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.push_back(styler[i]); - if (AtEOL(styler, i)) { + lineBuffer[linePos++] = styler[i]; + if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it - ColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, i, styler, allowInitialSpaces); - lineBuffer.clear(); + lineBuffer[linePos] = '\0'; + ColourisePropsLine(lineBuffer, linePos, startLine, i, styler, allowInitialSpaces); + linePos = 0; startLine = i + 1; } } - if (lineBuffer.length() > 0) { // Last line does not have ending characters - ColourisePropsLine(lineBuffer.c_str(), lineBuffer.length(), startLine, startPos + length - 1, styler, allowInitialSpaces); + if (linePos > 0) { // Last line does not have ending characters + ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length - 1, styler, allowInitialSpaces); } } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPython.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPython.cpp similarity index 92% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexPython.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPython.cpp index 53d245da4..6cfb03b5e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexPython.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexPython.cpp @@ -5,16 +5,17 @@ // Copyright 1998-2002 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -33,7 +34,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts @@ -65,20 +65,20 @@ enum kwType { kwOther, kwClass, kwDef, kwImport, kwCDef, kwCTypeName, kwCPDef }; enum literalsAllowed { litNone = 0, litU = 1, litB = 2, litF = 4 }; -constexpr int indicatorWhitespace = 1; +const int indicatorWhitespace = 1; bool IsPyComment(Accessor &styler, Sci_Position pos, Sci_Position len) { return len > 0 && styler[pos] == '#'; } -constexpr bool IsPyStringTypeChar(int ch, literalsAllowed allowed) noexcept { +bool IsPyStringTypeChar(int ch, literalsAllowed allowed) { 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) noexcept { +bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) { if (ch == '\'' || ch == '"') return true; if (IsPyStringTypeChar(ch, allowed)) { @@ -93,22 +93,22 @@ bool IsPyStringStart(int ch, int chNext, int chNext2, literalsAllowed allowed) n return false; } -constexpr bool IsPyFStringState(int st) noexcept { +bool IsPyFStringState(int st) { return ((st == SCE_P_FCHARACTER) || (st == SCE_P_FSTRING) || (st == SCE_P_FTRIPLE) || (st == SCE_P_FTRIPLEDOUBLE)); } -constexpr bool IsPySingleQuoteStringState(int st) noexcept { +bool IsPySingleQuoteStringState(int st) { return ((st == SCE_P_CHARACTER) || (st == SCE_P_STRING) || (st == SCE_P_FCHARACTER) || (st == SCE_P_FSTRING)); } -constexpr bool IsPyTripleQuoteStringState(int st) noexcept { +bool IsPyTripleQuoteStringState(int st) { return ((st == SCE_P_TRIPLE) || (st == SCE_P_TRIPLEDOUBLE) || (st == SCE_P_FTRIPLE) || (st == SCE_P_FTRIPLEDOUBLE)); } -char GetPyStringQuoteChar(int st) noexcept { +char GetPyStringQuoteChar(int st) { if ((st == SCE_P_CHARACTER) || (st == SCE_P_FCHARACTER) || (st == SCE_P_TRIPLE) || (st == SCE_P_FTRIPLE)) return '\''; @@ -126,7 +126,7 @@ void PushStateToStack(int state, std::vector &stack, Sing currentFStringExp = &stack.back(); } -int PopFromStateStack(std::vector &stack, SingleFStringExpState *¤tFStringExp) noexcept { +int PopFromStateStack(std::vector &stack, SingleFStringExpState *¤tFStringExp) { int state = 0; if (!stack.empty()) { @@ -135,7 +135,7 @@ int PopFromStateStack(std::vector &stack, SingleFStringEx } if (stack.empty()) { - currentFStringExp = nullptr; + currentFStringExp = NULL; } else { currentFStringExp = &stack.back(); } @@ -186,30 +186,30 @@ int GetPyStringState(Accessor &styler, Sci_Position i, Sci_PositionU *nextIndex, } inline bool IsAWordChar(int ch, bool unicodeIdentifiers) { - if (IsASCII(ch)) - return (IsAlphaNumeric(ch) || ch == '.' || ch == '_'); + if (ch < 0x80) + return (isalnum(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 (IsASCII(ch)) - return (IsUpperOrLowerCase(ch) || ch == '_'); + if (ch < 0x80) + return (isalpha(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); } -bool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) { - const Sci_Position line = styler.GetLine(pos); - const Sci_Position start_pos = styler.LineStart(line); +static bool IsFirstNonWhitespace(Sci_Position pos, Accessor &styler) { + Sci_Position line = styler.GetLine(pos); + 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')) @@ -232,7 +232,7 @@ struct OptionsPython { bool foldCompact; bool unicodeIdentifiers; - OptionsPython() noexcept { + OptionsPython() { whingeLevel = 0; base2or8Literals = true; stringsU = true; @@ -246,7 +246,7 @@ struct OptionsPython { unicodeIdentifiers = true; } - literalsAllowed AllowedLiterals() const noexcept { + literalsAllowed AllowedLiterals() const { literalsAllowed allowedLiterals = stringsU ? litU : litNone; if (stringsB) allowedLiterals = static_cast(allowedLiterals | litB); @@ -256,10 +256,10 @@ struct OptionsPython { } }; -const char *const pythonWordListDesc[] = { +static const char *const pythonWordListDesc[] = { "Keywords", "Highlighted identifiers", - nullptr + 0 }; struct OptionSetPython : public OptionSet { @@ -300,7 +300,7 @@ struct OptionSetPython : public OptionSet { 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 +344,7 @@ class LexerPython : public DefaultLexer { std::map > ftripleStateAtEol; public: explicit LexerPython() : - DefaultLexer("python", SCLEX_PYTHON, lexicalClasses, ELEMENTS(lexicalClasses)), + DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), subStyles(styleSubable, 0x80, 0x40, 0) { } ~LexerPython() override { @@ -353,7 +353,7 @@ class LexerPython : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvSubStyles; } const char *SCI_METHOD PropertyNames() override { return osPython.PropertyNames(); @@ -365,9 +365,6 @@ class LexerPython : public DefaultLexer { 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(); } @@ -376,7 +373,7 @@ class LexerPython : public DefaultLexer { void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override; void *SCI_METHOD PrivateCall(int, void *) override { - return nullptr; + return 0; } int SCI_METHOD LineEndTypesSupported() override { @@ -412,7 +409,7 @@ class LexerPython : public DefaultLexer { return styleSubable; } - static ILexer5 *LexerFactoryPython() { + static ILexer *LexerFactoryPython() { return new LexerPython(); } @@ -428,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 = nullptr; + WordList *wordListN = 0; switch (n) { case 0: wordListN = &keywords; @@ -436,8 +433,6 @@ Sci_Position SCI_METHOD LexerPython::WordListSet(int n, const char *wl) { case 1: wordListN = &keywords2; break; - default: - break; } Sci_Position firstModification = -1; if (wordListN) { @@ -494,12 +489,12 @@ void LexerPython::ProcessLineEnd(StyleContext &sc, std::vector fstringStateStack; - SingleFStringExpState *currentFStringExp = nullptr; + SingleFStringExpState *currentFStringExp = NULL; const Sci_Position endPos = startPos + length; @@ -510,7 +505,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in lineCurrent--; // Look for backslash-continued lines while (lineCurrent > 0) { - const Sci_Position eolPos = styler.LineStart(lineCurrent) - 1; + Sci_Position eolPos = styler.LineStart(lineCurrent) - 1; const int eolStyle = styler.StyleAt(eolPos); if (eolStyle == SCE_P_STRING || eolStyle == SCE_P_CHARACTER @@ -630,14 +625,14 @@ 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". - const Sci_Position pos = styler.GetStartSegment() - 1; + Sci_Position pos = styler.GetStartSegment() - 1; if (pos < 0 || (styler.SafeGetCharAt(pos, '\0') != '.')) style = SCE_P_WORD2; } else { style = SCE_P_WORD2; } } else { - const int subStyle = classifierIdentifiers.ValueFor(s); + int subStyle = classifierIdentifiers.ValueFor(s); if (subStyle >= 0) { style = subStyle; } @@ -772,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 && !IsPySingleQuoteStringState(sc.state) && !IsPyTripleQuoteStringState(sc.state)) { + if (currentFStringExp != NULL && !IsPySingleQuoteStringState(sc.state) && !IsPyTripleQuoteStringState(sc.state)) { if (currentFStringExp->nestingCount == 0 && (sc.ch == '}' || sc.ch == ':' || (sc.ch == '!' && sc.chNext != '='))) { sc.SetState(PopFromStateStack(fstringStateStack, currentFStringExp)); } else { @@ -803,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 (isoperator(sc.ch) || sc.ch == '`') { + } else if ((IsASCII(sc.ch) && isoperator(static_cast(sc.ch))) || sc.ch == '`') { sc.SetState(SCE_P_OPERATOR); } else if (sc.ch == '#') { sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE); @@ -828,7 +823,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in } static bool IsCommentLine(Sci_Position line, Accessor &styler) { - const Sci_Position pos = styler.LineStart(line); + 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]; @@ -850,7 +845,7 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i if (!options.fold) return; - Accessor styler(pAccess, nullptr); + Accessor styler(pAccess, NULL); const Sci_Position maxPos = startPos + length; const Sci_Position maxLines = (maxPos == styler.Length()) ? styler.GetLine(maxPos) : styler.GetLine(maxPos - 1); // Requested last line @@ -862,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, nullptr); + int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL); while (lineCurrent > 0) { lineCurrent--; - indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr); + indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, NULL); if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) && (!IsCommentLine(lineCurrent, styler)) && (!IsQuoteLine(lineCurrent, styler))) @@ -892,13 +887,13 @@ 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, nullptr); - const Sci_Position lookAtPos = (styler.LineStart(lineNext) == styler.Length()) ? styler.Length() - 1 : styler.LineStart(lineNext); + indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL); + 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); } - const bool quote_start = (quote && !prevQuote); - const bool quote_continue = (quote && prevQuote); + const int quote_start = (quote && !prevQuote); + const int quote_continue = (quote && prevQuote); if (!quote || !prevQuote) indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; if (quote) @@ -923,14 +918,15 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i int minCommentLevel = indentCurrentLevel; while (!quote && (lineNext < docLines) && - ((indentNext & SC_FOLDLEVELWHITEFLAG) || (IsCommentLine(lineNext, styler)))) { + ((indentNext & SC_FOLDLEVELWHITEFLAG) || + (lineNext <= docLines && IsCommentLine(lineNext, styler)))) { if (IsCommentLine(lineNext, styler) && indentNext < minCommentLevel) { minCommentLevel = indentNext; } lineNext++; - indentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr); + indentNext = styler.IndentAmount(lineNext, &spaceFlags, NULL); } const int levelAfterComments = ((lineNext < docLines) ? indentNext & SC_FOLDLEVELNUMBERMASK : minCommentLevel); @@ -945,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, nullptr); + const int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, NULL); if (options.foldCompact) { if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments) skipLevel = levelBeforeComments; - const int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; + int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; styler.SetLevel(skipLine, skipLevel | whiteFlag); } else { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexR.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexR.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexR.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexR.cpp index 2a1da0cb6..ead0dba18 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexR.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexR.cpp @@ -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). ** **/ @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRebol.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRebol.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexRebol.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRebol.cpp index f5b69250d..d4973c0c8 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRebol.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRebol.cpp @@ -18,9 +18,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -32,7 +29,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (isalnum(ch) || ch == '?' || ch == '!' || ch == '.' || ch == '\'' || ch == '+' || ch == '-' || ch == '*' || ch == '&' || ch == '|' || ch == '=' || ch == '_' || ch == '~'); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRegistry.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRegistry.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexRegistry.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRegistry.cpp index 80c42347b..bd0ea18f4 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRegistry.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRegistry.cpp @@ -14,12 +14,9 @@ #include #include #include - #include -#include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -33,7 +30,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; static const char *const RegistryWordListDesc[] = { 0 @@ -165,10 +161,10 @@ class LexerRegistry : public DefaultLexer { } public: - LexerRegistry() : DefaultLexer("registry", SCLEX_REGISTRY) {} + LexerRegistry() {} virtual ~LexerRegistry() {} int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { delete this; @@ -188,17 +184,13 @@ class LexerRegistry : public DefaultLexer { } 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 ILexer5 *LexerFactoryRegistry() { + static ILexer *LexerFactoryRegistry() { return new LexerRegistry; } const char *SCI_METHOD DescribeWordListSets() override { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRuby.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRuby.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexRuby.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRuby.cpp index 566d0cc7f..2affffe65 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRuby.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRuby.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; //XXX Identical to Perl, put in common area static inline bool isEOLChar(char ch) { @@ -254,10 +251,10 @@ class QuoteCls { int Count; char Up; char Down; - QuoteCls() noexcept { + QuoteCls() { New(); } - void New() noexcept { + void New() { Count = 0; Up = '\0'; Down = '\0'; @@ -267,6 +264,21 @@ class QuoteCls { Up = u; Down = opposite(Up); } + QuoteCls(const QuoteCls &q) { + // copy constructor -- use this for copying in + Count = q.Count; + Up = q.Up; + Down = q.Down; + } + QuoteCls &operator=(const QuoteCls &q) { // assignment constructor + if (this != &q) { + Count = q.Count; + Up = q.Up; + Down = q.Down; + } + return *this; + } + }; @@ -550,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] == '-' || styler[j] == '~') { + if (styler[j] == '-') { allow_indent = true; j++; } else { @@ -691,17 +703,23 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init class HereDocCls { public: - int State = 0; + int State; // States // 0: '<<' encountered // 1: collect the delimiter // 1b: text between the end of the delimiter and the EOL // 2: here doc text (lines after the delimiter) - char Quote = 0; // the char after '<<' - bool Quoted = false; // true if Quote in ('\'','"','`') - int DelimiterLength = 0; // strlen(Delimiter) - char Delimiter[256] {}; // the Delimiter, limit of 256: from Perl - bool CanBeIndented = false; + char Quote; // the char after '<<' + bool Quoted; // true if Quote in ('\'','"','`') + int DelimiterLength; // strlen(Delimiter) + char Delimiter[256]; // the Delimiter, limit of 256: from Perl + bool CanBeIndented; + HereDocCls() { + State = 0; + DelimiterLength = 0; + Delimiter[0] = '\0'; + CanBeIndented = false; + } }; HereDocCls HereDoc; @@ -717,7 +735,8 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init int state = initStyle; Sci_Position lengthDoc = startPos + length; - char prevWord[MAX_KEYWORD_LENGTH + 1] = ""; // 1 byte for zero + char prevWord[MAX_KEYWORD_LENGTH + 1]; // 1 byte for zero + prevWord[0] = '\0'; if (length == 0) return; @@ -755,9 +774,9 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init #define INNER_STRINGS_MAX_COUNT 5 // These vars track our instances of "...#{,,,%Q<..#{,,,}...>,,,}..." - int inner_string_types[INNER_STRINGS_MAX_COUNT] {}; + int inner_string_types[INNER_STRINGS_MAX_COUNT]; // Track # braces when we push a new #{ thing - int inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT] {}; + int inner_expn_brace_counts[INNER_STRINGS_MAX_COUNT]; QuoteCls inner_quotes[INNER_STRINGS_MAX_COUNT]; int inner_string_count = 0; int brace_counts = 0; // Number of #{ ... } things within an expression @@ -869,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. @@ -1215,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 == '-' || ch == '~') { + if (ch == '-') { HereDoc.CanBeIndented = true; advance_char(i, ch, chNext, chNext2); // pass by ref } else { @@ -1285,7 +1304,7 @@ static void ColouriseRbDoc(Sci_PositionU startPos, Sci_Position length, int init if (isEOLChar(chPrev) && isMatch(styler, lengthDoc, i, HereDoc.Delimiter)) { styler.ColourTo(i - 1, state); - i += static_cast(HereDoc.DelimiterLength) - 1; + i += HereDoc.DelimiterLength - 1; chNext = styler.SafeGetCharAt(i + 1); if (isEOLChar(chNext)) { styler.ColourTo(i, SCE_RB_HERE_DELIM); @@ -1626,11 +1645,12 @@ static bool keywordDoStartsLoop(Sci_Position pos, Accessor &styler) { char ch; + int style; Sci_Position lineStart = styler.GetLine(pos); Sci_Position lineStartPosn = styler.LineStart(lineStart); styler.Flush(); while (--pos >= lineStartPosn) { - const int style = actual_style(styler.StyleAt(pos)); + style = actual_style(styler.StyleAt(pos)); if (style == SCE_RB_DEFAULT) { if ((ch = styler[pos]) == '\r' || ch == '\n') { // Scintilla's LineStart() and GetLine() routines aren't @@ -1840,6 +1860,7 @@ static void FoldRbDoc(Sci_PositionU startPos, Sci_Position length, int initStyle } // Fill in the real level of the next line, keeping the current flags as they will be filled in later if (!buffer_ends_with_eol) { + lineCurrent++; int new_lev = levelCurrent; if (visibleChars == 0 && foldCompact) new_lev |= SC_FOLDLEVELWHITEFLAG; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRust.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRust.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexRust.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRust.cpp index 2a884e40b..a866203db 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRust.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexRust.cpp @@ -15,9 +15,7 @@ #include #include -#include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -34,7 +32,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; static const int NUM_RUST_KEYWORD_LISTS = 7; static const int MAX_RUST_IDENT_CHARS = 1023; @@ -123,15 +120,13 @@ 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 lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osRust.PropertyNames(); @@ -143,9 +138,6 @@ class LexerRust : public DefaultLexer { 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(); } @@ -155,7 +147,7 @@ class LexerRust : public DefaultLexer { void * SCI_METHOD PrivateCall(int, void *) override { return 0; } - static ILexer5 *LexerFactoryRust() { + static ILexer *LexerFactoryRust() { return new LexerRust(); } }; @@ -286,8 +278,6 @@ static void ScanNumber(Accessor& styler, Sci_Position& pos) { pos += 2; } else if (c == '6' && n == '4') { pos += 2; - } else if (styler.Match(pos, "128")) { - pos += 3; } else if (styler.Match(pos, "size")) { pos += 4; } else { @@ -526,7 +516,7 @@ static void ResumeBlockComment(Accessor &styler, Sci_Position& pos, Sci_Position level++; } } - else if (pos < max) { + else { pos++; } if (pos >= max) { @@ -559,8 +549,12 @@ static void ResumeLineComment(Accessor &styler, Sci_Position& pos, Sci_Position maybe_doc_comment = true; } - pos = styler.LineEnd(styler.GetLine(pos)); - styler.SetLineState(styler.GetLine(pos), SCE_RUST_DEFAULT); + while (pos < max && c != '\n') { + if (pos == styler.LineEnd(styler.GetLine(pos))) + styler.SetLineState(styler.GetLine(pos), 0); + pos++; + c = styler.SafeGetCharAt(pos, '\0'); + } if (state == DocComment || (state == UnknownComment && maybe_doc_comment)) styler.ColourTo(pos - 1, SCE_RUST_COMMENTLINEDOC); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSAS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSAS.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSAS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSAS.cpp index dea62ed95..29feba82d 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSAS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSAS.cpp @@ -19,9 +19,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -33,7 +30,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseSASDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSML.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSML.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSML.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSML.cpp index d4ccc94f9..ed67300d2 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSML.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSML.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -36,7 +33,7 @@ inline int issmlf(int c) {return isalpha(c) || c == '_';} inline int issmld(int c) {return isdigit(c) || c == '_';} -using namespace Lexilla; +using namespace Scintilla; static void ColouriseSMLDoc( Sci_PositionU startPos, Sci_Position length, diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSQL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSQL.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSQL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSQL.cpp index 027d2f256..aeb7f4772 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSQL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSQL.cpp @@ -15,11 +15,9 @@ #include #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -36,7 +34,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; static inline bool IsAWordChar(int ch, bool sqlAllowDottedWord) { if (!sqlAllowDottedWord) @@ -306,12 +303,12 @@ struct OptionSetSQL : public OptionSet { class LexerSQL : public DefaultLexer { public : - LexerSQL() : DefaultLexer("sql", SCLEX_SQL) {} + LexerSQL() {} virtual ~LexerSQL() {} int SCI_METHOD Version () const override { - return lvRelease5; + return lvOriginal; } void SCI_METHOD Release() override { @@ -337,23 +334,19 @@ 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(); } 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 Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; void * SCI_METHOD PrivateCall(int, void *) override { return 0; } - static ILexer5 *LexerFactorySQL() { + static ILexer *LexerFactorySQL() { return new LexerSQL(); } private: @@ -449,8 +442,9 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i LexAccessor styler(pAccess); StyleContext sc(startPos, length, initStyle, styler); int styleBeforeDCKeyword = SCE_SQL_DEFAULT; + Sci_Position offset = 0; - for (; sc.More(); sc.Forward()) { + for (; sc.More(); sc.Forward(), offset++) { // Determine if the current state should terminate. switch (sc.state) { case SCE_SQL_OPERATOR: @@ -543,7 +537,7 @@ void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int i if (options.sqlBackslashEscapes && sc.ch == '\\') { sc.Forward(); } else if (sc.ch == '\'') { - if (sc.chNext == '\'') { + if (sc.chNext == '\"') { sc.Forward(); } else { sc.ForwardSetState(SCE_SQL_DEFAULT); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSTTXT.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSTTXT.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSTTXT.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSTTXT.cpp index b02286295..dd2fe5465 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSTTXT.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSTTXT.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ClassifySTTXTWord(WordList *keywordlists[], StyleContext &sc) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexScriptol.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexScriptol.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexScriptol.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexScriptol.cpp index 4fbda054f..f82027aa3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexScriptol.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexScriptol.cpp @@ -10,9 +10,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -24,7 +21,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ClassifyWordSol(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, char *prevWord) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSmalltalk.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSmalltalk.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSmalltalk.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSmalltalk.cpp index 85d1c02c0..bd146d59c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSmalltalk.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSmalltalk.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /* | lexTable classificationBlock charClasses | diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSorcus.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSorcus.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSorcus.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSorcus.cpp index 3a435eece..66669dc8c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSorcus.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSorcus.cpp @@ -14,9 +14,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -28,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; //each character a..z and A..Z + '_' can be part of a keyword diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpecman.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpecman.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpecman.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpecman.cpp index c898a4789..5a4c9105f 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpecman.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpecman.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static inline bool IsAWordChar(const int ch) { return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\''); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpice.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpice.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpice.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpice.cpp index c63744967..9c21da308 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexSpice.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexSpice.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -26,7 +25,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; /* * Interface diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexStata.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexStata.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexStata.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexStata.cpp index 90d969447..78410c627 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexStata.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexStata.cpp @@ -19,9 +19,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -33,7 +30,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseStataDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], Accessor &styler) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTACL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTACL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTACL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTACL.cpp index f5e2c4cfc..898234c77 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTACL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTACL.cpp @@ -1,6 +1,6 @@ // Scintilla source code edit control -/** @file LexTACL.cxx - ** Lexer for TACL +/** @file LexTAL.cxx + ** Lexer for TAL ** Based on LexPascal.cxx ** Written by Laurent le Tynevez ** Updated by Simon Steele September 2002 @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; inline bool isTACLoperator(char ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTADS3.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTADS3.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTADS3.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTADS3.cpp index e43ced5ce..e2aecbf55 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTADS3.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTADS3.cpp @@ -38,9 +38,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -52,7 +49,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static const int T3_SINGLE_QUOTE = 1; static const int T3_INT_EXPRESSION = 2; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTAL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTAL.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTAL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTAL.cpp index ef5490baf..8d1f057a6 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTAL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTAL.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -29,7 +26,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; inline bool isTALoperator(char ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCL.cpp similarity index 95% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCL.cpp index 5e34aea34..0948f4880 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCL.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Extended to accept accented characters static inline bool IsAWordChar(int ch) { @@ -48,8 +45,7 @@ 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) - const bool foldComment = styler.GetPropertyInt("fold.comment") != 0; - const bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; + bool foldComment = styler.GetPropertyInt("fold.comment") != 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, @@ -132,10 +128,8 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W continue; case ',': sc.SetState(SCE_TCL_OPERATOR); - if (subParen) { + if (subParen) sc.ForwardSetState(SCE_TCL_SUBSTITUTION); - goto next; // Already forwarded so avoid loop's Forward() - } continue; default : // maybe spaces should be allowed ??? @@ -149,8 +143,8 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W } else if (!IsAWordChar(sc.ch)) { if ((sc.state == SCE_TCL_IDENTIFIER && expected) || sc.state == SCE_TCL_MODIFIER) { char w[100]; - sc.GetCurrent(w, sizeof(w)); char *s=w; + sc.GetCurrent(w, sizeof(w)); if (w[strlen(w)-1]=='\r') w[strlen(w)-1]=0; while (*s == ':') // ignore leading : like in ::set a 10 @@ -165,7 +159,7 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD3); } else if (keywords4.InList(s)) { sc.ChangeState(quote ? SCE_TCL_WORD_IN_QUOTE : SCE_TCL_WORD4); - } else if (sc.GetRelative(-static_cast(strlen(s))-1) == '{' && + } else if (sc.GetRelative(-static_cast(strlen(s))-1) == '{' && keywords5.InList(s) && sc.ch == '}') { // {keyword} exactly no spaces sc.ChangeState(SCE_TCL_EXPAND); } @@ -203,7 +197,7 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W } } int flag = 0; - if (!visibleChars && foldCompact) + if (!visibleChars) flag = SC_FOLDLEVELWHITEFLAG; if (currentLevel > previousLevel) flag = SC_FOLDLEVELHEADERFLAG; @@ -230,7 +224,6 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W sc.ForwardSetState(SCE_TCL_DEFAULT); prevSlash = false; previousLevel = currentLevel; - visibleChars = false; goto next; } @@ -319,7 +312,7 @@ static void ColouriseTCLDoc(Sci_PositionU startPos, Sci_Position length, int , W break; case '[': expected = true; - [[fallthrough]]; + // Falls through. case ']': case '(': case ')': diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCMD.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCMD.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCMD.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCMD.cpp index 23dbd11be..8050dddea 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTCMD.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTCMD.cpp @@ -13,9 +13,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -27,7 +24,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static bool IsAlphabetic(int ch) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTeX.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTeX.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTeX.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTeX.cpp index 2c619a783..7ed1bcecc 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTeX.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTeX.cpp @@ -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 @@ -23,9 +23,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -37,7 +34,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // val SCE_TEX_DEFAULT = 0 // val SCE_TEX_SPECIAL = 1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTxt2tags.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTxt2tags.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexTxt2tags.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTxt2tags.cpp index beea5c55b..6d1a954e0 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexTxt2tags.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexTxt2tags.cpp @@ -23,9 +23,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -37,7 +34,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVB.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVB.cpp similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexVB.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVB.cpp index eca3497bb..3b380c4fd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVB.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVB.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; // Internal state, highlighted as number #define SCE_B_FILENUMBER SCE_B_DEFAULT+100 @@ -56,7 +53,7 @@ static inline bool IsANumberChar(int ch) { // but probably enough in most cases. return (ch < 0x80) && (isdigit(ch) || toupper(ch) == 'E' || - ch == '.' || ch == '-' || ch == '+' || ch == '_'); + ch == '.' || ch == '-' || ch == '+'); } static void ColouriseVBDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, @@ -202,10 +199,6 @@ static void ColouriseVBDoc(Sci_PositionU startPos, Sci_Position length, int init // Octal number sc.SetState(SCE_B_NUMBER); sc.Forward(); - } else if (sc.ch == '&' && tolower(sc.chNext) == 'b') { - // Binary number - sc.SetState(SCE_B_NUMBER); - sc.Forward(); } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { sc.SetState(SCE_B_NUMBER); } else if (IsAWordStart(sc.ch) || (sc.ch == '[')) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVHDL.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVHDL.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexVHDL.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVHDL.cpp index b64eb9ebd..92b18269b 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVHDL.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVHDL.cpp @@ -17,9 +17,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -31,7 +28,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static void ColouriseVHDLDoc( Sci_PositionU startPos, @@ -255,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; /***************************************/ diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVerilog.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVerilog.cpp similarity index 99% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexVerilog.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVerilog.cpp index b2120d475..3dc2ac1ef 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVerilog.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVerilog.cpp @@ -14,11 +14,9 @@ #include #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -36,7 +34,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; namespace { // Use an unnamed namespace to protect the functions and classes from name conflicts @@ -219,13 +216,12 @@ 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 lvRelease5; + return lvSubStyles; } void SCI_METHOD Release() override { delete this; @@ -242,9 +238,6 @@ class LexerVerilog : public DefaultLexer { 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(); } @@ -286,7 +279,7 @@ class LexerVerilog : public DefaultLexer { const char * SCI_METHOD GetSubStyleBases() override { return styleSubable; } - static ILexer5* LexerFactoryVerilog() { + static ILexer* LexerFactoryVerilog() { return new LexerVerilog(); } static int MaskActive(int style) { diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVisualProlog.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVisualProlog.cpp similarity index 98% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexVisualProlog.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVisualProlog.cpp index dc7c33275..460ecfab8 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexVisualProlog.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexVisualProlog.cpp @@ -23,11 +23,9 @@ #endif #include -#include #include #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -44,7 +42,6 @@ #include "DefaultLexer.h" using namespace Scintilla; -using namespace Lexilla; // Options used for LexerVisualProlog struct OptionsVisualProlog { @@ -74,7 +71,7 @@ class LexerVisualProlog : public DefaultLexer { OptionsVisualProlog options; OptionSetVisualProlog osVisualProlog; public: - LexerVisualProlog() : DefaultLexer("visualprolog", SCLEX_VISUALPROLOG) { + LexerVisualProlog() { } virtual ~LexerVisualProlog() { } @@ -82,7 +79,7 @@ class LexerVisualProlog : public DefaultLexer { delete this; } int SCI_METHOD Version() const override { - return lvRelease5; + return lvOriginal; } const char * SCI_METHOD PropertyNames() override { return osVisualProlog.PropertyNames(); @@ -94,9 +91,6 @@ class LexerVisualProlog : public DefaultLexer { 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(); } @@ -108,7 +102,7 @@ class LexerVisualProlog : public DefaultLexer { return 0; } - static ILexer5 *LexerFactoryVisualProlog() { + static ILexer *LexerFactoryVisualProlog() { return new LexerVisualProlog(); } }; diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexYAML.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexYAML.cpp similarity index 96% rename from 3rdparty/unioncode-scintilla515/lexilla/lexers/LexYAML.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/LexYAML.cpp index e26ebf882..75515603e 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexYAML.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/LexYAML.cpp @@ -12,9 +12,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -26,7 +23,7 @@ #include "CharacterSet.h" #include "LexerModule.h" -using namespace Lexilla; +using namespace Scintilla; static const char * const yamlWordListDesc[] = { "Keywords", @@ -38,14 +35,6 @@ static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); } -/** - * Check for space, tab, line feed, or carriage return. - * See YAML 1.2 spec sections 5.4. Line Break Characters and 5.5. White Space Characters. - */ -static constexpr bool IsWhiteSpaceOrEOL(char ch) noexcept { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'; -} - static unsigned int SpaceCount(char* lineBuffer) { if (lineBuffer == NULL) return 0; @@ -132,7 +121,7 @@ static void ColouriseYAMLLine( styler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT); styler.ColourTo(endPos, SCE_YAML_COMMENT); return; - } else if (lineBuffer[i] == ':' && !bInQuotes && (IsWhiteSpaceOrEOL(lineBuffer[i + 1]) || i == lengthLine - 1)) { + } else if (lineBuffer[i] == ':' && !bInQuotes) { styler.ColourTo(startLine + i - 1, SCE_YAML_IDENTIFIER); styler.ColourTo(startLine + i, SCE_YAML_OPERATOR); // Non-folding scalar diff --git a/3rdparty/unioncode-scintilla515/lexilla/License.txt b/3rdparty/unioncode-qscintilla214/scintilla/lexers/License.txt similarity index 88% rename from 3rdparty/unioncode-scintilla515/lexilla/License.txt rename to 3rdparty/unioncode-qscintilla214/scintilla/lexers/License.txt index e93ac62f2..47c792655 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/License.txt +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexers/License.txt @@ -1,6 +1,6 @@ -License for Lexilla, Scintilla, and SciTE +License for Scintilla and SciTE -Copyright 1998-2021 by Neil Hodgson +Copyright 1998-2003 by Neil Hodgson All Rights Reserved diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.cpp similarity index 88% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.cpp index 65e07374d..7cce9a554 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.cpp @@ -8,9 +8,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -20,12 +17,12 @@ #include "LexAccessor.h" #include "Accessor.h" -using namespace Lexilla; +using namespace Scintilla; -Accessor::Accessor(Scintilla::IDocument *pAccess_, PropSetSimple *pprops_) : LexAccessor(pAccess_), pprops(pprops_) { +Accessor::Accessor(IDocument *pAccess_, PropSetSimple *pprops_) : LexAccessor(pAccess_), pprops(pprops_) { } -int Accessor::GetPropertyInt(std::string_view key, int defaultValue) const { +int Accessor::GetPropertyInt(const char *key, int defaultValue) const { return pprops->GetInt(key, defaultValue); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.h similarity index 77% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.h index db97ab408..8fc3f641a 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/Accessor.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/Accessor.h @@ -8,7 +8,7 @@ #ifndef ACCESSOR_H #define ACCESSOR_H -namespace Lexilla { +namespace Scintilla { enum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 }; @@ -21,9 +21,9 @@ typedef bool (*PFNIsCommentLeader)(Accessor &styler, Sci_Position pos, Sci_Posit class Accessor : public LexAccessor { public: PropSetSimple *pprops; - Accessor(Scintilla::IDocument *pAccess_, PropSetSimple *pprops_); - int GetPropertyInt(std::string_view key, int defaultValue=0) const; - int IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = nullptr); + Accessor(IDocument *pAccess_, PropSetSimple *pprops_); + int GetPropertyInt(const char *, int defaultValue=0) const; + int IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0); }; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.cpp similarity index 93% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.cpp index bdbbb039a..bc2fa2336 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.cpp @@ -7,20 +7,19 @@ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include #include #include #include "CharacterCategory.h" -namespace Lexilla { +namespace Scintilla { namespace { // Use an unnamed namespace to protect the declarations from name conflicts const int catRanges[] = { //++Autogenerated -- start of section automatically generated -// Created with Python 3.9.4, Unicode 13.0.0 +// Created with Python 3.7.0, Unicode 11.0.0 25, 1046, 1073, @@ -752,7 +751,7 @@ const int catRanges[] = { 70660, 71357, 71364, -71965, +71645, 72293, 72794, 72805, @@ -922,7 +921,7 @@ const int catRanges[] = { 92518, 92581, 92637, -92837, +92869, 92902, 92957, 93060, @@ -1003,7 +1002,6 @@ const int catRanges[] = { 101533, 101576, 101917, -102129, 102154, 102389, 102404, @@ -1045,7 +1043,8 @@ const int catRanges[] = { 106109, 106501, 106566, -106628, +106653, +106660, 106941, 106948, 107069, @@ -1073,7 +1072,6 @@ const int catRanges[] = { 110389, 110404, 110621, -110629, 110662, 110749, 110756, @@ -1117,16 +1115,30 @@ const int catRanges[] = { 118909, 118916, 118973, -118980, +119012, +119101, +119108, 119165, -119172, +119204, +119261, +119428, +119581, +119588, +119837, +119844, 119965, 119972, 120029, 120036, +120093, +120132, +120221, +120228, 120357, 120388, 120453, +120669, +120677, 120740, 120797, 120836, @@ -1273,8 +1285,7 @@ const int catRanges[] = { 163805, 163852, 163876, -183733, -183761, +183729, 183780, 184342, 184356, @@ -1402,8 +1413,7 @@ const int catRanges[] = { 218589, 218629, 219079, -219109, -219197, +219133, 221189, 221318, 221348, @@ -1474,12 +1484,12 @@ const int catRanges[] = { 236836, 236965, 236996, +237126, 237189, 237220, 237286, 237317, -237380, -237437, +237405, 237569, 238979, 240993, @@ -2028,7 +2038,10 @@ const int catRanges[] = { 355997, 356053, 357085, -357109, +357141, +358717, +358741, +360445, 360448, 361981, 361985, @@ -2231,9 +2244,7 @@ const int catRanges[] = { 378929, 378957, 378993, -379413, -379473, -379517, +379389, 380949, 381789, 381813, @@ -2303,6 +2314,7 @@ const int catRanges[] = { 406090, 406229, 406532, +407421, 407573, 408733, 409092, @@ -2318,10 +2330,13 @@ const int catRanges[] = { 414037, 415274, 415765, +417789, +417813, 425988, +636637, 636949, 638980, -1310653, +1310237, 1310724, 1311395, 1311428, @@ -2560,22 +2575,7 @@ const int catRanges[] = { 1373921, 1373952, 1373985, -1374016, -1374049, -1374080, -1374113, -1374144, -1374177, -1374237, -1374272, -1374305, -1374336, -1374465, -1374496, -1374529, -1374589, -1375904, -1375937, +1374045, 1375972, 1376003, 1376065, @@ -2590,8 +2590,7 @@ const int catRanges[] = { 1377445, 1377510, 1377557, -1377669, -1377725, +1377693, 1377802, 1378005, 1378067, @@ -2634,7 +2633,7 @@ const int catRanges[] = { 1390277, 1390406, 1390469, -1390534, +1390502, 1390641, 1391069, 1391075, @@ -2711,9 +2710,7 @@ const int catRanges[] = { 1403764, 1403779, 1403905, -1404195, -1404244, -1404317, +1404125, 1404417, 1406980, 1408102, @@ -2913,7 +2910,7 @@ const int catRanges[] = { 2109845, 2109949, 2109973, -2110397, +2110365, 2110485, 2110525, 2112021, @@ -3071,13 +3068,6 @@ const int catRanges[] = { 2205533, 2214922, 2215933, -2215940, -2217309, -2217317, -2217388, -2217437, -2217476, -2217565, 2220036, 2220970, 2221284, @@ -3087,11 +3077,6 @@ const int catRanges[] = { 2222634, 2222769, 2222941, -2225668, -2226346, -2226589, -2227204, -2227965, 2228230, 2228261, 2228294, @@ -3129,8 +3114,7 @@ const int catRanges[] = { 2238481, 2238596, 2238630, -2238692, -2238749, +2238717, 2238980, 2240101, 2240145, @@ -3146,8 +3130,7 @@ const int catRanges[] = { 2242737, 2242853, 2242993, -2243014, -2243045, +2243037, 2243080, 2243396, 2243441, @@ -3232,12 +3215,12 @@ const int catRanges[] = { 2263268, 2263409, 2263560, -2263889, +2263901, +2263921, 2263965, 2263985, 2264005, -2264036, -2264157, +2264061, 2265092, 2266630, 2266725, @@ -3287,8 +3270,7 @@ const int catRanges[] = { 2283013, 2283206, 2283237, -2283268, -2283325, +2283293, 2283528, 2283869, 2285572, @@ -3317,44 +3299,7 @@ const int catRanges[] = { 2301258, 2301565, 2301924, -2302205, -2302244, -2302301, -2302340, -2302621, -2302628, -2302717, -2302724, -2303494, -2303709, -2303718, -2303805, -2303845, -2303910, -2303941, -2303972, -2304006, -2304036, -2304070, -2304101, -2304145, -2304253, -2304520, -2304861, -2307076, -2307357, -2307396, -2308646, -2308741, -2308893, -2308933, -2308998, -2309125, -2309156, -2309201, -2309220, -2309254, -2309309, +2301981, 2310148, 2310181, 2310500, @@ -3370,6 +3315,8 @@ const int catRanges[] = { 2312934, 2312997, 2313092, +2314397, +2314436, 2314565, 2314982, 2315013, @@ -3445,14 +3392,6 @@ const int catRanges[] = { 2350758, 2350833, 2350909, -2356740, -2356797, -2357258, -2357941, -2358195, -2358325, -2358877, -2359281, 2359300, 2388829, 2392073, @@ -3463,8 +3402,6 @@ const int catRanges[] = { 2402461, 2490372, 2524669, -2524698, -2524989, 2654212, 2672893, 2949124, @@ -3502,33 +3439,21 @@ const int catRanges[] = { 3003121, 3003261, 3006468, -3008893, -3008997, +3008701, 3009028, 3009062, -3010845, +3010557, 3011045, 3011171, 3011613, 3013635, -3013713, -3013731, -3013765, -3013821, -3014150, -3014237, +3013725, 3014660, -3211037, +3210845, 3211268, -3250909, -3252228, -3252541, +3235453, 3538948, 3548157, -3549700, -3549821, -3550340, -3550493, 3550724, 3563421, 3637252, @@ -3686,22 +3611,6 @@ const int catRanges[] = { 3933373, 3933381, 3933565, -3940356, -3941821, -3941893, -3942115, -3942365, -3942408, -3942749, -3942852, -3942901, -3942941, -3954692, -3956101, -3956232, -3956573, -3956723, -3956765, 3997700, 4004029, 4004074, @@ -3710,8 +3619,7 @@ const int catRanges[] = { 4005888, 4006977, 4008069, -4008291, -4008349, +4008317, 4008456, 4008797, 4008913, @@ -3722,10 +3630,6 @@ const int catRanges[] = { 4036115, 4036138, 4036285, -4038698, -4040149, -4040170, -4040669, 4046852, 4047005, 4047012, @@ -3807,8 +3711,11 @@ const int catRanges[] = { 4069941, 4071133, 4071434, -4071861, -4077021, +4071869, +4071957, +4074909, +4075029, +4076989, 4078805, 4079741, 4080149, @@ -3822,17 +3729,15 @@ const int catRanges[] = { 4087829, 4095860, 4096021, -4119325, +4119229, 4119573, 4119997, 4120085, -4120509, +4120413, 4120597, 4124317, 4124693, 4127549, -4127765, -4128157, 4128789, 4129181, 4129301, @@ -3843,38 +3748,28 @@ const int catRanges[] = { 4133149, 4133397, 4134365, -4134421, -4134493, 4136981, -4140861, +4137373, +4137493, +4139005, +4139029, +4140605, +4140661, +4140797, 4140885, -4143517, -4143541, -4147869, +4140925, +4140949, +4142205, +4142613, +4142941, +4143125, +4143229, +4143637, +4145181, 4148245, 4148701, -4148757, -4148925, -4149013, -4149117, -4149269, -4149501, -4149781, -4150589, -4150805, -4151037, -4151317, -4151421, -4151829, -4152061, -4153365, -4158077, -4158101, -4159869, -4161032, -4161373, 4194308, -5561309, +5561085, 5562372, 5695165, 5695492, @@ -3885,8 +3780,6 @@ const int catRanges[] = { 6126653, 6225924, 6243293, -6291460, -6449533, 29360186, 29360221, 29361178, @@ -3897,12 +3790,11 @@ const int catRanges[] = { 33554397, 33554460, 35651549, -35651613, //--Autogenerated -- end of section automatically generated }; -constexpr int maxUnicode = 0x10ffff; -constexpr int maskCategory = 0x1F; +const int maxUnicode = 0x10ffff; +const int maskCategory = 0x1F; } @@ -3935,7 +3827,7 @@ enum class OtherID { oidNone, oidStart, oidContinue }; // Some characters are treated as valid for identifiers even // though most characters from their category are not. // Values copied from http://www.unicode.org/Public/9.0.0/ucd/PropList.txt -OtherID OtherIDOfCharacter(int character) noexcept { +OtherID OtherIDOfCharacter(int character) { if ( (character == 0x1885) || // MONGOLIAN LETTER ALI GALI BALUDA (character == 0x1886) || // MONGOLIAN LETTER ALI GALI THREE BALUDA @@ -3959,11 +3851,11 @@ OtherID OtherIDOfCharacter(int character) noexcept { // Pattern_Syntax|Pattern_White_Space. // As of Unicode 9, only VERTICAL TILDE which is in Lm and has Pattern_Syntax matches. // Should really generate from PropList.txt a list of Pattern_Syntax and Pattern_White_Space. -constexpr bool IsIdPattern(int character) noexcept { +bool IsIdPattern(int character) { return character == 0x2E2F; } -bool OmitXidStart(int character) noexcept { +bool OmitXidStart(int character) { switch (character) { case 0x037A: // GREEK YPOGEGRAMMENI case 0x0E33: // THAI CHARACTER SARA AM @@ -3994,7 +3886,7 @@ bool OmitXidStart(int character) noexcept { } } -bool OmitXidContinue(int character) noexcept { +bool OmitXidContinue(int character) { switch (character) { case 0x037A: // GREEK YPOGEGRAMMENI case 0x309B: // KATAKANA-HIRAGANA VOICED SOUND MARK @@ -4071,33 +3963,4 @@ bool IsXidContinue(int character) { } } -CharacterCategoryMap::CharacterCategoryMap() { - Optimize(256); -} - -int CharacterCategoryMap::Size() const noexcept { - return static_cast(dense.size()); -} - -void CharacterCategoryMap::Optimize(int countCharacters) { - const int characters = std::clamp(countCharacters, 256, maxUnicode + 1); - dense.resize(characters); - - int end = 0; - int index = 0; - int current = catRanges[index]; - ++index; - do { - const int next = catRanges[index]; - const unsigned char category = current & maskCategory; - current >>= 5; - end = std::min(characters, next >> 5); - while (current < end) { - dense[current++] = category; - } - current = next; - ++index; - } while (characters > end); -} - } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.h similarity index 64% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.h index f8e5c7b0d..767d79670 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterCategory.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterCategory.h @@ -8,7 +8,7 @@ #ifndef CHARACTERCATEGORY_H #define CHARACTERCATEGORY_H -namespace Lexilla { +namespace Scintilla { enum CharacterCategory { ccLu, ccLl, ccLt, ccLm, ccLo, @@ -28,23 +28,6 @@ bool IsIdContinue(int character); bool IsXidStart(int character); bool IsXidContinue(int character); -class CharacterCategoryMap { -private: - std::vector dense; -public: - CharacterCategoryMap(); - CharacterCategory CategoryFor(int character) const { - if (static_cast(character) < dense.size()) { - return static_cast(dense[character]); - } else { - // binary search through ranges - return CategoriseCharacter(character); - } - } - int Size() const noexcept; - void Optimize(int countCharacters); -}; - } #endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.cpp similarity index 88% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.cpp index 1b6770052..2a1dabc1c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.cpp @@ -11,11 +11,11 @@ #include "CharacterSet.h" -using namespace Lexilla; +using namespace Scintilla; -namespace Lexilla { +namespace Scintilla { -int CompareCaseInsensitive(const char *a, const char *b) noexcept { +int CompareCaseInsensitive(const char *a, const char *b) { while (*a && *b) { if (*a != *b) { const char upperA = MakeUpperCase(*a); @@ -30,7 +30,7 @@ int CompareCaseInsensitive(const char *a, const char *b) noexcept { return *a - *b; } -int CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept { +int CompareNCaseInsensitive(const char *a, const char *b, size_t len) { while (*a && *b && len) { if (*a != *b) { const char upperA = MakeUpperCase(*a); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.h similarity index 51% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.h index 691ca4b39..90df5ed1c 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CharacterSet.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/CharacterSet.h @@ -8,12 +8,12 @@ #ifndef CHARACTERSET_H #define CHARACTERSET_H -namespace Lexilla { +namespace Scintilla { -template -class CharacterSetArray { - unsigned char bset[(N-1)/8 + 1] = {}; - bool valueAfter = false; +class CharacterSet { + int size; + bool valueAfter; + bool *bset; public: enum setBase { setNone=0, @@ -23,8 +23,13 @@ class CharacterSetArray { setAlpha=setLower|setUpper, setAlphaNum=setAlpha|setDigits }; - CharacterSetArray(setBase base=setNone, const char *initialSet="", bool valueAfter_=false) noexcept { + CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false) { + size = size_; valueAfter = valueAfter_; + bset = new bool[size]; + for (int i=0; i < size; i++) { + bset[i] = false; + } AddString(initialSet); if (base & setLower) AddString("abcdefghijklmnopqrstuvwxyz"); @@ -33,67 +38,79 @@ class CharacterSetArray { if (base & setDigits) AddString("0123456789"); } - // For compatibility with previous version but should not be used in new code. - CharacterSetArray(setBase base, const char *initialSet, [[maybe_unused]]int size_, bool valueAfter_=false) noexcept : - CharacterSetArray(base, initialSet, valueAfter_) { - assert(size_ == N); + CharacterSet(const CharacterSet &other) { + size = other.size; + valueAfter = other.valueAfter; + bset = new bool[size]; + for (int i=0; i < size; i++) { + bset[i] = other.bset[i]; + } + } + CharacterSet &operator=(CharacterSet &&other) { + if (this != &other) { + delete []bset; + size = other.size; + valueAfter = other.valueAfter; + bset = other.bset; + other.size = 0; + other.bset = nullptr; + } + return *this; + } + ~CharacterSet() { + delete []bset; + bset = nullptr; + size = 0; + } + CharacterSet &operator=(const CharacterSet &other) { + if (this != &other) { + bool *bsetNew = new bool[other.size]; + for (int i=0; i < other.size; i++) { + bsetNew[i] = other.bset[i]; + } + delete []bset; + size = other.size; + valueAfter = other.valueAfter; + bset = bsetNew; + } + return *this; } - void Add(int val) noexcept { + void Add(int val) { assert(val >= 0); - assert(val < N); - bset[val >> 3] |= 1 << (val & 7); + assert(val < size); + bset[val] = true; } - void AddString(const char *setToAdd) noexcept { + void AddString(const char *setToAdd) { for (const char *cp=setToAdd; *cp; cp++) { - const unsigned char uch = *cp; - assert(uch < N); - Add(uch); + int val = static_cast(*cp); + assert(val >= 0); + assert(val < size); + bset[val] = true; } } - bool Contains(int val) const noexcept { - assert(val >= 0); + bool Contains(int val) const { + // val being -ve is valid (or there is a sign extension bug elsewhere. + //assert(val >= 0); if (val < 0) return false; - if (val >= N) return valueAfter; - return bset[val >> 3] & (1 << (val & 7)); - } - bool Contains(char ch) const noexcept { - // Overload char as char may be signed - const unsigned char uch = ch; - return Contains(uch); + return (val < size) ? bset[val] : valueAfter; } }; -using CharacterSet = CharacterSetArray<0x80>; - // Functions for classifying characters -template -constexpr bool AnyOf(T t, Args... args) noexcept { -#if defined(__clang__) - static_assert(__is_integral(T)); -#endif - return ((t == args) || ...); -} - -// prevent pointer without -template -constexpr void AnyOf([[maybe_unused]] T *t, [[maybe_unused]] Args... args) noexcept {} -template -constexpr void AnyOf([[maybe_unused]] const T *t, [[maybe_unused]] Args... args) noexcept {} - -constexpr bool IsASpace(int ch) noexcept { +inline bool IsASpace(int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } -constexpr bool IsASpaceOrTab(int ch) noexcept { +inline bool IsASpaceOrTab(int ch) { return (ch == ' ') || (ch == '\t'); } -constexpr bool IsADigit(int ch) noexcept { +inline bool IsADigit(int ch) { return (ch >= '0') && (ch <= '9'); } -constexpr bool IsADigit(int ch, int base) noexcept { +inline bool IsADigit(int ch, int base) { if (base <= 10) { return (ch >= '0') && (ch < '0' + base); } else { @@ -103,23 +120,19 @@ constexpr bool IsADigit(int ch, int base) noexcept { } } -constexpr bool IsASCII(int ch) noexcept { +inline bool IsASCII(int ch) { return (ch >= 0) && (ch < 0x80); } -constexpr bool IsLowerCase(int ch) noexcept { +inline bool IsLowerCase(int ch) { return (ch >= 'a') && (ch <= 'z'); } -constexpr bool IsUpperCase(int ch) noexcept { +inline bool IsUpperCase(int ch) { return (ch >= 'A') && (ch <= 'Z'); } -constexpr bool IsUpperOrLowerCase(int ch) noexcept { - return IsUpperCase(ch) || IsLowerCase(ch); -} - -constexpr bool IsAlphaNumeric(int ch) noexcept { +inline bool IsAlphaNumeric(int ch) { return ((ch >= '0') && (ch <= '9')) || ((ch >= 'a') && (ch <= 'z')) || @@ -130,19 +143,19 @@ constexpr bool IsAlphaNumeric(int ch) noexcept { * Check if a character is a space. * This is ASCII specific but is safe with chars >= 0x80. */ -constexpr bool isspacechar(int ch) noexcept { +inline bool isspacechar(int ch) { return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); } -constexpr bool iswordchar(int ch) noexcept { +inline bool iswordchar(int ch) { return IsAlphaNumeric(ch) || ch == '.' || ch == '_'; } -constexpr bool iswordstart(int ch) noexcept { +inline bool iswordstart(int ch) { return IsAlphaNumeric(ch) || ch == '_'; } -constexpr bool isoperator(int ch) noexcept { +inline bool isoperator(int ch) { if (IsAlphaNumeric(ch)) return false; if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || @@ -158,7 +171,7 @@ constexpr bool isoperator(int ch) noexcept { // Simple case functions for ASCII supersets. template -constexpr T MakeUpperCase(T ch) noexcept { +inline T MakeUpperCase(T ch) { if (ch < 'a' || ch > 'z') return ch; else @@ -166,15 +179,15 @@ constexpr T MakeUpperCase(T ch) noexcept { } template -constexpr T MakeLowerCase(T ch) noexcept { +inline T MakeLowerCase(T ch) { if (ch < 'A' || ch > 'Z') return ch; else return ch - 'A' + 'a'; } -int CompareCaseInsensitive(const char *a, const char *b) noexcept; -int CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept; +int CompareCaseInsensitive(const char *a, const char *b); +int CompareNCaseInsensitive(const char *a, const char *b, size_t len); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.cpp similarity index 83% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.cpp index 991dc34f7..9ca39b44a 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.cpp @@ -9,9 +9,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -23,16 +20,12 @@ #include "LexerModule.h" #include "DefaultLexer.h" -using namespace Lexilla; +using namespace Scintilla; static const char styleSubable[] = { 0 }; -DefaultLexer::DefaultLexer(const char *languageName_, int language_, - const LexicalClass *lexClasses_, size_t nClasses_) : - languageName(languageName_), - language(language_), - lexClasses(lexClasses_), - nClasses(nClasses_) { +DefaultLexer::DefaultLexer(const LexicalClass *lexClasses_, size_t nClasses_) : + lexClasses(lexClasses_), nClasses(nClasses_) { } DefaultLexer::~DefaultLexer() { @@ -43,7 +36,7 @@ void SCI_METHOD DefaultLexer::Release() { } int SCI_METHOD DefaultLexer::Version() const { - return Scintilla::lvRelease5; + return lvMetaData; } const char * SCI_METHOD DefaultLexer::PropertyNames() { @@ -70,7 +63,7 @@ Sci_Position SCI_METHOD DefaultLexer::WordListSet(int, const char *) { return -1; } -void SCI_METHOD DefaultLexer::Fold(Sci_PositionU, Sci_Position, int, Scintilla::IDocument *) { +void SCI_METHOD DefaultLexer::Fold(Sci_PositionU, Sci_Position, int, IDocument *) { } void * SCI_METHOD DefaultLexer::PrivateCall(int, void *) { @@ -130,13 +123,3 @@ const char * SCI_METHOD DefaultLexer::TagsOfStyle(int style) { const char * SCI_METHOD DefaultLexer::DescriptionOfStyle(int style) { return (style < NamedStyles()) ? lexClasses[style].description : ""; } - -// ILexer5 methods -const char * SCI_METHOD DefaultLexer::GetName() { - return languageName; -} - -int SCI_METHOD DefaultLexer::GetIdentifier() { - return language; -} - diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.h similarity index 81% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.h index 9db3f4d88..636bd0690 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/DefaultLexer.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/DefaultLexer.h @@ -10,17 +10,14 @@ #ifndef DEFAULTLEXER_H #define DEFAULTLEXER_H -namespace Lexilla { +namespace Scintilla { // A simple lexer with no state -class DefaultLexer : public Scintilla::ILexer5 { - const char *languageName; - int language; +class DefaultLexer : public ILexerWithMetaData { const LexicalClass *lexClasses; size_t nClasses; public: - DefaultLexer(const char *languageName_, int language_, - const LexicalClass *lexClasses_ = nullptr, size_t nClasses_ = 0); + DefaultLexer(const LexicalClass *lexClasses_ = nullptr, size_t nClasses_ = 0); virtual ~DefaultLexer(); void SCI_METHOD Release() override; int SCI_METHOD Version() const override; @@ -30,8 +27,8 @@ class DefaultLexer : public Scintilla::ILexer5 { Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; const char * SCI_METHOD DescribeWordListSets() override; Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0; - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override = 0; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; void * SCI_METHOD PrivateCall(int operation, void *pointer) override; int SCI_METHOD LineEndTypesSupported() override; int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override; @@ -47,9 +44,6 @@ class DefaultLexer : public Scintilla::ILexer5 { const char * SCI_METHOD NameOfStyle(int style) override; const char * SCI_METHOD TagsOfStyle(int style) override; const char * SCI_METHOD DescriptionOfStyle(int style) override; - // ILexer5 methods - const char * SCI_METHOD GetName() override; - int SCI_METHOD GetIdentifier() override; }; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexAccessor.h similarity index 78% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexAccessor.h index 8f76ed2a4..45eeff0fd 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexAccessor.h @@ -8,13 +8,13 @@ #ifndef LEXACCESSOR_H #define LEXACCESSOR_H -namespace Lexilla { +namespace Scintilla { -enum class EncodingType { eightBit, unicode, dbcs }; +enum EncodingType { enc8bit, encUnicode, encDBCS }; class LexAccessor { private: - Scintilla::IDocument *pAccess; + IDocument *pAccess; enum {extremePosition=0x7FFFFFFF}; /** @a bufferSize is a trade off between time taken to copy the characters * and retrieval overhead. @@ -48,10 +48,10 @@ class LexAccessor { } public: - explicit LexAccessor(Scintilla::IDocument *pAccess_) : + explicit LexAccessor(IDocument *pAccess_) : pAccess(pAccess_), startPos(extremePosition), endPos(0), codePage(pAccess->CodePage()), - encodingType(EncodingType::eightBit), + encodingType(enc8bit), lenDoc(pAccess->Length()), validLen(0), startSeg(0), startPosStyling(0), @@ -61,14 +61,14 @@ class LexAccessor { styleBuf[0] = 0; switch (codePage) { case 65001: - encodingType = EncodingType::unicode; + encodingType = encUnicode; break; case 932: case 936: case 949: case 950: case 1361: - encodingType = EncodingType::dbcs; + encodingType = encDBCS; } } char operator[](Sci_Position position) { @@ -77,8 +77,11 @@ class LexAccessor { } return buf[position - startPos]; } - Scintilla::IDocument *MultiByteAccess() const noexcept { - return pAccess; + IDocumentWithLineEnd *MultiByteAccess() const { + if (documentVersion >= dvLineEnd) { + return static_cast(pAccess); + } + return 0; } /** Safe version of operator[], returning a defined value for invalid position. */ char SafeGetCharAt(Sci_Position position, char chDefault=' ') { @@ -92,12 +95,9 @@ class LexAccessor { return buf[position - startPos]; } bool IsLeadByte(char ch) const { - return - (static_cast(ch) >= 0x80) && // non-ASCII - (encodingType == EncodingType::dbcs) && // IsDBCSLeadByte only for DBCS - pAccess->IsDBCSLeadByte(ch); + return pAccess->IsDBCSLeadByte(ch); } - EncodingType Encoding() const noexcept { + EncodingType Encoding() const { return encodingType; } bool Match(Sci_Position pos, const char *s) { @@ -108,15 +108,6 @@ class LexAccessor { } return true; } - bool MatchIgnoreCase(Sci_Position pos, const char *s); - - // Get first len - 1 characters in range [startPos_, endPos_). - void GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len); - void GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len); - // Get all characters in range [startPos_, endPos_). - std::string GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_); - std::string GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_); - char StyleAt(Sci_Position position) const { return pAccess->StyleAt(position); } @@ -126,8 +117,18 @@ class LexAccessor { Sci_Position LineStart(Sci_Position line) const { return pAccess->LineStart(line); } - Sci_Position LineEnd(Sci_Position line) const { - return pAccess->LineEnd(line); + Sci_Position LineEnd(Sci_Position line) { + if (documentVersion >= dvLineEnd) { + return (static_cast(pAccess))->LineEnd(line); + } else { + // Old interface means only '\r', '\n' and '\r\n' line ends. + Sci_Position startNext = pAccess->LineStart(line+1); + const char chLineEnd = SafeGetCharAt(startNext-1); + if (chLineEnd == '\n' && (SafeGetCharAt(startNext-2) == '\r')) + return startNext - 2; + else + return startNext - 1; + } } int LevelAt(Sci_Position line) const { return pAccess->GetLevel(line); @@ -150,7 +151,7 @@ class LexAccessor { } // Style setting void StartAt(Sci_PositionU start) { - pAccess->StartStyling(start); + pAccess->StartStyling(start, '\377'); startPosStyling = start; } Sci_PositionU GetStartSegment() const { @@ -162,7 +163,7 @@ class LexAccessor { void ColourTo(Sci_PositionU pos, int chAttr) { // Only perform styling if non empty range if (pos != startSeg - 1) { - assert(pos >= startSeg); + //assert(pos >= startSeg); if (pos < startSeg) { return; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.cpp similarity index 84% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.cpp index 1d25cc096..7b01beff4 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.cpp @@ -9,9 +9,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -23,7 +20,7 @@ #include "LexerModule.h" #include "LexerBase.h" -using namespace Lexilla; +using namespace Scintilla; static const char styleSubable[] = { 0 }; @@ -31,15 +28,15 @@ LexerBase::LexerBase(const LexicalClass *lexClasses_, size_t nClasses_) : lexClasses(lexClasses_), nClasses(nClasses_) { for (int wl = 0; wl < numWordLists; wl++) keyWordLists[wl] = new WordList; - keyWordLists[numWordLists] = nullptr; + keyWordLists[numWordLists] = 0; } LexerBase::~LexerBase() { for (int wl = 0; wl < numWordLists; wl++) { delete keyWordLists[wl]; - keyWordLists[wl] = nullptr; + keyWordLists[wl] = 0; } - keyWordLists[numWordLists] = nullptr; + keyWordLists[numWordLists] = 0; } void SCI_METHOD LexerBase::Release() { @@ -47,7 +44,7 @@ void SCI_METHOD LexerBase::Release() { } int SCI_METHOD LexerBase::Version() const { - return Scintilla::lvRelease5; + return lvMetaData; } const char * SCI_METHOD LexerBase::PropertyNames() { @@ -63,24 +60,25 @@ const char * SCI_METHOD LexerBase::DescribeProperty(const char *) { } Sci_Position SCI_METHOD LexerBase::PropertySet(const char *key, const char *val) { - if (props.Set(key, val)) { + const char *valOld = props.Get(key); + if (strcmp(val, valOld) != 0) { + props.Set(key, val, strlen(key), strlen(val)); return 0; } else { return -1; } } -const char *SCI_METHOD LexerBase::PropertyGet(const char *key) { - return props.Get(key); -} - const char * SCI_METHOD LexerBase::DescribeWordListSets() { return ""; } Sci_Position SCI_METHOD LexerBase::WordListSet(int n, const char *wl) { if (n < numWordLists) { - if (keyWordLists[n]->Set(wl)) { + WordList wlNew; + wlNew.Set(wl); + if (*keyWordLists[n] != wlNew) { + keyWordLists[n]->Set(wl); return 0; } } @@ -144,13 +142,3 @@ const char * SCI_METHOD LexerBase::TagsOfStyle(int style) { const char * SCI_METHOD LexerBase::DescriptionOfStyle(int style) { return (style < NamedStyles()) ? lexClasses[style].description : ""; } - -// ILexer5 methods - -const char *SCI_METHOD LexerBase::GetName() { - return ""; -} - -int SCI_METHOD LexerBase::GetIdentifier() { - return SCLEX_AUTOMATIC; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.h similarity index 85% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.h index 32a55760f..afeaa8038 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerBase.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerBase.h @@ -8,10 +8,10 @@ #ifndef LEXERBASE_H #define LEXERBASE_H -namespace Lexilla { +namespace Scintilla { // A simple lexer with no state -class LexerBase : public Scintilla::ILexer5 { +class LexerBase : public ILexerWithMetaData { protected: const LexicalClass *lexClasses; size_t nClasses; @@ -29,8 +29,8 @@ class LexerBase : public Scintilla::ILexer5 { Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; const char * SCI_METHOD DescribeWordListSets() override; Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0; - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override = 0; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override = 0; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override = 0; void * SCI_METHOD PrivateCall(int operation, void *pointer) override; int SCI_METHOD LineEndTypesSupported() override; int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override; @@ -46,10 +46,6 @@ class LexerBase : public Scintilla::ILexer5 { const char * SCI_METHOD NameOfStyle(int style) override; const char * SCI_METHOD TagsOfStyle(int style) override; const char * SCI_METHOD DescriptionOfStyle(int style) override; - // ILexer5 methods - const char * SCI_METHOD GetName() override; - int SCI_METHOD GetIdentifier() override; - const char *SCI_METHOD PropertyGet(const char *key) override; }; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.cpp similarity index 86% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.cpp index 4b550f6bb..30e8cf041 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.cpp @@ -9,7 +9,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -23,7 +22,7 @@ #include "LexerBase.h" #include "LexerSimple.h" -using namespace Lexilla; +using namespace Scintilla; LexerModule::LexerModule(int language_, LexerFunction fnLexer_, @@ -31,7 +30,7 @@ LexerModule::LexerModule(int language_, LexerFunction fnFolder_, const char *const wordListDescriptions_[], const LexicalClass *lexClasses_, - size_t nClasses_) noexcept : + size_t nClasses_) : language(language_), fnLexer(fnLexer_), fnFolder(fnFolder_), @@ -45,7 +44,7 @@ LexerModule::LexerModule(int language_, LexerModule::LexerModule(int language_, LexerFactoryFunction fnFactory_, const char *languageName_, - const char * const wordListDescriptions_[]) noexcept : + const char * const wordListDescriptions_[]) : language(language_), fnLexer(nullptr), fnFolder(nullptr), @@ -56,11 +55,14 @@ LexerModule::LexerModule(int language_, languageName(languageName_) { } -int LexerModule::GetLanguage() const noexcept { +LexerModule::~LexerModule() { +} + +int LexerModule::GetLanguage() const { return language; } -int LexerModule::GetNumWordLists() const noexcept { +int LexerModule::GetNumWordLists() const { if (!wordListDescriptions) { return -1; } else { @@ -74,7 +76,7 @@ int LexerModule::GetNumWordLists() const noexcept { } } -const char *LexerModule::GetWordListDescription(int index) const noexcept { +const char *LexerModule::GetWordListDescription(int index) const { assert(index < GetNumWordLists()); if (!wordListDescriptions || (index >= GetNumWordLists())) { return ""; @@ -83,15 +85,15 @@ const char *LexerModule::GetWordListDescription(int index) const noexcept { } } -const LexicalClass *LexerModule::LexClasses() const noexcept { +const LexicalClass *LexerModule::LexClasses() const { return lexClasses; } -size_t LexerModule::NamedStyles() const noexcept { +size_t LexerModule::NamedStyles() const { return nClasses; } -Scintilla::ILexer5 *LexerModule::Create() const { +ILexer *LexerModule::Create() const { if (fnFactory) return fnFactory(); else diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.h similarity index 68% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.h index d6ab78fcb..ab338bec6 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerModule.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerModule.h @@ -8,7 +8,7 @@ #ifndef LEXERMODULE_H #define LEXERMODULE_H -namespace Lexilla { +namespace Scintilla { class Accessor; class WordList; @@ -16,7 +16,7 @@ struct LexicalClass; typedef void (*LexerFunction)(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler); -typedef Scintilla::ILexer5 *(*LexerFactoryFunction)(); +typedef ILexer *(*LexerFactoryFunction)(); /** * A LexerModule is responsible for lexing and folding a particular language. @@ -43,31 +43,32 @@ class LexerModule { LexerFunction fnFolder_= nullptr, const char * const wordListDescriptions_[]=nullptr, const LexicalClass *lexClasses_=nullptr, - size_t nClasses_=0) noexcept; + size_t nClasses_=0); LexerModule( int language_, LexerFactoryFunction fnFactory_, const char *languageName_, - const char * const wordListDescriptions_[]=nullptr) noexcept; - int GetLanguage() const noexcept; + const char * const wordListDescriptions_[]=nullptr); + virtual ~LexerModule(); + int GetLanguage() const; // -1 is returned if no WordList information is available - int GetNumWordLists() const noexcept; - const char *GetWordListDescription(int index) const noexcept; - const LexicalClass *LexClasses() const noexcept; - size_t NamedStyles() const noexcept; + int GetNumWordLists() const; + const char *GetWordListDescription(int index) const; + const LexicalClass *LexClasses() const; + size_t NamedStyles() const; - Scintilla::ILexer5 *Create() const; + ILexer *Create() const; - void Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, + virtual void Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; - void Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, + virtual void Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, WordList *keywordlists[], Accessor &styler) const; - friend class CatalogueModules; + friend class Catalogue; }; -constexpr int Maximum(int a, int b) noexcept { +inline int Maximum(int a, int b) { return (a > b) ? a : b; } @@ -81,12 +82,6 @@ constexpr int Maximum(int a, int b) noexcept { #pragma GCC diagnostic ignored "-Wshadow" #endif -// Clang doesn't like omitting braces in array initialization but they just add -// noise to LexicalClass arrays in lexers -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wmissing-braces" -#endif - } #endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.cpp similarity index 89% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.cpp index d4c285751..3627e188a 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.cpp @@ -8,9 +8,6 @@ #include #include -#include -#include - #include "ILexer.h" #include "Scintilla.h" #include "SciLexer.h" @@ -23,7 +20,7 @@ #include "LexerBase.h" #include "LexerNoExceptions.h" -using namespace Lexilla; +using namespace Scintilla; Sci_Position SCI_METHOD LexerNoExceptions::PropertySet(const char *key, const char *val) { try { @@ -43,7 +40,7 @@ Sci_Position SCI_METHOD LexerNoExceptions::WordListSet(int n, const char *wl) { return -1; } -void SCI_METHOD LexerNoExceptions::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) { +void SCI_METHOD LexerNoExceptions::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { try { Accessor astyler(pAccess, &props); Lexer(startPos, lengthDoc, initStyle, pAccess, astyler); @@ -53,7 +50,7 @@ void SCI_METHOD LexerNoExceptions::Lex(Sci_PositionU startPos, Sci_Position leng pAccess->SetErrorStatus(SC_STATUS_FAILURE); } } -void SCI_METHOD LexerNoExceptions::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) { +void SCI_METHOD LexerNoExceptions::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { try { Accessor astyler(pAccess, &props); Folder(startPos, lengthDoc, initStyle, pAccess, astyler); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.h similarity index 76% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.h index 6b3a85a6b..5bcb090f0 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerNoExceptions.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerNoExceptions.h @@ -8,7 +8,7 @@ #ifndef LEXERNOEXCEPTIONS_H #define LEXERNOEXCEPTIONS_H -namespace Lexilla { +namespace Scintilla { // A simple lexer with no state class LexerNoExceptions : public LexerBase { @@ -16,11 +16,11 @@ class LexerNoExceptions : public LexerBase { // TODO Also need to prevent exceptions in constructor and destructor Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *) override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *) override; - virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0; - virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, Scintilla::IDocument *pAccess, Accessor &styler) = 0; + virtual void Lexer(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; + virtual void Folder(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess, Accessor &styler) = 0; }; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.cpp similarity index 79% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.cpp index 2cbb1330a..0be7d97ca 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.cpp @@ -9,7 +9,6 @@ #include #include -#include #include "ILexer.h" #include "Scintilla.h" @@ -23,7 +22,7 @@ #include "LexerBase.h" #include "LexerSimple.h" -using namespace Lexilla; +using namespace Scintilla; LexerSimple::LexerSimple(const LexerModule *module_) : LexerBase(module_->LexClasses(), module_->NamedStyles()), @@ -39,24 +38,16 @@ const char * SCI_METHOD LexerSimple::DescribeWordListSets() { return wordLists.c_str(); } -void SCI_METHOD LexerSimple::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) { +void SCI_METHOD LexerSimple::Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { Accessor astyler(pAccess, &props); module->Lex(startPos, lengthDoc, initStyle, keyWordLists, astyler); astyler.Flush(); } -void SCI_METHOD LexerSimple::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) { +void SCI_METHOD LexerSimple::Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) { if (props.GetInt("fold")) { Accessor astyler(pAccess, &props); module->Fold(startPos, lengthDoc, initStyle, keyWordLists, astyler); astyler.Flush(); } } - -const char * SCI_METHOD LexerSimple::GetName() { - return module->languageName; -} - -int SCI_METHOD LexerSimple::GetIdentifier() { - return module->GetLanguage(); -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.h similarity index 73% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.h index a1d1b290b..87882eaeb 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexerSimple.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/LexerSimple.h @@ -8,7 +8,7 @@ #ifndef LEXERSIMPLE_H #define LEXERSIMPLE_H -namespace Lexilla { +namespace Scintilla { // A simple lexer with no state class LexerSimple : public LexerBase { @@ -17,11 +17,8 @@ class LexerSimple : public LexerBase { public: explicit LexerSimple(const LexerModule *module_); const char * SCI_METHOD DescribeWordListSets() override; - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, Scintilla::IDocument *pAccess) override; - // ILexer5 methods - const char * SCI_METHOD GetName() override; - int SCI_METHOD GetIdentifier() override; + void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; + void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess) override; }; } diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexlib/License.txt b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/License.txt new file mode 100644 index 000000000..47c792655 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/License.txt @@ -0,0 +1,20 @@ +License for Scintilla and SciTE + +Copyright 1998-2003 by Neil Hodgson + +All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/OptionSet.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/OptionSet.h similarity index 86% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/OptionSet.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/OptionSet.h index 1c5c2ec00..b6fc07049 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/OptionSet.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/OptionSet.h @@ -10,7 +10,7 @@ #ifndef OPTIONSET_H #define OPTIONSET_H -namespace Lexilla { +namespace Scintilla { template class OptionSet { @@ -25,7 +25,6 @@ class OptionSet { plcoi pi; plcos ps; }; - std::string value; std::string description; Option() : opType(SC_TYPE_BOOLEAN), pb(0), description("") { @@ -39,8 +38,7 @@ class OptionSet { Option(plcos ps_, std::string description_) : opType(SC_TYPE_STRING), ps(ps_), description(description_) { } - bool Set(T *base, const char *val) { - value = val; + bool Set(T *base, const char *val) const { switch (opType) { case SC_TYPE_BOOLEAN: { bool option = atoi(val) != 0; @@ -68,11 +66,8 @@ class OptionSet { } return false; } - const char *Get() const noexcept { - return value.c_str(); - } }; - typedef std::map> OptionMap; + typedef std::map OptionMap; OptionMap nameToDef; std::string names; std::string wordLists; @@ -83,6 +78,8 @@ class OptionSet { names += name; } public: + virtual ~OptionSet() { + } void DefineProperty(const char *name, plcob pb, std::string description="") { nameToDef[name] = Option(pb, description); AppendName(name); @@ -95,7 +92,7 @@ class OptionSet { nameToDef[name] = Option(ps, description); AppendName(name); } - const char *PropertyNames() const noexcept { + const char *PropertyNames() const { return names.c_str(); } int PropertyType(const char *name) { @@ -121,14 +118,6 @@ class OptionSet { return false; } - const char *PropertyGet(const char *name) { - typename OptionMap::iterator it = nameToDef.find(name); - if (it != nameToDef.end()) { - return it->second.Get(); - } - return nullptr; - } - void DefineWordListSets(const char * const wordListDescriptions[]) { if (wordListDescriptions) { for (size_t wl = 0; wordListDescriptions[wl]; wl++) { @@ -139,7 +128,7 @@ class OptionSet { } } - const char *DescribeWordListSets() const noexcept { + const char *DescribeWordListSets() const { return wordLists.c_str(); } }; diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.cpp b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.cpp new file mode 100644 index 000000000..ba76019be --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.cpp @@ -0,0 +1,157 @@ +// Scintilla source code edit control +/** @file PropSetSimple.cxx + ** A basic string to string map. + **/ +// Copyright 1998-2010 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +// Maintain a dictionary of properties + +#include +#include + +#include +#include + +#include "PropSetSimple.h" + +using namespace Scintilla; + +namespace { + +typedef std::map mapss; + +mapss *PropsFromPointer(void *impl) { + return static_cast(impl); +} + +} + +PropSetSimple::PropSetSimple() { + mapss *props = new mapss; + impl = static_cast(props); +} + +PropSetSimple::~PropSetSimple() { + mapss *props = PropsFromPointer(impl); + delete props; + impl = 0; +} + +void PropSetSimple::Set(const char *key, const char *val, size_t lenKey, size_t lenVal) { + mapss *props = PropsFromPointer(impl); + if (!*key) // Empty keys are not supported + return; + (*props)[std::string(key, lenKey)] = std::string(val, lenVal); +} + +static bool IsASpaceCharacter(unsigned int ch) { + return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} + +void PropSetSimple::Set(const char *keyVal) { + while (IsASpaceCharacter(*keyVal)) + keyVal++; + const char *endVal = keyVal; + while (*endVal && (*endVal != '\n')) + endVal++; + const char *eqAt = strchr(keyVal, '='); + if (eqAt) { + Set(keyVal, eqAt + 1, eqAt-keyVal, + endVal - eqAt - 1); + } else if (*keyVal) { // No '=' so assume '=1' + Set(keyVal, "1", endVal-keyVal, 1); + } +} + +void PropSetSimple::SetMultiple(const char *s) { + const char *eol = strchr(s, '\n'); + while (eol) { + Set(s); + s = eol + 1; + eol = strchr(s, '\n'); + } + Set(s); +} + +const char *PropSetSimple::Get(const char *key) const { + mapss *props = PropsFromPointer(impl); + mapss::const_iterator keyPos = props->find(std::string(key)); + if (keyPos != props->end()) { + return keyPos->second.c_str(); + } else { + return ""; + } +} + +// There is some inconsistency between GetExpanded("foo") and Expand("$(foo)"). +// A solution is to keep a stack of variables that have been expanded, so that +// recursive expansions can be skipped. For now I'll just use the C++ stack +// for that, through a recursive function and a simple chain of pointers. + +struct VarChain { + VarChain(const char *var_=nullptr, const VarChain *link_= nullptr): var(var_), link(link_) {} + + bool contains(const char *testVar) const { + return (var && (0 == strcmp(var, testVar))) + || (link && link->contains(testVar)); + } + + const char *var; + const VarChain *link; +}; + +static int ExpandAllInPlace(const PropSetSimple &props, std::string &withVars, int maxExpands, const VarChain &blankVars) { + size_t varStart = withVars.find("$("); + while ((varStart != std::string::npos) && (maxExpands > 0)) { + const size_t varEnd = withVars.find(')', varStart+2); + if (varEnd == std::string::npos) { + break; + } + + // For consistency, when we see '$(ab$(cde))', expand the inner variable first, + // regardless whether there is actually a degenerate variable named 'ab$(cde'. + size_t innerVarStart = withVars.find("$(", varStart+2); + while ((innerVarStart != std::string::npos) && (innerVarStart > varStart) && (innerVarStart < varEnd)) { + varStart = innerVarStart; + innerVarStart = withVars.find("$(", varStart+2); + } + + std::string var(withVars.c_str(), varStart + 2, varEnd - varStart - 2); + std::string val = props.Get(var.c_str()); + + if (blankVars.contains(var.c_str())) { + val = ""; // treat blankVar as an empty string (e.g. to block self-reference) + } + + if (--maxExpands >= 0) { + maxExpands = ExpandAllInPlace(props, val, maxExpands, VarChain(var.c_str(), &blankVars)); + } + + withVars.erase(varStart, varEnd-varStart+1); + withVars.insert(varStart, val.c_str(), val.length()); + + varStart = withVars.find("$("); + } + + return maxExpands; +} + +int PropSetSimple::GetExpanded(const char *key, char *result) const { + std::string val = Get(key); + ExpandAllInPlace(*this, val, 100, VarChain(key)); + const int n = static_cast(val.size()); + if (result) { + memcpy(result, val.c_str(), n+1); + } + return n; // Not including NUL +} + +int PropSetSimple::GetInt(const char *key, int defaultValue) const { + std::string val = Get(key); + ExpandAllInPlace(*this, val, 100, VarChain(key)); + if (!val.empty()) { + return atoi(val.c_str()); + } + return defaultValue; +} diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.h new file mode 100644 index 000000000..ba4e42446 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/PropSetSimple.h @@ -0,0 +1,28 @@ +// Scintilla source code edit control +/** @file PropSetSimple.h + ** A basic string to string map. + **/ +// Copyright 1998-2009 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef PROPSETSIMPLE_H +#define PROPSETSIMPLE_H + +namespace Scintilla { + +class PropSetSimple { + void *impl; + void Set(const char *keyVal); +public: + PropSetSimple(); + virtual ~PropSetSimple(); + void Set(const char *key, const char *val, size_t lenKey, size_t lenVal); + void SetMultiple(const char *); + const char *Get(const char *key) const; + int GetExpanded(const char *key, char *result) const; + int GetInt(const char *key, int defaultValue=0) const; +}; + +} + +#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/SparseState.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/SparseState.h similarity index 90% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/SparseState.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/SparseState.h index 592b333b7..4e7ac92e3 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/SparseState.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/SparseState.h @@ -10,19 +10,19 @@ #ifndef SPARSESTATE_H #define SPARSESTATE_H -namespace Lexilla { +namespace Scintilla { template class SparseState { struct State { Sci_Position position; T value; - constexpr State(Sci_Position position_, T value_) noexcept : position(position_), value(value_) { + State(Sci_Position position_, T value_) : position(position_), value(value_) { } - inline bool operator<(const State &other) const noexcept { + inline bool operator<(const State &other) const { return position < other.position; } - inline bool operator==(const State &other) const noexcept { + inline bool operator==(const State &other) const { return (position == other.position) && (value == other.value); } }; @@ -31,7 +31,7 @@ class SparseState { stateVector states; typename stateVector::iterator Find(Sci_Position position) { - const State searchValue(position, T()); + State searchValue(position, T()); return std::lower_bound(states.begin(), states.end(), searchValue); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StringCopy.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StringCopy.h similarity index 97% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/StringCopy.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/StringCopy.h index 01f30ba9d..1c5442e65 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StringCopy.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StringCopy.h @@ -9,7 +9,7 @@ #ifndef STRINGCOPY_H #define STRINGCOPY_H -namespace Lexilla { +namespace Scintilla { // Safer version of string copy functions like strcpy, wcsncpy, etc. // Instantiate over fixed length strings of both char and wchar_t. diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.cpp similarity index 54% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.cpp index e7b571931..683e21453 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.cpp @@ -7,9 +7,7 @@ #include #include - -#include -#include +#include #include "ILexer.h" @@ -18,7 +16,7 @@ #include "StyleContext.h" #include "CharacterSet.h" -using namespace Lexilla; +using namespace Scintilla; bool StyleContext::MatchIgnoreCase(const char *s) { if (MakeLowerCase(ch) != static_cast(*s)) @@ -36,10 +34,36 @@ bool StyleContext::MatchIgnoreCase(const char *s) { return true; } +static void getRange(Sci_PositionU start, + Sci_PositionU end, + LexAccessor &styler, + char *s, + Sci_PositionU len) { + Sci_PositionU i = 0; + while ((i < end - start + 1) && (i < len-1)) { + s[i] = styler[start + i]; + i++; + } + s[i] = '\0'; +} + void StyleContext::GetCurrent(char *s, Sci_PositionU len) { - styler.GetRange(styler.GetStartSegment(), currentPos, s, len); + getRange(styler.GetStartSegment(), currentPos - 1, styler, s, len); +} + +static void getRangeLowered(Sci_PositionU start, + Sci_PositionU end, + LexAccessor &styler, + char *s, + Sci_PositionU len) { + Sci_PositionU i = 0; + while ((i < end - start + 1) && (i < len-1)) { + s[i] = MakeLowerCase(styler[start + i]); + i++; + } + s[i] = '\0'; } void StyleContext::GetCurrentLowered(char *s, Sci_PositionU len) { - styler.GetRangeLowered(styler.GetStartSegment(), currentPos, s, len); + getRangeLowered(styler.GetStartSegment(), currentPos - 1, styler, s, len); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.h similarity index 92% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.h index a6c6f9f4d..8cb683619 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/StyleContext.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/StyleContext.h @@ -8,7 +8,7 @@ #ifndef STYLECONTEXT_H #define STYLECONTEXT_H -namespace Lexilla { +namespace Scintilla { // All languages handled so far can treat all characters >= 0x80 as one class // which just continues the current token or starts an identifier if in default. @@ -16,7 +16,7 @@ namespace Lexilla { // syntactically significant. UTF-8 avoids this as all trail bytes are >= 0x80 class StyleContext { LexAccessor &styler; - Scintilla::IDocument *multiByteAccess; + IDocumentWithLineEnd *multiByteAccess; Sci_PositionU endPos; Sci_PositionU lengthDocument; @@ -44,7 +44,6 @@ class StyleContext { Sci_PositionU currentPos; Sci_Position currentLine; Sci_Position lineDocEnd; - Sci_Position lineEnd; Sci_Position lineStartNext; bool atLineStart; bool atLineEnd; @@ -65,7 +64,6 @@ class StyleContext { offsetRelative(0), currentPos(startPos), currentLine(-1), - lineEnd(-1), lineStartNext(-1), atLineEnd(false), state(initStyle & chMask), // Mask off all bits which aren't in the chMask. @@ -74,13 +72,12 @@ class StyleContext { width(0), chNext(0), widthNext(1) { - if (styler.Encoding() != EncodingType::eightBit) { + if (styler.Encoding() != enc8bit) { multiByteAccess = styler.MultiByteAccess(); } styler.StartAt(startPos /*, chMask*/); styler.StartSegment(startPos); currentLine = styler.GetLine(startPos); - lineEnd = styler.LineEnd(currentLine); lineStartNext = styler.LineStart(currentLine+1); lengthDocument = static_cast(styler.Length()); if (endPos == lengthDocument) @@ -103,7 +100,7 @@ class StyleContext { styler.ColourTo(currentPos - ((currentPos > lengthDocument) ? 2 : 1), state); styler.Flush(); } - bool More() const noexcept { + bool More() const { return currentPos < endPos; } void Forward() { @@ -111,7 +108,6 @@ class StyleContext { atLineStart = atLineEnd; if (atLineStart) { currentLine++; - lineEnd = styler.LineEnd(currentLine); lineStartNext = styler.LineStart(currentLine+1); } chPrev = ch; @@ -143,7 +139,7 @@ class StyleContext { } } } - void ChangeState(int state_) noexcept { + void ChangeState(int state_) { state = state_; } void SetState(int state_) { @@ -158,8 +154,8 @@ class StyleContext { Sci_Position LengthCurrent() const { return currentPos - styler.GetStartSegment(); } - int GetRelative(Sci_Position n, char chDefault='\0') { - return static_cast(styler.SafeGetCharAt(currentPos+n, chDefault)); + int GetRelative(Sci_Position n) { + return static_cast(styler.SafeGetCharAt(currentPos+n, 0)); } int GetRelativeCharacter(Sci_Position n) { if (n == 0) @@ -183,9 +179,6 @@ class StyleContext { return static_cast(styler.SafeGetCharAt(currentPos + n, 0)); } } - bool MatchLineEnd() const noexcept { - return static_cast(currentPos) == lineEnd; - } bool Match(char ch0) const { return ch == static_cast(ch0); } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/SubStyles.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/SubStyles.h similarity index 68% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/SubStyles.h rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/SubStyles.h index 049039e85..3e99efe83 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/SubStyles.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/SubStyles.h @@ -8,14 +8,13 @@ #ifndef SUBSTYLES_H #define SUBSTYLES_H -namespace Lexilla { +namespace Scintilla { class WordClassifier { int baseStyle; int firstStyle; int lenStyles; - using WordStyleMap = std::map>; - WordStyleMap wordToStyle; + std::map wordToStyle; public: @@ -28,55 +27,41 @@ class WordClassifier { wordToStyle.clear(); } - int Base() const noexcept { + int Base() const { return baseStyle; } - int Start() const noexcept { + int Start() const { return firstStyle; } - int Last() const noexcept { + int Last() const { return firstStyle + lenStyles - 1; } - int Length() const noexcept { + int Length() const { return lenStyles; } - void Clear() noexcept { + void Clear() { firstStyle = 0; lenStyles = 0; wordToStyle.clear(); } - int ValueFor(std::string_view s) const { - WordStyleMap::const_iterator it = wordToStyle.find(s); + int ValueFor(const std::string &s) const { + std::map::const_iterator it = wordToStyle.find(s); if (it != wordToStyle.end()) return it->second; else return -1; } - bool IncludesStyle(int style) const noexcept { + bool IncludesStyle(int style) const { return (style >= firstStyle) && (style < (firstStyle + lenStyles)); } - void RemoveStyle(int style) noexcept { - WordStyleMap::iterator it = wordToStyle.begin(); - while (it != wordToStyle.end()) { - if (it->second == style) { - it = wordToStyle.erase(it); - } else { - ++it; - } - } - } - void SetIdentifiers(int style, const char *identifiers) { - RemoveStyle(style); - if (!identifiers) - return; while (*identifiers) { const char *cpSpace = identifiers; while (*cpSpace && !(*cpSpace == ' ' || *cpSpace == '\t' || *cpSpace == '\r' || *cpSpace == '\n')) @@ -101,7 +86,7 @@ class SubStyles { int allocated; std::vector classifiers; - int BlockFromBaseStyle(int baseStyle) const noexcept { + int BlockFromBaseStyle(int baseStyle) const { for (int b=0; b < classifications; b++) { if (baseStyle == baseStyles[b]) return b; @@ -109,10 +94,10 @@ class SubStyles { return -1; } - int BlockFromStyle(int style) const noexcept { + int BlockFromStyle(int style) const { int b = 0; - for (const WordClassifier &wc : classifiers) { - if (wc.IncludesStyle(style)) + for (std::vector::const_iterator it=classifiers.begin(); it != classifiers.end(); ++it) { + if (it->IncludesStyle(style)) return b; b++; } @@ -148,17 +133,17 @@ class SubStyles { } } - int Start(int styleBase) noexcept { + int Start(int styleBase) { const int block = BlockFromBaseStyle(styleBase); return (block >= 0) ? classifiers[block].Start() : -1; } - int Length(int styleBase) noexcept { + int Length(int styleBase) { const int block = BlockFromBaseStyle(styleBase); return (block >= 0) ? classifiers[block].Length() : 0; } - int BaseStyle(int subStyle) const noexcept { + int BaseStyle(int subStyle) const { const int block = BlockFromStyle(subStyle); if (block >= 0) return classifiers[block].Base(); @@ -166,24 +151,24 @@ class SubStyles { return subStyle; } - int DistanceToSecondaryStyles() const noexcept { + int DistanceToSecondaryStyles() const { return secondaryDistance; } - int FirstAllocated() const noexcept { + int FirstAllocated() const { int start = 257; - for (const WordClassifier &wc : classifiers) { - if ((wc.Length() > 0) && (start > wc.Start())) - start = wc.Start(); + for (std::vector::const_iterator it = classifiers.begin(); it != classifiers.end(); ++it) { + if (start > it->Start()) + start = it->Start(); } return (start < 256) ? start : -1; } - int LastAllocated() const noexcept { + int LastAllocated() const { int last = -1; - for (const WordClassifier &wc : classifiers) { - if ((wc.Length() > 0) && (last < wc.Last())) - last = wc.Last(); + for (std::vector::const_iterator it = classifiers.begin(); it != classifiers.end(); ++it) { + if (last < it->Last()) + last = it->Last(); } return last; } @@ -194,14 +179,13 @@ class SubStyles { classifiers[block].SetIdentifiers(style, identifiers); } - void Free() noexcept { + void Free() { allocated = 0; - for (WordClassifier &wc : classifiers) { - wc.Clear(); - } + for (std::vector::iterator it=classifiers.begin(); it != classifiers.end(); ++it) + it->Clear(); } - const WordClassifier &Classifier(int baseStyle) const noexcept { + const WordClassifier &Classifier(int baseStyle) const { const int block = BlockFromBaseStyle(baseStyle); return classifiers[block >= 0 ? block : 0]; } diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.cxx b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.cpp similarity index 74% rename from 3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.cpp index f1292317a..c8b4cd63b 100644 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.cpp @@ -11,20 +11,18 @@ #include #include -#include #include "WordList.h" -using namespace Lexilla; - -namespace { +using namespace Scintilla; /** * Creates an array that points into each word in the string and puts \0 terminators * after each word. */ -std::unique_ptr ArrayFromWordList(char *wordlist, size_t slen, size_t *len, bool onlyLineEnds = false) { - size_t words = 0; +static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = false) { + int prev = '\n'; + int words = 0; // For rapid determination of whether a character is a separator, build // a look up table. bool wordSeparator[256] = {}; // Initialise all to false. @@ -34,27 +32,27 @@ std::unique_ptr ArrayFromWordList(char *wordlist, size_t slen, size_t wordSeparator[static_cast(' ')] = true; wordSeparator[static_cast('\t')] = true; } - unsigned char prev = '\n'; for (int j = 0; wordlist[j]; j++) { - const unsigned char curr = wordlist[j]; + const int curr = static_cast(wordlist[j]); if (!wordSeparator[curr] && wordSeparator[prev]) words++; prev = curr; } - std::unique_ptr keywords = std::make_unique(words + 1); - size_t wordsStore = 0; + char **keywords = new char *[words + 1]; + int wordsStore = 0; + const size_t slen = strlen(wordlist); if (words) { - unsigned char previous = '\0'; + prev = '\0'; for (size_t k = 0; k < slen; k++) { if (!wordSeparator[static_cast(wordlist[k])]) { - if (!previous) { + if (!prev) { keywords[wordsStore] = &wordlist[k]; wordsStore++; } } else { wordlist[k] = '\0'; } - previous = wordlist[k]; + prev = wordlist[k]; } } assert(wordsStore < (words + 1)); @@ -63,14 +61,8 @@ std::unique_ptr ArrayFromWordList(char *wordlist, size_t slen, size_t return keywords; } -bool cmpWords(const char *a, const char *b) noexcept { - return strcmp(a, b) < 0; -} - -} - -WordList::WordList(bool onlyLineEnds_) noexcept : - words(nullptr), list(nullptr), len(0), onlyLineEnds(onlyLineEnds_) { +WordList::WordList(bool onlyLineEnds_) : + words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) { // Prevent warnings by static analyzers about uninitialized starts. starts[0] = -1; } @@ -79,63 +71,68 @@ WordList::~WordList() { Clear(); } -WordList::operator bool() const noexcept { - return len != 0; +WordList::operator bool() const { + return len ? true : false; } -bool WordList::operator!=(const WordList &other) const noexcept { +bool WordList::operator!=(const WordList &other) const { if (len != other.len) return true; - for (size_t i=0; i(len); +int WordList::Length() const { + return len; } -void WordList::Clear() noexcept { - delete []list; - list = nullptr; - delete []words; - words = nullptr; +void WordList::Clear() { + if (words) { + delete []list; + delete []words; + } + words = 0; + list = 0; len = 0; } -bool WordList::Set(const char *s) { - const size_t lenS = strlen(s) + 1; - std::unique_ptr listTemp = std::make_unique(lenS); - memcpy(listTemp.get(), s, lenS); - size_t lenTemp = 0; - std::unique_ptr wordsTemp = ArrayFromWordList(listTemp.get(), lenS - 1, &lenTemp, onlyLineEnds); - std::sort(wordsTemp.get(), wordsTemp.get() + lenTemp, cmpWords); +#ifdef _MSC_VER - if (lenTemp == len) { - bool changed = false; - for (size_t i = 0; i < lenTemp; i++) { - if (strcmp(words[i], wordsTemp[i]) != 0) { - changed = true; - break; - } - } - if (!changed) { - return false; - } - } +static bool cmpWords(const char *a, const char *b) { + return strcmp(a, b) < 0; +} + +#else +static int cmpWords(const void *a, const void *b) { + return strcmp(*static_cast(a), *static_cast(b)); +} + +static void SortWordList(char **words, unsigned int len) { + qsort(words, len, sizeof(*words), cmpWords); +} + +#endif + +void WordList::Set(const char *s) { Clear(); - words = wordsTemp.release(); - list = listTemp.release(); - len = lenTemp; + const size_t lenS = strlen(s) + 1; + list = new char[lenS]; + memcpy(list, s, lenS); + words = ArrayFromWordList(list, &len, onlyLineEnds); +#ifdef _MSC_VER + std::sort(words, words + len, cmpWords); +#else + SortWordList(words, len); +#endif std::fill(starts, std::end(starts), -1); - for (int l = static_cast(len - 1); l >= 0; l--) { + for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; starts[indexChar] = l; } - return true; } /** Check whether a string is in the list. @@ -143,8 +140,8 @@ bool WordList::Set(const char *s) { * Prefix elements start with '^' and match all strings that start with the rest of the element * so '^GTK_' matches 'GTK_X', 'GTK_MAJOR_VERSION', and 'GTK_'. */ -bool WordList::InList(const char *s) const noexcept { - if (!words) +bool WordList::InList(const char *s) const { + if (0 == words) return false; const unsigned char firstChar = s[0]; int j = starts[firstChar]; @@ -185,8 +182,8 @@ bool WordList::InList(const char *s) const noexcept { * with def to be a keyword, but also defi, defin and define are valid. * The marker is ~ in this case. */ -bool WordList::InListAbbreviated(const char *s, const char marker) const noexcept { - if (!words) +bool WordList::InListAbbreviated(const char *s, const char marker) const { + if (0 == words) return false; const unsigned char firstChar = s[0]; int j = starts[firstChar]; @@ -239,8 +236,8 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const noexcep * The marker is ~ in this case. * No multiple markers check is done and wont work. */ -bool WordList::InListAbridged(const char *s, const char marker) const noexcept { - if (!words) +bool WordList::InListAbridged(const char *s, const char marker) const { + if (0 == words) return false; const unsigned char firstChar = s[0]; int j = starts[firstChar]; @@ -292,7 +289,7 @@ bool WordList::InListAbridged(const char *s, const char marker) const noexcept { return false; } -const char *WordList::WordAt(int n) const noexcept { +const char *WordList::WordAt(int n) const { return words[n]; } diff --git a/3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.h b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.h new file mode 100644 index 000000000..a9f2d4ab2 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/lexlib/WordList.h @@ -0,0 +1,38 @@ +// Scintilla source code edit control +/** @file WordList.h + ** Hold a list of words. + **/ +// Copyright 1998-2010 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef WORDLIST_H +#define WORDLIST_H + +namespace Scintilla { + +/** + */ +class WordList { + // Each word contains at least one character - a empty word acts as sentinel at the end. + char **words; + char *list; + int len; + bool onlyLineEnds; ///< Delimited by any white space or only line ends + int starts[256]; +public: + explicit WordList(bool onlyLineEnds_ = false); + ~WordList(); + operator bool() const; + bool operator!=(const WordList &other) const; + int Length() const; + void Clear(); + void Set(const char *s); + bool InList(const char *s) const; + bool InListAbbreviated(const char *s, const char marker) const; + bool InListAbridged(const char *s, const char marker) const; + const char *WordAt(int n) const; +}; + +} + +#endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.cpp similarity index 79% rename from 3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.cpp index 2bf88aa23..886ace4af 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.cpp @@ -13,25 +13,18 @@ #include #include -#include #include -#include #include #include -#include "ScintillaTypes.h" -#include "ScintillaMessages.h" - -#include "Debugging.h" -#include "Geometry.h" #include "Platform.h" -#include "CharacterType.h" +#include "Scintilla.h" +#include "CharacterSet.h" #include "Position.h" #include "AutoComplete.h" using namespace Scintilla; -using namespace Scintilla::Internal; AutoComplete::AutoComplete() : active(false), @@ -39,17 +32,16 @@ AutoComplete::AutoComplete() : typesep('?'), ignoreCase(false), chooseSingle(false), - options(AutoCompleteOption::Normal), posStart(0), startLen(0), cancelAtStartPos(true), autoHide(true), dropRestOfWord(false), - ignoreCaseBehaviour(CaseInsensitiveBehaviour::RespectCase), + ignoreCaseBehaviour(SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE), widthLBDefault(100), heightLBDefault(100), - autoSort(Ordering::PreSorted) { - lb = ListBox::Allocate(); + autoSort(SC_ORDER_PRESORTED) { + lb.reset(ListBox::Allocate()); } AutoComplete::~AutoComplete() { @@ -64,11 +56,10 @@ bool AutoComplete::Active() const noexcept { void AutoComplete::Start(Window &parent, int ctrlID, Sci::Position position, Point location, Sci::Position startLen_, - int lineHeight, bool unicodeMode, Technology technology, ListOptions listOptions) { + int lineHeight, bool unicodeMode, int technology) { if (active) { Cancel(); } - lb->SetOptions(listOptions); lb->Create(parent, ctrlID, location, lineHeight, unicodeMode, technology); lb->Clear(); active = true; @@ -115,11 +106,6 @@ struct Sorter { Sorter(AutoComplete *ac_, const char *list_) : ac(ac_), list(list_) { int i = 0; - if (!list[i]) { - // Empty list has a single empty member - indices.push_back(i); // word start - indices.push_back(i); // word end - } while (list[i]) { indices.push_back(i); // word start while (list[i] != ac->GetTypesep() && list[i] != ac->GetSeparator() && list[i]) @@ -141,7 +127,7 @@ struct Sorter { indices.push_back(i); // index of last position } - bool operator()(int a, int b) noexcept { + bool operator()(int a, int b) { const int lenA = indices[a * 2 + 1] - indices[a * 2]; const int lenB = indices[b * 2 + 1] - indices[b * 2]; const int len = std::min(lenA, lenB); @@ -157,7 +143,7 @@ struct Sorter { }; void AutoComplete::SetList(const char *list) { - if (autoSort == Ordering::PreSorted) { + if (autoSort == SC_ORDER_PRESORTED) { lb->SetList(list, separator, typesep); sortMatrix.clear(); for (int i = 0; i < lb->Length(); ++i) @@ -170,7 +156,7 @@ void AutoComplete::SetList(const char *list) { for (int i = 0; i < static_cast(IndexSort.indices.size()) / 2; ++i) sortMatrix.push_back(i); std::sort(sortMatrix.begin(), sortMatrix.end(), IndexSort); - if (autoSort == Ordering::Custom || sortMatrix.size() < 2) { + if (autoSort == SC_ORDER_CUSTOM || sortMatrix.size() < 2) { lb->SetList(list, separator, typesep); PLATFORM_ASSERT(lb->Length() == static_cast(sortMatrix.size())); return; @@ -207,7 +193,9 @@ int AutoComplete::GetSelection() const { } std::string AutoComplete::GetValue(int item) const { - return lb->GetValue(item); + char value[maxItemLen]; + lb->GetValue(item, value, sizeof(value)); + return std::string(value); } void AutoComplete::Show(bool show) { @@ -216,7 +204,7 @@ void AutoComplete::Show(bool show) { lb->Select(0); } -void AutoComplete::Cancel() noexcept { +void AutoComplete::Cancel() { if (lb->Created()) { lb->Clear(); lb->Destroy(); @@ -243,41 +231,42 @@ void AutoComplete::Select(const char *word) { int end = lb->Length() - 1; // upper bound of the api array block to search while ((start <= end) && (location == -1)) { // Binary searching loop int pivot = (start + end) / 2; - std::string item = GetValue(sortMatrix[pivot]); + char item[maxItemLen]; + lb->GetValue(sortMatrix[pivot], item, maxItemLen); int cond; if (ignoreCase) - cond = CompareNCaseInsensitive(word, item.c_str(), lenWord); + cond = CompareNCaseInsensitive(word, item, lenWord); else - cond = strncmp(word, item.c_str(), lenWord); + cond = strncmp(word, item, lenWord); if (!cond) { // Find first match while (pivot > start) { - item = lb->GetValue(sortMatrix[pivot-1]); + lb->GetValue(sortMatrix[pivot-1], item, maxItemLen); if (ignoreCase) - cond = CompareNCaseInsensitive(word, item.c_str(), lenWord); + cond = CompareNCaseInsensitive(word, item, lenWord); else - cond = strncmp(word, item.c_str(), lenWord); + cond = strncmp(word, item, lenWord); if (0 != cond) break; --pivot; } location = pivot; if (ignoreCase - && ignoreCaseBehaviour == CaseInsensitiveBehaviour::RespectCase) { + && ignoreCaseBehaviour == SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE) { // Check for exact-case match for (; pivot <= end; pivot++) { - item = lb->GetValue(sortMatrix[pivot]); - if (!strncmp(word, item.c_str(), lenWord)) { + lb->GetValue(sortMatrix[pivot], item, maxItemLen); + if (!strncmp(word, item, lenWord)) { location = pivot; break; } - if (CompareNCaseInsensitive(word, item.c_str(), lenWord)) + if (CompareNCaseInsensitive(word, item, lenWord)) break; } } } else if (cond < 0) { end = pivot - 1; - } else { // cond > 0 + } else if (cond > 0) { start = pivot + 1; } } @@ -287,13 +276,14 @@ void AutoComplete::Select(const char *word) { else lb->Select(-1); } else { - if (autoSort == Ordering::Custom) { + if (autoSort == SC_ORDER_CUSTOM) { // Check for a logically earlier match + char item[maxItemLen]; for (int i = location + 1; i <= end; ++i) { - std::string item = lb->GetValue(sortMatrix[i]); - if (CompareNCaseInsensitive(word, item.c_str(), lenWord)) + lb->GetValue(sortMatrix[i], item, maxItemLen); + if (CompareNCaseInsensitive(word, item, lenWord)) break; - if (sortMatrix[i] < sortMatrix[location] && !strncmp(word, item.c_str(), lenWord)) + if (sortMatrix[i] < sortMatrix[location] && !strncmp(word, item, lenWord)) location = i; } } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.h b/3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.h similarity index 68% rename from 3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.h index 6afdf7c3e..6440c13d4 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/AutoComplete.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/AutoComplete.h @@ -8,7 +8,7 @@ #ifndef AUTOCOMPLETE_H #define AUTOCOMPLETE_H -namespace Scintilla::Internal { +namespace Scintilla { /** */ @@ -17,7 +17,7 @@ class AutoComplete { std::string stopChars; std::string fillUpChars; char separator; - char typesep; // Type separator + char typesep; // Type seperator enum { maxItemLen=1000 }; std::vector sortMatrix; @@ -25,29 +25,23 @@ class AutoComplete { bool ignoreCase; bool chooseSingle; - AutoCompleteOption options; std::unique_ptr lb; Sci::Position posStart; Sci::Position startLen; - /// Should autocompletion be cancelled if editor's currentPos <= startPos? + /// Should autocompletion be canceled if editor's currentPos <= startPos? bool cancelAtStartPos; bool autoHide; bool dropRestOfWord; - Scintilla::CaseInsensitiveBehaviour ignoreCaseBehaviour; + unsigned int ignoreCaseBehaviour; int widthLBDefault; int heightLBDefault; - /** Ordering::PreSorted: Assume the list is presorted; selection will fail if it is not alphabetical
- * Ordering::PerformSort: Sort the list alphabetically; start up performance cost for sorting
- * Ordering::Custom: Handle non-alphabetical entries; start up performance cost for generating a sorted lookup table + /** SC_ORDER_PRESORTED: Assume the list is presorted; selection will fail if it is not alphabetical
+ * SC_ORDER_PERFORMSORT: Sort the list alphabetically; start up performance cost for sorting
+ * SC_ORDER_CUSTOM: Handle non-alphabetical entries; start up performance cost for generating a sorted lookup table */ - Scintilla::Ordering autoSort; + int autoSort; AutoComplete(); - // Deleted so AutoComplete objects can not be copied. - AutoComplete(const AutoComplete &) = delete; - AutoComplete(AutoComplete &&) = delete; - AutoComplete &operator=(const AutoComplete &) = delete; - AutoComplete &operator=(AutoComplete &&) = delete; ~AutoComplete(); /// Is the auto completion list displayed? @@ -55,8 +49,7 @@ class AutoComplete { /// Display the auto completion list positioned to be near a character position void Start(Window &parent, int ctrlID, Sci::Position position, Point location, - Sci::Position startLen_, int lineHeight, bool unicodeMode, Scintilla::Technology technology, - ListOptions listOptions); + Sci::Position startLen_, int lineHeight, bool unicodeMode, int technology); /// The stop chars are characters which, when typed, cause the auto completion list to disappear void SetStopChars(const char *stopChars_); @@ -84,7 +77,7 @@ class AutoComplete { std::string GetValue(int item) const; void Show(bool show); - void Cancel() noexcept; + void Cancel(); /// Move the current list element by delta, scrolling appropriately void Move(int delta); diff --git a/3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.cpp b/3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.cpp new file mode 100644 index 000000000..2dcf91ea6 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.cpp @@ -0,0 +1,332 @@ +// Scintilla source code edit control +/** @file CallTip.cxx + ** Code for displaying call tips. + **/ +// Copyright 1998-2001 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "Scintilla.h" + +#include "StringCopy.h" +#include "Position.h" +#include "IntegerRectangle.h" +#include "CallTip.h" + +using namespace Scintilla; + +CallTip::CallTip() { + wCallTip = 0; + inCallTipMode = false; + posStartCallTip = 0; + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + lineHeight = 1; + offsetMain = 0; + startHighlight = 0; + endHighlight = 0; + tabSize = 0; + above = false; + useStyleCallTip = false; // for backwards compatibility + + insetX = 5; + widthArrow = 14; + borderHeight = 2; // Extra line for border and an empty line at top and bottom. + verticalOffset = 1; + +#ifdef __APPLE__ + // proper apple colours for the default + colourBG = ColourDesired(0xff, 0xff, 0xc6); + colourUnSel = ColourDesired(0, 0, 0); +#else + colourBG = ColourDesired(0xff, 0xff, 0xff); + colourUnSel = ColourDesired(0x80, 0x80, 0x80); +#endif + colourSel = ColourDesired(0, 0, 0x80); + colourShade = ColourDesired(0, 0, 0); + colourLight = ColourDesired(0xc0, 0xc0, 0xc0); + codePage = 0; + clickPlace = 0; +} + +CallTip::~CallTip() { + font.Release(); + wCallTip.Destroy(); +} + +// Although this test includes 0, we should never see a \0 character. +static bool IsArrowCharacter(char ch) { + return (ch == 0) || (ch == '\001') || (ch == '\002'); +} + +// We ignore tabs unless a tab width has been set. +bool CallTip::IsTabCharacter(char ch) const { + return (tabSize > 0) && (ch == '\t'); +} + +int CallTip::NextTabPos(int x) const { + if (tabSize > 0) { // paranoia... not called unless this is true + x -= insetX; // position relative to text + x = (x + tabSize) / tabSize; // tab "number" + return tabSize*x + insetX; // position of next tab + } else { + return x + 1; // arbitrary + } +} + +// Draw a section of the call tip that does not include \n in one colour. +// The text may include up to numEnds tabs or arrow characters. +void CallTip::DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw) { + s += posStart; + const int len = posEnd - posStart; + + // Divide the text into sections that are all text, or that are + // single arrows or single tab characters (if tabSize > 0). + int maxEnd = 0; + const int numEnds = 10; + int ends[numEnds + 2]; + for (int i=0; i 0) + ends[maxEnd++] = i; + ends[maxEnd++] = i+1; + } + } + ends[maxEnd++] = len; + int startSeg = 0; + int xEnd; + for (int seg = 0; seg startSeg) { + if (IsArrowCharacter(s[startSeg])) { + xEnd = x + widthArrow; + const bool upArrow = s[startSeg] == '\001'; + rcClient.left = static_cast(x); + rcClient.right = static_cast(xEnd); + if (draw) { + const int halfWidth = widthArrow / 2 - 3; + const int quarterWidth = halfWidth / 2; + const int centreX = x + widthArrow / 2 - 1; + const int centreY = static_cast(rcClient.top + rcClient.bottom) / 2; + surface->FillRectangle(rcClient, colourBG); + const PRectangle rcClientInner(rcClient.left + 1, rcClient.top + 1, + rcClient.right - 2, rcClient.bottom - 1); + surface->FillRectangle(rcClientInner, colourUnSel); + + if (upArrow) { // Up arrow + Point pts[] = { + Point::FromInts(centreX - halfWidth, centreY + quarterWidth), + Point::FromInts(centreX + halfWidth, centreY + quarterWidth), + Point::FromInts(centreX, centreY - halfWidth + quarterWidth), + }; + surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); + } else { // Down arrow + Point pts[] = { + Point::FromInts(centreX - halfWidth, centreY - quarterWidth), + Point::FromInts(centreX + halfWidth, centreY - quarterWidth), + Point::FromInts(centreX, centreY + halfWidth - quarterWidth), + }; + surface->Polygon(pts, ELEMENTS(pts), colourBG, colourBG); + } + } + offsetMain = xEnd; + if (upArrow) { + rectUp = rcClient; + } else { + rectDown = rcClient; + } + } else if (IsTabCharacter(s[startSeg])) { + xEnd = NextTabPos(x); + } else { + xEnd = x + static_cast(lround(surface->WidthText(font, s + startSeg, endSeg - startSeg))); + if (draw) { + rcClient.left = static_cast(x); + rcClient.right = static_cast(xEnd); + surface->DrawTextTransparent(rcClient, font, static_cast(ytext), + s+startSeg, endSeg - startSeg, + highlight ? colourSel : colourUnSel); + } + } + x = xEnd; + startSeg = endSeg; + } + } +} + +int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { + const PRectangle rcClientPos = wCallTip.GetClientPosition(); + const PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1); + + // To make a nice small call tip window, it is only sized to fit most normal characters without accents + const int ascent = static_cast(lround(surfaceWindow->Ascent(font) - surfaceWindow->InternalLeading(font))); + + // For each line... + // Draw the definition in three parts: before highlight, highlighted, after highlight + int ytext = static_cast(rcClient.top) + ascent + 1; + rcClient.bottom = ytext + surfaceWindow->Descent(font) + 1; + const char *chunkVal = val.c_str(); + bool moreChunks = true; + int maxWidth = 0; + + while (moreChunks) { + const char *chunkEnd = strchr(chunkVal, '\n'); + if (!chunkEnd) { + chunkEnd = chunkVal + strlen(chunkVal); + moreChunks = false; + } + const int chunkOffset = static_cast(chunkVal - val.c_str()); + const int chunkLength = static_cast(chunkEnd - chunkVal); + const int chunkEndOffset = chunkOffset + chunkLength; + int thisStartHighlight = std::max(startHighlight, chunkOffset); + thisStartHighlight = std::min(thisStartHighlight, chunkEndOffset); + thisStartHighlight -= chunkOffset; + int thisEndHighlight = std::max(endHighlight, chunkOffset); + thisEndHighlight = std::min(thisEndHighlight, chunkEndOffset); + thisEndHighlight -= chunkOffset; + rcClient.top = static_cast(ytext - ascent - 1); + + int x = insetX; // start each line at this inset + + DrawChunk(surfaceWindow, x, chunkVal, 0, thisStartHighlight, + ytext, rcClient, false, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisStartHighlight, thisEndHighlight, + ytext, rcClient, true, draw); + DrawChunk(surfaceWindow, x, chunkVal, thisEndHighlight, chunkLength, + ytext, rcClient, false, draw); + + chunkVal = chunkEnd + 1; + ytext += lineHeight; + rcClient.bottom += lineHeight; + maxWidth = std::max(maxWidth, x); + } + return maxWidth; +} + +void CallTip::PaintCT(Surface *surfaceWindow) { + if (val.empty()) + return; + const PRectangle rcClientPos = wCallTip.GetClientPosition(); + const PRectangle rcClientSize(0.0f, 0.0f, rcClientPos.right - rcClientPos.left, + rcClientPos.bottom - rcClientPos.top); + const PRectangle rcClient(1.0f, 1.0f, rcClientSize.right - 1, rcClientSize.bottom - 1); + + surfaceWindow->FillRectangle(rcClient, colourBG); + + offsetMain = insetX; // initial alignment assuming no arrows + PaintContents(surfaceWindow, true); + +#ifndef __APPLE__ + // OSX doesn't put borders on "help tags" + // Draw a raised border around the edges of the window + const IntegerRectangle ircClientSize(rcClientSize); + surfaceWindow->MoveTo(0, ircClientSize.bottom - 1); + surfaceWindow->PenColour(colourShade); + surfaceWindow->LineTo(ircClientSize.right - 1, ircClientSize.bottom - 1); + surfaceWindow->LineTo(ircClientSize.right - 1, 0); + surfaceWindow->PenColour(colourLight); + surfaceWindow->LineTo(0, 0); + surfaceWindow->LineTo(0, ircClientSize.bottom - 1); +#endif +} + +void CallTip::MouseClick(Point pt) { + clickPlace = 0; + if (rectUp.Contains(pt)) + clickPlace = 1; + if (rectDown.Contains(pt)) + clickPlace = 2; +} + +PRectangle CallTip::CallTipStart(Sci::Position pos, Point pt, int textHeight, const char *defn, + const char *faceName, int size, + int codePage_, int characterSet, + int technology, const Window &wParent) { + clickPlace = 0; + val = defn; + codePage = codePage_; + std::unique_ptr surfaceMeasure(Surface::Allocate(technology)); + surfaceMeasure->Init(wParent.GetID()); + surfaceMeasure->SetUnicodeMode(SC_CP_UTF8 == codePage); + surfaceMeasure->SetDBCSMode(codePage); + startHighlight = 0; + endHighlight = 0; + inCallTipMode = true; + posStartCallTip = pos; + const XYPOSITION deviceHeight = static_cast(surfaceMeasure->DeviceHeightFont(size)); + const FontParameters fp(faceName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, SC_WEIGHT_NORMAL, false, 0, technology, characterSet); + font.Create(fp); + // Look for multiple lines in the text + // Only support \n here - simply means container must avoid \r! + const int numLines = 1 + static_cast(std::count(val.begin(), val.end(), '\n')); + rectUp = PRectangle(0,0,0,0); + rectDown = PRectangle(0,0,0,0); + offsetMain = insetX; // changed to right edge of any arrows + const int width = PaintContents(surfaceMeasure.get(), false) + insetX; + lineHeight = static_cast(lround(surfaceMeasure->Height(font))); + + // The returned + // rectangle is aligned to the right edge of the last arrow encountered in + // the tip text, else to the tip text left edge. + const int height = lineHeight * numLines - static_cast(surfaceMeasure->InternalLeading(font)) + borderHeight * 2; + if (above) { + return PRectangle(pt.x - offsetMain, pt.y - verticalOffset - height, pt.x + width - offsetMain, pt.y - verticalOffset); + } else { + return PRectangle(pt.x - offsetMain, pt.y + verticalOffset + textHeight, pt.x + width - offsetMain, pt.y + verticalOffset + textHeight + height); + } +} + +void CallTip::CallTipCancel() { + inCallTipMode = false; + if (wCallTip.Created()) { + wCallTip.Destroy(); + } +} + +void CallTip::SetHighlight(int start, int end) { + // Avoid flashing by checking something has really changed + if ((start != startHighlight) || (end != endHighlight)) { + startHighlight = start; + endHighlight = (end > start) ? end : start; + if (wCallTip.Created()) { + wCallTip.InvalidateAll(); + } + } +} + +// Set the tab size (sizes > 0 enable the use of tabs). This also enables the +// use of the STYLE_CALLTIP. +void CallTip::SetTabSize(int tabSz) { + tabSize = tabSz; + useStyleCallTip = true; +} + +// Set the calltip position, below the text by default or if above is false +// else above the text. +void CallTip::SetPosition(bool aboveText) { + above = aboveText; +} + +// It might be better to have two access functions for this and to use +// them for all settings of colours. +void CallTip::SetForeBack(const ColourDesired &fore, const ColourDesired &back) { + colourBG = back; + colourUnSel = fore; +} diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CallTip.h b/3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.h similarity index 61% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CallTip.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.h index dc1071baa..a37138d5f 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CallTip.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CallTip.h @@ -8,47 +8,40 @@ #ifndef CALLTIP_H #define CALLTIP_H -namespace Scintilla::Internal { - -struct Chunk { - size_t start; - size_t end; - constexpr Chunk(size_t start_=0, size_t end_=0) noexcept : start(start_), end(end_) { - assert(start <= end); - } - size_t Length() const noexcept; -}; +namespace Scintilla { /** */ class CallTip { - Chunk highlight; // character offset to start and end of highlighted text + int startHighlight; // character offset to start and... + int endHighlight; // ...end of highlighted text std::string val; - std::shared_ptr font; + Font font; PRectangle rectUp; // rectangle of last up angle in the tip PRectangle rectDown; // rectangle of last down arrow in the tip int lineHeight; // vertical line spacing int offsetMain; // The alignment point of the call tip int tabSize; // Tab size in pixels, <=0 no TAB expand - bool useStyleCallTip; // if true, StyleCallTip should be used + bool useStyleCallTip; // if true, STYLE_CALLTIP should be used bool above; // if true, display calltip above text - int DrawChunk(Surface *surface, int x, std::string_view sv, - int ytext, PRectangle rcClient, bool asHighlight, bool draw); + void DrawChunk(Surface *surface, int &x, const char *s, + int posStart, int posEnd, int ytext, PRectangle rcClient, + bool highlight, bool draw); int PaintContents(Surface *surfaceWindow, bool draw); - bool IsTabCharacter(char ch) const noexcept; - int NextTabPos(int x) const noexcept; + bool IsTabCharacter(char ch) const; + int NextTabPos(int x) const; public: Window wCallTip; Window wDraw; bool inCallTipMode; Sci::Position posStartCallTip; - ColourRGBA colourBG; - ColourRGBA colourUnSel; - ColourRGBA colourSel; - ColourRGBA colourShade; - ColourRGBA colourLight; + ColourDesired colourBG; + ColourDesired colourUnSel; + ColourDesired colourSel; + ColourDesired colourShade; + ColourDesired colourLight; int codePage; int clickPlace; @@ -57,7 +50,7 @@ class CallTip { int borderHeight; int verticalOffset; // pixel offset up or down of the calltip with respect to the line - CallTip() noexcept; + CallTip(); // Deleted so CallTip objects can not be copied. CallTip(const CallTip &) = delete; CallTip(CallTip &&) = delete; @@ -67,31 +60,30 @@ class CallTip { void PaintCT(Surface *surfaceWindow); - void MouseClick(Point pt) noexcept; + void MouseClick(Point pt); /// Setup the calltip and return a rectangle of the area required. PRectangle CallTipStart(Sci::Position pos, Point pt, int textHeight, const char *defn, const char *faceName, int size, int codePage_, - Scintilla::CharacterSet characterSet, Scintilla::Technology technology, const char *localeName, - const Window &wParent); + int characterSet, int technology, const Window &wParent); - void CallTipCancel() noexcept; + void CallTipCancel(); /// Set a range of characters to be displayed in a highlight style. /// Commonly used to highlight the current parameter. - void SetHighlight(size_t start, size_t end); + void SetHighlight(int start, int end); /// Set the tab size in pixels for the call tip. 0 or -ve means no tab expand. - void SetTabSize(int tabSz) noexcept; + void SetTabSize(int tabSz); /// Set calltip position. - void SetPosition(bool aboveText) noexcept; + void SetPosition(bool aboveText); /// Used to determine which STYLE_xxxx to use for call tip information - bool UseStyleCallTip() const noexcept; + bool UseStyleCallTip() const { return useStyleCallTip;} // Modify foreground and background colours - void SetForeBack(const ColourRGBA &fore, const ColourRGBA &back) noexcept; + void SetForeBack(const ColourDesired &fore, const ColourDesired &back); }; } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.cpp similarity index 91% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.cpp index e41791ba1..cecea427c 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.cpp @@ -8,19 +8,18 @@ // Copyright 2013 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include #include #include #include -#include #include #include +#include "StringCopy.h" #include "CaseConvert.h" #include "UniConversion.h" -using namespace Scintilla::Internal; +using namespace Scintilla; namespace { // Use an unnamed namespace to protect the declarations from name conflicts @@ -76,7 +75,6 @@ int symmetricCaseConversionRanges[] = { 42803,42802,31,2, 42879,42878,5,2, 42903,42902,10,2, -42933,42932,6,2, 65345,65313,26,1, 66600,66560,40,1, 66776,66736,36,1, @@ -159,7 +157,6 @@ int symmetricCaseConversions[] = { 629,415, 637,11364, 640,422, -642,42949, 643,425, 647,42929, 648,430, @@ -194,7 +191,6 @@ int symmetricCaseConversions[] = { 4351,7359, 7545,42877, 7549,11363, -7566,42950, 8017,8025, 8019,8027, 8021,8029, @@ -240,11 +236,9 @@ int symmetricCaseConversions[] = { 42892,42891, 42897,42896, 42899,42898, -42900,42948, -42947,42946, -42952,42951, -42954,42953, -42998,42997, +42933,42932, +42935,42934, +42937,42936, 43859,42931, //--Autogenerated -- end of section automatically generated @@ -575,7 +569,7 @@ class CaseConverter : public ICaseConverter { enum { maxConversionLength=6 }; struct ConversionString { char conversion[maxConversionLength+1]; - ConversionString() noexcept : conversion{} { + ConversionString() : conversion{} { } }; // Conversions are initially store in a vector of structs but then decomposed into @@ -583,18 +577,8 @@ class CaseConverter : public ICaseConverter { struct CharacterConversion { int character; ConversionString conversion; - CharacterConversion() noexcept : character(0) { - // Empty case: NUL -> "". - } - CharacterConversion(int character_, std::string_view conversion_) noexcept : character(character_) { - assert(conversion_.length() <= maxConversionLength); - try { - // This can never fail as std::string_view::copy should only throw - // std::out_of_range if pos > size() and pos == 0 here - conversion_.copy(conversion.conversion, conversion_.length()); - } catch (...) { - // Ignore any exception - } + CharacterConversion(int character_=0, const char *conversion_="") noexcept : character(character_) { + StringCopy(conversion.conversion, conversion_); } bool operator<(const CharacterConversion &other) const noexcept { return character < other.character; @@ -607,15 +591,11 @@ class CaseConverter : public ICaseConverter { std::vector conversions; public: - CaseConverter() = default; - // Deleted so CaseConverter objects can not be copied. - CaseConverter(const CaseConverter &) = delete; - CaseConverter(CaseConverter &&) = delete; - CaseConverter &operator=(const CaseConverter &) = delete; - CaseConverter &operator=(CaseConverter &&) = delete; - virtual ~CaseConverter() noexcept = default; - bool Initialised() const noexcept { - return !characters.empty(); + CaseConverter() { + } + virtual ~CaseConverter() = default; + bool Initialised() const { + return characters.size() > 0; } void Add(int character, const char *conversion) { characterToConversion.emplace_back(character, conversion); @@ -689,28 +669,28 @@ CaseConverter caseConvFold; CaseConverter caseConvUp; CaseConverter caseConvLow; -void AddSymmetric(CaseConversion conversion, int lower,int upper) { +void AddSymmetric(enum CaseConversion conversion, int lower,int upper) { char lowerUTF8[UTF8MaxBytes+1]; UTF8FromUTF32Character(lower, lowerUTF8); char upperUTF8[UTF8MaxBytes+1]; UTF8FromUTF32Character(upper, upperUTF8); switch (conversion) { - case CaseConversion::fold: + case CaseConversionFold: caseConvFold.Add(upper, lowerUTF8); break; - case CaseConversion::upper: + case CaseConversionUpper: caseConvUp.Add(lower, upperUTF8); break; - case CaseConversion::lower: + case CaseConversionLower: caseConvLow.Add(upper, lowerUTF8); break; } } -void SetupConversions(CaseConversion conversion) { +void SetupConversions(enum CaseConversion conversion) { // First initialize for the symmetric ranges - for (size_t i=0; iInitialised()) SetupConversions(conversion); return pCaseConv; } -const char *CaseConvert(int character, CaseConversion conversion) { +const char *CaseConvert(int character, enum CaseConversion conversion) { CaseConverter *pCaseConv = ConverterForConversion(conversion); if (!pCaseConv->Initialised()) SetupConversions(conversion); return pCaseConv->Find(character); } -size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, CaseConversion conversion) { +size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, enum CaseConversion conversion) { CaseConverter *pCaseConv = ConverterForConversion(conversion); if (!pCaseConv->Initialised()) SetupConversions(conversion); return pCaseConv->CaseConvertString(converted, sizeConverted, mixed, lenMixed); } -std::string CaseConvertString(const std::string &s, CaseConversion conversion) { +std::string CaseConvertString(const std::string &s, enum CaseConversion conversion) { std::string retMapped(s.length() * maxExpansionCaseConversion, 0); const size_t lenMapped = CaseConvertString(&retMapped[0], retMapped.length(), s.c_str(), s.length(), conversion); diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.h b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.h similarity index 72% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.h index ca45f175a..cdd089710 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CaseConvert.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseConvert.h @@ -10,12 +10,12 @@ #ifndef CASECONVERT_H #define CASECONVERT_H -namespace Scintilla::Internal { +namespace Scintilla { -enum class CaseConversion { - fold, - upper, - lower +enum CaseConversion { + CaseConversionFold, + CaseConversionUpper, + CaseConversionLower }; class ICaseConverter { @@ -23,23 +23,23 @@ class ICaseConverter { virtual size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed) = 0; }; -ICaseConverter *ConverterFor(CaseConversion conversion); +ICaseConverter *ConverterFor(enum CaseConversion conversion); // Returns a UTF-8 string. Empty when no conversion -const char *CaseConvert(int character, CaseConversion conversion); +const char *CaseConvert(int character, enum CaseConversion conversion); // When performing CaseConvertString, the converted value may be up to 3 times longer than the input. // Ligatures are often decomposed into multiple characters and long cases include: // ΐ "\xce\x90" folds to ΐ "\xce\xb9\xcc\x88\xcc\x81" -constexpr size_t maxExpansionCaseConversion = 3; +const int maxExpansionCaseConversion=3; // Converts a mixed case string using a particular conversion. // Result may be a different length to input and the length is the return value. // If there is not enough space then 0 is returned. -size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, CaseConversion conversion); +size_t CaseConvertString(char *converted, size_t sizeConverted, const char *mixed, size_t lenMixed, enum CaseConversion conversion); // Converts a mixed case string using a particular conversion. -std::string CaseConvertString(const std::string &s, CaseConversion conversion); +std::string CaseConvertString(const std::string &s, enum CaseConversion conversion); } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.cpp similarity index 87% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.cpp index b5acc5f96..0fd29c7bb 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.cpp @@ -12,17 +12,20 @@ #include "CaseFolder.h" #include "CaseConvert.h" -using namespace Scintilla::Internal; +using namespace Scintilla; CaseFolder::~CaseFolder() { } -CaseFolderTable::CaseFolderTable() noexcept : mapping{} { +CaseFolderTable::CaseFolderTable() : mapping{} { for (size_t iChar=0; iChar(iChar); } } +CaseFolderTable::~CaseFolderTable() { +} + size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { if (lenMixed > sizeFolded) { return 0; @@ -34,11 +37,11 @@ size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed, } } -void CaseFolderTable::SetTranslation(char ch, char chTranslation) noexcept { +void CaseFolderTable::SetTranslation(char ch, char chTranslation) { mapping[static_cast(ch)] = chTranslation; } -void CaseFolderTable::StandardASCII() noexcept { +void CaseFolderTable::StandardASCII() { for (size_t iChar=0; iChar= 'A' && iChar <= 'Z') { mapping[iChar] = static_cast(iChar - 'A' + 'a'); @@ -50,7 +53,7 @@ void CaseFolderTable::StandardASCII() noexcept { CaseFolderUnicode::CaseFolderUnicode() { StandardASCII(); - converter = ConverterFor(CaseConversion::fold); + converter = ConverterFor(CaseConversionFold); } size_t CaseFolderUnicode::Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) { diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.h b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.h similarity index 84% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.h index 45abe4d8f..5fa65870e 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CaseFolder.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CaseFolder.h @@ -8,7 +8,7 @@ #ifndef CASEFOLDER_H #define CASEFOLDER_H -namespace Scintilla::Internal { +namespace Scintilla { class CaseFolder { public: @@ -20,10 +20,11 @@ class CaseFolderTable : public CaseFolder { protected: char mapping[256]; public: - CaseFolderTable() noexcept; + CaseFolderTable(); + ~CaseFolderTable() override; size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override; - void SetTranslation(char ch, char chTranslation) noexcept; - void StandardASCII() noexcept; + void SetTranslation(char ch, char chTranslation); + void StandardASCII(); }; class ICaseConverter; diff --git a/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.cpp b/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.cpp new file mode 100644 index 000000000..1a5c3bc13 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.cpp @@ -0,0 +1,204 @@ +// Scintilla source code edit control +/** @file Catalogue.cxx + ** Lexer infrastructure. + ** Contains a list of LexerModules which can be searched to find a module appropriate for a + ** particular language. + **/ +// Copyright 1998-2002 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include + +#include +#include + +#include "ILexer.h" +#include "Scintilla.h" +#include "SciLexer.h" + +#include "LexerModule.h" +#include "Catalogue.h" + +using namespace Scintilla; + +static std::vector lexerCatalogue; +static int nextLanguage = SCLEX_AUTOMATIC+1; + +const LexerModule *Catalogue::Find(int language) { + Scintilla_LinkLexers(); + for (const LexerModule *lm : lexerCatalogue) { + if (lm->GetLanguage() == language) { + return lm; + } + } + return nullptr; +} + +const LexerModule *Catalogue::Find(const char *languageName) { + Scintilla_LinkLexers(); + if (languageName) { + for (const LexerModule *lm : lexerCatalogue) { + if (lm->languageName && (0 == strcmp(lm->languageName, languageName))) { + return lm; + } + } + } + return nullptr; +} + +void Catalogue::AddLexerModule(LexerModule *plm) { + if (plm->GetLanguage() == SCLEX_AUTOMATIC) { + plm->language = nextLanguage; + nextLanguage++; + } + lexerCatalogue.push_back(plm); +} + +// To add or remove a lexer, add or remove its file and run LexGen.py. + +// Force a reference to all of the Scintilla lexers so that the linker will +// not remove the code of the lexers. +int Scintilla_LinkLexers() { + + static int initialised = 0; + if (initialised) + return 0; + initialised = 1; + +// Shorten the code that declares a lexer and ensures it is linked in by calling a method. +#define LINK_LEXER(lexer) extern LexerModule lexer; Catalogue::AddLexerModule(&lexer); + +//++Autogenerated -- run scripts/LexGen.py to regenerate +//**\(\tLINK_LEXER(\*);\n\) + LINK_LEXER(lmA68k); + LINK_LEXER(lmAbaqus); + LINK_LEXER(lmAda); + LINK_LEXER(lmAPDL); + LINK_LEXER(lmAs); + LINK_LEXER(lmAsm); + LINK_LEXER(lmAsn1); + LINK_LEXER(lmASY); + LINK_LEXER(lmAU3); + LINK_LEXER(lmAVE); + LINK_LEXER(lmAVS); + LINK_LEXER(lmBaan); + LINK_LEXER(lmBash); + LINK_LEXER(lmBatch); + LINK_LEXER(lmBibTeX); + LINK_LEXER(lmBlitzBasic); + LINK_LEXER(lmBullant); + LINK_LEXER(lmCaml); + LINK_LEXER(lmClw); + LINK_LEXER(lmClwNoCase); + LINK_LEXER(lmCmake); + LINK_LEXER(lmCOBOL); + LINK_LEXER(lmCoffeeScript); + LINK_LEXER(lmConf); + LINK_LEXER(lmCPP); + LINK_LEXER(lmCPPNoCase); + LINK_LEXER(lmCsound); + LINK_LEXER(lmCss); + LINK_LEXER(lmD); + LINK_LEXER(lmDiff); + LINK_LEXER(lmDMAP); + LINK_LEXER(lmDMIS); + LINK_LEXER(lmECL); + LINK_LEXER(lmEDIFACT); + LINK_LEXER(lmEiffel); + LINK_LEXER(lmEiffelkw); + LINK_LEXER(lmErlang); + LINK_LEXER(lmErrorList); + LINK_LEXER(lmESCRIPT); + LINK_LEXER(lmF77); + LINK_LEXER(lmFlagShip); + LINK_LEXER(lmForth); + LINK_LEXER(lmFortran); + LINK_LEXER(lmFreeBasic); + LINK_LEXER(lmGAP); + LINK_LEXER(lmGui4Cli); + LINK_LEXER(lmHaskell); + LINK_LEXER(lmHTML); + LINK_LEXER(lmIHex); + LINK_LEXER(lmIndent); + LINK_LEXER(lmInno); + LINK_LEXER(lmJSON); + LINK_LEXER(lmKix); + LINK_LEXER(lmKVIrc); + LINK_LEXER(lmLatex); + LINK_LEXER(lmLISP); + LINK_LEXER(lmLiterateHaskell); + LINK_LEXER(lmLot); + LINK_LEXER(lmLout); +#if !defined(SCINTILLA_QT) + LINK_LEXER(lmLPeg); +#endif + LINK_LEXER(lmLua); + LINK_LEXER(lmMagikSF); + LINK_LEXER(lmMake); + LINK_LEXER(lmMarkdown); + LINK_LEXER(lmMatlab); + LINK_LEXER(lmMaxima); + LINK_LEXER(lmMETAPOST); + LINK_LEXER(lmMMIXAL); + LINK_LEXER(lmModula); + LINK_LEXER(lmMSSQL); + LINK_LEXER(lmMySQL); + LINK_LEXER(lmNimrod); + LINK_LEXER(lmNncrontab); + LINK_LEXER(lmNsis); + LINK_LEXER(lmNull); + LINK_LEXER(lmOctave); + LINK_LEXER(lmOpal); + LINK_LEXER(lmOScript); + LINK_LEXER(lmPascal); + LINK_LEXER(lmPB); + LINK_LEXER(lmPerl); + LINK_LEXER(lmPHPSCRIPT); + LINK_LEXER(lmPLM); + LINK_LEXER(lmPO); + LINK_LEXER(lmPOV); + LINK_LEXER(lmPowerPro); + LINK_LEXER(lmPowerShell); + LINK_LEXER(lmProgress); + LINK_LEXER(lmProps); + LINK_LEXER(lmPS); + LINK_LEXER(lmPureBasic); + LINK_LEXER(lmPython); + LINK_LEXER(lmR); + LINK_LEXER(lmREBOL); + LINK_LEXER(lmRegistry); + LINK_LEXER(lmRuby); + LINK_LEXER(lmRust); + LINK_LEXER(lmSAS); + LINK_LEXER(lmScriptol); + LINK_LEXER(lmSmalltalk); + LINK_LEXER(lmSML); + LINK_LEXER(lmSorc); + LINK_LEXER(lmSpecman); + LINK_LEXER(lmSpice); + LINK_LEXER(lmSQL); + LINK_LEXER(lmSrec); + LINK_LEXER(lmStata); + LINK_LEXER(lmSTTXT); + LINK_LEXER(lmTACL); + LINK_LEXER(lmTADS3); + LINK_LEXER(lmTAL); + LINK_LEXER(lmTCL); + LINK_LEXER(lmTCMD); + LINK_LEXER(lmTEHex); + LINK_LEXER(lmTeX); + LINK_LEXER(lmTxt2tags); + LINK_LEXER(lmVB); + LINK_LEXER(lmVBScript); + LINK_LEXER(lmVerilog); + LINK_LEXER(lmVHDL); + LINK_LEXER(lmVisualProlog); + LINK_LEXER(lmXML); + LINK_LEXER(lmYAML); + +//--Autogenerated -- end of automatically generated section + + return 1; +} diff --git a/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.h b/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.h new file mode 100644 index 000000000..d8769a896 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Catalogue.h @@ -0,0 +1,24 @@ +// Scintilla source code edit control +/** @file Catalogue.h + ** Lexer infrastructure. + ** Contains a list of LexerModules which can be searched to find a module appropriate for a + ** particular language. + **/ +// Copyright 1998-2010 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CATALOGUE_H +#define CATALOGUE_H + +namespace Scintilla { + +class Catalogue { +public: + static const LexerModule *Find(int language); + static const LexerModule *Find(const char *languageName); + static void AddLexerModule(LexerModule *plm); +}; + +} + +#endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.cpp similarity index 67% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.cpp index b84372cf2..17a30a565 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.cpp @@ -14,30 +14,27 @@ #include #include -#include #include -#include #include #include -#include "ScintillaTypes.h" - -#include "Debugging.h" +#include "Platform.h" +#include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "CellBuffer.h" #include "UniConversion.h" -namespace Scintilla::Internal { +namespace Scintilla { struct CountWidths { // Measures the number of characters in a string divided into those // from the Base Multilingual Plane and those from other planes. Sci::Position countBasePlane; Sci::Position countOtherPlanes; - explicit CountWidths(Sci::Position countBasePlane_=0, Sci::Position countOtherPlanes_=0) noexcept : + CountWidths(Sci::Position countBasePlane_=0, Sci::Position countOtherPlanes_=0) noexcept : countBasePlane(countBasePlane_), countOtherPlanes(countOtherPlanes_) { } @@ -64,30 +61,27 @@ struct CountWidths { class ILineVector { public: virtual void Init() = 0; - virtual void SetPerLine(PerLine *pl) noexcept = 0; - virtual void InsertText(Sci::Line line, Sci::Position delta) noexcept = 0; + virtual void SetPerLine(PerLine *pl) = 0; + virtual void InsertText(Sci::Line line, Sci::Position delta) = 0; virtual void InsertLine(Sci::Line line, Sci::Position position, bool lineStart) = 0; - virtual void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) = 0; virtual void SetLineStart(Sci::Line line, Sci::Position position) noexcept = 0; virtual void RemoveLine(Sci::Line line) = 0; virtual Sci::Line Lines() const noexcept = 0; - virtual void AllocateLines(Sci::Line lines) = 0; virtual Sci::Line LineFromPosition(Sci::Position pos) const noexcept = 0; virtual Sci::Position LineStart(Sci::Line line) const noexcept = 0; - virtual void InsertCharacters(Sci::Line line, CountWidths delta) noexcept = 0; - virtual void SetLineCharactersWidth(Sci::Line line, CountWidths width) noexcept = 0; - virtual Scintilla::LineCharacterIndexType LineCharacterIndex() const noexcept = 0; - virtual bool AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex, Sci::Line lines) = 0; - virtual bool ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex) = 0; - virtual Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept = 0; - virtual Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept = 0; + virtual void InsertCharacters(Sci::Line line, CountWidths delta) = 0; + virtual void SetLineCharactersWidth(Sci::Line line, CountWidths width) = 0; + virtual int LineCharacterIndex() const noexcept = 0; + virtual bool AllocateLineCharacterIndex(int lineCharacterIndex, Sci::Line lines) = 0; + virtual bool ReleaseLineCharacterIndex(int lineCharacterIndex) = 0; + virtual Sci::Position IndexLineStart(Sci::Line line, int lineCharacterIndex) const noexcept = 0; + virtual Sci::Line LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const noexcept = 0; virtual ~ILineVector() {} }; } using namespace Scintilla; -using namespace Scintilla::Internal; template class LineStartIndex { @@ -104,6 +98,7 @@ class LineStartIndex { void operator=(const LineStartIndex &) = delete; void operator=(LineStartIndex &&) = delete; virtual ~LineStartIndex() { + starts.DeleteAll(); } bool Allocate(Sci::Line lines) { refCount++; @@ -129,24 +124,10 @@ class LineStartIndex { return starts.PositionFromPartition(static_cast(line) + 1) - starts.PositionFromPartition(static_cast(line)); } - void SetLineWidth(Sci::Line line, Sci::Position width) noexcept { + void SetLineWidth(Sci::Line line, Sci::Position width) { const Sci::Position widthCurrent = LineWidth(line); starts.InsertText(static_cast(line), static_cast(width - widthCurrent)); } - void AllocateLines(Sci::Line lines) { - if (lines > starts.Partitions()) { - starts.ReAllocate(lines); - } - } - void InsertLines(Sci::Line line, Sci::Line lines) { - // Insert multiple lines with each temporarily 1 character wide. - // The line widths will be fixed up by later measuring code. - const POS lineAsPos = static_cast(line); - const POS lineStart = starts.PositionFromPartition(lineAsPos - 1) + 1; - for (POS l = 0; l < static_cast(lines); l++) { - starts.InsertPartition(lineAsPos + l, lineStart + l); - } - } }; template @@ -155,24 +136,17 @@ class LineVector : public ILineVector { PerLine *perLine; LineStartIndex startsUTF16; LineStartIndex startsUTF32; - LineCharacterIndexType activeIndices; - - void SetActiveIndices() noexcept { - activeIndices = - (startsUTF32.Active() ? LineCharacterIndexType::Utf32 : LineCharacterIndexType::None) - | (startsUTF16.Active() ? LineCharacterIndexType::Utf16 : LineCharacterIndexType::None); - } - public: - LineVector() : starts(256), perLine(nullptr), activeIndices(LineCharacterIndexType::None) { - } + LineVector() : starts(256), perLine(nullptr) { + Init(); + } // Deleted so LineVector objects can not be copied. LineVector(const LineVector &) = delete; LineVector(LineVector &&) = delete; LineVector &operator=(const LineVector &) = delete; LineVector &operator=(LineVector &&) = delete; ~LineVector() override { - } + } void Init() override { starts.DeleteAll(); if (perLine) { @@ -181,48 +155,27 @@ class LineVector : public ILineVector { startsUTF32.starts.DeleteAll(); startsUTF16.starts.DeleteAll(); } - void SetPerLine(PerLine *pl) noexcept override { + void SetPerLine(PerLine *pl) override { perLine = pl; } - void InsertText(Sci::Line line, Sci::Position delta) noexcept override { + void InsertText(Sci::Line line, Sci::Position delta) override { starts.InsertText(static_cast(line), static_cast(delta)); } void InsertLine(Sci::Line line, Sci::Position position, bool lineStart) override { const POS lineAsPos = static_cast(line); starts.InsertPartition(lineAsPos, static_cast(position)); - if (activeIndices != LineCharacterIndexType::None) { - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { - startsUTF32.InsertLines(line, 1); - } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { - startsUTF16.InsertLines(line, 1); - } + if (startsUTF32.Active()) { + startsUTF32.starts.InsertPartition(lineAsPos, + static_cast(startsUTF32.starts.PositionFromPartition(lineAsPos - 1) + 1)); } - if (perLine) { - if ((line > 0) && lineStart) - line--; - perLine->InsertLine(line); - } - } - void InsertLines(Sci::Line line, const Sci::Position *positions, size_t lines, bool lineStart) override { - const POS lineAsPos = static_cast(line); - if constexpr (sizeof(Sci::Position) == sizeof(POS)) { - starts.InsertPartitions(lineAsPos, positions, lines); - } else { - starts.InsertPartitionsWithCast(lineAsPos, positions, lines); - } - if (activeIndices != LineCharacterIndexType::None) { - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { - startsUTF32.InsertLines(line, lines); - } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { - startsUTF16.InsertLines(line, lines); - } + if (startsUTF16.Active()) { + startsUTF16.starts.InsertPartition(lineAsPos, + static_cast(startsUTF16.starts.PositionFromPartition(lineAsPos - 1) + 1)); } if (perLine) { if ((line > 0) && lineStart) line--; - perLine->InsertLines(line, lines); + perLine->InsertLine(line); } } void SetLineStart(Sci::Line line, Sci::Position position) noexcept override { @@ -230,10 +183,10 @@ class LineVector : public ILineVector { } void RemoveLine(Sci::Line line) override { starts.RemovePartition(static_cast(line)); - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { + if (startsUTF32.Active()) { startsUTF32.starts.RemovePartition(static_cast(line)); } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { + if (startsUTF16.Active()) { startsUTF16.starts.RemovePartition(static_cast(line)); } if (perLine) { @@ -243,78 +196,72 @@ class LineVector : public ILineVector { Sci::Line Lines() const noexcept override { return static_cast(starts.Partitions()); } - void AllocateLines(Sci::Line lines) override { - if (lines > Lines()) { - starts.ReAllocate(lines); - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { - startsUTF32.AllocateLines(lines); - } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { - startsUTF16.AllocateLines(lines); - } - } - } Sci::Line LineFromPosition(Sci::Position pos) const noexcept override { return static_cast(starts.PartitionFromPosition(static_cast(pos))); } Sci::Position LineStart(Sci::Line line) const noexcept override { return starts.PositionFromPartition(static_cast(line)); } - void InsertCharacters(Sci::Line line, CountWidths delta) noexcept override { - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { + void InsertCharacters(Sci::Line line, CountWidths delta) override { + if (startsUTF32.Active()) { startsUTF32.starts.InsertText(static_cast(line), static_cast(delta.WidthUTF32())); } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { + if (startsUTF16.Active()) { startsUTF16.starts.InsertText(static_cast(line), static_cast(delta.WidthUTF16())); } } - void SetLineCharactersWidth(Sci::Line line, CountWidths width) noexcept override { - if (FlagSet(activeIndices, LineCharacterIndexType::Utf32)) { + void SetLineCharactersWidth(Sci::Line line, CountWidths width) override { + if (startsUTF32.Active()) { assert(startsUTF32.starts.Partitions() == starts.Partitions()); startsUTF32.SetLineWidth(line, width.WidthUTF32()); } - if (FlagSet(activeIndices, LineCharacterIndexType::Utf16)) { + if (startsUTF16.Active()) { assert(startsUTF16.starts.Partitions() == starts.Partitions()); startsUTF16.SetLineWidth(line, width.WidthUTF16()); } } - LineCharacterIndexType LineCharacterIndex() const noexcept override { - return activeIndices; + int LineCharacterIndex() const noexcept override { + int retVal = 0; + if (startsUTF32.Active()) { + retVal |= SC_LINECHARACTERINDEX_UTF32; + } + if (startsUTF16.Active()) { + retVal |= SC_LINECHARACTERINDEX_UTF16; + } + return retVal; } - bool AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex, Sci::Line lines) override { - const LineCharacterIndexType activeIndicesStart = activeIndices; - if (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf32)) { - startsUTF32.Allocate(lines); + bool AllocateLineCharacterIndex(int lineCharacterIndex, Sci::Line lines) override { + bool changed = false; + if ((lineCharacterIndex & SC_LINECHARACTERINDEX_UTF32) != 0) { + changed = startsUTF32.Allocate(lines) || changed; assert(startsUTF32.starts.Partitions() == starts.Partitions()); } - if (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf16)) { - startsUTF16.Allocate(lines); + if ((lineCharacterIndex & SC_LINECHARACTERINDEX_UTF16) != 0) { + changed = startsUTF16.Allocate(lines) || changed; assert(startsUTF16.starts.Partitions() == starts.Partitions()); } - SetActiveIndices(); - return activeIndicesStart != activeIndices; + return changed; } - bool ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) override { - const LineCharacterIndexType activeIndicesStart = activeIndices; - if (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf32)) { - startsUTF32.Release(); + bool ReleaseLineCharacterIndex(int lineCharacterIndex) override { + bool changed = false; + if ((lineCharacterIndex & SC_LINECHARACTERINDEX_UTF32) != 0) { + changed = startsUTF32.Release() || changed; } - if (FlagSet(lineCharacterIndex, LineCharacterIndexType::Utf16)) { - startsUTF16.Release(); + if ((lineCharacterIndex & SC_LINECHARACTERINDEX_UTF16) != 0) { + changed = startsUTF16.Release() || changed; } - SetActiveIndices(); - return activeIndicesStart != activeIndices; + return changed; } - Sci::Position IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept override { - if (lineCharacterIndex == LineCharacterIndexType::Utf32) { + Sci::Position IndexLineStart(Sci::Line line, int lineCharacterIndex) const noexcept override { + if (lineCharacterIndex == SC_LINECHARACTERINDEX_UTF32) { return startsUTF32.starts.PositionFromPartition(static_cast(line)); } else { return startsUTF16.starts.PositionFromPartition(static_cast(line)); } } - Sci::Line LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept override { - if (lineCharacterIndex == LineCharacterIndexType::Utf32) { + Sci::Line LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const noexcept override { + if (lineCharacterIndex == SC_LINECHARACTERINDEX_UTF32) { return static_cast(startsUTF32.starts.PartitionFromPosition(static_cast(pos))); } else { return static_cast(startsUTF16.starts.PartitionFromPosition(static_cast(pos))); @@ -322,8 +269,8 @@ class LineVector : public ILineVector { } }; -Action::Action() noexcept { - at = ActionType::start; +Action::Action() { + at = startAction; position = 0; lenData = 0; mayCoalesce = false; @@ -332,19 +279,19 @@ Action::Action() noexcept { Action::~Action() { } -void Action::Create(ActionType at_, Sci::Position position_, const char *data_, Sci::Position lenData_, bool mayCoalesce_) { +void Action::Create(actionType at_, Sci::Position position_, const char *data_, Sci::Position lenData_, bool mayCoalesce_) { data = nullptr; position = position_; at = at_; if (lenData_) { - data = std::make_unique(lenData_); + data = std::unique_ptr(new char[lenData_]); memcpy(&data[0], data_, lenData_); } lenData = lenData_; mayCoalesce = mayCoalesce_; } -void Action::Clear() noexcept { +void Action::Clear() { data = nullptr; lenData = 0; } @@ -376,7 +323,7 @@ UndoHistory::UndoHistory() { savePoint = 0; tentativePoint = -1; - actions[currentAction].Create(ActionType::start); + actions[currentAction].Create(startAction); } UndoHistory::~UndoHistory() { @@ -391,7 +338,7 @@ void UndoHistory::EnsureUndoRoom() { } } -const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, const char *data, Sci::Position lengthData, +const char *UndoHistory::AppendAction(actionType at, Sci::Position position, const char *data, Sci::Position lengthData, bool &startSequence, bool mayCoalesce) { EnsureUndoRoom(); //Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); @@ -407,7 +354,7 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con int targetAct = -1; const Action *actPrevious = &(actions[currentAction + targetAct]); // Container actions may forward the coalesce state of Scintilla Actions. - while ((actPrevious->at == ActionType::container) && actPrevious->mayCoalesce) { + while ((actPrevious->at == containerAction) && actPrevious->mayCoalesce) { targetAct--; actPrevious = &(actions[currentAction + targetAct]); } @@ -420,15 +367,15 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con currentAction++; } else if (!mayCoalesce || !actPrevious->mayCoalesce) { currentAction++; - } else if (at == ActionType::container || actions[currentAction].at == ActionType::container) { + } else if (at == containerAction || actions[currentAction].at == containerAction) { ; // A coalescible containerAction - } else if ((at != actPrevious->at) && (actPrevious->at != ActionType::start)) { + } else if ((at != actPrevious->at) && (actPrevious->at != startAction)) { currentAction++; - } else if ((at == ActionType::insert) && + } else if ((at == insertAction) && (position != (actPrevious->position + actPrevious->lenData))) { // Insertions must be immediately after to coalesce currentAction++; - } else if (at == ActionType::remove) { + } else if (at == removeAction) { if ((lengthData == 1) || (lengthData == 2)) { if ((position + lengthData) == actPrevious->position) { ; // Backspace -> OK @@ -458,7 +405,7 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con const int actionWithData = currentAction; actions[currentAction].Create(at, position, data, lengthData, mayCoalesce); currentAction++; - actions[currentAction].Create(ActionType::start); + actions[currentAction].Create(startAction); maxAction = currentAction; return actions[actionWithData].data.get(); } @@ -466,9 +413,9 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con void UndoHistory::BeginUndoAction() { EnsureUndoRoom(); if (undoSequenceDepth == 0) { - if (actions[currentAction].at != ActionType::start) { + if (actions[currentAction].at != startAction) { currentAction++; - actions[currentAction].Create(ActionType::start); + actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; @@ -481,9 +428,9 @@ void UndoHistory::EndUndoAction() { EnsureUndoRoom(); undoSequenceDepth--; if (0 == undoSequenceDepth) { - if (actions[currentAction].at != ActionType::start) { + if (actions[currentAction].at != startAction) { currentAction++; - actions[currentAction].Create(ActionType::start); + actions[currentAction].Create(startAction); maxAction = currentAction; } actions[currentAction].mayCoalesce = false; @@ -499,16 +446,16 @@ void UndoHistory::DeleteUndoHistory() { actions[i].Clear(); maxAction = 0; currentAction = 0; - actions[currentAction].Create(ActionType::start); + actions[currentAction].Create(startAction); savePoint = 0; tentativePoint = -1; } -void UndoHistory::SetSavePoint() noexcept { +void UndoHistory::SetSavePoint() { savePoint = currentAction; } -bool UndoHistory::IsSavePoint() const noexcept { +bool UndoHistory::IsSavePoint() const { return savePoint == currentAction; } @@ -522,13 +469,9 @@ void UndoHistory::TentativeCommit() { maxAction = currentAction; } -bool UndoHistory::TentativeActive() const noexcept { - return tentativePoint >= 0; -} - -int UndoHistory::TentativeSteps() noexcept { +int UndoHistory::TentativeSteps() { // Drop any trailing startAction - if (actions[currentAction].at == ActionType::start && currentAction > 0) + if (actions[currentAction].at == startAction && currentAction > 0) currentAction--; if (tentativePoint >= 0) return currentAction - tentativePoint; @@ -536,18 +479,18 @@ int UndoHistory::TentativeSteps() noexcept { return -1; } -bool UndoHistory::CanUndo() const noexcept { +bool UndoHistory::CanUndo() const { return (currentAction > 0) && (maxAction > 0); } int UndoHistory::StartUndo() { // Drop any trailing startAction - if (actions[currentAction].at == ActionType::start && currentAction > 0) + if (actions[currentAction].at == startAction && currentAction > 0) currentAction--; // Count the steps in this action int act = currentAction; - while (actions[act].at != ActionType::start && act > 0) { + while (actions[act].at != startAction && act > 0) { act--; } return currentAction - act; @@ -561,18 +504,18 @@ void UndoHistory::CompletedUndoStep() { currentAction--; } -bool UndoHistory::CanRedo() const noexcept { +bool UndoHistory::CanRedo() const { return maxAction > currentAction; } int UndoHistory::StartRedo() { // Drop any leading startAction - if (currentAction < maxAction && actions[currentAction].at == ActionType::start) + if (currentAction < maxAction && actions[currentAction].at == startAction) currentAction++; // Count the steps in this action int act = currentAction; - while (act < maxAction && actions[act].at != ActionType::start) { + while (act < maxAction && actions[act].at != startAction) { act++; } return act - currentAction; @@ -590,12 +533,12 @@ CellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) : hasStyles(hasStyles_), largeDocument(largeDocument_) { readOnly = false; utf8Substance = false; - utf8LineEnds = LineEndType::Default; + utf8LineEnds = 0; collectingUndo = true; if (largeDocument) - plv = std::make_unique>(); + plv = std::unique_ptr>(new LineVector()); else - plv = std::make_unique>(); + plv = std::unique_ptr>(new LineVector()); } CellBuffer::~CellBuffer() { @@ -615,10 +558,8 @@ void CellBuffer::GetCharRange(char *buffer, Sci::Position position, Sci::Positio if (position < 0) return; if ((position + lengthRetrieve) > substance.Length()) { - Platform::DebugPrintf("Bad GetCharRange %.0f for %.0f of %.0f\n", - static_cast(position), - static_cast(lengthRetrieve), - static_cast(substance.Length())); + Platform::DebugPrintf("Bad GetCharRange %d for %d of %d\n", position, + lengthRetrieve, substance.Length()); return; } substance.GetRange(buffer, position, lengthRetrieve); @@ -638,10 +579,8 @@ void CellBuffer::GetStyleRange(unsigned char *buffer, Sci::Position position, Sc return; } if ((position + lengthRetrieve) > style.Length()) { - Platform::DebugPrintf("Bad GetStyleRange %.0f for %.0f of %.0f\n", - static_cast(position), - static_cast(lengthRetrieve), - static_cast(style.Length())); + Platform::DebugPrintf("Bad GetStyleRange %d for %d of %d\n", position, + lengthRetrieve, style.Length()); return; } style.GetRange(reinterpret_cast(buffer), position, lengthRetrieve); @@ -651,29 +590,14 @@ const char *CellBuffer::BufferPointer() { return substance.BufferPointer(); } -const char *CellBuffer::RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept { +const char *CellBuffer::RangePointer(Sci::Position position, Sci::Position rangeLength) { return substance.RangePointer(position, rangeLength); } -Sci::Position CellBuffer::GapPosition() const noexcept { +Sci::Position CellBuffer::GapPosition() const { return substance.GapPosition(); } -SplitView CellBuffer::AllView() const noexcept { - const size_t length = substance.Length(); - size_t length1 = substance.GapPosition(); - if (length1 == 0) { - // Assign segment2 to segment1 / length1 to avoid useless test against 0 length1 - length1 = length; - } - return SplitView { - substance.ElementPointer(0), - length1, - substance.ElementPointer(length1) - length1, - length - }; -} - // The char* returned is to an allocation owned by the undo history const char *CellBuffer::InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence) { // InsertString and DeleteChars are the bottleneck though which all changes occur @@ -682,7 +606,7 @@ const char *CellBuffer::InsertString(Sci::Position position, const char *s, Sci: if (collectingUndo) { // Save into the undo/redo stack, but only the characters - not the formatting // This takes up about half load time - data = uh.AppendAction(ActionType::insert, position, s, insertLength, startSequence); + data = uh.AppendAction(insertAction, position, s, insertLength, startSequence); } BasicInsertString(position, s, insertLength); @@ -690,7 +614,7 @@ const char *CellBuffer::InsertString(Sci::Position position, const char *s, Sci: return data; } -bool CellBuffer::SetStyleAt(Sci::Position position, char styleValue) noexcept { +bool CellBuffer::SetStyleAt(Sci::Position position, char styleValue) { if (!hasStyles) { return false; } @@ -703,7 +627,7 @@ bool CellBuffer::SetStyleAt(Sci::Position position, char styleValue) noexcept { } } -bool CellBuffer::SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue) noexcept { +bool CellBuffer::SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue) { if (!hasStyles) { return false; } @@ -731,7 +655,7 @@ const char *CellBuffer::DeleteChars(Sci::Position position, Sci::Position delete // Save into the undo/redo stack, but only the characters - not the formatting // The gap would be moved to position anyway for the deletion so this doesn't cost extra data = substance.RangePointer(position, deleteLength); - data = uh.AppendAction(ActionType::remove, position, data, deleteLength, startSequence); + data = uh.AppendAction(removeAction, position, data, deleteLength, startSequence); } BasicDeleteChars(position, deleteLength); @@ -750,28 +674,32 @@ void CellBuffer::Allocate(Sci::Position newSize) { } } -void CellBuffer::SetUTF8Substance(bool utf8Substance_) noexcept { - utf8Substance = utf8Substance_; +void CellBuffer::SetUTF8Substance(bool utf8Substance_) { + if (utf8Substance != utf8Substance_) { + utf8Substance = utf8Substance_; + ResetLineEnds(); + } } -void CellBuffer::SetLineEndTypes(LineEndType utf8LineEnds_) { +void CellBuffer::SetLineEndTypes(int utf8LineEnds_) { if (utf8LineEnds != utf8LineEnds_) { - const LineCharacterIndexType indexes = plv->LineCharacterIndex(); + const int indexes = plv->LineCharacterIndex(); utf8LineEnds = utf8LineEnds_; ResetLineEnds(); AllocateLineCharacterIndex(indexes); } } -bool CellBuffer::ContainsLineEnd(const char *s, Sci::Position length) const noexcept { +bool CellBuffer::ContainsLineEnd(const char *s, Sci::Position length) const { unsigned char chBeforePrev = 0; unsigned char chPrev = 0; for (Sci::Position i = 0; i < length; i++) { const unsigned char ch = s[i]; if ((ch == '\r') || (ch == '\n')) { return true; - } else if (utf8LineEnds == LineEndType::Unicode) { - if (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) { + } else if (utf8LineEnds) { + const unsigned char back3[3] = { chBeforePrev, chPrev, ch }; + if (UTF8IsSeparator(back3) || UTF8IsNEL(back3 + 1)) { return true; } } @@ -781,15 +709,15 @@ bool CellBuffer::ContainsLineEnd(const char *s, Sci::Position length) const noex return false; } -void CellBuffer::SetPerLine(PerLine *pl) noexcept { +void CellBuffer::SetPerLine(PerLine *pl) { plv->SetPerLine(pl); } -LineCharacterIndexType CellBuffer::LineCharacterIndex() const noexcept { +int CellBuffer::LineCharacterIndex() const noexcept { return plv->LineCharacterIndex(); } -void CellBuffer::AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) { +void CellBuffer::AllocateLineCharacterIndex(int lineCharacterIndex) { if (utf8Substance) { if (plv->AllocateLineCharacterIndex(lineCharacterIndex, Lines())) { // Changed so recalculate whole file @@ -798,7 +726,7 @@ void CellBuffer::AllocateLineCharacterIndex(LineCharacterIndexType lineCharacter } } -void CellBuffer::ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) { +void CellBuffer::ReleaseLineCharacterIndex(int lineCharacterIndex) { plv->ReleaseLineCharacterIndex(lineCharacterIndex); } @@ -806,10 +734,6 @@ Sci::Line CellBuffer::Lines() const noexcept { return plv->Lines(); } -void CellBuffer::AllocateLines(Sci::Line lines) { - plv->AllocateLines(lines); -} - Sci::Position CellBuffer::LineStart(Sci::Line line) const noexcept { if (line < 0) return 0; @@ -823,27 +747,27 @@ Sci::Line CellBuffer::LineFromPosition(Sci::Position pos) const noexcept { return plv->LineFromPosition(pos); } -Sci::Position CellBuffer::IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept { +Sci::Position CellBuffer::IndexLineStart(Sci::Line line, int lineCharacterIndex) const noexcept { return plv->IndexLineStart(line, lineCharacterIndex); } -Sci::Line CellBuffer::LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept { +Sci::Line CellBuffer::LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const noexcept { return plv->LineFromPositionIndex(pos, lineCharacterIndex); } -bool CellBuffer::IsReadOnly() const noexcept { +bool CellBuffer::IsReadOnly() const { return readOnly; } -void CellBuffer::SetReadOnly(bool set) noexcept { +void CellBuffer::SetReadOnly(bool set) { readOnly = set; } -bool CellBuffer::IsLarge() const noexcept { +bool CellBuffer::IsLarge() const { return largeDocument; } -bool CellBuffer::HasStyles() const noexcept { +bool CellBuffer::HasStyles() const { return hasStyles; } @@ -851,7 +775,7 @@ void CellBuffer::SetSavePoint() { uh.SetSavePoint(); } -bool CellBuffer::IsSavePoint() const noexcept { +bool CellBuffer::IsSavePoint() const { return uh.IsSavePoint(); } @@ -863,11 +787,11 @@ void CellBuffer::TentativeCommit() { uh.TentativeCommit(); } -int CellBuffer::TentativeSteps() noexcept { +int CellBuffer::TentativeSteps() { return uh.TentativeSteps(); } -bool CellBuffer::TentativeActive() const noexcept { +bool CellBuffer::TentativeActive() const { return uh.TentativeActive(); } @@ -881,7 +805,7 @@ void CellBuffer::RemoveLine(Sci::Line line) { plv->RemoveLine(line); } -bool CellBuffer::UTF8LineEndOverlaps(Sci::Position position) const noexcept { +bool CellBuffer::UTF8LineEndOverlaps(Sci::Position position) const { const unsigned char bytes[] = { static_cast(substance.ValueAt(position-2)), static_cast(substance.ValueAt(position-1)), @@ -904,7 +828,7 @@ bool CellBuffer::UTF8IsCharacterBoundary(Sci::Position position) const { if (!UTF8IsTrailByte(back.front())) { if (i > 0) { // Have reached a non-trail - const int cla = UTF8Classify(back); + const int cla = UTF8Classify(reinterpret_cast(back.data()), back.size()); if ((cla & UTF8MaskInvalid) || (cla != i)) { return false; } @@ -924,15 +848,13 @@ bool CellBuffer::UTF8IsCharacterBoundary(Sci::Position position) const { void CellBuffer::ResetLineEnds() { // Reinitialize line data -- too much work to preserve - const Sci::Line lines = plv->Lines(); plv->Init(); - plv->AllocateLines(lines); - constexpr Sci::Position position = 0; + const Sci::Position position = 0; const Sci::Position length = Length(); - plv->InsertText(0, length); Sci::Line lineInsert = 1; - constexpr bool atLineStart = true; + const bool atLineStart = true; + plv->InsertText(lineInsert-1, length); unsigned char chBeforePrev = 0; unsigned char chPrev = 0; for (Sci::Position i = 0; i < length; i++) { @@ -948,8 +870,9 @@ void CellBuffer::ResetLineEnds() { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } - } else if (utf8LineEnds == LineEndType::Unicode) { - if (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) { + } else if (utf8LineEnds) { + const unsigned char back3[3] = {chBeforePrev, chPrev, ch}; + if (UTF8IsSeparator(back3) || UTF8IsNEL(back3+1)) { InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } @@ -961,14 +884,14 @@ void CellBuffer::ResetLineEnds() { namespace { -CountWidths CountCharacterWidthsUTF8(std::string_view sv) noexcept { +CountWidths CountCharacterWidthsUTF8(const char *s, size_t len) noexcept { CountWidths cw; - size_t remaining = sv.length(); + size_t remaining = len; while (remaining > 0) { - const int utf8Status = UTF8Classify(sv); + const int utf8Status = UTF8Classify(reinterpret_cast(s), len); const int lenChar = utf8Status & UTF8MaskWidth; cw.CountChar(lenChar); - sv.remove_prefix(lenChar); + s += lenChar; remaining -= lenChar; } return cw; @@ -977,7 +900,7 @@ CountWidths CountCharacterWidthsUTF8(std::string_view sv) noexcept { } bool CellBuffer::MaintainingLineCharacterIndex() const noexcept { - return plv->LineCharacterIndex() != LineCharacterIndexType::None; + return plv->LineCharacterIndex() != SC_LINECHARACTERINDEX_NONE; } void CellBuffer::RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineLast) { @@ -989,8 +912,8 @@ void CellBuffer::RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineL posLineEnd = LineStart(line+1); const Sci::Position width = posLineEnd - posLineStart; text.resize(width); - GetCharRange(text.data(), posLineStart, width); - const CountWidths cw = CountCharacterWidthsUTF8(text); + GetCharRange(const_cast(text.data()), posLineStart, width); + const CountWidths cw = CountCharacterWidthsUTF8(text.data(), text.size()); plv->SetLineCharactersWidth(line, cw); } } @@ -1002,7 +925,7 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P const unsigned char chAfter = substance.ValueAt(position); bool breakingUTF8LineEnd = false; - if (utf8LineEnds == LineEndType::Unicode && UTF8IsTrailByte(chAfter)) { + if (utf8LineEnds && UTF8IsTrailByte(chAfter)) { breakingUTF8LineEnd = UTF8LineEndOverlaps(position); } @@ -1019,7 +942,7 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P // Actually, don't need to check that whole insertion is valid just that there // are no potential fragments at ends. simpleInsertion = UTF8IsCharacterBoundary(position) && - UTF8IsValid(std::string_view(s, insertLength)); + UTF8IsValid(s, insertLength); } substance.InsertFromArray(position, s, 0, insertLength); @@ -1040,96 +963,33 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P if (breakingUTF8LineEnd) { RemoveLine(lineInsert); } - - constexpr size_t PositionBlockSize = 128; - Sci::Position positions[PositionBlockSize]{}; - size_t nPositions = 0; - const Sci::Line lineStart = lineInsert; - - // s may not NULL-terminated, ensure *ptr == '\n' or *next == '\n' is valid. - const char * const end = s + insertLength - 1; - const char *ptr = s; - unsigned char ch = 0; - - if (chPrev == '\r' && *ptr == '\n') { - ++ptr; - // Patch up what was end of line - plv->SetLineStart(lineInsert - 1, (position + ptr - s)); - simpleInsertion = false; - } - - if (ptr < end) { - uint8_t eolTable[256]{}; - eolTable[static_cast('\n')] = 1; - eolTable[static_cast('\r')] = 2; - if (utf8LineEnds == LineEndType::Unicode) { - // see UniConversion.h for LS, PS and NEL - eolTable[0x85] = 4; - eolTable[0xa8] = 3; - eolTable[0xa9] = 3; - } - - do { - // skip to line end - ch = *ptr++; - uint8_t type; - while ((type = eolTable[ch]) == 0 && ptr < end) { - chBeforePrev = chPrev; - chPrev = ch; - ch = *ptr++; - } - switch (type) { - case 2: // '\r' - if (*ptr == '\n') { - ++ptr; - } - [[fallthrough]]; - case 1: // '\n' - positions[nPositions++] = position + ptr - s; - if (nPositions == PositionBlockSize) { - plv->InsertLines(lineInsert, positions, nPositions, atLineStart); - lineInsert += nPositions; - nPositions = 0; - } - break; - case 3: - case 4: - // LS, PS and NEL - if ((type == 3 && chPrev == 0x80 && chBeforePrev == 0xe2) || (type == 4 && chPrev == 0xc2)) { - positions[nPositions++] = position + ptr - s; - if (nPositions == PositionBlockSize) { - plv->InsertLines(lineInsert, positions, nPositions, atLineStart); - lineInsert += nPositions; - nPositions = 0; - } - } - break; - } - - chBeforePrev = chPrev; - chPrev = ch; - } while (ptr < end); - } - - if (nPositions != 0) { - plv->InsertLines(lineInsert, positions, nPositions, atLineStart); - lineInsert += nPositions; - } - - ch = *end; - if (ptr == end) { - ++ptr; - if (ch == '\r' || ch == '\n') { - InsertLine(lineInsert, (position + ptr - s), atLineStart); + unsigned char ch = ' '; + for (Sci::Position i = 0; i < insertLength; i++) { + ch = s[i]; + if (ch == '\r') { + InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; - } else if (utf8LineEnds == LineEndType::Unicode && !UTF8IsAscii(ch)) { - if (UTF8IsMultibyteLineEnd(chBeforePrev, chPrev, ch)) { - InsertLine(lineInsert, (position + ptr - s), atLineStart); + simpleInsertion = false; + } else if (ch == '\n') { + if (chPrev == '\r') { + // Patch up what was end of line + plv->SetLineStart(lineInsert - 1, (position + i) + 1); + } else { + InsertLine(lineInsert, (position + i) + 1, atLineStart); lineInsert++; } + simpleInsertion = false; + } else if (utf8LineEnds) { + const unsigned char back3[3] = {chBeforePrev, chPrev, ch}; + if (UTF8IsSeparator(back3) || UTF8IsNEL(back3+1)) { + InsertLine(lineInsert, (position + i) + 1, atLineStart); + lineInsert++; + simpleInsertion = false; + } } + chBeforePrev = chPrev; + chPrev = ch; } - // Joining two lines where last insertion is cr and following substance starts with lf if (chAfter == '\n') { if (ch == '\r') { @@ -1137,9 +997,7 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P RemoveLine(lineInsert - 1); simpleInsertion = false; } - } else if (utf8LineEnds == LineEndType::Unicode && !UTF8IsAscii(chAfter)) { - chBeforePrev = chPrev; - chPrev = ch; + } else if (utf8LineEnds && !UTF8IsAscii(chAfter)) { // May have end of UTF-8 line end in buffer and start in insertion for (int j = 0; j < UTF8SeparatorLength-1; j++) { const unsigned char chAt = substance.ValueAt(position + insertLength + j); @@ -1147,18 +1005,20 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P if (UTF8IsSeparator(back3)) { InsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart); lineInsert++; + simpleInsertion = false; } if ((j == 0) && UTF8IsNEL(back3+1)) { InsertLine(lineInsert, (position + insertLength + j) + 1, atLineStart); lineInsert++; + simpleInsertion = false; } chBeforePrev = chPrev; chPrev = chAt; } } if (maintainingIndex) { - if (simpleInsertion && (lineInsert == lineStart)) { - const CountWidths cw = CountCharacterWidthsUTF8(std::string_view(s, insertLength)); + if (simpleInsertion) { + const CountWidths cw = CountCharacterWidthsUTF8(s, insertLength); plv->InsertCharacters(linePosition, cw); } else { RecalculateIndexLineStarts(linePosition, lineInsert - 1); @@ -1170,7 +1030,7 @@ void CellBuffer::BasicDeleteChars(Sci::Position position, Sci::Position deleteLe if (deleteLength == 0) return; - Sci::Line lineRecalculateStart = Sci::invalidPosition; + Sci::Line lineRecalculateStart = INVALID_POSITION; if ((position == 0) && (deleteLength == substance.Length())) { // If whole buffer is being deleted, faster to reinitialise lines data @@ -1198,10 +1058,10 @@ void CellBuffer::BasicDeleteChars(Sci::Position position, Sci::Position deleteLe UTF8IsCharacterBoundary(position) && UTF8IsCharacterBoundary(posEnd); if (simpleDeletion) { std::string text(deleteLength, '\0'); - GetCharRange(text.data(), position, deleteLength); - if (UTF8IsValid(text)) { + GetCharRange(const_cast(text.data()), position, deleteLength); + if (UTF8IsValid(text.data(), text.size())) { // Everything is good - const CountWidths cw = CountCharacterWidthsUTF8(text); + const CountWidths cw = CountCharacterWidthsUTF8(text.data(), text.size()); plv->InsertCharacters(linePosition, -cw); } else { lineRecalculateStart = linePosition; @@ -1218,7 +1078,7 @@ void CellBuffer::BasicDeleteChars(Sci::Position position, Sci::Position deleteLe lineRemove++; ignoreNL = true; // First \n is not real deletion } - if (utf8LineEnds == LineEndType::Unicode && UTF8IsTrailByte(chNext)) { + if (utf8LineEnds && UTF8IsTrailByte(chNext)) { if (UTF8LineEndOverlaps(position)) { RemoveLine(lineRemove); } @@ -1237,7 +1097,7 @@ void CellBuffer::BasicDeleteChars(Sci::Position position, Sci::Position deleteLe } else { RemoveLine(lineRemove); } - } else if (utf8LineEnds == LineEndType::Unicode) { + } else if (utf8LineEnds) { if (!UTF8IsAscii(ch)) { const unsigned char next3[3] = {ch, chNext, static_cast(substance.ValueAt(position + i + 2))}; @@ -1273,7 +1133,7 @@ bool CellBuffer::SetUndoCollection(bool collectUndo) { return collectingUndo; } -bool CellBuffer::IsCollectingUndo() const noexcept { +bool CellBuffer::IsCollectingUndo() const { return collectingUndo; } @@ -1286,15 +1146,15 @@ void CellBuffer::EndUndoAction() { } void CellBuffer::AddUndoAction(Sci::Position token, bool mayCoalesce) { - bool startSequence = false; - uh.AppendAction(ActionType::container, token, nullptr, 0, startSequence, mayCoalesce); + bool startSequence; + uh.AppendAction(containerAction, token, nullptr, 0, startSequence, mayCoalesce); } void CellBuffer::DeleteUndoHistory() { uh.DeleteUndoHistory(); } -bool CellBuffer::CanUndo() const noexcept { +bool CellBuffer::CanUndo() const { return uh.CanUndo(); } @@ -1308,19 +1168,19 @@ const Action &CellBuffer::GetUndoStep() const { void CellBuffer::PerformUndoStep() { const Action &actionStep = uh.GetUndoStep(); - if (actionStep.at == ActionType::insert) { + if (actionStep.at == insertAction) { if (substance.Length() < actionStep.lenData) { throw std::runtime_error( "CellBuffer::PerformUndoStep: deletion must be less than document length."); } BasicDeleteChars(actionStep.position, actionStep.lenData); - } else if (actionStep.at == ActionType::remove) { + } else if (actionStep.at == removeAction) { BasicInsertString(actionStep.position, actionStep.data.get(), actionStep.lenData); } uh.CompletedUndoStep(); } -bool CellBuffer::CanRedo() const noexcept { +bool CellBuffer::CanRedo() const { return uh.CanRedo(); } @@ -1334,9 +1194,9 @@ const Action &CellBuffer::GetRedoStep() const { void CellBuffer::PerformRedoStep() { const Action &actionStep = uh.GetRedoStep(); - if (actionStep.at == ActionType::insert) { + if (actionStep.at == insertAction) { BasicInsertString(actionStep.position, actionStep.data.get(), actionStep.lenData); - } else if (actionStep.at == ActionType::remove) { + } else if (actionStep.at == removeAction) { BasicDeleteChars(actionStep.position, actionStep.lenData); } uh.CompletedRedoStep(); diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.h b/3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.h similarity index 69% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.h index d8914d7ba..7d5682260 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CellBuffer.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CellBuffer.h @@ -8,7 +8,7 @@ #ifndef CELLBUFFER_H #define CELLBUFFER_H -namespace Scintilla::Internal { +namespace Scintilla { // Interface to per-line data that wants to see each line insertion and deletion class PerLine { @@ -16,7 +16,6 @@ class PerLine { virtual ~PerLine() {} virtual void Init()=0; virtual void InsertLine(Sci::Line line)=0; - virtual void InsertLines(Sci::Line line, Sci::Line lines) = 0; virtual void RemoveLine(Sci::Line line)=0; }; @@ -25,20 +24,20 @@ class PerLine { */ class ILineVector; -enum class ActionType { insert, remove, start, container }; +enum actionType { insertAction, removeAction, startAction, containerAction }; /** * Actions are used to store all the information required to perform one undo/redo step. */ class Action { public: - ActionType at; + actionType at; Sci::Position position; std::unique_ptr data; Sci::Position lenData; bool mayCoalesce; - Action() noexcept; + Action(); // Deleted so Action objects can not be copied. Action(const Action &other) = delete; Action &operator=(const Action &other) = delete; @@ -46,8 +45,8 @@ class Action { // Move constructor allows vector to be resized without reallocating. Action(Action &&other) noexcept = default; ~Action(); - void Create(ActionType at_, Sci::Position position_=0, const char *data_=nullptr, Sci::Position lenData_=0, bool mayCoalesce_=true); - void Clear() noexcept; + void Create(actionType at_, Sci::Position position_=0, const char *data_=nullptr, Sci::Position lenData_=0, bool mayCoalesce_=true); + void Clear(); }; /** @@ -72,7 +71,7 @@ class UndoHistory { void operator=(UndoHistory &&) = delete; ~UndoHistory(); - const char *AppendAction(ActionType at, Sci::Position position, const char *data, Sci::Position lengthData, bool &startSequence, bool mayCoalesce=true); + const char *AppendAction(actionType at, Sci::Position position, const char *data, Sci::Position lengthData, bool &startSequence, bool mayCoalesce=true); void BeginUndoAction(); void EndUndoAction(); @@ -81,53 +80,27 @@ class UndoHistory { /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. - void SetSavePoint() noexcept; - bool IsSavePoint() const noexcept; + void SetSavePoint(); + bool IsSavePoint() const; // Tentative actions are used for input composition so that it can be undone cleanly void TentativeStart(); void TentativeCommit(); - bool TentativeActive() const noexcept; - int TentativeSteps() noexcept; + bool TentativeActive() const noexcept { return tentativePoint >= 0; } + int TentativeSteps(); /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. - bool CanUndo() const noexcept; + bool CanUndo() const; int StartUndo(); const Action &GetUndoStep() const; void CompletedUndoStep(); - bool CanRedo() const noexcept; + bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void CompletedRedoStep(); }; -struct SplitView { - const char *segment1 = nullptr; - size_t length1 = 0; - const char *segment2 = nullptr; - size_t length = 0; - - bool operator==(const SplitView &other) const noexcept { - return segment1 == other.segment1 && length1 == other.length1 && - segment2 == other.segment2 && length == other.length; - } - bool operator!=(const SplitView &other) const noexcept { - return !(*this == other); - } - - char CharAt(size_t position) const noexcept { - if (position < length1) { - return segment1[position]; - } - if (position < length) { - return segment2[position]; - } - return 0; - } -}; - - /** * Holder for an expandable array of characters that supports undo and line markers. * Based on article "Data Structures in a Bit-Mapped Text Editor" @@ -141,14 +114,14 @@ class CellBuffer { SplitVector style; bool readOnly; bool utf8Substance; - Scintilla::LineEndType utf8LineEnds; + int utf8LineEnds; bool collectingUndo; UndoHistory uh; std::unique_ptr plv; - bool UTF8LineEndOverlaps(Sci::Position position) const noexcept; + bool UTF8LineEndOverlaps(Sci::Position position) const; bool UTF8IsCharacterBoundary(Sci::Position position) const; void ResetLineEnds(); void RecalculateIndexLineStarts(Sci::Line lineFirst, Sci::Line lineLast); @@ -174,54 +147,52 @@ class CellBuffer { char StyleAt(Sci::Position position) const noexcept; void GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const; const char *BufferPointer(); - const char *RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept; - Sci::Position GapPosition() const noexcept; - SplitView AllView() const noexcept; + const char *RangePointer(Sci::Position position, Sci::Position rangeLength); + Sci::Position GapPosition() const; Sci::Position Length() const noexcept; void Allocate(Sci::Position newSize); - void SetUTF8Substance(bool utf8Substance_) noexcept; - Scintilla::LineEndType GetLineEndTypes() const noexcept { return utf8LineEnds; } - void SetLineEndTypes(Scintilla::LineEndType utf8LineEnds_); - bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept; - void SetPerLine(PerLine *pl) noexcept; - Scintilla::LineCharacterIndexType LineCharacterIndex() const noexcept; - void AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); - void ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); + void SetUTF8Substance(bool utf8Substance_); + int GetLineEndTypes() const { return utf8LineEnds; } + void SetLineEndTypes(int utf8LineEnds_); + bool ContainsLineEnd(const char *s, Sci::Position length) const; + void SetPerLine(PerLine *pl); + int LineCharacterIndex() const noexcept; + void AllocateLineCharacterIndex(int lineCharacterIndex); + void ReleaseLineCharacterIndex(int lineCharacterIndex); Sci::Line Lines() const noexcept; - void AllocateLines(Sci::Line lines); Sci::Position LineStart(Sci::Line line) const noexcept; - Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; + Sci::Position IndexLineStart(Sci::Line line, int lineCharacterIndex) const noexcept; Sci::Line LineFromPosition(Sci::Position pos) const noexcept; - Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; + Sci::Line LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const noexcept; void InsertLine(Sci::Line line, Sci::Position position, bool lineStart); void RemoveLine(Sci::Line line); const char *InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence); /// Setting styles for positions outside the range of the buffer is safe and has no effect. /// @return true if the style of a character is changed. - bool SetStyleAt(Sci::Position position, char styleValue) noexcept; - bool SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue) noexcept; + bool SetStyleAt(Sci::Position position, char styleValue); + bool SetStyleFor(Sci::Position position, Sci::Position lengthStyle, char styleValue); const char *DeleteChars(Sci::Position position, Sci::Position deleteLength, bool &startSequence); - bool IsReadOnly() const noexcept; - void SetReadOnly(bool set) noexcept; - bool IsLarge() const noexcept; - bool HasStyles() const noexcept; + bool IsReadOnly() const; + void SetReadOnly(bool set); + bool IsLarge() const; + bool HasStyles() const; /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); - bool IsSavePoint() const noexcept; + bool IsSavePoint() const; void TentativeStart(); void TentativeCommit(); - bool TentativeActive() const noexcept; - int TentativeSteps() noexcept; + bool TentativeActive() const; + int TentativeSteps(); bool SetUndoCollection(bool collectUndo); - bool IsCollectingUndo() const noexcept; + bool IsCollectingUndo() const; void BeginUndoAction(); void EndUndoAction(); void AddUndoAction(Sci::Position token, bool mayCoalesce); @@ -229,11 +200,11 @@ class CellBuffer { /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. - bool CanUndo() const noexcept; + bool CanUndo() const; int StartUndo(); const Action &GetUndoStep() const; void PerformUndoStep(); - bool CanRedo() const noexcept; + bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void PerformRedoStep(); diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/CharClassify.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.cpp similarity index 58% rename from 3rdparty/unioncode-scintilla515/scintilla/src/CharClassify.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.cpp index b5eb33700..ba8433e62 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/CharClassify.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.cpp @@ -6,14 +6,13 @@ // The License.txt file describes the conditions under which this software may be distributed. #include -#include +#include #include -#include "CharacterType.h" #include "CharClassify.h" -using namespace Scintilla::Internal; +using namespace Scintilla; CharClassify::CharClassify() : charClass{} { SetDefaultCharClasses(true); @@ -21,29 +20,29 @@ CharClassify::CharClassify() : charClass{} { void CharClassify::SetDefaultCharClasses(bool includeWordClass) { // Initialize all char classes to default values - for (int ch = 0; ch < maxChar; ch++) { + for (int ch = 0; ch < 256; ch++) { if (ch == '\r' || ch == '\n') - charClass[ch] = CharacterClass::newLine; - else if (IsControl(ch) || ch == ' ') - charClass[ch] = CharacterClass::space; - else if (includeWordClass && (ch >= 0x80 || IsAlphaNumeric(ch) || ch == '_')) - charClass[ch] = CharacterClass::word; + charClass[ch] = ccNewLine; + else if (ch < 0x20 || ch == ' ') + charClass[ch] = ccSpace; + else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) + charClass[ch] = ccWord; else - charClass[ch] = CharacterClass::punctuation; + charClass[ch] = ccPunctuation; } } -void CharClassify::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) { - // Apply the newCharClass to the specified chars +void CharClassify::SetCharClasses(const unsigned char *chars, cc newCharClass) { + // Apply the newCharClass to the specifed chars if (chars) { while (*chars) { - charClass[*chars] = newCharClass; + charClass[*chars] = static_cast(newCharClass); chars++; } } } -int CharClassify::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const noexcept { +int CharClassify::GetCharsOfClass(cc characterClass, unsigned char *buffer) const { // Get characters belonging to the given char class; return the number // of characters (if the buffer is NULL, don't write to it). int count = 0; diff --git a/3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.h b/3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.h new file mode 100644 index 000000000..c1ca3c120 --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/CharClassify.h @@ -0,0 +1,31 @@ +// Scintilla source code edit control +/** @file CharClassify.h + ** Character classifications used by Document and RESearch. + **/ +// Copyright 2006-2009 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef CHARCLASSIFY_H +#define CHARCLASSIFY_H + +namespace Scintilla { + +class CharClassify { +public: + CharClassify(); + + enum cc { ccSpace, ccNewLine, ccWord, ccPunctuation }; + void SetDefaultCharClasses(bool includeWordClass); + void SetCharClasses(const unsigned char *chars, cc newCharClass); + int GetCharsOfClass(cc characterClass, unsigned char *buffer) const; + cc GetClass(unsigned char ch) const { return static_cast(charClass[ch]);} + bool IsWord(unsigned char ch) const { return static_cast(charClass[ch]) == ccWord;} + +private: + enum { maxChar=256 }; + unsigned char charClass[maxChar]; // not type cc to save space +}; + +} + +#endif diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.cpp similarity index 80% rename from 3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.cpp index 8b4babb2e..5937be6fc 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.cpp @@ -10,13 +10,11 @@ #include #include -#include #include -#include #include #include -#include "Debugging.h" +#include "Platform.h" #include "Position.h" #include "UniqueString.h" @@ -26,7 +24,7 @@ #include "SparseVector.h" #include "ContractionState.h" -using namespace Scintilla::Internal; +using namespace Scintilla; namespace { @@ -62,32 +60,33 @@ class ContractionState final : public IContractionState { void Clear() noexcept override; - Sci::Line LinesInDoc() const noexcept override; - Sci::Line LinesDisplayed() const noexcept override; - Sci::Line DisplayFromDoc(Sci::Line lineDoc) const noexcept override; - Sci::Line DisplayLastFromDoc(Sci::Line lineDoc) const noexcept override; - Sci::Line DocFromDisplay(Sci::Line lineDisplay) const noexcept override; + Sci::Line LinesInDoc() const override; + Sci::Line LinesDisplayed() const override; + Sci::Line DisplayFromDoc(Sci::Line lineDoc) const override; + Sci::Line DisplayLastFromDoc(Sci::Line lineDoc) const override; + Sci::Line DocFromDisplay(Sci::Line lineDisplay) const override; void InsertLines(Sci::Line lineDoc, Sci::Line lineCount) override; void DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) override; - bool GetVisible(Sci::Line lineDoc) const noexcept override; + bool GetVisible(Sci::Line lineDoc) const override; bool SetVisible(Sci::Line lineDocStart, Sci::Line lineDocEnd, bool isVisible) override; - bool HiddenLines() const noexcept override; + bool HiddenLines() const override; - const char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept override; + const char *GetFoldDisplayText(Sci::Line lineDoc) const override; + bool GetFoldDisplayTextShown(Sci::Line lineDoc) const override; bool SetFoldDisplayText(Sci::Line lineDoc, const char *text) override; - bool GetExpanded(Sci::Line lineDoc) const noexcept override; + bool GetExpanded(Sci::Line lineDoc) const override; bool SetExpanded(Sci::Line lineDoc, bool isExpanded) override; - Sci::Line ContractedNext(Sci::Line lineDocStart) const noexcept override; + Sci::Line ContractedNext(Sci::Line lineDocStart) const override; - int GetHeight(Sci::Line lineDoc) const noexcept override; + int GetHeight(Sci::Line lineDoc) const override; bool SetHeight(Sci::Line lineDoc, int height) override; - void ShowAll() noexcept override; + void ShowAll() override; - void Check() const noexcept; + void Check() const; }; template @@ -95,16 +94,18 @@ ContractionState::ContractionState() noexcept : linesInDocument(1) { } template -ContractionState::~ContractionState() = default; +ContractionState::~ContractionState() { + Clear(); +} template void ContractionState::EnsureData() { if (OneToOne()) { - visible = std::make_unique>(); - expanded = std::make_unique>(); - heights = std::make_unique>(); - foldDisplayTexts = std::make_unique>(); - displayLines = std::make_unique>(4); + visible = std::unique_ptr>(new RunStyles()); + expanded = std::unique_ptr>(new RunStyles()); + heights = std::unique_ptr>(new RunStyles()); + foldDisplayTexts = std::unique_ptr>(new SparseVector()); + displayLines = std::unique_ptr>(new Partitioning(4)); InsertLines(0, linesInDocument); } } @@ -157,7 +158,7 @@ void ContractionState::Clear() noexcept { } template -Sci::Line ContractionState::LinesInDoc() const noexcept { +Sci::Line ContractionState::LinesInDoc() const { if (OneToOne()) { return linesInDocument; } else { @@ -166,7 +167,7 @@ Sci::Line ContractionState::LinesInDoc() const noexcept { } template -Sci::Line ContractionState::LinesDisplayed() const noexcept { +Sci::Line ContractionState::LinesDisplayed() const { if (OneToOne()) { return linesInDocument; } else { @@ -175,7 +176,7 @@ Sci::Line ContractionState::LinesDisplayed() const noexcept { } template -Sci::Line ContractionState::DisplayFromDoc(Sci::Line lineDoc) const noexcept { +Sci::Line ContractionState::DisplayFromDoc(Sci::Line lineDoc) const { if (OneToOne()) { return (lineDoc <= linesInDocument) ? lineDoc : linesInDocument; } else { @@ -186,16 +187,16 @@ Sci::Line ContractionState::DisplayFromDoc(Sci::Line lineDoc) const noexce } template -Sci::Line ContractionState::DisplayLastFromDoc(Sci::Line lineDoc) const noexcept { +Sci::Line ContractionState::DisplayLastFromDoc(Sci::Line lineDoc) const { return DisplayFromDoc(lineDoc) + GetHeight(lineDoc) - 1; } template -Sci::Line ContractionState::DocFromDisplay(Sci::Line lineDisplay) const noexcept { +Sci::Line ContractionState::DocFromDisplay(Sci::Line lineDisplay) const { if (OneToOne()) { return lineDisplay; } else { - if (lineDisplay < 0) { + if (lineDisplay <= 0) { return 0; } if (lineDisplay > LinesDisplayed()) { @@ -209,30 +210,22 @@ Sci::Line ContractionState::DocFromDisplay(Sci::Line lineDisplay) const no template void ContractionState::InsertLines(Sci::Line lineDoc, Sci::Line lineCount) { - if (OneToOne()) { - linesInDocument += static_cast(lineCount); - } else { - for (Sci::Line l = 0; l < lineCount; l++) { - InsertLine(lineDoc + l); - } + for (int l = 0; l < lineCount; l++) { + InsertLine(lineDoc + l); } Check(); } template void ContractionState::DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) { - if (OneToOne()) { - linesInDocument -= static_cast(lineCount); - } else { - for (Sci::Line l = 0; l < lineCount; l++) { - DeleteLine(lineDoc); - } + for (Sci::Line l = 0; l < lineCount; l++) { + DeleteLine(lineDoc); } Check(); } template -bool ContractionState::GetVisible(Sci::Line lineDoc) const noexcept { +bool ContractionState::GetVisible(Sci::Line lineDoc) const { if (OneToOne()) { return true; } else { @@ -269,7 +262,7 @@ bool ContractionState::SetVisible(Sci::Line lineDocStart, Sci::Line lineDo } template -bool ContractionState::HiddenLines() const noexcept { +bool ContractionState::HiddenLines() const { if (OneToOne()) { return false; } else { @@ -278,17 +271,22 @@ bool ContractionState::HiddenLines() const noexcept { } template -const char *ContractionState::GetFoldDisplayText(Sci::Line lineDoc) const noexcept { +const char *ContractionState::GetFoldDisplayText(Sci::Line lineDoc) const { Check(); return foldDisplayTexts->ValueAt(lineDoc).get(); } +template +bool ContractionState::GetFoldDisplayTextShown(Sci::Line lineDoc) const { + return !GetExpanded(lineDoc) && GetFoldDisplayText(lineDoc); +} + template bool ContractionState::SetFoldDisplayText(Sci::Line lineDoc, const char *text) { EnsureData(); const char *foldText = foldDisplayTexts->ValueAt(lineDoc).get(); if (!foldText || !text || 0 != strcmp(text, foldText)) { - UniqueString uns = IsNullOrEmpty(text) ? UniqueString() : UniqueStringCopy(text); + UniqueString uns = UniqueStringCopy(text); foldDisplayTexts->SetValueAt(lineDoc, std::move(uns)); Check(); return true; @@ -299,7 +297,7 @@ bool ContractionState::SetFoldDisplayText(Sci::Line lineDoc, const char *t } template -bool ContractionState::GetExpanded(Sci::Line lineDoc) const noexcept { +bool ContractionState::GetExpanded(Sci::Line lineDoc) const { if (OneToOne()) { return true; } else { @@ -326,7 +324,7 @@ bool ContractionState::SetExpanded(Sci::Line lineDoc, bool isExpanded) { } template -Sci::Line ContractionState::ContractedNext(Sci::Line lineDocStart) const noexcept { +Sci::Line ContractionState::ContractedNext(Sci::Line lineDocStart) const { if (OneToOne()) { return -1; } else { @@ -344,7 +342,7 @@ Sci::Line ContractionState::ContractedNext(Sci::Line lineDocStart) const n } template -int ContractionState::GetHeight(Sci::Line lineDoc) const noexcept { +int ContractionState::GetHeight(Sci::Line lineDoc) const { if (OneToOne()) { return 1; } else { @@ -377,7 +375,7 @@ bool ContractionState::SetHeight(Sci::Line lineDoc, int height) { } template -void ContractionState::ShowAll() noexcept { +void ContractionState::ShowAll() { const LINE lines = static_cast(LinesInDoc()); Clear(); linesInDocument = lines; @@ -386,7 +384,7 @@ void ContractionState::ShowAll() noexcept { // Debugging checks template -void ContractionState::Check() const noexcept { +void ContractionState::Check() const { #ifdef CHECK_CORRECTNESS for (Sci::Line vline = 0; vline < LinesDisplayed(); vline++) { const Sci::Line lineDoc = DocFromDisplay(vline); @@ -408,13 +406,13 @@ void ContractionState::Check() const noexcept { } -namespace Scintilla::Internal { +namespace Scintilla { std::unique_ptr ContractionStateCreate(bool largeDocument) { if (largeDocument) - return std::make_unique>(); + return std::unique_ptr>(new ContractionState()); else - return std::make_unique>(); + return std::unique_ptr>(new ContractionState()); } } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.h b/3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.h similarity index 59% rename from 3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.h index 55c390c55..90f5c0784 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/ContractionState.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/ContractionState.h @@ -8,7 +8,7 @@ #ifndef CONTRACTIONSTATE_H #define CONTRACTIONSTATE_H -namespace Scintilla::Internal { +namespace Scintilla { /** */ @@ -18,30 +18,31 @@ class IContractionState { virtual void Clear()=0; - virtual Sci::Line LinesInDoc() const noexcept=0; - virtual Sci::Line LinesDisplayed() const noexcept=0; - virtual Sci::Line DisplayFromDoc(Sci::Line lineDoc) const noexcept=0; - virtual Sci::Line DisplayLastFromDoc(Sci::Line lineDoc) const noexcept=0; - virtual Sci::Line DocFromDisplay(Sci::Line lineDisplay) const noexcept=0; + virtual Sci::Line LinesInDoc() const=0; + virtual Sci::Line LinesDisplayed() const=0; + virtual Sci::Line DisplayFromDoc(Sci::Line lineDoc) const=0; + virtual Sci::Line DisplayLastFromDoc(Sci::Line lineDoc) const=0; + virtual Sci::Line DocFromDisplay(Sci::Line lineDisplay) const=0; virtual void InsertLines(Sci::Line lineDoc, Sci::Line lineCount)=0; virtual void DeleteLines(Sci::Line lineDoc, Sci::Line lineCount)=0; - virtual bool GetVisible(Sci::Line lineDoc) const noexcept=0; + virtual bool GetVisible(Sci::Line lineDoc) const=0; virtual bool SetVisible(Sci::Line lineDocStart, Sci::Line lineDocEnd, bool isVisible)=0; - virtual bool HiddenLines() const noexcept=0; + virtual bool HiddenLines() const=0; - virtual const char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept=0; + virtual const char *GetFoldDisplayText(Sci::Line lineDoc) const=0; + virtual bool GetFoldDisplayTextShown(Sci::Line lineDoc) const=0; virtual bool SetFoldDisplayText(Sci::Line lineDoc, const char *text)=0; - virtual bool GetExpanded(Sci::Line lineDoc) const noexcept=0; + virtual bool GetExpanded(Sci::Line lineDoc) const=0; virtual bool SetExpanded(Sci::Line lineDoc, bool isExpanded)=0; - virtual Sci::Line ContractedNext(Sci::Line lineDocStart) const noexcept =0; + virtual Sci::Line ContractedNext(Sci::Line lineDocStart) const=0; - virtual int GetHeight(Sci::Line lineDoc) const noexcept=0; + virtual int GetHeight(Sci::Line lineDoc) const=0; virtual bool SetHeight(Sci::Line lineDoc, int height)=0; - virtual void ShowAll() noexcept=0; + virtual void ShowAll()=0; }; std::unique_ptr ContractionStateCreate(bool largeDocument); diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/DBCS.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.cpp similarity index 79% rename from 3rdparty/unioncode-scintilla515/scintilla/src/DBCS.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.cpp index e3ae3d75f..148c9818e 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/DBCS.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.cpp @@ -7,9 +7,9 @@ #include "DBCS.h" -using namespace Scintilla::Internal; +using namespace Scintilla; -namespace Scintilla::Internal { +namespace Scintilla { bool DBCSIsLeadByte(int codePage, char ch) noexcept { // Byte ranges found in Wikipedia articles with relevant search strings in each case @@ -39,16 +39,4 @@ bool DBCSIsLeadByte(int codePage, char ch) noexcept { return false; } -bool IsDBCSValidSingleByte(int codePage, int ch) noexcept { - switch (codePage) { - case 932: - return ch == 0x80 - || (ch >= 0xA0 && ch <= 0xDF) - || (ch >= 0xFD); - - default: - return false; - } -} - } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/DBCS.h b/3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.h similarity index 56% rename from 3rdparty/unioncode-scintilla515/scintilla/src/DBCS.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.h index ceeb75929..ff3f9f22f 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/DBCS.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/DBCS.h @@ -8,18 +8,9 @@ #ifndef DBCS_H #define DBCS_H -namespace Scintilla::Internal { - -constexpr bool IsDBCSCodePage(int codePage) noexcept { - return codePage == 932 - || codePage == 936 - || codePage == 949 - || codePage == 950 - || codePage == 1361; -} +namespace Scintilla { bool DBCSIsLeadByte(int codePage, char ch) noexcept; -bool IsDBCSValidSingleByte(int codePage, int ch) noexcept; } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/Decoration.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.cpp similarity index 76% rename from 3rdparty/unioncode-scintilla515/scintilla/src/Decoration.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.cpp index a26eecd1c..104f75ae2 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/Decoration.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.cpp @@ -11,23 +11,20 @@ #include #include -#include #include -#include #include #include -#include "ScintillaTypes.h" - -#include "Debugging.h" +#include "Platform.h" +#include "Scintilla.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" #include "Decoration.h" -using namespace Scintilla::Internal; +using namespace Scintilla; namespace { @@ -39,23 +36,25 @@ class Decoration : public IDecoration { explicit Decoration(int indicator_) : indicator(indicator_) { } + ~Decoration() override { + } - bool Empty() const noexcept override { + bool Empty() const override { return (rs.Runs() == 1) && (rs.AllSameAs(0)); } - int Indicator() const noexcept override { + int Indicator() const override { return indicator; } - Sci::Position Length() const noexcept override { + Sci::Position Length() const override { return rs.Length(); } - int ValueAt(Sci::Position position) const noexcept override { + int ValueAt(Sci::Position position) const override { return rs.ValueAt(static_cast(position)); } - Sci::Position StartRun(Sci::Position position) const noexcept override { + Sci::Position StartRun(Sci::Position position) const override { return rs.StartRun(static_cast(position)); } - Sci::Position EndRun(Sci::Position position) const noexcept override { + Sci::Position EndRun(Sci::Position position) const override { return rs.EndRun(static_cast(position)); } void SetValueAt(Sci::Position position, int value) override { @@ -64,7 +63,7 @@ class Decoration : public IDecoration { void InsertSpace(Sci::Position position, Sci::Position insertLength) override { rs.InsertSpace(static_cast(position), static_cast(insertLength)); } - Sci::Position Runs() const noexcept override { + Sci::Position Runs() const override { return rs.Runs(); } }; @@ -73,14 +72,14 @@ template class DecorationList : public IDecorationList { int currentIndicator; int currentValue; - Decoration *current; // Non-owning. Cached so FillRange doesn't have to search for each call. + Decoration *current; // Cached so FillRange doesn't have to search for each call. Sci::Position lengthDocument; // Ordered by indicator std::vector>> decorationList; std::vector decorationView; // Read-only view of decorationList bool clickNotified; - Decoration *DecorationFromIndicator(int indicator) noexcept; + Decoration *DecorationFromIndicator(int indicator); Decoration *Create(int indicator, Sci::Position length); void Delete(int indicator); void DeleteAnyEmpty(); @@ -88,16 +87,17 @@ class DecorationList : public IDecorationList { public: DecorationList(); + ~DecorationList() override; - const std::vector &View() const noexcept override { + const std::vector &View() const override { return decorationView; } void SetCurrentIndicator(int indicator) override; - int GetCurrentIndicator() const noexcept override { return currentIndicator; } + int GetCurrentIndicator() const override { return currentIndicator; } void SetCurrentValue(int value) override; - int GetCurrentValue() const noexcept override { return currentValue; } + int GetCurrentValue() const override { return currentValue; } // Returns changed=true if some values may have changed FillResult FillRange(Sci::Position position, int value, Sci::Position fillLength) override; @@ -107,15 +107,15 @@ class DecorationList : public IDecorationList { void DeleteLexerDecorations() override; - int AllOnFor(Sci::Position position) const noexcept override; - int ValueAt(int indicator, Sci::Position position) noexcept override; - Sci::Position Start(int indicator, Sci::Position position) noexcept override; - Sci::Position End(int indicator, Sci::Position position) noexcept override; + int AllOnFor(Sci::Position position) const override; + int ValueAt(int indicator, Sci::Position position) override; + Sci::Position Start(int indicator, Sci::Position position) override; + Sci::Position End(int indicator, Sci::Position position) override; - bool ClickNotified() const noexcept override { + bool ClickNotified() const override { return clickNotified; } - void SetClickNotified(bool notified) noexcept override { + void SetClickNotified(bool notified) override { clickNotified = notified; } }; @@ -126,7 +126,12 @@ DecorationList::DecorationList() : currentIndicator(0), currentValue(1), cu } template -Decoration *DecorationList::DecorationFromIndicator(int indicator) noexcept { +DecorationList::~DecorationList() { + current = nullptr; +} + +template +Decoration *DecorationList::DecorationFromIndicator(int indicator) { for (const std::unique_ptr> &deco : decorationList) { if (deco->Indicator() == indicator) { return deco.get(); @@ -138,12 +143,12 @@ Decoration *DecorationList::DecorationFromIndicator(int indicator) noe template Decoration *DecorationList::Create(int indicator, Sci::Position length) { currentIndicator = indicator; - std::unique_ptr> decoNew = std::make_unique>(indicator); + std::unique_ptr> decoNew = std::unique_ptr>(new Decoration(indicator)); decoNew->rs.InsertSpace(0, static_cast(length)); typename std::vector>>::iterator it = std::lower_bound( decorationList.begin(), decorationList.end(), decoNew, - [](const std::unique_ptr> &a, const std::unique_ptr> &b) noexcept { + [](const std::unique_ptr> &a, const std::unique_ptr> &b) { return a->Indicator() < b->Indicator(); }); typename std::vector>>::iterator itAdded = @@ -157,7 +162,7 @@ Decoration *DecorationList::Create(int indicator, Sci::Position length template void DecorationList::Delete(int indicator) { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [indicator](const std::unique_ptr> &deco) noexcept { + [indicator](const std::unique_ptr> &deco) { return deco->Indicator() == indicator; }), decorationList.end()); current = nullptr; @@ -187,7 +192,7 @@ FillResult DecorationList::FillRange(Sci::Position position, // Converting result from POS to Sci::Position as callers not polymorphic. const FillResult frInPOS = current->rs.FillRange(static_cast(position), value, static_cast(fillLength)); const FillResult fr { frInPOS.changed, frInPOS.position, frInPOS.fillLength }; - if (current->Empty()) { + if (current->Empty()) { Delete(currentIndicator); } return fr; @@ -222,8 +227,8 @@ void DecorationList::DeleteRange(Sci::Position position, Sci::Position dele template void DecorationList::DeleteLexerDecorations() { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [](const std::unique_ptr> &deco) noexcept { - return deco->Indicator() < static_cast(Scintilla::IndicatorNumbers::Container); + [](const std::unique_ptr> &deco) { + return deco->Indicator() < INDIC_CONTAINER; }), decorationList.end()); current = nullptr; SetView(); @@ -235,7 +240,7 @@ void DecorationList::DeleteAnyEmpty() { decorationList.clear(); } else { decorationList.erase(std::remove_if(decorationList.begin(), decorationList.end(), - [](const std::unique_ptr> &deco) noexcept { + [](const std::unique_ptr> &deco) { return deco->Empty(); }), decorationList.end()); } @@ -250,12 +255,12 @@ void DecorationList::SetView() { } template -int DecorationList::AllOnFor(Sci::Position position) const noexcept { +int DecorationList::AllOnFor(Sci::Position position) const { int mask = 0; for (const std::unique_ptr> &deco : decorationList) { if (deco->rs.ValueAt(static_cast(position))) { - if (deco->Indicator() < static_cast(Scintilla::IndicatorNumbers::Ime)) { - mask |= 1u << deco->Indicator(); + if (deco->Indicator() < INDIC_IME) { + mask |= 1 << deco->Indicator(); } } } @@ -263,7 +268,7 @@ int DecorationList::AllOnFor(Sci::Position position) const noexcept { } template -int DecorationList::ValueAt(int indicator, Sci::Position position) noexcept { +int DecorationList::ValueAt(int indicator, Sci::Position position) { const Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.ValueAt(static_cast(position)); @@ -272,7 +277,7 @@ int DecorationList::ValueAt(int indicator, Sci::Position position) noexcept } template -Sci::Position DecorationList::Start(int indicator, Sci::Position position) noexcept { +Sci::Position DecorationList::Start(int indicator, Sci::Position position) { const Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.StartRun(static_cast(position)); @@ -281,7 +286,7 @@ Sci::Position DecorationList::Start(int indicator, Sci::Position position) } template -Sci::Position DecorationList::End(int indicator, Sci::Position position) noexcept { +Sci::Position DecorationList::End(int indicator, Sci::Position position) { const Decoration *deco = DecorationFromIndicator(indicator); if (deco) { return deco->rs.EndRun(static_cast(position)); @@ -291,20 +296,20 @@ Sci::Position DecorationList::End(int indicator, Sci::Position position) no } -namespace Scintilla::Internal { +namespace Scintilla { std::unique_ptr DecorationCreate(bool largeDocument, int indicator) { if (largeDocument) - return std::make_unique>(indicator); + return std::unique_ptr>(new Decoration(indicator)); else - return std::make_unique>(indicator); + return std::unique_ptr>(new Decoration(indicator)); } std::unique_ptr DecorationListCreate(bool largeDocument) { if (largeDocument) - return std::make_unique>(); + return std::unique_ptr>(new DecorationList()); else - return std::make_unique>(); + return std::unique_ptr>(new DecorationList()); } } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/Decoration.h b/3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.h similarity index 57% rename from 3rdparty/unioncode-scintilla515/scintilla/src/Decoration.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.h index 303e3c06f..1461f2f98 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/Decoration.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Decoration.h @@ -7,39 +7,33 @@ #ifndef DECORATION_H #define DECORATION_H -#include "Position.h" -#include "RunStyles.h" - -#include -#include - -namespace Scintilla::Internal { +namespace Scintilla { class IDecoration { public: virtual ~IDecoration() {} - virtual bool Empty() const noexcept = 0; - virtual int Indicator() const noexcept = 0; - virtual Sci::Position Length() const noexcept = 0; - virtual int ValueAt(Sci::Position position) const noexcept = 0; - virtual Sci::Position StartRun(Sci::Position position) const noexcept = 0; - virtual Sci::Position EndRun(Sci::Position position) const noexcept = 0; + virtual bool Empty() const = 0; + virtual int Indicator() const = 0; + virtual Sci::Position Length() const = 0; + virtual int ValueAt(Sci::Position position) const = 0; + virtual Sci::Position StartRun(Sci::Position position) const = 0; + virtual Sci::Position EndRun(Sci::Position position) const = 0; virtual void SetValueAt(Sci::Position position, int value) = 0; virtual void InsertSpace(Sci::Position position, Sci::Position insertLength) = 0; - virtual Sci::Position Runs() const noexcept = 0; + virtual Sci::Position Runs() const = 0; }; class IDecorationList { public: virtual ~IDecorationList() {} - virtual const std::vector &View() const noexcept = 0; + virtual const std::vector &View() const =0; virtual void SetCurrentIndicator(int indicator) = 0; - virtual int GetCurrentIndicator() const noexcept = 0; + virtual int GetCurrentIndicator() const = 0; virtual void SetCurrentValue(int value) = 0; - virtual int GetCurrentValue() const noexcept = 0; + virtual int GetCurrentValue() const = 0; // Returns with changed=true if some values may have changed virtual FillResult FillRange(Sci::Position position, int value, Sci::Position fillLength) = 0; @@ -47,13 +41,13 @@ class IDecorationList { virtual void DeleteRange(Sci::Position position, Sci::Position deleteLength) = 0; virtual void DeleteLexerDecorations() = 0; - virtual int AllOnFor(Sci::Position position) const noexcept = 0; - virtual int ValueAt(int indicator, Sci::Position position) noexcept = 0; - virtual Sci::Position Start(int indicator, Sci::Position position) noexcept = 0; - virtual Sci::Position End(int indicator, Sci::Position position) noexcept = 0; + virtual int AllOnFor(Sci::Position position) const = 0; + virtual int ValueAt(int indicator, Sci::Position position) = 0; + virtual Sci::Position Start(int indicator, Sci::Position position) = 0; + virtual Sci::Position End(int indicator, Sci::Position position) = 0; - virtual bool ClickNotified() const noexcept = 0; - virtual void SetClickNotified(bool notified) noexcept = 0; + virtual bool ClickNotified() const = 0; + virtual void SetClickNotified(bool notified) = 0; }; std::unique_ptr DecorationCreate(bool largeDocument, int indicator); diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/Document.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/Document.cpp similarity index 69% rename from 3rdparty/unioncode-scintilla515/scintilla/src/Document.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/Document.cpp index 3d6e48a98..b6b1ce294 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/Document.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Document.cpp @@ -14,10 +14,8 @@ #include #include -#include #include #include -#include #include #include #include @@ -26,14 +24,14 @@ #include #endif -#include "ScintillaTypes.h" +#include "Platform.h" + #include "ILoader.h" #include "ILexer.h" +#include "Scintilla.h" -#include "Debugging.h" - -#include "CharacterType.h" -#include "CharacterCategoryMap.h" +#include "CharacterSet.h" +#include "CharacterCategory.h" #include "Position.h" #include "SplitVector.h" #include "Partitioning.h" @@ -49,17 +47,6 @@ #include "ElapsedPeriod.h" using namespace Scintilla; -using namespace Scintilla::Internal; - -LexInterface::LexInterface(Document *pdoc_) noexcept : pdoc(pdoc_), performingStyle(false) { -} - -LexInterface::~LexInterface() noexcept = default; - -void LexInterface::SetInstance(ILexer5 *instance_) { - instance.reset(instance_); - pdoc->LexerChanged(); -} void LexInterface::Colourise(Sci::Position start, Sci::Position end) { if (pdoc && instance && !performingStyle) { @@ -89,15 +76,15 @@ void LexInterface::Colourise(Sci::Position start, Sci::Position end) { } } -LineEndType LexInterface::LineEndTypesSupported() { +int LexInterface::LineEndTypesSupported() { if (instance) { - return static_cast(instance->LineEndTypesSupported()); + const int interfaceVersion = instance->Version(); + if (interfaceVersion >= lvSubStyles) { + ILexerWithSubStyles *ssinstance = static_cast(instance); + return ssinstance->LineEndTypesSupported(); + } } - return LineEndType::Default; -} - -bool LexInterface::UseContainerLexing() const noexcept { - return !instance; + return 0; } ActionDuration::ActionDuration(double duration_, double minDuration_, double maxDuration_) noexcept : @@ -111,10 +98,10 @@ void ActionDuration::AddSample(size_t numberActions, double durationOfActions) n // Alpha value for exponential smoothing. // Most recent value contributes 25% to smoothed value. - constexpr double alpha = 0.25; + const double alpha = 0.25; const double durationOne = durationOfActions / numberActions; - duration = std::clamp(alpha * durationOne + (1.0 - alpha) * duration, + duration = Sci::clamp(alpha * durationOne + (1.0 - alpha) * duration, minDuration, maxDuration); } @@ -122,21 +109,17 @@ double ActionDuration::Duration() const noexcept { return duration; } -size_t ActionDuration::ActionsInAllowedTime(double secondsAllowed) const noexcept { - return std::lround(secondsAllowed / Duration()); -} - -Document::Document(DocumentOption options) : - cb(!FlagSet(options, DocumentOption::StylesNone), FlagSet(options, DocumentOption::TextLarge)), - durationStyleOneByte(0.000001, 0.0000001, 0.00001) { +Document::Document(int options) : + cb((options & SC_DOCUMENTOPTION_STYLES_NONE) == 0, (options & SC_DOCUMENTOPTION_TEXT_LARGE) != 0), + durationStyleOneLine(0.00001, 0.000001, 0.0001) { refCount = 0; #ifdef _WIN32 - eolMode = EndOfLine::CrLf; + eolMode = SC_EOL_CRLF; #else - eolMode = EndOfLine::Lf; + eolMode = SC_EOL_LF; #endif - dbcsCodePage = CpUtf8; - lineEndBitSet = LineEndType::Default; + dbcsCodePage = SC_CP_UTF8; + lineEndBitSet = SC_LINE_END_TYPE_DEFAULT; endStyled = 0; styleClock = 0; enteredModification = 0; @@ -152,17 +135,16 @@ Document::Document(DocumentOption options) : matchesValid = false; - perLineData[ldMarkers] = std::make_unique(); - perLineData[ldLevels] = std::make_unique(); - perLineData[ldState] = std::make_unique(); - perLineData[ldMargin] = std::make_unique(); - perLineData[ldAnnotation] = std::make_unique(); - perLineData[ldEOLAnnotation] = std::make_unique(); + perLineData[ldMarkers].reset(new LineMarkers()); + perLineData[ldLevels].reset(new LineLevels()); + perLineData[ldState].reset(new LineState()); + perLineData[ldMargin].reset(new LineAnnotation()); + perLineData[ldAnnotation].reset(new LineAnnotation()); decorations = DecorationListCreate(IsLarge()); cb.SetPerLine(this); - cb.SetUTF8Substance(CpUtf8 == dbcsCodePage); + cb.SetUTF8Substance(SC_CP_UTF8 == dbcsCodePage); } Document::~Document() { @@ -199,13 +181,6 @@ void Document::InsertLine(Sci::Line line) { } } -void Document::InsertLines(Sci::Line line, Sci::Line lines) { - for (const auto &pl : perLineData) { - if (pl) - pl->InsertLines(line, lines); - } -} - void Document::RemoveLine(Sci::Line line) { for (const std::unique_ptr &pl : perLineData) { if (pl) @@ -213,35 +188,31 @@ void Document::RemoveLine(Sci::Line line) { } } -LineMarkers *Document::Markers() const noexcept { - return dynamic_cast(perLineData[ldMarkers].get()); -} - -LineLevels *Document::Levels() const noexcept { - return dynamic_cast(perLineData[ldLevels].get()); +LineMarkers *Document::Markers() const { + return static_cast(perLineData[ldMarkers].get()); } -LineState *Document::States() const noexcept { - return dynamic_cast(perLineData[ldState].get()); +LineLevels *Document::Levels() const { + return static_cast(perLineData[ldLevels].get()); } -LineAnnotation *Document::Margins() const noexcept { - return dynamic_cast(perLineData[ldMargin].get()); +LineState *Document::States() const { + return static_cast(perLineData[ldState].get()); } -LineAnnotation *Document::Annotations() const noexcept { - return dynamic_cast(perLineData[ldAnnotation].get()); +LineAnnotation *Document::Margins() const { + return static_cast(perLineData[ldMargin].get()); } -LineAnnotation *Document::EOLAnnotations() const noexcept { - return dynamic_cast(perLineData[ldEOLAnnotation].get()); +LineAnnotation *Document::Annotations() const { + return static_cast(perLineData[ldAnnotation].get()); } -LineEndType Document::LineEndTypesSupported() const { - if ((CpUtf8 == dbcsCodePage) && pli) +int Document::LineEndTypesSupported() const { + if ((SC_CP_UTF8 == dbcsCodePage) && pli) return pli->LineEndTypesSupported(); else - return LineEndType::Default; + return 0; } bool Document::SetDBCSCodePage(int dbcsCodePage_) { @@ -249,7 +220,7 @@ bool Document::SetDBCSCodePage(int dbcsCodePage_) { dbcsCodePage = dbcsCodePage_; SetCaseFolder(nullptr); cb.SetLineEndTypes(lineEndBitSet & LineEndTypesSupported()); - cb.SetUTF8Substance(CpUtf8 == dbcsCodePage); + cb.SetUTF8Substance(SC_CP_UTF8 == dbcsCodePage); ModifiedAt(0); // Need to restyle whole document return true; } else { @@ -257,10 +228,10 @@ bool Document::SetDBCSCodePage(int dbcsCodePage_) { } } -bool Document::SetLineEndTypesAllowed(LineEndType lineEndBitSet_) { +bool Document::SetLineEndTypesAllowed(int lineEndBitSet_) { if (lineEndBitSet != lineEndBitSet_) { lineEndBitSet = lineEndBitSet_; - const LineEndType lineEndBitSetActive = lineEndBitSet & LineEndTypesSupported(); + const int lineEndBitSetActive = lineEndBitSet & LineEndTypesSupported(); if (lineEndBitSetActive != cb.GetLineEndTypes()) { ModifiedAt(0); cb.SetLineEndTypes(lineEndBitSetActive); @@ -292,38 +263,38 @@ void Document::TentativeUndo() { for (int step = 0; step < steps; step++) { const Sci::Line prevLinesTotal = LinesTotal(); const Action &action = cb.GetUndoStep(); - if (action.at == ActionType::remove) { + if (action.at == removeAction) { NotifyModified(DocModification( - ModificationFlags::BeforeInsert | ModificationFlags::Undo, action)); - } else if (action.at == ActionType::container) { - DocModification dm(ModificationFlags::Container | ModificationFlags::Undo); + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else if (action.at == containerAction) { + DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_UNDO); dm.token = action.position; NotifyModified(dm); } else { NotifyModified(DocModification( - ModificationFlags::BeforeDelete | ModificationFlags::Undo, action)); + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); } cb.PerformUndoStep(); - if (action.at != ActionType::container) { + if (action.at != containerAction) { ModifiedAt(action.position); } - ModificationFlags modFlags = ModificationFlags::Undo; + int modFlags = SC_PERFORMED_UNDO; // With undo, an insertion action becomes a deletion notification - if (action.at == ActionType::remove) { - modFlags |= ModificationFlags::InsertText; - } else if (action.at == ActionType::insert) { - modFlags |= ModificationFlags::DeleteText; + if (action.at == removeAction) { + modFlags |= SC_MOD_INSERTTEXT; + } else if (action.at == insertAction) { + modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) - modFlags |= ModificationFlags::MultiStepUndoRedo; + modFlags |= SC_MULTISTEPUNDOREDO; const Sci::Line linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { - modFlags |= ModificationFlags::LastStepInUndoRedo; + modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) - modFlags |= ModificationFlags::MultilineUndoRedo; + modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified(DocModification(modFlags, action.position, action.lenData, linesAdded, action.data.get())); @@ -339,18 +310,18 @@ void Document::TentativeUndo() { } } -int Document::GetMark(Sci::Line line) const noexcept { +int Document::GetMark(Sci::Line line) const { return Markers()->MarkValue(line); } -Sci::Line Document::MarkerNext(Sci::Line lineStart, int mask) const noexcept { +Sci::Line Document::MarkerNext(Sci::Line lineStart, int mask) const { return Markers()->MarkerNext(lineStart, mask); } int Document::AddMark(Sci::Line line, int markerNum) { if (line >= 0 && line <= LinesTotal()) { const int prev = Markers()->AddMark(line, markerNum, LinesTotal()); - const DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line); + const DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, nullptr, line); NotifyModified(mh); return prev; } else { @@ -367,19 +338,19 @@ void Document::AddMarkSet(Sci::Line line, int valueSet) { if (m & 1) Markers()->AddMark(line, i, LinesTotal()); } - const DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line); + const DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, nullptr, line); NotifyModified(mh); } void Document::DeleteMark(Sci::Line line, int markerNum) { Markers()->DeleteMark(line, markerNum, false); - const DocModification mh(ModificationFlags::ChangeMarker, LineStart(line), 0, 0, nullptr, line); + const DocModification mh(SC_MOD_CHANGEMARKER, LineStart(line), 0, 0, nullptr, line); NotifyModified(mh); } void Document::DeleteMarkFromHandle(int markerHandle) { Markers()->DeleteMarkFromHandle(markerHandle); - DocModification mh(ModificationFlags::ChangeMarker); + DocModification mh(SC_MOD_CHANGEMARKER); mh.line = -1; NotifyModified(mh); } @@ -391,26 +362,18 @@ void Document::DeleteAllMarks(int markerNum) { someChanges = true; } if (someChanges) { - DocModification mh(ModificationFlags::ChangeMarker); + DocModification mh(SC_MOD_CHANGEMARKER); mh.line = -1; NotifyModified(mh); } } -Sci::Line Document::LineFromHandle(int markerHandle) const noexcept { +Sci::Line Document::LineFromHandle(int markerHandle) const { return Markers()->LineFromHandle(markerHandle); } -int Document::MarkerNumberFromLine(Sci::Line line, int which) const noexcept { - return Markers()->NumberFromLine(line, which); -} - -int Document::MarkerHandleFromLine(Sci::Line line, int which) const noexcept { - return Markers()->HandleFromLine(line, which); -} - Sci_Position SCI_METHOD Document::LineStart(Sci_Position line) const { - return cb.LineStart(line); + return cb.LineStart(static_cast(line)); } bool Document::IsLineStartPosition(Sci::Position position) const { @@ -422,7 +385,7 @@ Sci_Position SCI_METHOD Document::LineEnd(Sci_Position line) const { return LineStart(line + 1); } else { Sci::Position position = LineStart(line + 1); - if (LineEndType::Unicode == cb.GetLineEndTypes()) { + if (SC_CP_UTF8 == dbcsCodePage) { const unsigned char bytes[] = { cb.UCharAt(position-3), cb.UCharAt(position-2), @@ -447,7 +410,7 @@ Sci_Position SCI_METHOD Document::LineEnd(Sci_Position line) const { void SCI_METHOD Document::SetErrorStatus(int status) { // Tell the watchers an error has occurred. for (const WatcherWithUserData &watcher : watchers) { - watcher.watcher->NotifyErrorOccurred(this, watcher.userData, static_cast(status)); + watcher.watcher->NotifyErrorOccurred(this, watcher.userData, status); } } @@ -485,76 +448,59 @@ Sci::Position Document::VCHomePosition(Sci::Position position) const { return startText; } -Sci::Position Document::IndexLineStart(Sci::Line line, LineCharacterIndexType lineCharacterIndex) const noexcept { +Sci::Position Document::IndexLineStart(Sci::Line line, int lineCharacterIndex) const { return cb.IndexLineStart(line, lineCharacterIndex); } -Sci::Line Document::LineFromPositionIndex(Sci::Position pos, LineCharacterIndexType lineCharacterIndex) const noexcept { +Sci::Line Document::LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const { return cb.LineFromPositionIndex(pos, lineCharacterIndex); } -Sci::Line Document::LineFromPositionAfter(Sci::Line line, Sci::Position length) const noexcept { - const Sci::Position posAfter = cb.LineStart(line) + length; - if (posAfter >= LengthNoExcept()) { - return LinesTotal(); - } - const Sci::Line lineAfter = SciLineFromPosition(posAfter); - if (lineAfter > line) { - return lineAfter; - } else { - // Want to make some progress so return next line - return lineAfter + 1; - } -} - int SCI_METHOD Document::SetLevel(Sci_Position line, int level) { - const int prev = Levels()->SetLevel(line, level, LinesTotal()); + const int prev = Levels()->SetLevel(static_cast(line), level, LinesTotal()); if (prev != level) { - DocModification mh(ModificationFlags::ChangeFold | ModificationFlags::ChangeMarker, - LineStart(line), 0, 0, nullptr, line); - mh.foldLevelNow = static_cast(level); - mh.foldLevelPrev = static_cast(prev); + DocModification mh(SC_MOD_CHANGEFOLD | SC_MOD_CHANGEMARKER, + LineStart(line), 0, 0, nullptr, static_cast(line)); + mh.foldLevelNow = level; + mh.foldLevelPrev = prev; NotifyModified(mh); } return prev; } int SCI_METHOD Document::GetLevel(Sci_Position line) const { - return Levels()->GetLevel(line); -} - -FoldLevel Document::GetFoldLevel(Sci_Position line) const { - return static_cast(Levels()->GetLevel(line)); + return Levels()->GetLevel(static_cast(line)); } void Document::ClearLevels() { Levels()->ClearLevels(); } -static bool IsSubordinate(FoldLevel levelStart, FoldLevel levelTry) noexcept { - if (LevelIsWhitespace(levelTry)) +static bool IsSubordinate(int levelStart, int levelTry) { + if (levelTry & SC_FOLDLEVELWHITEFLAG) return true; else return LevelNumber(levelStart) < LevelNumber(levelTry); } -Sci::Line Document::GetLastChild(Sci::Line lineParent, std::optional level, Sci::Line lastLine) { - const FoldLevel levelStart = LevelNumberPart(level ? *level : GetFoldLevel(lineParent)); +Sci::Line Document::GetLastChild(Sci::Line lineParent, int level, Sci::Line lastLine) { + if (level == -1) + level = LevelNumber(GetLevel(lineParent)); const Sci::Line maxLine = LinesTotal(); const Sci::Line lookLastLine = (lastLine != -1) ? std::min(LinesTotal() - 1, lastLine) : -1; Sci::Line lineMaxSubord = lineParent; while (lineMaxSubord < maxLine - 1) { EnsureStyledTo(LineStart(lineMaxSubord + 2)); - if (!IsSubordinate(levelStart, GetFoldLevel(lineMaxSubord + 1))) + if (!IsSubordinate(level, GetLevel(lineMaxSubord + 1))) break; - if ((lookLastLine != -1) && (lineMaxSubord >= lookLastLine) && !LevelIsWhitespace(GetFoldLevel(lineMaxSubord))) + if ((lookLastLine != -1) && (lineMaxSubord >= lookLastLine) && !(GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG)) break; lineMaxSubord++; } if (lineMaxSubord > lineParent) { - if (levelStart > LevelNumberPart(GetFoldLevel(lineMaxSubord + 1))) { + if (level > LevelNumber(GetLevel(lineMaxSubord + 1))) { // Have chewed up some whitespace that belongs to a parent so seek back - if (LevelIsWhitespace(GetFoldLevel(lineMaxSubord))) { + if (GetLevel(lineMaxSubord) & SC_FOLDLEVELWHITEFLAG) { lineMaxSubord--; } } @@ -563,16 +509,16 @@ Sci::Line Document::GetLastChild(Sci::Line lineParent, std::optional } Sci::Line Document::GetFoldParent(Sci::Line line) const { - const FoldLevel level = LevelNumberPart(GetFoldLevel(line)); + const int level = LevelNumber(GetLevel(line)); Sci::Line lineLook = line - 1; while ((lineLook > 0) && ( - (!LevelIsHeader(GetFoldLevel(lineLook))) || - (LevelNumberPart(GetFoldLevel(lineLook)) >= level)) + (!(GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG)) || + (LevelNumber(GetLevel(lineLook)) >= level)) ) { lineLook--; } - if (LevelIsHeader(GetFoldLevel(lineLook)) && - (LevelNumberPart(GetFoldLevel(lineLook)) < level)) { + if ((GetLevel(lineLook) & SC_FOLDLEVELHEADERFLAG) && + (LevelNumber(GetLevel(lineLook)) < level)) { return lineLook; } else { return -1; @@ -580,49 +526,49 @@ Sci::Line Document::GetFoldParent(Sci::Line line) const { } void Document::GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sci::Line line, Sci::Line lastLine) { - const FoldLevel level = GetFoldLevel(line); + const int level = GetLevel(line); const Sci::Line lookLastLine = std::max(line, lastLine) + 1; Sci::Line lookLine = line; - FoldLevel lookLineLevel = level; - FoldLevel lookLineLevelNum = LevelNumberPart(lookLineLevel); - while ((lookLine > 0) && (LevelIsWhitespace(lookLineLevel) || - (LevelIsHeader(lookLineLevel) && (lookLineLevelNum >= LevelNumberPart(GetFoldLevel(lookLine + 1)))))) { - lookLineLevel = GetFoldLevel(--lookLine); - lookLineLevelNum = LevelNumberPart(lookLineLevel); + int lookLineLevel = level; + int lookLineLevelNum = LevelNumber(lookLineLevel); + while ((lookLine > 0) && ((lookLineLevel & SC_FOLDLEVELWHITEFLAG) || + ((lookLineLevel & SC_FOLDLEVELHEADERFLAG) && (lookLineLevelNum >= LevelNumber(GetLevel(lookLine + 1)))))) { + lookLineLevel = GetLevel(--lookLine); + lookLineLevelNum = LevelNumber(lookLineLevel); } - Sci::Line beginFoldBlock = LevelIsHeader(lookLineLevel) ? lookLine : GetFoldParent(lookLine); + Sci::Line beginFoldBlock = (lookLineLevel & SC_FOLDLEVELHEADERFLAG) ? lookLine : GetFoldParent(lookLine); if (beginFoldBlock == -1) { highlightDelimiter.Clear(); return; } - Sci::Line endFoldBlock = GetLastChild(beginFoldBlock, {}, lookLastLine); + Sci::Line endFoldBlock = GetLastChild(beginFoldBlock, -1, lookLastLine); Sci::Line firstChangeableLineBefore = -1; if (endFoldBlock < line) { lookLine = beginFoldBlock - 1; - lookLineLevel = GetFoldLevel(lookLine); - lookLineLevelNum = LevelNumberPart(lookLineLevel); - while ((lookLine >= 0) && (lookLineLevelNum >= FoldLevel::Base)) { - if (LevelIsHeader(lookLineLevel)) { - if (GetLastChild(lookLine, {}, lookLastLine) == line) { + lookLineLevel = GetLevel(lookLine); + lookLineLevelNum = LevelNumber(lookLineLevel); + while ((lookLine >= 0) && (lookLineLevelNum >= SC_FOLDLEVELBASE)) { + if (lookLineLevel & SC_FOLDLEVELHEADERFLAG) { + if (GetLastChild(lookLine, -1, lookLastLine) == line) { beginFoldBlock = lookLine; endFoldBlock = line; firstChangeableLineBefore = line - 1; } } - if ((lookLine > 0) && (lookLineLevelNum == FoldLevel::Base) && (LevelNumberPart(GetFoldLevel(lookLine - 1)) > lookLineLevelNum)) + if ((lookLine > 0) && (lookLineLevelNum == SC_FOLDLEVELBASE) && (LevelNumber(GetLevel(lookLine - 1)) > lookLineLevelNum)) break; - lookLineLevel = GetFoldLevel(--lookLine); - lookLineLevelNum = LevelNumberPart(lookLineLevel); + lookLineLevel = GetLevel(--lookLine); + lookLineLevelNum = LevelNumber(lookLineLevel); } } if (firstChangeableLineBefore == -1) { - for (lookLine = line - 1, lookLineLevel = GetFoldLevel(lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel); + for (lookLine = line - 1, lookLineLevel = GetLevel(lookLine), lookLineLevelNum = LevelNumber(lookLineLevel); lookLine >= beginFoldBlock; - lookLineLevel = GetFoldLevel(--lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel)) { - if (LevelIsWhitespace(lookLineLevel) || (lookLineLevelNum > LevelNumberPart(level))) { + lookLineLevel = GetLevel(--lookLine), lookLineLevelNum = LevelNumber(lookLineLevel)) { + if ((lookLineLevel & SC_FOLDLEVELWHITEFLAG) || (lookLineLevelNum > LevelNumber(level))) { firstChangeableLineBefore = lookLine; break; } @@ -632,10 +578,10 @@ void Document::GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sc firstChangeableLineBefore = beginFoldBlock - 1; Sci::Line firstChangeableLineAfter = -1; - for (lookLine = line + 1, lookLineLevel = GetFoldLevel(lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel); + for (lookLine = line + 1, lookLineLevel = GetLevel(lookLine), lookLineLevelNum = LevelNumber(lookLineLevel); lookLine <= endFoldBlock; - lookLineLevel = GetFoldLevel(++lookLine), lookLineLevelNum = LevelNumberPart(lookLineLevel)) { - if (LevelIsHeader(lookLineLevel) && (lookLineLevelNum < LevelNumberPart(GetFoldLevel(lookLine + 1)))) { + lookLineLevel = GetLevel(++lookLine), lookLineLevelNum = LevelNumber(lookLineLevel)) { + if ((lookLineLevel & SC_FOLDLEVELHEADERFLAG) && (lookLineLevelNum < LevelNumber(GetLevel(lookLine + 1)))) { firstChangeableLineAfter = lookLine; break; } @@ -649,50 +595,35 @@ void Document::GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sc highlightDelimiter.firstChangeableLineAfter = firstChangeableLineAfter; } -Sci::Position Document::ClampPositionIntoDocument(Sci::Position pos) const noexcept { - return std::clamp(pos, 0, LengthNoExcept()); +Sci::Position Document::ClampPositionIntoDocument(Sci::Position pos) const { + return Sci::clamp(pos, static_cast(0), static_cast(Length())); } -bool Document::IsCrLf(Sci::Position pos) const noexcept { +bool Document::IsCrLf(Sci::Position pos) const { if (pos < 0) return false; - if (pos >= (LengthNoExcept() - 1)) + if (pos >= (Length() - 1)) return false; return (cb.CharAt(pos) == '\r') && (cb.CharAt(pos + 1) == '\n'); } -int Document::LenChar(Sci::Position pos) const noexcept { - if (pos < 0 || pos >= LengthNoExcept()) { - // Returning 1 instead of 0 to defend against hanging with a loop that goes (or starts) out of bounds. +int Document::LenChar(Sci::Position pos) { + if (pos < 0) { return 1; } else if (IsCrLf(pos)) { return 2; - } - - const unsigned char leadByte = cb.UCharAt(pos); - if (!dbcsCodePage || UTF8IsAscii(leadByte)) { - // Common case: ASCII character - return 1; - } - if (CpUtf8 == dbcsCodePage) { + } else if (SC_CP_UTF8 == dbcsCodePage) { + const unsigned char leadByte = cb.UCharAt(pos); const int widthCharBytes = UTF8BytesOfLead[leadByte]; - unsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 }; - for (int b = 1; b < widthCharBytes; b++) { - charBytes[b] = cb.UCharAt(pos + b); - } - const int utf8status = UTF8Classify(charBytes, widthCharBytes); - if (utf8status & UTF8MaskInvalid) { - // Treat as invalid and use up just one byte - return 1; - } else { - return utf8status & UTF8MaskWidth; - } + const Sci::Position lengthDoc = Length(); + if ((pos + widthCharBytes) > lengthDoc) + return static_cast(lengthDoc - pos); + else + return widthCharBytes; + } else if (dbcsCodePage) { + return IsDBCSLeadByteNoExcept(cb.CharAt(pos)) ? 2 : 1; } else { - if (IsDBCSLeadByteNoExcept(leadByte) && IsDBCSTrailByteNoExcept(cb.CharAt(pos + 1))) { - return 2; - } else { - return 1; - } + return 1; } } @@ -723,20 +654,20 @@ bool Document::InGoodUTF8(Sci::Position pos, Sci::Position &start, Sci::Position } } -// Normalise a position so that it is not part way through a multi-byte character. +// Normalise a position so that it is not halfway through a two byte character. // This can occur in two situations - // When lines are terminated with \r\n pairs which should be treated as one character. // When displaying DBCS text such as Japanese. // If moving, move the position in the indicated direction. -Sci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd) const noexcept { +Sci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd) const { //Platform::DebugPrintf("NoCRLF %d %d\n", pos, moveDir); // If out of range, just return minimum/maximum value. if (pos <= 0) return 0; - if (pos >= LengthNoExcept()) - return LengthNoExcept(); + if (pos >= Length()) + return Length(); - // PLATFORM_ASSERT(pos > 0 && pos < LengthNoExcept()); + // PLATFORM_ASSERT(pos > 0 && pos < Length()); if (checkLineEnd && IsCrLf(pos - 1)) { if (moveDir > 0) return pos + 1; @@ -745,7 +676,7 @@ Sci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position } if (dbcsCodePage) { - if (CpUtf8 == dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { const unsigned char ch = cb.UCharAt(pos); // If ch is not a trail byte then pos is valid intercharacter position if (UTF8IsTrailByte(ch)) { @@ -763,7 +694,7 @@ Sci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position } else { // Anchor DBCS calculations at start of line because start of line can // not be a DBCS trail byte. - const Sci::Position posStartLine = cb.LineStart(cb.LineFromPosition(pos)); + const Sci::Position posStartLine = LineStart(LineFromPosition(pos)); if (pos == posStartLine) return pos; @@ -774,7 +705,7 @@ Sci::Position Document::MovePositionOutsideChar(Sci::Position pos, Sci::Position // Check from known start of character. while (posCheck < pos) { - const int mbsize = IsDBCSDualByteAt(posCheck) ? 2 : 1; + const int mbsize = IsDBCSLeadByteNoExcept(cb.CharAt(posCheck)) ? 2 : 1; if (posCheck + mbsize == pos) { return pos; } else if (posCheck + mbsize > pos) { @@ -804,7 +735,7 @@ Sci::Position Document::NextPosition(Sci::Position pos, int moveDir) const noexc return cb.Length(); if (dbcsCodePage) { - if (CpUtf8 == dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { if (increment == 1) { // Simple forward movement case so can avoid some checks const unsigned char leadByte = cb.UCharAt(pos); @@ -839,7 +770,7 @@ Sci::Position Document::NextPosition(Sci::Position pos, int moveDir) const noexc } } else { if (moveDir > 0) { - const int mbsize = IsDBCSDualByteAt(pos) ? 2 : 1; + const int mbsize = IsDBCSLeadByteNoExcept(cb.CharAt(pos)) ? 2 : 1; pos += mbsize; if (pos > cb.Length()) pos = cb.Length(); @@ -852,13 +783,8 @@ Sci::Position Document::NextPosition(Sci::Position pos, int moveDir) const noexc if ((pos - 1) <= posStartLine) { return pos - 1; } else if (IsDBCSLeadByteNoExcept(cb.CharAt(pos - 1))) { - // Should actually be trail byte - if (IsDBCSDualByteAt(pos - 2)) { - return pos - 2; - } else { - // Invalid byte pair so treat as one byte wide - return pos - 1; - } + // Must actually be trail byte + return pos - 2; } else { // Otherwise, step back until a non-lead-byte is found. Sci::Position posTemp = pos - 1; @@ -867,12 +793,7 @@ Sci::Position Document::NextPosition(Sci::Position pos, int moveDir) const noexc // Now posTemp+1 must point to the beginning of a character, // so figure out whether we went back an even or an odd // number of bytes and go back 1 or 2 bytes, respectively. - const Sci::Position widthLast = ((pos - posTemp) & 1) + 1; - if ((widthLast == 2) && (IsDBCSDualByteAt(pos - widthLast))) { - return pos - widthLast; - } - // Byte before pos may be valid character or may be an invalid second byte - return pos - 1; + return (pos - 1 - ((pos - posTemp) & 1)); } } } @@ -894,8 +815,8 @@ bool Document::NextCharacter(Sci::Position &pos, int moveDir) const noexcept { } } -Document::CharacterExtracted Document::CharacterAfter(Sci::Position position) const noexcept { - if (position >= LengthNoExcept()) { +Document::CharacterExtracted Document::CharacterAfter(Sci::Position position) const { + if (position >= Length()) { return CharacterExtracted(unicodeReplacementChar, 0); } const unsigned char leadByte = cb.UCharAt(position); @@ -903,7 +824,7 @@ Document::CharacterExtracted Document::CharacterAfter(Sci::Position position) co // Common case: ASCII character return CharacterExtracted(leadByte, 1); } - if (CpUtf8 == dbcsCodePage) { + if (SC_CP_UTF8 == dbcsCodePage) { const int widthCharBytes = UTF8BytesOfLead[leadByte]; unsigned char charBytes[UTF8MaxBytes] = { leadByte, 0, 0, 0 }; for (int b = 1; b(endUTF - startUTF); unsigned char charBytes[UTF8MaxBytes] = { 0, 0, 0, 0 }; - for (Sci::Position b = 0; b Length())) - return Sci::invalidPosition; + return INVALID_POSITION; } return pos; } -Sci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const noexcept { +Sci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const { Sci::Position pos = positionStart; if (dbcsCodePage) { const int increment = (characterOffset > 0) ? 1 : -1; while (characterOffset != 0) { const Sci::Position posNext = NextPosition(pos, increment); if (posNext == pos) - return Sci::invalidPosition; + return INVALID_POSITION; if (std::abs(pos-posNext) > 3) // 4 byte character = 2*UTF16. characterOffset -= increment; pos = posNext; @@ -1002,39 +921,45 @@ Sci::Position Document::GetRelativePositionUTF16(Sci::Position positionStart, Sc } } else { pos = positionStart + characterOffset; - if ((pos < 0) || (pos > LengthNoExcept())) - return Sci::invalidPosition; + if ((pos < 0) || (pos > Length())) + return INVALID_POSITION; } return pos; } int SCI_METHOD Document::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const { + int character; int bytesInCharacter = 1; - const unsigned char leadByte = cb.UCharAt(position); - int character = leadByte; - if (dbcsCodePage && !UTF8IsAscii(leadByte)) { - if (CpUtf8 == dbcsCodePage) { - const int widthCharBytes = UTF8BytesOfLead[leadByte]; - unsigned char charBytes[UTF8MaxBytes] = {leadByte,0,0,0}; - for (int b=1; b= 0xFE); + case 950: + // Big5 + return + ((lead >= 0x80) && (lead <= 0xA0)) || + (lead == 0xC8) || + (lead >= 0xFA); + case 1361: + // Korean Johab KS C-5601-1992 + return + ((lead >= 0x80) && (lead <= 0x83)) || + ((lead >= 0xD4) && (lead <= 0xD8)) || + (lead == 0xDF) || + (lead >= 0xFA); + } + return false; +} + +bool Document::IsDBCSTrailByteInvalid(char ch) const noexcept { const unsigned char trail = ch; switch (dbcsCodePage) { case 932: // Shift_jis - return (trail != 0x7F) && - ((trail >= 0x40) && (trail <= 0xFC)); + return + (trail <= 0x3F) || + (trail == 0x7F) || + (trail >= 0xFD); case 936: // GBK - return (trail != 0x7F) && - ((trail >= 0x40) && (trail <= 0xFE)); + return + (trail <= 0x3F) || + (trail == 0x7F) || + (trail == 0xFF); case 949: // Korean Wansung KS C-5601-1987 return - ((trail >= 0x41) && (trail <= 0x5A)) || - ((trail >= 0x61) && (trail <= 0x7A)) || - ((trail >= 0x81) && (trail <= 0xFE)); + (trail <= 0x40) || + ((trail >= 0x5B) && (trail <= 0x60)) || + ((trail >= 0x7B) && (trail <= 0x80)) || + (trail == 0xFF); case 950: // Big5 return - ((trail >= 0x40) && (trail <= 0x7E)) || - ((trail >= 0xA1) && (trail <= 0xFE)); + (trail <= 0x3F) || + ((trail >= 0x7F) && (trail <= 0xA0)) || + (trail == 0xFF); case 1361: // Korean Johab KS C-5601-1992 return - ((trail >= 0x31) && (trail <= 0x7E)) || - ((trail >= 0x81) && (trail <= 0xFE)); + (trail <= 0x30) || + (trail == 0x7F) || + (trail == 0x80) || + (trail == 0xFF); } return false; } -int Document::DBCSDrawBytes(std::string_view text) const noexcept { - if (text.length() <= 1) { - return static_cast(text.length()); +int Document::DBCSDrawBytes(const char *text, int len) const noexcept { + if (len <= 1) { + return len; } if (IsDBCSLeadByteNoExcept(text[0])) { - return IsDBCSTrailByteNoExcept(text[1]) ? 2 : 1; + return IsDBCSTrailByteInvalid(text[1]) ? 1 : 2; } else { return 1; } } -bool Document::IsDBCSDualByteAt(Sci::Position pos) const noexcept { - return IsDBCSLeadByteNoExcept(cb.CharAt(pos)) - && IsDBCSTrailByteNoExcept(cb.CharAt(pos + 1)); +static inline bool IsSpaceOrTab(int ch) noexcept { + return ch == ' ' || ch == '\t'; } -// Need to break text into segments near end but taking into account the -// encoding to not break inside a UTF-8 or DBCS character and also trying -// to avoid breaking inside a pair of combining characters, or inside -// ligatures. -// TODO: implement grapheme cluster boundaries, -// see https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries. -// +// Need to break text into segments near lengthSegment but taking into +// account the encoding to not break inside a UTF-8 or DBCS character +// and also trying to avoid breaking inside a pair of combining characters. // The segment length must always be long enough (more than 4 bytes) // so that there will be at least one whole character to make a segment. // For UTF-8, text must consist only of valid whole characters. // In preference order from best to worst: -// 1) Break before or after spaces or controls -// 2) Break at word and punctuation boundary for better kerning and ligature support -// 3) Break after whole character, this may break combining characters - -size_t Document::SafeSegment(std::string_view text) const noexcept { - // check space first as most written language use spaces. - for (std::string_view::iterator it = text.end() - 1; it != text.begin(); --it) { - if (IsBreakSpace(*it)) { - return it - text.begin(); - } - } - - if (!dbcsCodePage || dbcsCodePage == CpUtf8) { - // backward iterate for UTF-8 and single byte encoding to find word and punctuation boundary. - std::string_view::iterator it = text.end() - 1; - const bool punctuation = IsPunctuation(*it); - do { - --it; - if (punctuation != IsPunctuation(*it)) { - return it - text.begin() + 1; +// 1) Break after space +// 2) Break before punctuation +// 3) Break after whole character + +int Document::SafeSegment(const char *text, int length, int lengthSegment) const noexcept { + if (length <= lengthSegment) + return length; + int lastSpaceBreak = -1; + int lastPunctuationBreak = -1; + int lastEncodingAllowedBreak = 0; + for (int j=0; j < lengthSegment;) { + const unsigned char ch = text[j]; + if (j > 0) { + if (IsSpaceOrTab(text[j - 1]) && !IsSpaceOrTab(text[j])) { + lastSpaceBreak = j; } - } while (it != text.begin()); - - it = text.end() - 1; - if (dbcsCodePage) { - // for UTF-8 go back to the start of last character. - for (int trail = 0; trail < UTF8MaxBytes - 1 && UTF8IsTrailByte(*it); trail++) { - --it; + if (ch < 'A') { + lastPunctuationBreak = j; } } - return it - text.begin(); - } - - { - // forward iterate for DBCS to find word and punctuation boundary. - size_t lastPunctuationBreak = 0; - size_t lastEncodingAllowedBreak = 0; - CharacterClass ccPrev = CharacterClass::space; - for (size_t j = 0; j < text.length();) { - const unsigned char ch = text[j]; - lastEncodingAllowedBreak = j++; + lastEncodingAllowedBreak = j; - CharacterClass cc = CharacterClass::word; - if (UTF8IsAscii(ch)) { - if (IsPunctuation(ch)) { - cc = CharacterClass::punctuation; - } - } else { - j += IsDBCSLeadByteNoExcept(ch); - } - if (cc != ccPrev) { - ccPrev = cc; - lastPunctuationBreak = lastEncodingAllowedBreak; - } + if (dbcsCodePage == SC_CP_UTF8) { + j += UTF8BytesOfLead[ch]; + } else if (dbcsCodePage) { + j += IsDBCSLeadByteNoExcept(ch) ? 2 : 1; + } else { + j++; } - return lastPunctuationBreak ? lastPunctuationBreak : lastEncodingAllowedBreak; } + if (lastSpaceBreak >= 0) { + return lastSpaceBreak; + } else if (lastPunctuationBreak >= 0) { + return lastPunctuationBreak; + } + return lastEncodingAllowedBreak; } EncodingFamily Document::CodePageFamily() const noexcept { - if (CpUtf8 == dbcsCodePage) - return EncodingFamily::unicode; + if (SC_CP_UTF8 == dbcsCodePage) + return efUnicode; else if (dbcsCodePage) - return EncodingFamily::dbcs; + return efDBCS; else - return EncodingFamily::eightBit; + return efEightBit; } void Document::ModifiedAt(Sci::Position pos) noexcept { @@ -1227,7 +1171,7 @@ bool Document::DeleteChars(Sci::Position pos, Sci::Position len) { return false; if (len <= 0) return false; - if ((pos + len) > LengthNoExcept()) + if ((pos + len) > Length()) return false; CheckReadOnly(); if (enteredModification != 0) { @@ -1237,23 +1181,22 @@ bool Document::DeleteChars(Sci::Position pos, Sci::Position len) { if (!cb.IsReadOnly()) { NotifyModified( DocModification( - ModificationFlags::BeforeDelete | ModificationFlags::User, + SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, pos, len, - 0, nullptr)); + 0, 0)); const Sci::Line prevLinesTotal = LinesTotal(); const bool startSavePoint = cb.IsSavePoint(); bool startSequence = false; const char *text = cb.DeleteChars(pos, len, startSequence); if (startSavePoint && cb.IsCollectingUndo()) - NotifySavePoint(false); - if ((pos < LengthNoExcept()) || (pos == 0)) + NotifySavePoint(!startSavePoint); + if ((pos < Length()) || (pos == 0)) ModifiedAt(pos); else ModifiedAt(pos-1); NotifyModified( DocModification( - ModificationFlags::DeleteText | ModificationFlags::User | - (startSequence?ModificationFlags::StartAction:ModificationFlags::None), + SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), pos, len, LinesTotal() - prevLinesTotal, text)); } @@ -1281,7 +1224,7 @@ Sci::Position Document::InsertString(Sci::Position position, const char *s, Sci: insertion.clear(); NotifyModified( DocModification( - ModificationFlags::InsertCheck, + SC_MOD_INSERTCHECK, position, insertLength, 0, s)); if (insertionSet) { @@ -1290,7 +1233,7 @@ Sci::Position Document::InsertString(Sci::Position position, const char *s, Sci: } NotifyModified( DocModification( - ModificationFlags::BeforeInsert | ModificationFlags::User, + SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, position, insertLength, 0, s)); const Sci::Line prevLinesTotal = LinesTotal(); @@ -1298,12 +1241,11 @@ Sci::Position Document::InsertString(Sci::Position position, const char *s, Sci: bool startSequence = false; const char *text = cb.InsertString(position, s, insertLength, startSequence); if (startSavePoint && cb.IsCollectingUndo()) - NotifySavePoint(false); + NotifySavePoint(!startSavePoint); ModifiedAt(position); NotifyModified( DocModification( - ModificationFlags::InsertText | ModificationFlags::User | - (startSequence?ModificationFlags::StartAction:ModificationFlags::None), + SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), position, insertLength, LinesTotal() - prevLinesTotal, text)); if (insertionSet) { // Free memory as could be large @@ -1323,11 +1265,11 @@ int SCI_METHOD Document::AddData(const char *data, Sci_Position length) { const Sci::Position position = Length(); InsertString(position, data, length); } catch (std::bad_alloc &) { - return static_cast(Status::BadAlloc); + return SC_STATUS_BADALLOC; } catch (...) { - return static_cast(Status::Failure); + return SC_STATUS_FAILURE; } - return static_cast(Status::Ok); + return 0; } void * SCI_METHOD Document::ConvertToDocument() { @@ -1351,11 +1293,11 @@ Sci::Position Document::Undo() { for (int step = 0; step < steps; step++) { const Sci::Line prevLinesTotal = LinesTotal(); const Action &action = cb.GetUndoStep(); - if (action.at == ActionType::remove) { + if (action.at == removeAction) { NotifyModified(DocModification( - ModificationFlags::BeforeInsert | ModificationFlags::Undo, action)); - } else if (action.at == ActionType::container) { - DocModification dm(ModificationFlags::Container | ModificationFlags::Undo); + SC_MOD_BEFOREINSERT | SC_PERFORMED_UNDO, action)); + } else if (action.at == containerAction) { + DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_UNDO); dm.token = action.position; NotifyModified(dm); if (!action.mayCoalesce) { @@ -1366,19 +1308,19 @@ Sci::Position Document::Undo() { } } else { NotifyModified(DocModification( - ModificationFlags::BeforeDelete | ModificationFlags::Undo, action)); + SC_MOD_BEFOREDELETE | SC_PERFORMED_UNDO, action)); } cb.PerformUndoStep(); - if (action.at != ActionType::container) { + if (action.at != containerAction) { ModifiedAt(action.position); newPos = action.position; } - ModificationFlags modFlags = ModificationFlags::Undo; + int modFlags = SC_PERFORMED_UNDO; // With undo, an insertion action becomes a deletion notification - if (action.at == ActionType::remove) { + if (action.at == removeAction) { newPos += action.lenData; - modFlags |= ModificationFlags::InsertText; + modFlags |= SC_MOD_INSERTTEXT; if ((coalescedRemoveLen > 0) && (action.position == prevRemoveActionPos || action.position == (prevRemoveActionPos + prevRemoveActionLen))) { coalescedRemoveLen += action.lenData; @@ -1389,22 +1331,22 @@ Sci::Position Document::Undo() { } prevRemoveActionPos = action.position; prevRemoveActionLen = action.lenData; - } else if (action.at == ActionType::insert) { - modFlags |= ModificationFlags::DeleteText; + } else if (action.at == insertAction) { + modFlags |= SC_MOD_DELETETEXT; coalescedRemovePos = -1; coalescedRemoveLen = 0; prevRemoveActionPos = -1; prevRemoveActionLen = 0; } if (steps > 1) - modFlags |= ModificationFlags::MultiStepUndoRedo; + modFlags |= SC_MULTISTEPUNDOREDO; const Sci::Line linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { - modFlags |= ModificationFlags::LastStepInUndoRedo; + modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) - modFlags |= ModificationFlags::MultilineUndoRedo; + modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified(DocModification(modFlags, action.position, action.lenData, linesAdded, action.data.get())); @@ -1431,39 +1373,39 @@ Sci::Position Document::Redo() { for (int step = 0; step < steps; step++) { const Sci::Line prevLinesTotal = LinesTotal(); const Action &action = cb.GetRedoStep(); - if (action.at == ActionType::insert) { + if (action.at == insertAction) { NotifyModified(DocModification( - ModificationFlags::BeforeInsert | ModificationFlags::Redo, action)); - } else if (action.at == ActionType::container) { - DocModification dm(ModificationFlags::Container | ModificationFlags::Redo); + SC_MOD_BEFOREINSERT | SC_PERFORMED_REDO, action)); + } else if (action.at == containerAction) { + DocModification dm(SC_MOD_CONTAINER | SC_PERFORMED_REDO); dm.token = action.position; NotifyModified(dm); } else { NotifyModified(DocModification( - ModificationFlags::BeforeDelete | ModificationFlags::Redo, action)); + SC_MOD_BEFOREDELETE | SC_PERFORMED_REDO, action)); } cb.PerformRedoStep(); - if (action.at != ActionType::container) { + if (action.at != containerAction) { ModifiedAt(action.position); newPos = action.position; } - ModificationFlags modFlags = ModificationFlags::Redo; - if (action.at == ActionType::insert) { + int modFlags = SC_PERFORMED_REDO; + if (action.at == insertAction) { newPos += action.lenData; - modFlags |= ModificationFlags::InsertText; - } else if (action.at == ActionType::remove) { - modFlags |= ModificationFlags::DeleteText; + modFlags |= SC_MOD_INSERTTEXT; + } else if (action.at == removeAction) { + modFlags |= SC_MOD_DELETETEXT; } if (steps > 1) - modFlags |= ModificationFlags::MultiStepUndoRedo; + modFlags |= SC_MULTISTEPUNDOREDO; const Sci::Line linesAdded = LinesTotal() - prevLinesTotal; if (linesAdded != 0) multiLine = true; if (step == steps - 1) { - modFlags |= ModificationFlags::LastStepInUndoRedo; + modFlags |= SC_LASTSTEPINUNDOREDO; if (multiLine) - modFlags |= ModificationFlags::MultilineUndoRedo; + modFlags |= SC_MULTILINEUNDOREDO; } NotifyModified( DocModification(modFlags, action.position, action.lenData, @@ -1496,7 +1438,7 @@ void Document::DelCharBack(Sci::Position pos) { } } -static constexpr Sci::Position NextTab(Sci::Position pos, Sci::Position tabSize) noexcept { +static Sci::Position NextTab(Sci::Position pos, Sci::Position tabSize) noexcept { return ((pos / tabSize) + 1) * tabSize; } @@ -1585,7 +1527,7 @@ Sci::Position Document::GetColumn(Sci::Position pos) { return column; } -Sci::Position Document::CountCharacters(Sci::Position startPos, Sci::Position endPos) const noexcept { +Sci::Position Document::CountCharacters(Sci::Position startPos, Sci::Position endPos) const { startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, -1, false); Sci::Position count = 0; @@ -1597,7 +1539,7 @@ Sci::Position Document::CountCharacters(Sci::Position startPos, Sci::Position en return count; } -Sci::Position Document::CountUTF16(Sci::Position startPos, Sci::Position endPos) const noexcept { +Sci::Position Document::CountUTF16(Sci::Position startPos, Sci::Position endPos) const { startPos = MovePositionOutsideChar(startPos, 1, false); endPos = MovePositionOutsideChar(endPos, -1, false); Sci::Position count = 0; @@ -1652,15 +1594,15 @@ void Document::Indent(bool forwards, Sci::Line lineBottom, Sci::Line lineTop) { // Convert line endings for a piece of text to a particular mode. // Stop at len or when a NUL is found. -std::string Document::TransformLineEnds(const char *s, size_t len, EndOfLine eolModeWanted) { +std::string Document::TransformLineEnds(const char *s, size_t len, int eolModeWanted) { std::string dest; for (size_t i = 0; (i < len) && (s[i]); i++) { if (s[i] == '\n' || s[i] == '\r') { - if (eolModeWanted == EndOfLine::Cr) { + if (eolModeWanted == SC_EOL_CR) { dest.push_back('\r'); - } else if (eolModeWanted == EndOfLine::Lf) { + } else if (eolModeWanted == SC_EOL_LF) { dest.push_back('\n'); - } else { // eolModeWanted == EndOfLine::CrLf + } else { // eolModeWanted == SC_EOL_CRLF dest.push_back('\r'); dest.push_back('\n'); } @@ -1674,25 +1616,25 @@ std::string Document::TransformLineEnds(const char *s, size_t len, EndOfLine eol return dest; } -void Document::ConvertLineEnds(EndOfLine eolModeSet) { +void Document::ConvertLineEnds(int eolModeSet) { UndoGroup ug(this); for (Sci::Position pos = 0; pos < Length(); pos++) { if (cb.CharAt(pos) == '\r') { if (cb.CharAt(pos + 1) == '\n') { // CRLF - if (eolModeSet == EndOfLine::Cr) { + if (eolModeSet == SC_EOL_CR) { DeleteChars(pos + 1, 1); // Delete the LF - } else if (eolModeSet == EndOfLine::Lf) { + } else if (eolModeSet == SC_EOL_LF) { DeleteChars(pos, 1); // Delete the CR } else { pos++; } } else { // CR - if (eolModeSet == EndOfLine::CrLf) { + if (eolModeSet == SC_EOL_CRLF) { pos += InsertString(pos + 1, "\n", 1); // Insert LF - } else if (eolModeSet == EndOfLine::Lf) { + } else if (eolModeSet == SC_EOL_LF) { pos += InsertString(pos, "\n", 1); // Insert LF DeleteChars(pos, 1); // Delete CR pos--; @@ -1700,9 +1642,9 @@ void Document::ConvertLineEnds(EndOfLine eolModeSet) { } } else if (cb.CharAt(pos) == '\n') { // LF - if (eolModeSet == EndOfLine::CrLf) { + if (eolModeSet == SC_EOL_CRLF) { pos += InsertString(pos, "\r", 1); // Insert CR - } else if (eolModeSet == EndOfLine::Cr) { + } else if (eolModeSet == SC_EOL_CR) { pos += InsertString(pos, "\r", 1); // Insert CR DeleteChars(pos, 1); // Delete LF pos--; @@ -1712,9 +1654,9 @@ void Document::ConvertLineEnds(EndOfLine eolModeSet) { } -DocumentOption Document::Options() const noexcept { - return (IsLarge() ? DocumentOption::TextLarge : DocumentOption::Default) | - (cb.HasStyles() ? DocumentOption::Default : DocumentOption::StylesNone); +int Document::Options() const { + return (IsLarge() ? SC_DOCUMENTOPTION_TEXT_LARGE : 0) | + (cb.HasStyles() ? 0 : SC_DOCUMENTOPTION_STYLES_NONE); } bool Document::IsWhiteLine(Sci::Line line) const { @@ -1756,17 +1698,25 @@ Sci::Position Document::ParaDown(Sci::Position pos) const { return LineEnd(line-1); } -CharacterClass Document::WordCharacterClass(unsigned int ch) const { - if (dbcsCodePage && (ch >= 0x80)) { - if (CpUtf8 == dbcsCodePage) { +bool Document::IsASCIIWordByte(unsigned char ch) const { + if (IsASCII(ch)) { + return charClass.GetClass(ch) == CharClassify::ccWord; + } else { + return false; + } +} + +CharClassify::cc Document::WordCharacterClass(unsigned int ch) const { + if (dbcsCodePage && (!UTF8IsAscii(ch))) { + if (SC_CP_UTF8 == dbcsCodePage) { // Use hard coded Unicode class - const CharacterCategory cc = charMap.CategoryFor(ch); + const CharacterCategory cc = CategoriseCharacter(ch); switch (cc) { // Separator, Line/Paragraph case ccZl: case ccZp: - return CharacterClass::newLine; + return CharClassify::ccNewLine; // Separator, Space case ccZs: @@ -1776,7 +1726,7 @@ CharacterClass Document::WordCharacterClass(unsigned int ch) const { case ccCs: case ccCo: case ccCn: - return CharacterClass::space; + return CharClassify::ccSpace; // Letter case ccLu: @@ -1792,7 +1742,7 @@ CharacterClass Document::WordCharacterClass(unsigned int ch) const { case ccMn: case ccMc: case ccMe: - return CharacterClass::word; + return CharClassify::ccWord; // Punctuation case ccPc: @@ -1807,23 +1757,23 @@ CharacterClass Document::WordCharacterClass(unsigned int ch) const { case ccSc: case ccSk: case ccSo: - return CharacterClass::punctuation; + return CharClassify::ccPunctuation; } } else { // Asian DBCS - return CharacterClass::word; + return CharClassify::ccWord; } } return charClass.GetClass(static_cast(ch)); } /** - * Used by commands that want to select whole words. + * Used by commmands that want to select whole words. * Finds the start of word at pos when delta < 0 or the end of the word when delta >= 0. */ Sci::Position Document::ExtendWordSelect(Sci::Position pos, int delta, bool onlyWordCharacters) const { - CharacterClass ccStart = CharacterClass::word; + CharClassify::cc ccStart = CharClassify::ccWord; if (delta < 0) { if (!onlyWordCharacters) { const CharacterExtracted ce = CharacterBefore(pos); @@ -1836,11 +1786,11 @@ Sci::Position Document::ExtendWordSelect(Sci::Position pos, int delta, bool only pos -= ce.widthBytes; } } else { - if (!onlyWordCharacters && pos < LengthNoExcept()) { + if (!onlyWordCharacters && pos < Length()) { const CharacterExtracted ce = CharacterAfter(pos); ccStart = WordCharacterClass(ce.character); } - while (pos < LengthNoExcept()) { + while (pos < Length()) { const CharacterExtracted ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; @@ -1861,13 +1811,13 @@ Sci::Position Document::NextWordStart(Sci::Position pos, int delta) const { if (delta < 0) { while (pos > 0) { const CharacterExtracted ce = CharacterBefore(pos); - if (WordCharacterClass(ce.character) != CharacterClass::space) + if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos -= ce.widthBytes; } if (pos > 0) { CharacterExtracted ce = CharacterBefore(pos); - const CharacterClass ccStart = WordCharacterClass(ce.character); + const CharClassify::cc ccStart = WordCharacterClass(ce.character); while (pos > 0) { ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != ccStart) @@ -1877,16 +1827,16 @@ Sci::Position Document::NextWordStart(Sci::Position pos, int delta) const { } } else { CharacterExtracted ce = CharacterAfter(pos); - const CharacterClass ccStart = WordCharacterClass(ce.character); - while (pos < LengthNoExcept()) { + const CharClassify::cc ccStart = WordCharacterClass(ce.character); + while (pos < Length()) { ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; pos += ce.widthBytes; } - while (pos < LengthNoExcept()) { + while (pos < Length()) { ce = CharacterAfter(pos); - if (WordCharacterClass(ce.character) != CharacterClass::space) + if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos += ce.widthBytes; } @@ -1905,8 +1855,8 @@ Sci::Position Document::NextWordEnd(Sci::Position pos, int delta) const { if (delta < 0) { if (pos > 0) { CharacterExtracted ce = CharacterBefore(pos); - const CharacterClass ccStart = WordCharacterClass(ce.character); - if (ccStart != CharacterClass::space) { + const CharClassify::cc ccStart = WordCharacterClass(ce.character); + if (ccStart != CharClassify::ccSpace) { while (pos > 0) { ce = CharacterBefore(pos); if (WordCharacterClass(ce.character) != ccStart) @@ -1916,22 +1866,22 @@ Sci::Position Document::NextWordEnd(Sci::Position pos, int delta) const { } while (pos > 0) { ce = CharacterBefore(pos); - if (WordCharacterClass(ce.character) != CharacterClass::space) + if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos -= ce.widthBytes; } } } else { - while (pos < LengthNoExcept()) { + while (pos < Length()) { const CharacterExtracted ce = CharacterAfter(pos); - if (WordCharacterClass(ce.character) != CharacterClass::space) + if (WordCharacterClass(ce.character) != CharClassify::ccSpace) break; pos += ce.widthBytes; } - if (pos < LengthNoExcept()) { + if (pos < Length()) { CharacterExtracted ce = CharacterAfter(pos); - const CharacterClass ccStart = WordCharacterClass(ce.character); - while (pos < LengthNoExcept()) { + const CharClassify::cc ccStart = WordCharacterClass(ce.character); + while (pos < Length()) { ce = CharacterAfter(pos); if (WordCharacterClass(ce.character) != ccStart) break; @@ -1942,45 +1892,38 @@ Sci::Position Document::NextWordEnd(Sci::Position pos, int delta) const { return pos; } -namespace { - -constexpr bool IsWordEdge(CharacterClass cc, CharacterClass ccNext) noexcept { - return (cc != ccNext) && - (cc == CharacterClass::word || cc == CharacterClass::punctuation); -} - -} - /** * Check that the character at the given position is a word or punctuation character and that * the previous character is of a different character class. */ bool Document::IsWordStartAt(Sci::Position pos) const { - if (pos >= LengthNoExcept()) + if (pos >= Length()) return false; - if (pos >= 0) { + if (pos > 0) { const CharacterExtracted cePos = CharacterAfter(pos); - // At start of document, treat as if space before so can be word start - const CharacterExtracted cePrev = (pos > 0) ? - CharacterBefore(pos) : CharacterExtracted(' ', 1); - return IsWordEdge(WordCharacterClass(cePos.character), WordCharacterClass(cePrev.character)); + const CharClassify::cc ccPos = WordCharacterClass(cePos.character); + const CharacterExtracted cePrev = CharacterBefore(pos); + const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character); + return (ccPos == CharClassify::ccWord || ccPos == CharClassify::ccPunctuation) && + (ccPos != ccPrev); } return true; } /** - * Check that the character before the given position is a word or punctuation character and that + * Check that the character at the given position is a word or punctuation character and that * the next character is of a different character class. */ bool Document::IsWordEndAt(Sci::Position pos) const { if (pos <= 0) return false; - if (pos <= LengthNoExcept()) { - // At end of document, treat as if space after so can be word end - const CharacterExtracted cePos = (pos < LengthNoExcept()) ? - CharacterAfter(pos) : CharacterExtracted(' ', 1); + if (pos < Length()) { + const CharacterExtracted cePos = CharacterAfter(pos); + const CharClassify::cc ccPos = WordCharacterClass(cePos.character); const CharacterExtracted cePrev = CharacterBefore(pos); - return IsWordEdge(WordCharacterClass(cePrev.character), WordCharacterClass(cePos.character)); + const CharClassify::cc ccPrev = WordCharacterClass(cePrev.character); + return (ccPrev == CharClassify::ccWord || ccPrev == CharClassify::ccPunctuation) && + (ccPrev != ccPos); } return true; } @@ -2003,8 +1946,8 @@ bool Document::HasCaseFolder() const noexcept { return pcf != nullptr; } -void Document::SetCaseFolder(std::unique_ptr pcf_) noexcept { - pcf = std::move(pcf_); +void Document::SetCaseFolder(CaseFolder *pcf_) { + pcf.reset(pcf_); } Document::CharacterExtracted Document::ExtractCharacter(Sci::Position position) const noexcept { @@ -2026,53 +1969,19 @@ Document::CharacterExtracted Document::ExtractCharacter(Sci::Position position) } } -namespace { - -// Equivalent of memchr over the split view -ptrdiff_t SplitFindChar(const SplitView &view, size_t start, size_t length, int ch) noexcept { - size_t range1Length = 0; - if (start < view.length1) { - range1Length = std::min(length, view.length1 - start); - const char *match = static_cast(memchr(view.segment1 + start, ch, range1Length)); - if (match) { - return match - view.segment1; - } - start += range1Length; - } - const char *match2 = static_cast(memchr(view.segment2 + start, ch, length - range1Length)); - if (match2) { - return match2 - view.segment2; - } - return -1; -} - -// Equivalent of memcmp over the split view -// This does not call memcmp as search texts are commonly too short to overcome the -// call overhead. -bool SplitMatch(const SplitView &view, size_t start, std::string_view text) noexcept { - for (size_t i = 0; i < text.length(); i++) { - if (view.CharAt(i + start) != text[i]) { - return false; - } - } - return true; -} - -} - /** * Find text in document, supporting both forward and backward * searches (just pass minPos > maxPos to do a backward search) * Has not been tested with backwards DBCS searches yet. */ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, const char *search, - FindOption flags, Sci::Position *length) { + int flags, Sci::Position *length) { if (*length <= 0) return minPos; - const bool caseSensitive = FlagSet(flags, FindOption::MatchCase); - const bool word = FlagSet(flags, FindOption::WholeWord); - const bool wordStart = FlagSet(flags, FindOption::WordStart); - const bool regExp = FlagSet(flags, FindOption::RegExp); + const bool caseSensitive = (flags & SCFIND_MATCHCASE) != 0; + const bool word = (flags & SCFIND_WHOLEWORD) != 0; + const bool wordStart = (flags & SCFIND_WORDSTART) != 0; + const bool regExp = (flags & SCFIND_REGEXP) != 0; if (regExp) { if (!regex) regex = std::unique_ptr(CreateRegexSearch(&charClass)); @@ -2096,98 +2005,60 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con // Back all of a character pos = NextPosition(pos, increment); } - const SplitView cbView = cb.AllView(); if (caseSensitive) { const Sci::Position endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos; - const unsigned char charStartSearch = search[0]; - if (forward && ((0 == dbcsCodePage) || (CpUtf8 == dbcsCodePage && !UTF8IsTrailByte(charStartSearch)))) { - // This is a fast case where there is no need to test byte values to iterate - // so becomes the equivalent of a memchr+memcmp loop. - // UTF-8 search will not be self-synchronizing when starts with trail byte - const std::string_view suffix(search + 1, lengthFind - 1); - while (pos < endSearch) { - pos = SplitFindChar(cbView, pos, limitPos - pos, charStartSearch); - if (pos < 0) { - break; + const char charStartSearch = search[0]; + while (forward ? (pos < endSearch) : (pos >= endSearch)) { + if (CharAt(pos) == charStartSearch) { + bool found = (pos + lengthFind) <= limitPos; + for (int indexSearch = 1; (indexSearch < lengthFind) && found; indexSearch++) { + found = CharAt(pos + indexSearch) == search[indexSearch]; } - if (SplitMatch(cbView, pos + 1, suffix) && MatchesWordOptions(word, wordStart, pos, lengthFind)) { + if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) { return pos; } - pos++; - } - } else { - while (forward ? (pos < endSearch) : (pos >= endSearch)) { - const unsigned char leadByte = cbView.CharAt(pos); - if (leadByte == charStartSearch) { - bool found = (pos + lengthFind) <= limitPos; - // SplitMatch could be called here but it is slower with g++ -O2 - for (int indexSearch = 1; (indexSearch < lengthFind) && found; indexSearch++) { - found = cbView.CharAt(pos + indexSearch) == search[indexSearch]; - } - if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) { - return pos; - } - } - if (forward && UTF8IsAscii(leadByte)) { - pos++; - } else { - if (dbcsCodePage) { - if (!NextCharacter(pos, increment)) { - break; - } - } else { - pos += increment; - } - } } + if (!NextCharacter(pos, increment)) + break; } - } else if (CpUtf8 == dbcsCodePage) { - constexpr size_t maxFoldingExpansion = 4; + } else if (SC_CP_UTF8 == dbcsCodePage) { + const size_t maxFoldingExpansion = 4; std::vector searchThing((lengthFind+1) * UTF8MaxBytes * maxFoldingExpansion + 1); const size_t lenSearch = pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind); + char bytes[UTF8MaxBytes + 1] = ""; + char folded[UTF8MaxBytes * maxFoldingExpansion + 1] = ""; while (forward ? (pos < endPos) : (pos >= endPos)) { int widthFirstCharacter = 0; Sci::Position posIndexDocument = pos; size_t indexSearch = 0; bool characterMatches = true; for (;;) { - const unsigned char leadByte = cbView.CharAt(posIndexDocument); - char bytes[UTF8MaxBytes + 1]; + const unsigned char leadByte = cb.UCharAt(posIndexDocument); + bytes[0] = leadByte; int widthChar = 1; if (!UTF8IsAscii(leadByte)) { const int widthCharBytes = UTF8BytesOfLead[leadByte]; - bytes[0] = leadByte; for (int b=1; b(bytes), widthCharBytes) & UTF8MaskWidth; } - if (!widthFirstCharacter) { + if (!widthFirstCharacter) widthFirstCharacter = widthChar; - } - if ((posIndexDocument + widthChar) > limitPos) { + if ((posIndexDocument + widthChar) > limitPos) break; - } - size_t lenFlat = 1; - if (widthChar == 1) { - characterMatches = searchThing[indexSearch] == MakeLowerCase(leadByte); - } else { - char folded[UTF8MaxBytes * maxFoldingExpansion + 1]; - lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar); - // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing - assert((indexSearch + lenFlat) <= searchThing.size()); - // Does folded match the buffer - characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); - } - if (!characterMatches) { + const size_t lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar); + // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing + assert((indexSearch + lenFlat) <= searchThing.size()); + // Does folded match the buffer + characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); + if (!characterMatches) break; - } posIndexDocument += widthChar; indexSearch += lenFlat; - if (indexSearch >= lenSearch) { + if (indexSearch >= lenSearch) break; - } } if (characterMatches && (indexSearch == lenSearch)) { if (MatchesWordOptions(word, wordStart, pos, posIndexDocument - pos)) { @@ -2198,48 +2069,35 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con if (forward) { pos += widthFirstCharacter; } else { - if (!NextCharacter(pos, increment)) { + if (!NextCharacter(pos, increment)) break; - } } } } else if (dbcsCodePage) { - constexpr size_t maxBytesCharacter = 2; - constexpr size_t maxFoldingExpansion = 4; + const size_t maxBytesCharacter = 2; + const size_t maxFoldingExpansion = 4; std::vector searchThing((lengthFind+1) * maxBytesCharacter * maxFoldingExpansion + 1); const size_t lenSearch = pcf->Fold(&searchThing[0], searchThing.size(), search, lengthFind); while (forward ? (pos < endPos) : (pos >= endPos)) { - int widthFirstCharacter = 0; Sci::Position indexDocument = 0; size_t indexSearch = 0; bool characterMatches = true; - while (((pos + indexDocument) < limitPos) && + while (characterMatches && + ((pos + indexDocument) < limitPos) && (indexSearch < lenSearch)) { - const unsigned char leadByte = cbView.CharAt(pos + indexDocument); - const int widthChar = (!UTF8IsAscii(leadByte) && IsDBCSLeadByteNoExcept(leadByte)) ? 2 : 1; - if (!widthFirstCharacter) { - widthFirstCharacter = widthChar; - } - if ((pos + indexDocument + widthChar) > limitPos) { - break; - } - size_t lenFlat = 1; - if (widthChar == 1) { - characterMatches = searchThing[indexSearch] == MakeLowerCase(leadByte); - } else { - char bytes[maxBytesCharacter + 1]; - bytes[0] = leadByte; - bytes[1] = cbView.CharAt(pos + indexDocument + 1); - char folded[maxBytesCharacter * maxFoldingExpansion + 1]; - lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar); - // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing - assert((indexSearch + lenFlat) <= searchThing.size()); - // Does folded match the buffer - characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); - } - if (!characterMatches) { + char bytes[maxBytesCharacter + 1]; + bytes[0] = cb.CharAt(pos + indexDocument); + const Sci::Position widthChar = IsDBCSLeadByteNoExcept(bytes[0]) ? 2 : 1; + if (widthChar == 2) + bytes[1] = cb.CharAt(pos + indexDocument + 1); + if ((pos + indexDocument + widthChar) > limitPos) break; - } + char folded[maxBytesCharacter * maxFoldingExpansion + 1]; + const size_t lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar); + // memcmp may examine lenFlat bytes in both arguments so assert it doesn't read past end of searchThing + assert((indexSearch + lenFlat) <= searchThing.size()); + // Does folded match the buffer + characterMatches = 0 == memcmp(folded, &searchThing[0] + indexSearch, lenFlat); indexDocument += widthChar; indexSearch += lenFlat; } @@ -2249,13 +2107,8 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con return pos; } } - if (forward) { - pos += widthFirstCharacter; - } else { - if (!NextCharacter(pos, increment)) { - break; - } - } + if (!NextCharacter(pos, increment)) + break; } } else { const Sci::Position endSearch = (startPos <= endPos) ? endPos - lengthFind + 1 : endPos; @@ -2264,20 +2117,16 @@ Sci::Position Document::FindText(Sci::Position minPos, Sci::Position maxPos, con while (forward ? (pos < endSearch) : (pos >= endSearch)) { bool found = (pos + lengthFind) <= limitPos; for (int indexSearch = 0; (indexSearch < lengthFind) && found; indexSearch++) { - const char ch = cbView.CharAt(pos + indexSearch); - const char chTest = searchThing[indexSearch]; - if (UTF8IsAscii(ch)) { - found = chTest == MakeLowerCase(ch); - } else { - char folded[2]; - pcf->Fold(folded, sizeof(folded), &ch, 1); - found = folded[0] == chTest; - } + const char ch = CharAt(pos + indexSearch); + char folded[2]; + pcf->Fold(folded, sizeof(folded), &ch, 1); + found = folded[0] == searchThing[indexSearch]; } if (found && MatchesWordOptions(word, wordStart, pos, lengthFind)) { return pos; } - pos += increment; + if (!NextCharacter(pos, increment)) + break; } } } @@ -2292,15 +2141,15 @@ const char *Document::SubstituteByPosition(const char *text, Sci::Position *leng return nullptr; } -LineCharacterIndexType Document::LineCharacterIndex() const noexcept { +int Document::LineCharacterIndex() const { return cb.LineCharacterIndex(); } -void Document::AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) { +void Document::AllocateLineCharacterIndex(int lineCharacterIndex) { return cb.AllocateLineCharacterIndex(lineCharacterIndex); } -void Document::ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) { +void Document::ReleaseLineCharacterIndex(int lineCharacterIndex) { return cb.ReleaseLineCharacterIndex(lineCharacterIndex); } @@ -2308,31 +2157,19 @@ Sci::Line Document::LinesTotal() const noexcept { return cb.Lines(); } -void Document::AllocateLines(Sci::Line lines) { - cb.AllocateLines(lines); -} - void Document::SetDefaultCharClasses(bool includeWordClass) { charClass.SetDefaultCharClasses(includeWordClass); } -void Document::SetCharClasses(const unsigned char *chars, CharacterClass newCharClass) { +void Document::SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass) { charClass.SetCharClasses(chars, newCharClass); } -int Document::GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const { +int Document::GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer) const { return charClass.GetCharsOfClass(characterClass, buffer); } -void Document::SetCharacterCategoryOptimization(int countCharacters) { - charMap.Optimize(countCharacters); -} - -int Document::CharacterCategoryOptimization() const noexcept { - return charMap.Size(); -} - -void SCI_METHOD Document::StartStyling(Sci_Position position) { +void SCI_METHOD Document::StartStyling(Sci_Position position, char) { endStyled = position; } @@ -2343,7 +2180,7 @@ bool SCI_METHOD Document::SetStyleFor(Sci_Position length, char style) { enteredStyling++; const Sci::Position prevEndStyled = endStyled; if (cb.SetStyleFor(endStyled, length, style)) { - const DocModification mh(ModificationFlags::ChangeStyle | ModificationFlags::User, + const DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, prevEndStyled, length); NotifyModified(mh); } @@ -2372,7 +2209,7 @@ bool SCI_METHOD Document::SetStyles(Sci_Position length, const char *styles) { } } if (didChange) { - const DocModification mh(ModificationFlags::ChangeStyle | ModificationFlags::User, + const DocModification mh(SC_MOD_CHANGESTYLE | SC_PERFORMED_USER, startMod, endMod - startMod + 1); NotifyModified(mh); } @@ -2399,10 +2236,11 @@ void Document::EnsureStyledTo(Sci::Position pos) { } void Document::StyleToAdjustingLineDuration(Sci::Position pos) { - const Sci::Position stylingStart = GetEndStyled(); + const Sci::Line lineFirst = SciLineFromPosition(GetEndStyled()); ElapsedPeriod epStyling; EnsureStyledTo(pos); - durationStyleOneByte.AddSample(pos - stylingStart, epStyling.Duration()); + const Sci::Line lineLast = SciLineFromPosition(GetEndStyled()); + durationStyleOneLine.AddSample(lineLast - lineFirst, epStyling.Duration()); } void Document::LexerChanged() { @@ -2412,18 +2250,18 @@ void Document::LexerChanged() { } } -LexInterface *Document::GetLexInterface() const noexcept { +LexInterface *Document::GetLexInterface() const { return pli.get(); } -void Document::SetLexInterface(std::unique_ptr pLexInterface) noexcept { - pli = std::move(pLexInterface); +void Document::SetLexInterface(LexInterface *pLexInterface) { + pli.reset(pLexInterface); } int SCI_METHOD Document::SetLineState(Sci_Position line, int state) { - const int statePrevious = States()->SetLineState(line, state); + const int statePrevious = States()->SetLineState(static_cast(line), state); if (state != statePrevious) { - const DocModification mh(ModificationFlags::ChangeLineState, LineStart(line), 0, 0, nullptr, + const DocModification mh(SC_MOD_CHANGELINESTATE, LineStart(line), 0, 0, nullptr, static_cast(line)); NotifyModified(mh); } @@ -2431,20 +2269,20 @@ int SCI_METHOD Document::SetLineState(Sci_Position line, int state) { } int SCI_METHOD Document::GetLineState(Sci_Position line) const { - return States()->GetLineState(line); + return States()->GetLineState(static_cast(line)); } -Sci::Line Document::GetMaxLineState() const noexcept { +Sci::Line Document::GetMaxLineState() const { return States()->GetMaxLineState(); } void SCI_METHOD Document::ChangeLexerState(Sci_Position start, Sci_Position end) { - const DocModification mh(ModificationFlags::LexerState, start, - end-start, 0, nullptr, 0); + const DocModification mh(SC_MOD_LEXERSTATE, start, + end-start, 0, 0, 0); NotifyModified(mh); } -StyledText Document::MarginStyledText(Sci::Line line) const noexcept { +StyledText Document::MarginStyledText(Sci::Line line) const { const LineAnnotation *pla = Margins(); return StyledText(pla->Length(line), pla->Text(line), pla->MultipleStyles(line), pla->Style(line), pla->Styles(line)); @@ -2452,21 +2290,21 @@ StyledText Document::MarginStyledText(Sci::Line line) const noexcept { void Document::MarginSetText(Sci::Line line, const char *text) { Margins()->SetText(line, text); - const DocModification mh(ModificationFlags::ChangeMargin, LineStart(line), - 0, 0, nullptr, line); + const DocModification mh(SC_MOD_CHANGEMARGIN, LineStart(line), + 0, 0, 0, line); NotifyModified(mh); } void Document::MarginSetStyle(Sci::Line line, int style) { Margins()->SetStyle(line, style); - NotifyModified(DocModification(ModificationFlags::ChangeMargin, LineStart(line), - 0, 0, nullptr, line)); + NotifyModified(DocModification(SC_MOD_CHANGEMARGIN, LineStart(line), + 0, 0, 0, line)); } void Document::MarginSetStyles(Sci::Line line, const unsigned char *styles) { Margins()->SetStyles(line, styles); - NotifyModified(DocModification(ModificationFlags::ChangeMargin, LineStart(line), - 0, 0, nullptr, line)); + NotifyModified(DocModification(SC_MOD_CHANGEMARGIN, LineStart(line), + 0, 0, 0, line)); } void Document::MarginClearAll() { @@ -2477,7 +2315,7 @@ void Document::MarginClearAll() { Margins()->ClearAll(); } -StyledText Document::AnnotationStyledText(Sci::Line line) const noexcept { +StyledText Document::AnnotationStyledText(Sci::Line line) const { const LineAnnotation *pla = Annotations(); return StyledText(pla->Length(line), pla->Text(line), pla->MultipleStyles(line), pla->Style(line), pla->Styles(line)); @@ -2488,20 +2326,18 @@ void Document::AnnotationSetText(Sci::Line line, const char *text) { const Sci::Line linesBefore = AnnotationLines(line); Annotations()->SetText(line, text); const int linesAfter = AnnotationLines(line); - DocModification mh(ModificationFlags::ChangeAnnotation, LineStart(line), - 0, 0, nullptr, line); + DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), + 0, 0, 0, line); mh.annotationLinesAdded = linesAfter - linesBefore; NotifyModified(mh); } } void Document::AnnotationSetStyle(Sci::Line line, int style) { - if (line >= 0 && line < LinesTotal()) { - Annotations()->SetStyle(line, style); - const DocModification mh(ModificationFlags::ChangeAnnotation, LineStart(line), - 0, 0, nullptr, line); - NotifyModified(mh); - } + Annotations()->SetStyle(line, style); + const DocModification mh(SC_MOD_CHANGEANNOTATION, LineStart(line), + 0, 0, 0, line); + NotifyModified(mh); } void Document::AnnotationSetStyles(Sci::Line line, const unsigned char *styles) { @@ -2510,7 +2346,7 @@ void Document::AnnotationSetStyles(Sci::Line line, const unsigned char *styles) } } -int Document::AnnotationLines(Sci::Line line) const noexcept { +int Document::AnnotationLines(Sci::Line line) const { return Annotations()->Lines(line); } @@ -2522,38 +2358,6 @@ void Document::AnnotationClearAll() { Annotations()->ClearAll(); } -StyledText Document::EOLAnnotationStyledText(Sci::Line line) const noexcept { - const LineAnnotation *pla = EOLAnnotations(); - return StyledText(pla->Length(line), pla->Text(line), - pla->MultipleStyles(line), pla->Style(line), pla->Styles(line)); -} - -void Document::EOLAnnotationSetText(Sci::Line line, const char *text) { - if (line >= 0 && line < LinesTotal()) { - EOLAnnotations()->SetText(line, text); - const DocModification mh(ModificationFlags::ChangeEOLAnnotation, LineStart(line), - 0, 0, nullptr, line); - NotifyModified(mh); - } -} - -void Document::EOLAnnotationSetStyle(Sci::Line line, int style) { - if (line >= 0 && line < LinesTotal()) { - EOLAnnotations()->SetStyle(line, style); - const DocModification mh(ModificationFlags::ChangeEOLAnnotation, LineStart(line), - 0, 0, nullptr, line); - NotifyModified(mh); - } -} - -void Document::EOLAnnotationClearAll() { - const Sci::Line maxEditorLine = LinesTotal(); - for (Sci::Line l=0; lClearAll(); -} - void Document::IncrementStyleClock() noexcept { styleClock = (styleClock + 1) % 0x100000; } @@ -2566,7 +2370,7 @@ void SCI_METHOD Document::DecorationFillRange(Sci_Position position, int value, const FillResult fr = decorations->FillRange( position, value, fillLength); if (fr.changed) { - const DocModification mh(ModificationFlags::ChangeIndicator | ModificationFlags::User, + const DocModification mh(SC_MOD_CHANGEINDICATOR | SC_PERFORMED_USER, fr.position, fr.fillLength); NotifyModified(mh); } @@ -2582,18 +2386,12 @@ bool Document::AddWatcher(DocWatcher *watcher, void *userData) { return true; } -bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) noexcept { - try { - // This can never fail as WatcherWithUserData constructor and == are noexcept - // but std::find is not noexcept. - std::vector::iterator it = - std::find(watchers.begin(), watchers.end(), WatcherWithUserData(watcher, userData)); - if (it != watchers.end()) { - watchers.erase(it); - return true; - } - } catch (...) { - // Ignore any exception +bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) { + std::vector::iterator it = + std::find(watchers.begin(), watchers.end(), WatcherWithUserData(watcher, userData)); + if (it != watchers.end()) { + watchers.erase(it); + return true; } return false; } @@ -2611,9 +2409,9 @@ void Document::NotifySavePoint(bool atSavePoint) { } void Document::NotifyModified(DocModification mh) { - if (FlagSet(mh.modificationType, ModificationFlags::InsertText)) { + if (mh.modificationType & SC_MOD_INSERTTEXT) { decorations->InsertSpace(mh.position, mh.length); - } else if (FlagSet(mh.modificationType, ModificationFlags::DeleteText)) { + } else if (mh.modificationType & SC_MOD_DELETETEXT) { decorations->DeleteRange(mh.position, mh.length); } for (const WatcherWithUserData &watcher : watchers) { @@ -2621,8 +2419,49 @@ void Document::NotifyModified(DocModification mh) { } } +// Used for word part navigation. +static bool IsASCIIPunctuationCharacter(unsigned int ch) noexcept { + switch (ch) { + case '!': + case '"': + case '#': + case '$': + case '%': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case '-': + case '.': + case '/': + case ':': + case ';': + case '<': + case '=': + case '>': + case '?': + case '@': + case '[': + case '\\': + case ']': + case '^': + case '_': + case '`': + case '{': + case '|': + case '}': + case '~': + return true; + default: + return false; + } +} + bool Document::IsWordPartSeparator(unsigned int ch) const { - return (WordCharacterClass(ch) == CharacterClass::word) && IsPunctuation(ch); + return (WordCharacterClass(ch) == CharClassify::ccWord) && IsASCIIPunctuationCharacter(ch); } Sci::Position Document::WordPartLeft(Sci::Position pos) const { @@ -2652,15 +2491,15 @@ Sci::Position Document::WordPartLeft(Sci::Position pos) const { pos -= CharacterBefore(pos).widthBytes; if (!IsADigit(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; - } else if (IsPunctuation(ceStart.character)) { - while (pos > 0 && IsPunctuation(CharacterAfter(pos).character)) + } else if (IsASCIIPunctuationCharacter(ceStart.character)) { + while (pos > 0 && IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; - if (!IsPunctuation(CharacterAfter(pos).character)) + if (!IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; - } else if (IsASpace(ceStart.character)) { - while (pos > 0 && IsASpace(CharacterAfter(pos).character)) + } else if (isspacechar(ceStart.character)) { + while (pos > 0 && isspacechar(CharacterAfter(pos).character)) pos -= CharacterBefore(pos).widthBytes; - if (!IsASpace(CharacterAfter(pos).character)) + if (!isspacechar(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else if (!IsASCII(ceStart.character)) { while (pos > 0 && !IsASCII(CharacterAfter(pos).character)) @@ -2677,7 +2516,7 @@ Sci::Position Document::WordPartLeft(Sci::Position pos) const { Sci::Position Document::WordPartRight(Sci::Position pos) const { CharacterExtracted ceStart = CharacterAfter(pos); - const Sci::Position length = LengthNoExcept(); + const Sci::Position length = Length(); if (IsWordPartSeparator(ceStart.character)) { while (pos < length && IsWordPartSeparator(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; @@ -2703,11 +2542,11 @@ Sci::Position Document::WordPartRight(Sci::Position pos) const { } else if (IsADigit(ceStart.character)) { while (pos < length && IsADigit(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; - } else if (IsPunctuation(ceStart.character)) { - while (pos < length && IsPunctuation(CharacterAfter(pos).character)) + } else if (IsASCIIPunctuationCharacter(ceStart.character)) { + while (pos < length && IsASCIIPunctuationCharacter(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; - } else if (IsASpace(ceStart.character)) { - while (pos < length && IsASpace(CharacterAfter(pos).character)) + } else if (isspacechar(ceStart.character)) { + while (pos < length && isspacechar(CharacterAfter(pos).character)) pos += CharacterAfter(pos).widthBytes; } else { pos += CharacterAfter(pos).widthBytes; @@ -2715,14 +2554,18 @@ Sci::Position Document::WordPartRight(Sci::Position pos) const { return pos; } -Sci::Position Document::ExtendStyleRange(Sci::Position pos, int delta, bool singleLine) noexcept { - const char sStart = cb.StyleAt(pos); +static bool IsLineEndChar(char c) noexcept { + return (c == '\n' || c == '\r'); +} + +Sci::Position Document::ExtendStyleRange(Sci::Position pos, int delta, bool singleLine) { + const int sStart = cb.StyleAt(pos); if (delta < 0) { - while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsEOLCharacter(cb.CharAt(pos)))) + while (pos > 0 && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos)))) pos--; pos++; } else { - while (pos < (LengthNoExcept()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsEOLCharacter(cb.CharAt(pos)))) + while (pos < (Length()) && (cb.StyleAt(pos) == sStart) && (!singleLine || !IsLineEndChar(cb.CharAt(pos)))) pos++; } return pos; @@ -2752,7 +2595,7 @@ static char BraceOpposite(char ch) noexcept { } // TODO: should be able to extend styled region to find matching brace -Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxReStyle*/, Sci::Position startPos, bool useStartPos) noexcept { +Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxReStyle*/) { const char chBrace = CharAt(position); const char chSeek = BraceOpposite(chBrace); if (chSeek == '\0') @@ -2762,8 +2605,8 @@ Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxRe if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<') direction = 1; int depth = 1; - position = useStartPos ? startPos : NextPosition(position, direction); - while ((position >= 0) && (position < LengthNoExcept())) { + position = NextPosition(position, direction); + while ((position >= 0) && (position < Length())) { const char chAtPos = CharAt(position); const int styAtPos = StyleIndexAt(position); if ((position > GetEndStyled()) || (styAtPos == styBrace)) { @@ -2788,9 +2631,14 @@ Sci::Position Document::BraceMatch(Sci::Position position, Sci::Position /*maxRe class BuiltinRegex : public RegexSearchBase { public: explicit BuiltinRegex(CharClassify *charClassTable) : search(charClassTable) {} + BuiltinRegex(const BuiltinRegex &) = delete; + BuiltinRegex(BuiltinRegex &&) = delete; + BuiltinRegex &operator=(const BuiltinRegex &) = delete; + BuiltinRegex &operator=(BuiltinRegex &&) = delete; + ~BuiltinRegex() override = default; Sci::Position FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s, - bool caseSensitive, bool word, bool wordStart, FindOption flags, + bool caseSensitive, bool word, bool wordStart, int flags, Sci::Position *length) override; const char *SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) override; @@ -2814,7 +2662,7 @@ class RESearchRange { Sci::Line lineRangeStart; Sci::Line lineRangeEnd; Sci::Line lineRangeBreak; - RESearchRange(const Document *doc_, Sci::Position minPos, Sci::Position maxPos) noexcept : doc(doc_) { + RESearchRange(const Document *doc_, Sci::Position minPos, Sci::Position maxPos) : doc(doc_) { increment = (minPos <= maxPos) ? 1 : -1; // Range endpoints should not be inside DBCS characters or between a CR and LF, @@ -2871,18 +2719,35 @@ class DocumentIndexer : public CharacterIndexer { class ByteIterator { public: - using iterator_category = std::bidirectional_iterator_tag; - using value_type = char; - using difference_type = ptrdiff_t; - using pointer = char*; - using reference = char&; + typedef std::bidirectional_iterator_tag iterator_category; + typedef char value_type; + typedef ptrdiff_t difference_type; + typedef char* pointer; + typedef char& reference; const Document *doc; Sci::Position position; - explicit ByteIterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : + ByteIterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : doc(doc_), position(position_) { } + ByteIterator(const ByteIterator &other) noexcept { + doc = other.doc; + position = other.position; + } + ByteIterator(ByteIterator &&other) noexcept { + doc = other.doc; + position = other.position; + } + ByteIterator &operator=(const ByteIterator &other) noexcept { + if (this != &other) { + doc = other.doc; + position = other.position; + } + return *this; + } + ByteIterator &operator=(ByteIterator &&) noexcept = default; + ~ByteIterator() = default; char operator*() const noexcept { return doc->CharAt(position); } @@ -2939,13 +2804,13 @@ class UTF8Iterator { size_t lenCharacters; wchar_t buffered[2]; public: - using iterator_category = std::bidirectional_iterator_tag; - using value_type = wchar_t; - using difference_type = ptrdiff_t; - using pointer = wchar_t*; - using reference = wchar_t&; + typedef std::bidirectional_iterator_tag iterator_category; + typedef wchar_t value_type; + typedef ptrdiff_t difference_type; + typedef wchar_t* pointer; + typedef wchar_t& reference; - explicit UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : + UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : doc(doc_), position(position_), characterIndex(0), lenBytes(0), lenCharacters(0), buffered{} { buffered[0] = 0; buffered[1] = 0; @@ -2953,6 +2818,30 @@ class UTF8Iterator { ReadCharacter(); } } + UTF8Iterator(const UTF8Iterator &other) noexcept : buffered{} { + doc = other.doc; + position = other.position; + characterIndex = other.characterIndex; + lenBytes = other.lenBytes; + lenCharacters = other.lenCharacters; + buffered[0] = other.buffered[0]; + buffered[1] = other.buffered[1]; + } + UTF8Iterator(UTF8Iterator &&other) noexcept = default; + UTF8Iterator &operator=(const UTF8Iterator &other) noexcept { + if (this != &other) { + doc = other.doc; + position = other.position; + characterIndex = other.characterIndex; + lenBytes = other.lenBytes; + lenCharacters = other.lenCharacters; + buffered[0] = other.buffered[0]; + buffered[1] = other.buffered[1]; + } + return *this; + } + UTF8Iterator &operator=(UTF8Iterator &&) noexcept = default; + ~UTF8Iterator() = default; wchar_t operator*() const noexcept { assert(lenCharacters != 0); return buffered[characterIndex]; @@ -3030,15 +2919,29 @@ class UTF8Iterator { const Document *doc; Sci::Position position; public: - using iterator_category = std::bidirectional_iterator_tag; - using value_type = wchar_t; - using difference_type = ptrdiff_t; - using pointer = wchar_t*; - using reference = wchar_t&; + typedef std::bidirectional_iterator_tag iterator_category; + typedef wchar_t value_type; + typedef ptrdiff_t difference_type; + typedef wchar_t* pointer; + typedef wchar_t& reference; - explicit UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : + UTF8Iterator(const Document *doc_=nullptr, Sci::Position position_=0) noexcept : doc(doc_), position(position_) { } + UTF8Iterator(const UTF8Iterator &other) noexcept { + doc = other.doc; + position = other.position; + } + UTF8Iterator(UTF8Iterator &&other) noexcept = default; + UTF8Iterator &operator=(const UTF8Iterator &other) noexcept { + if (this != &other) { + doc = other.doc; + position = other.position; + } + return *this; + } + UTF8Iterator &operator=(UTF8Iterator &&) noexcept = default; + ~UTF8Iterator() = default; wchar_t operator*() const noexcept { const Document::CharacterExtracted charExtracted = doc->ExtractCharacter(position); return charExtracted.character; @@ -3129,7 +3032,7 @@ bool MatchOnLines(const Document *doc, const Regex ®exp, const RESearchRange } #endif if (matched) { - for (size_t co = 0; co < match.size() && co < RESearch::MAXTAG; co++) { + for (size_t co = 0; co < match.size(); co++) { search.bopat[co] = match[co].first.Pos(); search.eopat[co] = match[co].second.PosRoundUp(); const Sci::Position lenMatch = search.eopat[co] - search.bopat[co]; @@ -3148,7 +3051,7 @@ Sci::Position Cxx11RegexFindText(const Document *doc, Sci::Position minPos, Sci: try { //ElapsedPeriod ep; std::regex::flag_type flagsRe = std::regex::ECMAScript; - // Flags that appear to have no effect: + // Flags that apper to have no effect: // | std::regex::collate | std::regex::extended; if (!caseSensitive) flagsRe = flagsRe | std::regex::icase; @@ -3157,10 +3060,17 @@ Sci::Position Cxx11RegexFindText(const Document *doc, Sci::Position minPos, Sci: search.Clear(); bool matched = false; - if (CpUtf8 == doc->dbcsCodePage) { - const std::wstring ws = WStringFromUTF8(s); + if (SC_CP_UTF8 == doc->dbcsCodePage) { + const size_t lenS = strlen(s); + std::vector ws(lenS + 1); +#if WCHAR_T_IS_16 + const size_t outLen = UTF16FromUTF8(s, lenS, &ws[0], lenS); +#else + const size_t outLen = UTF32FromUTF8(s, lenS, reinterpret_cast(&ws[0]), lenS); +#endif + ws[outLen] = 0; std::wregex regexp; - regexp.assign(ws, flagsRe); + regexp.assign(&ws[0], flagsRe); matched = MatchOnLines(doc, regexp, resr, search); } else { @@ -3194,11 +3104,11 @@ Sci::Position Cxx11RegexFindText(const Document *doc, Sci::Position minPos, Sci: } Sci::Position BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s, - bool caseSensitive, bool, bool, FindOption flags, + bool caseSensitive, bool, bool, int flags, Sci::Position *length) { #ifndef NO_CXX11_REGEX - if (FlagSet(flags, FindOption::Cxx11RegEx)) { + if (flags & SCFIND_CXX11REGEX) { return Cxx11RegexFindText(doc, minPos, maxPos, s, caseSensitive, length, search); } @@ -3206,7 +3116,7 @@ Sci::Position BuiltinRegex::FindText(Document *doc, Sci::Position minPos, Sci::P const RESearchRange resr(doc, minPos, maxPos); - const bool posix = FlagSet(flags, FindOption::Posix); + const bool posix = (flags & SCFIND_POSIX) != 0; const char *errmsg = search.Compile(s, *length, caseSensitive, posix); if (errmsg) { @@ -3283,7 +3193,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, substituted.clear(); const DocumentIndexer di(doc, doc->Length()); search.GrabMatches(di); - for (Sci::Position j = 0; j < *length; j++) { + for (int j = 0; j < *length; j++) { if (text[j] == '\\') { if (text[j + 1] >= '0' && text[j + 1] <= '9') { const unsigned int patNum = text[j + 1] - '0'; @@ -3333,7 +3243,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, #ifndef SCI_OWNREGEX -RegexSearchBase *Scintilla::Internal::CreateRegexSearch(CharClassify *charClassTable) { +RegexSearchBase *Scintilla::CreateRegexSearch(CharClassify *charClassTable) { return new BuiltinRegex(charClassTable); } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/Document.h b/3rdparty/unioncode-qscintilla214/scintilla/src/Document.h similarity index 69% rename from 3rdparty/unioncode-scintilla515/scintilla/src/Document.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/Document.h index bf23b363e..927bbd77c 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/Document.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/Document.h @@ -8,21 +8,7 @@ #ifndef DOCUMENT_H #define DOCUMENT_H -#include "ILexer.h" -#include "ILoader.h" -#include "PerLine.h" -#include "CaseFolder.h" -#include "Position.h" -#include "Decoration.h" -#include "CharClassify.h" -#include "ScintillaTypes.h" -#include "CharacterCategoryMap.h" - -#include -#include -#include - -namespace Scintilla::Internal { +namespace Scintilla { class DocWatcher; class DocModification; @@ -32,7 +18,7 @@ class LineLevels; class LineState; class LineAnnotation; -enum class EncodingFamily { eightBit, unicode, dbcs }; +enum EncodingFamily { efEightBit, efUnicode, efDBCS }; /** * The range class represents a range of text in a document. @@ -104,10 +90,10 @@ class Range { */ class RegexSearchBase { public: - virtual ~RegexSearchBase() = default; + virtual ~RegexSearchBase() {} virtual Sci::Position FindText(Document *doc, Sci::Position minPos, Sci::Position maxPos, const char *s, - bool caseSensitive, bool word, bool wordStart, Scintilla::FindOption flags, Sci::Position *length) = 0; + bool caseSensitive, bool word, bool wordStart, int flags, Sci::Position *length) = 0; ///@return String with the substitutions, must remain valid until the next call or destruction virtual const char *SubstituteByPosition(Document *doc, const char *text, Sci::Position *length) = 0; @@ -140,34 +126,34 @@ struct StyledText { class HighlightDelimiter { public: - HighlightDelimiter() noexcept : isEnabled(false) { + HighlightDelimiter() : isEnabled(false) { Clear(); } - void Clear() noexcept { + void Clear() { beginFoldBlock = -1; endFoldBlock = -1; firstChangeableLineBefore = -1; firstChangeableLineAfter = -1; } - bool NeedsDrawing(Sci::Line line) const noexcept { + bool NeedsDrawing(Sci::Line line) const { return isEnabled && (line <= firstChangeableLineBefore || line >= firstChangeableLineAfter); } - bool IsFoldBlockHighlighted(Sci::Line line) const noexcept { + bool IsFoldBlockHighlighted(Sci::Line line) const { return isEnabled && beginFoldBlock != -1 && beginFoldBlock <= line && line <= endFoldBlock; } - bool IsHeadOfFoldBlock(Sci::Line line) const noexcept { + bool IsHeadOfFoldBlock(Sci::Line line) const { return beginFoldBlock == line && line < endFoldBlock; } - bool IsBodyOfFoldBlock(Sci::Line line) const noexcept { + bool IsBodyOfFoldBlock(Sci::Line line) const { return beginFoldBlock != -1 && beginFoldBlock < line && line < endFoldBlock; } - bool IsTailOfFoldBlock(Sci::Line line) const noexcept { + bool IsTailOfFoldBlock(Sci::Line line) const { return beginFoldBlock != -1 && beginFoldBlock < line && line == endFoldBlock; } @@ -178,41 +164,25 @@ class HighlightDelimiter { bool isEnabled; }; -struct LexerReleaser { - // Called by unique_ptr to destroy/free the Resource - void operator()(Scintilla::ILexer5 *pLexer) noexcept { - if (pLexer) { - try { - pLexer->Release(); - } catch (...) { - // ILexer5::Release must not throw, ignore if it does. - } - } - } -}; - -using LexerInstance = std::unique_ptr; +inline int LevelNumber(int level) noexcept { + return level & SC_FOLDLEVELNUMBERMASK; +} -// LexInterface defines the interface to ILexer used in Document. -// The LexState subclass is actually created and that is used within ScintillaBase -// to provide more methods that are exposed through Scintilla's external API. class LexInterface { protected: Document *pdoc; - LexerInstance instance; + ILexer *instance; bool performingStyle; ///< Prevent reentrance public: - explicit LexInterface(Document *pdoc_) noexcept; - // Deleted so LexInterface objects can not be copied. - LexInterface(const LexInterface &) = delete; - LexInterface(LexInterface &&) = delete; - LexInterface &operator=(const LexInterface &) = delete; - LexInterface &operator=(LexInterface &&) = delete; - virtual ~LexInterface() noexcept; - void SetInstance(ILexer5 *instance_); + explicit LexInterface(Document *pdoc_) : pdoc(pdoc_), instance(nullptr), performingStyle(false) { + } + virtual ~LexInterface() { + } void Colourise(Sci::Position start, Sci::Position end); - virtual Scintilla::LineEndType LineEndTypesSupported(); - bool UseContainerLexing() const noexcept; + virtual int LineEndTypesSupported(); + bool UseContainerLexing() const { + return instance == nullptr; + } }; struct RegexError : public std::runtime_error { @@ -237,12 +207,11 @@ class ActionDuration { ActionDuration(double duration_, double minDuration_, double maxDuration_) noexcept; void AddSample(size_t numberActions, double durationOfActions) noexcept; double Duration() const noexcept; - size_t ActionsInAllowedTime(double secondsAllowed) const noexcept; }; /** */ -class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader { +class Document : PerLine, public IDocumentWithLineEnd, public ILoader { public: /** Used to pair watcher pointer with user data. */ @@ -261,7 +230,6 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader int refCount; CellBuffer cb; CharClassify charClass; - CharacterCategoryMap charMap; std::unique_ptr pcf; Sci::Position endStyled; int styleClock; @@ -275,14 +243,13 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader std::vector watchers; // ldSize is not real data - it is for dimensions and loops - enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldEOLAnnotation, ldSize }; + enum lineData { ldMarkers, ldLevels, ldState, ldMargin, ldAnnotation, ldSize }; std::unique_ptr perLineData[ldSize]; - LineMarkers *Markers() const noexcept; - LineLevels *Levels() const noexcept; - LineState *States() const noexcept; - LineAnnotation *Margins() const noexcept; - LineAnnotation *Annotations() const noexcept; - LineAnnotation *EOLAnnotations() const noexcept; + LineMarkers *Markers() const; + LineLevels *Levels() const; + LineState *States() const; + LineAnnotation *Margins() const; + LineAnnotation *Annotations() const; bool matchesValid; std::unique_ptr regex; @@ -302,21 +269,21 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader } }; - Scintilla::EndOfLine eolMode; + int eolMode; /// Can also be SC_CP_UTF8 to enable UTF-8 mode int dbcsCodePage; - Scintilla::LineEndType lineEndBitSet; + int lineEndBitSet; int tabInChars; int indentInChars; int actualIndentInChars; bool useTabs; bool tabIndents; bool backspaceUnindents; - ActionDuration durationStyleOneByte; + ActionDuration durationStyleOneLine; std::unique_ptr decorations; - Document(Scintilla::DocumentOption options); + Document(int options); // Deleted so Document objects can not be copied. Document(const Document &) = delete; Document(Document &&) = delete; @@ -330,43 +297,42 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader // From PerLine void Init() override; void InsertLine(Sci::Line line) override; - void InsertLines(Sci::Line line, Sci::Line lines) override; void RemoveLine(Sci::Line line) override; - Scintilla::LineEndType LineEndTypesSupported() const; + int LineEndTypesSupported() const; bool SetDBCSCodePage(int dbcsCodePage_); - Scintilla::LineEndType GetLineEndTypesAllowed() const noexcept { return cb.GetLineEndTypes(); } - bool SetLineEndTypesAllowed(Scintilla::LineEndType lineEndBitSet_); - Scintilla::LineEndType GetLineEndTypesActive() const noexcept { return cb.GetLineEndTypes(); } + int GetLineEndTypesAllowed() const { return cb.GetLineEndTypes(); } + bool SetLineEndTypesAllowed(int lineEndBitSet_); + int GetLineEndTypesActive() const { return cb.GetLineEndTypes(); } int SCI_METHOD Version() const override { - return Scintilla::dvRelease4; + return dvLineEnd; } void SCI_METHOD SetErrorStatus(int status) override; Sci_Position SCI_METHOD LineFromPosition(Sci_Position pos) const override; Sci::Line SciLineFromPosition(Sci::Position pos) const noexcept; // Avoids casting LineFromPosition - Sci::Position ClampPositionIntoDocument(Sci::Position pos) const noexcept; - bool ContainsLineEnd(const char *s, Sci::Position length) const noexcept { return cb.ContainsLineEnd(s, length); } - bool IsCrLf(Sci::Position pos) const noexcept; - int LenChar(Sci::Position pos) const noexcept; + Sci::Position ClampPositionIntoDocument(Sci::Position pos) const; + bool ContainsLineEnd(const char *s, Sci::Position length) const { return cb.ContainsLineEnd(s, length); } + bool IsCrLf(Sci::Position pos) const; + int LenChar(Sci::Position pos); bool InGoodUTF8(Sci::Position pos, Sci::Position &start, Sci::Position &end) const noexcept; - Sci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd=true) const noexcept; + Sci::Position MovePositionOutsideChar(Sci::Position pos, Sci::Position moveDir, bool checkLineEnd=true) const; Sci::Position NextPosition(Sci::Position pos, int moveDir) const noexcept; bool NextCharacter(Sci::Position &pos, int moveDir) const noexcept; // Returns true if pos changed - Document::CharacterExtracted CharacterAfter(Sci::Position position) const noexcept; - Document::CharacterExtracted CharacterBefore(Sci::Position position) const noexcept; + Document::CharacterExtracted CharacterAfter(Sci::Position position) const; + Document::CharacterExtracted CharacterBefore(Sci::Position position) const; Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const override; - Sci::Position GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const noexcept; + Sci::Position GetRelativePositionUTF16(Sci::Position positionStart, Sci::Position characterOffset) const; int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const override; int SCI_METHOD CodePage() const override; bool SCI_METHOD IsDBCSLeadByte(char ch) const override; bool IsDBCSLeadByteNoExcept(char ch) const noexcept; - bool IsDBCSTrailByteNoExcept(char ch) const noexcept; - int DBCSDrawBytes(std::string_view text) const noexcept; - bool IsDBCSDualByteAt(Sci::Position pos) const noexcept; - size_t SafeSegment(std::string_view text) const noexcept; + bool IsDBCSLeadByteInvalid(char ch) const noexcept; + bool IsDBCSTrailByteInvalid(char ch) const noexcept; + int DBCSDrawBytes(const char *text, int len) const noexcept; + int SafeSegment(const char *text, int length, int lengthSegment) const noexcept; EncodingFamily CodePageFamily() const noexcept; // Gateways to modifying document @@ -379,42 +345,42 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader void * SCI_METHOD ConvertToDocument() override; Sci::Position Undo(); Sci::Position Redo(); - bool CanUndo() const noexcept { return cb.CanUndo(); } - bool CanRedo() const noexcept { return cb.CanRedo(); } + bool CanUndo() const { return cb.CanUndo(); } + bool CanRedo() const { return cb.CanRedo(); } void DeleteUndoHistory() { cb.DeleteUndoHistory(); } bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } - bool IsCollectingUndo() const noexcept { return cb.IsCollectingUndo(); } + bool IsCollectingUndo() const { return cb.IsCollectingUndo(); } void BeginUndoAction() { cb.BeginUndoAction(); } void EndUndoAction() { cb.EndUndoAction(); } void AddUndoAction(Sci::Position token, bool mayCoalesce) { cb.AddUndoAction(token, mayCoalesce); } void SetSavePoint(); - bool IsSavePoint() const noexcept { return cb.IsSavePoint(); } + bool IsSavePoint() const { return cb.IsSavePoint(); } void TentativeStart() { cb.TentativeStart(); } void TentativeCommit() { cb.TentativeCommit(); } void TentativeUndo(); - bool TentativeActive() const noexcept { return cb.TentativeActive(); } + bool TentativeActive() const { return cb.TentativeActive(); } const char * SCI_METHOD BufferPointer() override { return cb.BufferPointer(); } - const char *RangePointer(Sci::Position position, Sci::Position rangeLength) noexcept { return cb.RangePointer(position, rangeLength); } - Sci::Position GapPosition() const noexcept { return cb.GapPosition(); } + const char *RangePointer(Sci::Position position, Sci::Position rangeLength) { return cb.RangePointer(position, rangeLength); } + Sci::Position GapPosition() const { return cb.GapPosition(); } int SCI_METHOD GetLineIndentation(Sci_Position line) override; Sci::Position SetLineIndentation(Sci::Line line, Sci::Position indent); Sci::Position GetLineIndentPosition(Sci::Line line) const; Sci::Position GetColumn(Sci::Position pos); - Sci::Position CountCharacters(Sci::Position startPos, Sci::Position endPos) const noexcept; - Sci::Position CountUTF16(Sci::Position startPos, Sci::Position endPos) const noexcept; + Sci::Position CountCharacters(Sci::Position startPos, Sci::Position endPos) const; + Sci::Position CountUTF16(Sci::Position startPos, Sci::Position endPos) const; Sci::Position FindColumn(Sci::Line line, Sci::Position column); void Indent(bool forwards, Sci::Line lineBottom, Sci::Line lineTop); - static std::string TransformLineEnds(const char *s, size_t len, Scintilla::EndOfLine eolModeWanted); - void ConvertLineEnds(Scintilla::EndOfLine eolModeSet); + static std::string TransformLineEnds(const char *s, size_t len, int eolModeWanted); + void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } - bool IsReadOnly() const noexcept { return cb.IsReadOnly(); } - bool IsLarge() const noexcept { return cb.IsLarge(); } - Scintilla::DocumentOption Options() const noexcept; + bool IsReadOnly() const { return cb.IsReadOnly(); } + bool IsLarge() const { return cb.IsLarge(); } + int Options() const; void DelChar(Sci::Position pos); void DelCharBack(Sci::Position pos); @@ -428,16 +394,14 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader void GetStyleRange(unsigned char *buffer, Sci::Position position, Sci::Position lengthRetrieve) const { cb.GetStyleRange(buffer, position, lengthRetrieve); } - int GetMark(Sci::Line line) const noexcept; - Sci::Line MarkerNext(Sci::Line lineStart, int mask) const noexcept; + int GetMark(Sci::Line line) const; + Sci::Line MarkerNext(Sci::Line lineStart, int mask) const; int AddMark(Sci::Line line, int markerNum); void AddMarkSet(Sci::Line line, int valueSet); void DeleteMark(Sci::Line line, int markerNum); void DeleteMarkFromHandle(int markerHandle); void DeleteAllMarks(int markerNum); - Sci::Line LineFromHandle(int markerHandle) const noexcept; - int MarkerNumberFromLine(Sci::Line line, int which) const noexcept; - int MarkerHandleFromLine(Sci::Line line, int which) const noexcept; + Sci::Line LineFromHandle(int markerHandle) const; Sci_Position SCI_METHOD LineStart(Sci_Position line) const override; bool IsLineStartPosition(Sci::Position position) const; Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override; @@ -445,15 +409,13 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader bool IsLineEndPosition(Sci::Position position) const; bool IsPositionInLineEnd(Sci::Position position) const; Sci::Position VCHomePosition(Sci::Position position) const; - Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; - Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; - Sci::Line LineFromPositionAfter(Sci::Line line, Sci::Position length) const noexcept; + Sci::Position IndexLineStart(Sci::Line line, int lineCharacterIndex) const; + Sci::Line LineFromPositionIndex(Sci::Position pos, int lineCharacterIndex) const; int SCI_METHOD SetLevel(Sci_Position line, int level) override; int SCI_METHOD GetLevel(Sci_Position line) const override; - Scintilla::FoldLevel GetFoldLevel(Sci_Position line) const; void ClearLevels(); - Sci::Line GetLastChild(Sci::Line lineParent, std::optional level = {}, Sci::Line lastLine = -1); + Sci::Line GetLastChild(Sci::Line lineParent, int level=-1, Sci::Line lastLine=-1); Sci::Line GetFoldParent(Sci::Line line) const; void GetHighlightDelimiters(HighlightDelimiter &highlightDelimiter, Sci::Line line, Sci::Line lastLine); @@ -461,7 +423,6 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader Sci::Position NextWordStart(Sci::Position pos, int delta) const; Sci::Position NextWordEnd(Sci::Position pos, int delta) const; Sci_Position SCI_METHOD Length() const override { return cb.Length(); } - Sci::Position LengthNoExcept() const noexcept { return cb.Length(); } void Allocate(Sci::Position newSize) { cb.Allocate(newSize); } CharacterExtracted ExtractCharacter(Sci::Position position) const noexcept; @@ -472,21 +433,18 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader bool MatchesWordOptions(bool word, bool wordStart, Sci::Position pos, Sci::Position length) const; bool HasCaseFolder() const noexcept; - void SetCaseFolder(std::unique_ptr pcf_) noexcept; - Sci::Position FindText(Sci::Position minPos, Sci::Position maxPos, const char *search, Scintilla::FindOption flags, Sci::Position *length); + void SetCaseFolder(CaseFolder *pcf_); + Sci::Position FindText(Sci::Position minPos, Sci::Position maxPos, const char *search, int flags, Sci::Position *length); const char *SubstituteByPosition(const char *text, Sci::Position *length); - Scintilla::LineCharacterIndexType LineCharacterIndex() const noexcept; - void AllocateLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); - void ReleaseLineCharacterIndex(Scintilla::LineCharacterIndexType lineCharacterIndex); + int LineCharacterIndex() const; + void AllocateLineCharacterIndex(int lineCharacterIndex); + void ReleaseLineCharacterIndex(int lineCharacterIndex); Sci::Line LinesTotal() const noexcept; - void AllocateLines(Sci::Line lines); void SetDefaultCharClasses(bool includeWordClass); - void SetCharClasses(const unsigned char *chars, CharacterClass newCharClass); - int GetCharsOfClass(CharacterClass characterClass, unsigned char *buffer) const; - void SetCharacterCategoryOptimization(int countCharacters); - int CharacterCategoryOptimization() const noexcept; - void SCI_METHOD StartStyling(Sci_Position position) override; + void SetCharClasses(const unsigned char *chars, CharClassify::cc newCharClass); + int GetCharsOfClass(CharClassify::cc characterClass, unsigned char *buffer) const; + void SCI_METHOD StartStyling(Sci_Position position, char mask) override; bool SCI_METHOD SetStyleFor(Sci_Position length, char style) override; bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) override; Sci::Position GetEndStyled() const noexcept { return endStyled; } @@ -497,45 +455,41 @@ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader void IncrementStyleClock() noexcept; void SCI_METHOD DecorationSetCurrentIndicator(int indicator) override; void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) override; - LexInterface *GetLexInterface() const noexcept; - void SetLexInterface(std::unique_ptr pLexInterface) noexcept; + LexInterface *GetLexInterface() const; + void SetLexInterface(LexInterface *pLexInterface); int SCI_METHOD SetLineState(Sci_Position line, int state) override; int SCI_METHOD GetLineState(Sci_Position line) const override; - Sci::Line GetMaxLineState() const noexcept; + Sci::Line GetMaxLineState() const; void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) override; - StyledText MarginStyledText(Sci::Line line) const noexcept; + StyledText MarginStyledText(Sci::Line line) const; void MarginSetStyle(Sci::Line line, int style); void MarginSetStyles(Sci::Line line, const unsigned char *styles); void MarginSetText(Sci::Line line, const char *text); void MarginClearAll(); - StyledText AnnotationStyledText(Sci::Line line) const noexcept; + StyledText AnnotationStyledText(Sci::Line line) const; void AnnotationSetText(Sci::Line line, const char *text); void AnnotationSetStyle(Sci::Line line, int style); void AnnotationSetStyles(Sci::Line line, const unsigned char *styles); - int AnnotationLines(Sci::Line line) const noexcept; + int AnnotationLines(Sci::Line line) const; void AnnotationClearAll(); - StyledText EOLAnnotationStyledText(Sci::Line line) const noexcept; - void EOLAnnotationSetStyle(Sci::Line line, int style); - void EOLAnnotationSetText(Sci::Line line, const char *text); - void EOLAnnotationClearAll(); - bool AddWatcher(DocWatcher *watcher, void *userData); - bool RemoveWatcher(DocWatcher *watcher, void *userData) noexcept; + bool RemoveWatcher(DocWatcher *watcher, void *userData); - CharacterClass WordCharacterClass(unsigned int ch) const; + bool IsASCIIWordByte(unsigned char ch) const; + CharClassify::cc WordCharacterClass(unsigned int ch) const; bool IsWordPartSeparator(unsigned int ch) const; Sci::Position WordPartLeft(Sci::Position pos) const; Sci::Position WordPartRight(Sci::Position pos) const; - Sci::Position ExtendStyleRange(Sci::Position pos, int delta, bool singleLine) noexcept; + Sci::Position ExtendStyleRange(Sci::Position pos, int delta, bool singleLine = false); bool IsWhiteLine(Sci::Line line) const; Sci::Position ParaUp(Sci::Position pos) const; Sci::Position ParaDown(Sci::Position pos) const; int IndentSize() const noexcept { return actualIndentInChars; } - Sci::Position BraceMatch(Sci::Position position, Sci::Position maxReStyle, Sci::Position startPos, bool useStartPos) noexcept; + Sci::Position BraceMatch(Sci::Position position, Sci::Position maxReStyle); private: void NotifyModifyAttempt(); @@ -553,16 +507,8 @@ class UndoGroup { pdoc->BeginUndoAction(); } } - // Deleted so UndoGroup objects can not be copied. - UndoGroup(const UndoGroup &) = delete; - UndoGroup(UndoGroup &&) = delete; - void operator=(const UndoGroup &) = delete; - UndoGroup &operator=(UndoGroup &&) = delete; ~UndoGroup() { if (groupNeeded) { - // EndUndoAction can throw as it allocates but throw in destructor is fatal. - // To fix this UndoHistory should allocate any memory needed by EndUndoAction - // beforehand or change EndUndoAction to not require allocation. pdoc->EndUndoAction(); } } @@ -579,18 +525,18 @@ class UndoGroup { */ class DocModification { public: - Scintilla::ModificationFlags modificationType; + int modificationType; Sci::Position position; Sci::Position length; Sci::Line linesAdded; /**< Negative if lines deleted. */ const char *text; /**< Only valid for changes to text, not for changes to style. */ Sci::Line line; - Scintilla::FoldLevel foldLevelNow; - Scintilla::FoldLevel foldLevelPrev; + int foldLevelNow; + int foldLevelPrev; Sci::Line annotationLinesAdded; Sci::Position token; - DocModification(Scintilla::ModificationFlags modificationType_, Sci::Position position_=0, Sci::Position length_=0, + DocModification(int modificationType_, Sci::Position position_=0, Sci::Position length_=0, Sci::Line linesAdded_=0, const char *text_=nullptr, Sci::Line line_=0) noexcept : modificationType(modificationType_), position(position_), @@ -598,20 +544,20 @@ class DocModification { linesAdded(linesAdded_), text(text_), line(line_), - foldLevelNow(Scintilla::FoldLevel::None), - foldLevelPrev(Scintilla::FoldLevel::None), + foldLevelNow(0), + foldLevelPrev(0), annotationLinesAdded(0), token(0) {} - DocModification(Scintilla::ModificationFlags modificationType_, const Action &act, Sci::Line linesAdded_=0) noexcept : + DocModification(int modificationType_, const Action &act, Sci::Line linesAdded_=0) noexcept : modificationType(modificationType_), position(act.position), length(act.lenData), linesAdded(linesAdded_), text(act.data.get()), line(0), - foldLevelNow(Scintilla::FoldLevel::None), - foldLevelPrev(Scintilla::FoldLevel::None), + foldLevelNow(0), + foldLevelPrev(0), annotationLinesAdded(0), token(0) {} }; @@ -627,10 +573,10 @@ class DocWatcher { virtual void NotifyModifyAttempt(Document *doc, void *userData) = 0; virtual void NotifySavePoint(Document *doc, void *userData, bool atSavePoint) = 0; virtual void NotifyModified(Document *doc, DocModification mh, void *userData) = 0; - virtual void NotifyDeleted(Document *doc, void *userData) noexcept = 0; + virtual void NotifyDeleted(Document *doc, void *userData) = 0; virtual void NotifyStyleNeeded(Document *doc, void *userData, Sci::Position endPos) = 0; virtual void NotifyLexerChanged(Document *doc, void *userData) = 0; - virtual void NotifyErrorOccurred(Document *doc, void *userData, Scintilla::Status status) = 0; + virtual void NotifyErrorOccurred(Document *doc, void *userData, int status) = 0; }; } diff --git a/3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.cpp b/3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.cpp new file mode 100644 index 000000000..7ed7e350d --- /dev/null +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.cpp @@ -0,0 +1,77 @@ +// Scintilla source code edit control +/** @file EditModel.cxx + ** Defines the editor state that must be visible to EditorView. + **/ +// Copyright 1998-2014 by Neil Hodgson +// The License.txt file describes the conditions under which this software may be distributed. + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "Platform.h" + +#include "ILoader.h" +#include "ILexer.h" +#include "Scintilla.h" + +#include "Position.h" +#include "UniqueString.h" +#include "SplitVector.h" +#include "Partitioning.h" +#include "RunStyles.h" +#include "ContractionState.h" +#include "CellBuffer.h" +#include "KeyMap.h" +#include "Indicator.h" +#include "LineMarker.h" +#include "Style.h" +#include "ViewStyle.h" +#include "CharClassify.h" +#include "Decoration.h" +#include "CaseFolder.h" +#include "Document.h" +#include "UniConversion.h" +#include "Selection.h" +#include "PositionCache.h" +#include "EditModel.h" + +using namespace Scintilla; + +Caret::Caret() : + active(false), on(false), period(500) {} + +EditModel::EditModel() : braces{} { + inOverstrike = false; + xOffset = 0; + trackLineWidth = false; + posDrag = SelectionPosition(Sci::invalidPosition); + braces[0] = Sci::invalidPosition; + braces[1] = Sci::invalidPosition; + bracesMatchStyle = STYLE_BRACEBAD; + highlightGuideColumn = 0; + primarySelection = true; + imeInteraction = imeWindowed; + foldFlags = 0; + foldDisplayTextStyle = SC_FOLDDISPLAYTEXT_HIDDEN; + hotspot = Range(Sci::invalidPosition); + hoverIndicatorPos = Sci::invalidPosition; + wrapWidth = LineLayout::wrapWidthInfinite; + pdoc = new Document(SC_DOCUMENTOPTION_DEFAULT); + pdoc->AddRef(); + pcs = ContractionStateCreate(pdoc->IsLarge()); +} + +EditModel::~EditModel() { + pdoc->Release(); + pdoc = nullptr; +} diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/EditModel.h b/3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.h similarity index 67% rename from 3rdparty/unioncode-scintilla515/scintilla/src/EditModel.h rename to 3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.h index 0887b86ca..da89c9198 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/EditModel.h +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/EditModel.h @@ -8,7 +8,7 @@ #ifndef EDITMODEL_H #define EDITMODEL_H -namespace Scintilla::Internal { +namespace Scintilla { /** */ @@ -18,7 +18,7 @@ class Caret { bool on; int period; - Caret() noexcept; + Caret(); }; class EditModel { @@ -33,20 +33,16 @@ class EditModel { Sci::Position braces[2]; int bracesMatchStyle; int highlightGuideColumn; - bool hasFocus; Selection sel; bool primarySelection; - Scintilla::IMEInteraction imeInteraction; - Scintilla::Bidirectional bidirectional; + enum IMEInteraction { imeWindowed, imeInline } imeInteraction; - Scintilla::FoldFlag foldFlags; - Scintilla::FoldDisplayTextStyle foldDisplayTextStyle; - UniqueString defaultFoldDisplayText; + int foldFlags; + int foldDisplayTextStyle; std::unique_ptr pcs; // Hotspot support Range hotspot; - bool hotspotSingleLine; Sci::Position hoverIndicatorPos; // Wrapping support @@ -64,12 +60,7 @@ class EditModel { virtual Sci::Line TopLineOfMain() const = 0; virtual Point GetVisibleOriginInMain() const = 0; virtual Sci::Line LinesOnScreen() const = 0; - bool BidirectionalEnabled() const noexcept; - bool BidirectionalR2L() const noexcept; - void SetDefaultFoldDisplayText(const char *text); - const char *GetDefaultFoldDisplayText() const noexcept; - const char *GetFoldDisplayText(Sci::Line lineDoc) const noexcept; - InSelection LineEndInSelection(Sci::Line lineDoc) const; + virtual Range GetHotSpotRange() const = 0; }; } diff --git a/3rdparty/unioncode-scintilla515/scintilla/src/EditView.cxx b/3rdparty/unioncode-qscintilla214/scintilla/src/EditView.cpp similarity index 54% rename from 3rdparty/unioncode-scintilla515/scintilla/src/EditView.cxx rename to 3rdparty/unioncode-qscintilla214/scintilla/src/EditView.cpp index 444fb3283..4a9dc1f8e 100644 --- a/3rdparty/unioncode-scintilla515/scintilla/src/EditView.cxx +++ b/3rdparty/unioncode-qscintilla214/scintilla/src/EditView.cpp @@ -7,38 +7,32 @@ #include #include -#include #include #include +#include #include #include #include #include -#include #include #include -#include #include -#include #include #include #include #include -#include "ScintillaTypes.h" -#include "ScintillaMessages.h" -#include "ScintillaStructures.h" +#include "Platform.h" + #include "ILoader.h" #include "ILexer.h" +#include "Scintilla.h" -#include "Debugging.h" -#include "Geometry.h" -#include "Platform.h" - -#include "CharacterType.h" -#include "CharacterCategoryMap.h" +#include "StringCopy.h" +#include "CharacterSet.h" #include "Position.h" +#include "IntegerRectangle.h" #include "UniqueString.h" #include "SplitVector.h" #include "Partitioning.h" @@ -64,17 +58,21 @@ #include "ElapsedPeriod.h" using namespace Scintilla; -using namespace Scintilla::Internal; -PrintParameters::PrintParameters() noexcept { +static inline bool IsControlCharacter(int ch) { + // iscntrl returns true for lots of chars > 127 which are displayable + return ch >= 0 && ch < ' '; +} + +PrintParameters::PrintParameters() { magnification = 0; - colourMode = PrintOption::Normal; - wrapState = Wrap::Word; + colourMode = SC_PRINT_NORMAL; + wrapState = eWrapWord; } -namespace Scintilla::Internal { +namespace Scintilla { -bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) noexcept { +bool ValidStyledText(const ViewStyle &vs, size_t styleOffset, const StyledText &st) { if (st.multipleStyles) { for (size_t iStyle = 0; iStyle(surface->WidthText(fontText, sv)); + FontAlias fontText = vs.styles[style + styleOffset].font; + width += static_cast(surface->WidthText(fontText, text + start, + static_cast(endSegment - start + 1))); start = endSegment + 1; } return width; @@ -113,9 +111,9 @@ int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, cons if (st.multipleStyles) { widthSubLine = WidthStyledText(surface, vs, styleOffset, st.text + start, st.styles + start, lenLine); } else { - const Font *fontText = vs.styles[styleOffset + st.style].font.get(); - const std::string_view text(st.text + start, lenLine); - widthSubLine = static_cast(surface->WidthText(fontText, text)); + FontAlias fontText = vs.styles[styleOffset + st.style].font; + widthSubLine = static_cast(surface->WidthText(fontText, + st.text + start, static_cast(lenLine))); } if (widthSubLine > widthMax) widthMax = widthSubLine; @@ -125,18 +123,18 @@ int WidestLineWidth(Surface *surface, const ViewStyle &vs, int styleOffset, cons } void DrawTextNoClipPhase(Surface *surface, PRectangle rc, const Style &style, XYPOSITION ybase, - std::string_view text, DrawPhase phase) { - const Font *fontText = style.font.get(); - if (FlagSet(phase, DrawPhase::back)) { - if (FlagSet(phase, DrawPhase::text)) { + const char *s, int len, DrawPhase phase) { + FontAlias fontText = style.font; + if (phase & drawBack) { + if (phase & drawText) { // Drawing both - surface->DrawTextNoClip(rc, fontText, ybase, text, + surface->DrawTextNoClip(rc, fontText, ybase, s, len, style.fore, style.back); } else { - surface->FillRectangleAligned(rc, Fill(style.back)); + surface->FillRectangle(rc, style.back); } - } else if (FlagSet(phase, DrawPhase::text)) { - surface->DrawTextTransparent(rc, fontText, ybase, text, style.fore); + } else if (phase & drawText) { + surface->DrawTextTransparent(rc, fontText, ybase, s, len, style.fore); } } @@ -152,94 +150,91 @@ void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRec while (end < length - 1 && st.styles[start + end + 1] == style) end++; style += styleOffset; - const Font *fontText = vs.styles[style].font.get(); - const std::string_view text(st.text + start + i, end - i + 1); - const int width = static_cast(surface->WidthText(fontText, text)); + FontAlias fontText = vs.styles[style].font; + const int width = static_cast(surface->WidthText(fontText, + st.text + start + i, static_cast(end - i + 1))); PRectangle rcSegment = rcText; rcSegment.left = static_cast(x); rcSegment.right = static_cast(x + width + 1); DrawTextNoClipPhase(surface, rcSegment, vs.styles[style], - rcText.top + vs.maxAscent, text, phase); + rcText.top + vs.maxAscent, st.text + start + i, + static_cast(end - i + 1), phase); x += width; i = end + 1; } } else { const size_t style = st.style + styleOffset; DrawTextNoClipPhase(surface, rcText, vs.styles[style], - rcText.top + vs.maxAscent, - std::string_view(st.text + start, length), phase); + rcText.top + vs.maxAscent, st.text + start, + static_cast(length), phase); } } -void Hexits(char *hexits, int ch) noexcept { - hexits[0] = 'x'; - hexits[1] = "0123456789ABCDEF"[ch / 0x10]; - hexits[2] = "0123456789ABCDEF"[ch % 0x10]; - hexits[3] = 0; } -} +const XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point precision issues EditView::EditView() { tabWidthMinimumPixels = 2; // needed for calculating tab stops for fractional proportional fonts hideSelection = false; drawOverstrikeCaret = true; bufferedDraw = true; - phasesDraw = PhasesDraw::Two; + phasesDraw = phasesTwo; lineWidthMaxSeen = 0; additionalCaretsBlink = true; additionalCaretsVisible = true; imeCaretBlockOverride = false; - llc.SetLevel(LineCache::Caret); + llc.SetLevel(LineLayoutCache::llcCaret); posCache.SetSize(0x400); tabArrowHeight = 4; customDrawTabArrow = nullptr; customDrawWrapMarker = nullptr; } -EditView::~EditView() = default; +EditView::~EditView() { +} -bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) noexcept { - const PhasesDraw phasesDrawNew = twoPhaseDraw ? PhasesDraw::Two : PhasesDraw::One; +bool EditView::SetTwoPhaseDraw(bool twoPhaseDraw) { + const PhasesDraw phasesDrawNew = twoPhaseDraw ? phasesTwo : phasesOne; const bool redraw = phasesDraw != phasesDrawNew; phasesDraw = phasesDrawNew; return redraw; } -bool EditView::SetPhasesDraw(int phases) noexcept { +bool EditView::SetPhasesDraw(int phases) { const PhasesDraw phasesDrawNew = static_cast(phases); const bool redraw = phasesDraw != phasesDrawNew; phasesDraw = phasesDrawNew; return redraw; } -bool EditView::LinesOverlap() const noexcept { - return phasesDraw == PhasesDraw::Multiple; +bool EditView::LinesOverlap() const { + return phasesDraw == phasesMultiple; } -void EditView::ClearAllTabstops() noexcept { +void EditView::ClearAllTabstops() { ldTabstops.reset(); } -XYPOSITION EditView::NextTabstopPos(Sci::Line line, XYPOSITION x, XYPOSITION tabWidth) const noexcept { +XYPOSITION EditView::NextTabstopPos(Sci::Line line, XYPOSITION x, XYPOSITION tabWidth) const { const int next = GetNextTabstop(line, static_cast(x + tabWidthMinimumPixels)); if (next > 0) return static_cast(next); return (static_cast((x + tabWidthMinimumPixels) / tabWidth) + 1) * tabWidth; } -bool EditView::ClearTabstops(Sci::Line line) noexcept { +bool EditView::ClearTabstops(Sci::Line line) { return ldTabstops && ldTabstops->ClearTabstops(line); } bool EditView::AddTabstop(Sci::Line line, int x) { if (!ldTabstops) { - ldTabstops = std::make_unique(); + ldTabstops.reset(new LineTabstops()); } return ldTabstops && ldTabstops->AddTabstop(line, x); } -int EditView::GetNextTabstop(Sci::Line line, int x) const noexcept { +int EditView::GetNextTabstop(Sci::Line line, int x) const { if (ldTabstops) { return ldTabstops->GetNextTabstop(line, x); } else { @@ -261,76 +256,85 @@ void EditView::LinesAddedOrRemoved(Sci::Line lineOfPos, Sci::Line linesAdded) { } } -void EditView::DropGraphics() noexcept { - pixmapLine.reset(); - pixmapIndentGuide.reset(); - pixmapIndentGuideHighlight.reset(); +void EditView::DropGraphics(bool freeObjects) { + if (freeObjects) { + pixmapLine.reset(); + pixmapIndentGuide.reset(); + pixmapIndentGuideHighlight.reset(); + } else { + if (pixmapLine) + pixmapLine->Release(); + if (pixmapIndentGuide) + pixmapIndentGuide->Release(); + if (pixmapIndentGuideHighlight) + pixmapIndentGuideHighlight->Release(); + } +} + +void EditView::AllocateGraphics(const ViewStyle &vsDraw) { + if (!pixmapLine) + pixmapLine.reset(Surface::Allocate(vsDraw.technology)); + if (!pixmapIndentGuide) + pixmapIndentGuide.reset(Surface::Allocate(vsDraw.technology)); + if (!pixmapIndentGuideHighlight) + pixmapIndentGuideHighlight.reset(Surface::Allocate(vsDraw.technology)); } -static const char *ControlCharacterString(unsigned char ch) noexcept { +static const char *ControlCharacterString(unsigned char ch) { const char * const reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; - if (ch < std::size(reps)) { + if (ch < ELEMENTS(reps)) { return reps[ch]; } else { return "BAD"; } } -static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, - const ViewStyle &vsDraw, Stroke stroke) { - - const XYPOSITION halfWidth = stroke.width / 2.0; - - const XYPOSITION leftStroke = std::round(std::min(rcTab.left + 2, rcTab.right - 1)) + halfWidth; - const XYPOSITION rightStroke = std::max(leftStroke, std::round(rcTab.right) - 1.0f - halfWidth); - const XYPOSITION yMidAligned = ymid + halfWidth; - const Point arrowPoint(rightStroke, yMidAligned); - if (rightStroke > leftStroke) { - // When not enough room, don't draw the arrow shaft - surface->LineDraw(Point(leftStroke, yMidAligned), arrowPoint, stroke); - } +static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const ViewStyle &vsDraw) { + const IntegerRectangle ircTab(rcTab); + if ((rcTab.left + 2) < (rcTab.right - 1)) + surface->MoveTo(ircTab.left + 2, ymid); + else + surface->MoveTo(ircTab.right - 1, ymid); + surface->LineTo(ircTab.right - 1, ymid); // Draw the arrow head if needed - if (vsDraw.tabDrawMode == TabDrawMode::LongArrow) { - XYPOSITION ydiff = std::floor(rcTab.Height() / 2.0f); - XYPOSITION xhead = rightStroke - ydiff; + if (vsDraw.tabDrawMode == tdLongArrow) { + int ydiff = (ircTab.bottom - ircTab.top) / 2; + int xhead = ircTab.right - 1 - ydiff; if (xhead <= rcTab.left) { - ydiff -= rcTab.left - xhead; - xhead = rcTab.left; + ydiff -= ircTab.left - xhead - 1; + xhead = ircTab.left - 1; } - const Point ptsHead[] = { - Point(xhead, yMidAligned - ydiff), - arrowPoint, - Point(xhead, yMidAligned + ydiff) - }; - surface->PolyLine(ptsHead, std::size(ptsHead), stroke); + surface->LineTo(xhead, ymid - ydiff); + surface->MoveTo(ircTab.right - 1, ymid); + surface->LineTo(xhead, ymid + ydiff); } } -void EditView::RefreshPixMaps(Surface *surfaceWindow, const ViewStyle &vsDraw) { - if (!pixmapIndentGuide) { +void EditView::RefreshPixMaps(Surface *surfaceWindow, WindowID wid, const ViewStyle &vsDraw) { + if (!pixmapIndentGuide->Initialised()) { // 1 extra pixel in height so can handle odd/even positions and so produce a continuous line - pixmapIndentGuide = surfaceWindow->AllocatePixMap(1, vsDraw.lineHeight + 1); - pixmapIndentGuideHighlight = surfaceWindow->AllocatePixMap(1, vsDraw.lineHeight + 1); + pixmapIndentGuide->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); + pixmapIndentGuideHighlight->InitPixMap(1, vsDraw.lineHeight + 1, surfaceWindow, wid); const PRectangle rcIG = PRectangle::FromInts(0, 0, 1, vsDraw.lineHeight); - pixmapIndentGuide->FillRectangle(rcIG, vsDraw.styles[StyleIndentGuide].back); - pixmapIndentGuideHighlight->FillRectangle(rcIG, vsDraw.styles[StyleBraceLight].back); + pixmapIndentGuide->FillRectangle(rcIG, vsDraw.styles[STYLE_INDENTGUIDE].back); + pixmapIndentGuide->PenColour(vsDraw.styles[STYLE_INDENTGUIDE].fore); + pixmapIndentGuideHighlight->FillRectangle(rcIG, vsDraw.styles[STYLE_BRACELIGHT].back); + pixmapIndentGuideHighlight->PenColour(vsDraw.styles[STYLE_BRACELIGHT].fore); for (int stripe = 1; stripe < vsDraw.lineHeight + 1; stripe += 2) { const PRectangle rcPixel = PRectangle::FromInts(0, stripe, 1, stripe + 1); - pixmapIndentGuide->FillRectangle(rcPixel, vsDraw.styles[StyleIndentGuide].fore); - pixmapIndentGuideHighlight->FillRectangle(rcPixel, vsDraw.styles[StyleBraceLight].fore); + pixmapIndentGuide->FillRectangle(rcPixel, vsDraw.styles[STYLE_INDENTGUIDE].fore); + pixmapIndentGuideHighlight->FillRectangle(rcPixel, vsDraw.styles[STYLE_BRACELIGHT].fore); } - pixmapIndentGuide->FlushDrawing(); - pixmapIndentGuideHighlight->FlushDrawing(); } } -std::shared_ptr EditView::RetrieveLineLayout(Sci::Line lineNumber, const EditModel &model) { +LineLayout *EditView::RetrieveLineLayout(Sci::Line lineNumber, const EditModel &model) { const Sci::Position posLineStart = model.pdoc->LineStart(lineNumber); const Sci::Position posLineEnd = model.pdoc->LineStart(lineNumber + 1); PLATFORM_ASSERT(posLineEnd >= posLineStart); @@ -340,62 +344,24 @@ std::shared_ptr EditView::RetrieveLineLayout(Sci::Line lineNumber, c model.LinesOnScreen() + 1, model.pdoc->LinesTotal()); } -namespace { - -constexpr XYPOSITION epsilon = 0.0001f; // A small nudge to avoid floating point precision issues - -/** -* Return the chDoc argument with case transformed as indicated by the caseForce argument. -* chPrevious is needed for camel casing. -* This only affects ASCII characters and is provided for languages with case-insensitive -* ASCII keywords where the user wishes to view keywords in a preferred case. -*/ -inline char CaseForce(Style::CaseForce caseForce, char chDoc, char chPrevious) noexcept { - switch (caseForce) { - case Style::CaseForce::mixed: - return chDoc; - case Style::CaseForce::lower: - return MakeLowerCase(chDoc); - case Style::CaseForce::upper: - return MakeUpperCase(chDoc); - case Style::CaseForce::camel: - default: // default should not occur, included to avoid warnings - if (IsUpperOrLowerCase(chDoc) && !IsUpperOrLowerCase(chPrevious)) { - return MakeUpperCase(chDoc); - } else { - return MakeLowerCase(chDoc); - } - } -} - -bool ViewIsASCII(std::string_view text) { - return std::all_of(text.cbegin(), text.cend(), IsASCII); -} - -} - /** * Fill in the LineLayout data for the given line. * Copy the given @a line and its styles from the document into local arrays. * Also determine the x position at which each character starts. */ -void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width) { +void EditView::LayoutLine(const EditModel &model, Sci::Line line, Surface *surface, const ViewStyle &vstyle, LineLayout *ll, int width) { if (!ll) return; - const Sci::Line line = ll->LineNumber(); PLATFORM_ASSERT(line < model.pdoc->LinesTotal()); - PLATFORM_ASSERT(ll->chars); + PLATFORM_ASSERT(ll->chars != NULL); const Sci::Position posLineStart = model.pdoc->LineStart(line); Sci::Position posLineEnd = model.pdoc->LineStart(line + 1); // If the line is very long, limit the treatment to a length that should fit in the viewport if (posLineEnd >(posLineStart + ll->maxLineLength)) { posLineEnd = posLineStart + ll->maxLineLength; } - // Hard to cope when too narrow, so just assume there is space - width = std::max(width, 20); - - if (ll->validity == LineLayout::ValidLevel::checkTextAndStyle) { + if (ll->validity == LineLayout::llCheckTextAndStyle) { Sci::Position lineLength = posLineEnd - posLineStart; if (!vstyle.viewEOL) { lineLength = model.pdoc->LineEnd(line) - posLineStart; @@ -404,32 +370,47 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt // See if chars, styles, indicators, are all the same bool allSame = true; // Check base line layout - char chPrevious = 0; - for (Sci::Position numCharsInLine = 0; numCharsInLine < lineLength; numCharsInLine++) { + int styleByte = 0; + int numCharsInLine = 0; + while (numCharsInLine < lineLength) { const Sci::Position charInDoc = numCharsInLine + posLineStart; const char chDoc = model.pdoc->CharAt(charInDoc); - const int styleByte = model.pdoc->StyleIndexAt(charInDoc); + styleByte = model.pdoc->StyleIndexAt(charInDoc); allSame = allSame && (ll->styles[numCharsInLine] == styleByte); - allSame = allSame && - (ll->chars[numCharsInLine] == CaseForce(vstyle.styles[styleByte].caseForce, chDoc, chPrevious)); - chPrevious = chDoc; + if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseMixed) + allSame = allSame && + (ll->chars[numCharsInLine] == chDoc); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseLower) + allSame = allSame && + (ll->chars[numCharsInLine] == MakeLowerCase(chDoc)); + else if (vstyle.styles[ll->styles[numCharsInLine]].caseForce == Style::caseUpper) + allSame = allSame && + (ll->chars[numCharsInLine] == MakeUpperCase(chDoc)); + else { // Style::caseCamel + if ((model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine])) && + ((numCharsInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[numCharsInLine - 1])))) { + allSame = allSame && (ll->chars[numCharsInLine] == MakeUpperCase(chDoc)); + } else { + allSame = allSame && (ll->chars[numCharsInLine] == MakeLowerCase(chDoc)); + } + } + numCharsInLine++; } - const int styleByteLast = (posLineEnd > posLineStart) ? model.pdoc->StyleIndexAt(posLineEnd - 1) : 0; - allSame = allSame && (ll->styles[lineLength] == styleByteLast); // For eolFilled + allSame = allSame && (ll->styles[numCharsInLine] == styleByte); // For eolFilled if (allSame) { - ll->validity = (ll->widthLine != width) ? LineLayout::ValidLevel::positions : LineLayout::ValidLevel::lines; + ll->validity = LineLayout::llPositions; } else { - ll->validity = LineLayout::ValidLevel::invalid; + ll->validity = LineLayout::llInvalid; } } else { - ll->validity = LineLayout::ValidLevel::invalid; + ll->validity = LineLayout::llInvalid; } } - if (ll->validity == LineLayout::ValidLevel::invalid) { + if (ll->validity == LineLayout::llInvalid) { ll->widthLine = LineLayout::wrapWidthInfinite; ll->lines = 1; - if (vstyle.edgeState == EdgeVisualStyle::Background) { + if (vstyle.edgeState == EDGE_BACKGROUND) { Sci::Position edgePosition = model.pdoc->FindColumn(line, vstyle.theEdge.column); if (edgePosition >= posLineStart) { edgePosition -= posLineStart; @@ -445,13 +426,26 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt model.pdoc->GetStyleRange(ll->styles.get(), posLineStart, lineLength); const int numCharsBeforeEOL = static_cast(model.pdoc->LineEnd(line) - posLineStart); const int numCharsInLine = (vstyle.viewEOL) ? lineLength : numCharsBeforeEOL; + for (Sci::Position styleInLine = 0; styleInLine < numCharsInLine; styleInLine++) { + const unsigned char styleByte = ll->styles[styleInLine]; + ll->styles[styleInLine] = styleByte; + } const unsigned char styleByteLast = (lineLength > 0) ? ll->styles[lineLength - 1] : 0; if (vstyle.someStylesForceCase) { - char chPrevious = 0; for (int charInLine = 0; charInLinechars[charInLine]; - ll->chars[charInLine] = CaseForce(vstyle.styles[ll->styles[charInLine]].caseForce, chDoc, chPrevious); - chPrevious = chDoc; + if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseUpper) + ll->chars[charInLine] = MakeUpperCase(chDoc); + else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower) + ll->chars[charInLine] = MakeLowerCase(chDoc); + else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseCamel) { + if ((model.pdoc->IsASCIIWordByte(ll->chars[charInLine])) && + ((charInLine == 0) || (!model.pdoc->IsASCIIWordByte(ll->chars[charInLine - 1])))) { + ll->chars[charInLine] = MakeUpperCase(chDoc); + } else { + ll->chars[charInLine] = MakeLowerCase(chDoc); + } + } } } ll->xHighlightGuide = 0; @@ -464,7 +458,7 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt ll->positions[0] = 0; bool lastSegItalics = false; - BreakFinder bfLayout(ll, nullptr, Range(0, numCharsInLine), posLineStart, 0, BreakFinder::BreakFor::Text, model.pdoc, &model.reprs, nullptr); + BreakFinder bfLayout(ll, nullptr, Range(0, numCharsInLine), posLineStart, 0, false, model.pdoc, &model.reprs, nullptr); while (bfLayout.More()) { const TextSegment ts = bfLayout.Next(); @@ -479,20 +473,10 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt representationWidth = NextTabstopPos(line, x, vstyle.tabWidth) - ll->positions[ts.start]; } else { if (representationWidth <= 0.0) { - assert(ts.representation->stringRep.length() <= Representation::maxLength); - XYPOSITION positionsRepr[Representation::maxLength+1]; - // ts.representation->stringRep is UTF-8 which only matches cache if document is UTF-8 - // or it only contains ASCII which is a subset of all currently supported encodings. - if ((CpUtf8 == model.pdoc->dbcsCodePage) || ViewIsASCII(ts.representation->stringRep)) { - posCache.MeasureWidths(surface, vstyle, StyleControlChar, ts.representation->stringRep, - positionsRepr); - } else { - surface->MeasureWidthsUTF8(vstyle.styles[StyleControlChar].font.get(), ts.representation->stringRep, positionsRepr); - } - representationWidth = positionsRepr[ts.representation->stringRep.length() - 1]; - if (FlagSet(ts.representation->appearance, RepresentationAppearance::Blob)) { - representationWidth += vstyle.ctrlCharPadding; - } + XYPOSITION positionsRepr[256]; // Should expand when needed + posCache.MeasureWidths(surface, vstyle, STYLE_CONTROLCHAR, ts.representation->stringRep.c_str(), + static_cast(ts.representation->stringRep.length()), positionsRepr, model.pdoc); + representationWidth = positionsRepr[ts.representation->stringRep.length() - 1] + vstyle.ctrlCharPadding; } } for (int ii = 0; ii < ts.length; ii++) @@ -502,8 +486,8 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt // Over half the segments are single characters and of these about half are space characters. ll->positions[ts.start + 1] = vstyle.styles[ll->styles[ts.start]].spaceWidth; } else { - posCache.MeasureWidths(surface, vstyle, ll->styles[ts.start], - std::string_view(&ll->chars[ts.start], ts.length), &ll->positions[ts.start + 1]); + posCache.MeasureWidths(surface, vstyle, ll->styles[ts.start], &ll->chars[ts.start], + ts.length, &ll->positions[ts.start + 1], model.pdoc); } } lastSegItalics = (!ts.representation) && ((ll->chars[ts.end() - 1] != ' ') && vstyle.styles[ll->styles[ts.start]].italic); @@ -520,9 +504,13 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt } ll->numCharsInLine = numCharsInLine; ll->numCharsBeforeEOL = numCharsBeforeEOL; - ll->validity = LineLayout::ValidLevel::positions; + ll->validity = LineLayout::llPositions; } - if ((ll->validity == LineLayout::ValidLevel::positions) || (ll->widthLine != width)) { + // Hard to cope when too narrow, so just assume there is space + if (width < 20) { + width = 20; + } + if ((ll->validity == LineLayout::llPositions) || (ll->widthLine != width)) { ll->widthLine = width; if (width == LineLayout::wrapWidthInfinite) { ll->lines = 1; @@ -530,25 +518,23 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt // Simple common case where line does not need wrapping. ll->lines = 1; } else { - if (FlagSet(vstyle.wrap.visualFlags, WrapVisualFlag::End)) { + if (vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { width -= static_cast(vstyle.aveCharWidth); // take into account the space for end wrap mark } XYPOSITION wrapAddIndent = 0; // This will be added to initial indent of line - switch (vstyle.wrap.indentMode) { - case WrapIndentMode::Fixed: - wrapAddIndent = vstyle.wrap.visualStartIndent * vstyle.aveCharWidth; + switch (vstyle.wrapIndentMode) { + case SC_WRAPINDENT_FIXED: + wrapAddIndent = vstyle.wrapVisualStartIndent * vstyle.aveCharWidth; break; - case WrapIndentMode::Indent: + case SC_WRAPINDENT_INDENT: wrapAddIndent = model.pdoc->IndentSize() * vstyle.spaceWidth; break; - case WrapIndentMode::DeepIndent: + case SC_WRAPINDENT_DEEPINDENT: wrapAddIndent = model.pdoc->IndentSize() * 2 * vstyle.spaceWidth; break; - default: // No additional indent for WrapIndentMode::Fixed - break; } ll->wrapIndent = wrapAddIndent; - if (vstyle.wrap.indentMode != WrapIndentMode::Fixed) { + if (vstyle.wrapIndentMode != SC_WRAPINDENT_FIXED) { for (int i = 0; i < ll->numCharsInLine; i++) { if (!IsSpaceOrTab(ll->chars[i])) { ll->wrapIndent += ll->positions[i]; // Add line indent @@ -560,138 +546,77 @@ void EditView::LayoutLine(const EditModel &model, Surface *surface, const ViewSt if (ll->wrapIndent > width - static_cast(vstyle.aveCharWidth) * 15) ll->wrapIndent = wrapAddIndent; // Check for wrapIndent minimum - if ((FlagSet(vstyle.wrap.visualFlags, WrapVisualFlag::Start)) && (ll->wrapIndent < vstyle.aveCharWidth)) + if ((vstyle.wrapVisualFlags & SC_WRAPVISUALFLAG_START) && (ll->wrapIndent < vstyle.aveCharWidth)) ll->wrapIndent = vstyle.aveCharWidth; // Indent to show start visual ll->lines = 0; // Calculate line start positions based upon width. + Sci::Position lastGoodBreak = 0; Sci::Position lastLineStart = 0; - XYACCUMULATOR startOffset = width; + XYACCUMULATOR startOffset = 0; Sci::Position p = 0; - const Wrap wrapState = vstyle.wrap.state; - const Sci::Position numCharsInLine = ll->numCharsInLine; - while (p < numCharsInLine) { - while (p < numCharsInLine && ll->positions[p + 1] < startOffset) { - p++; - } - if (p < numCharsInLine) { - // backtrack to find lastGoodBreak - Sci::Position lastGoodBreak = p; - if (p > 0) { - lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; - } - if (wrapState != Wrap::Char) { - Sci::Position pos = lastGoodBreak; - while (pos > lastLineStart) { - // style boundary and space - if (wrapState != Wrap::WhiteSpace && (ll->styles[pos - 1] != ll->styles[pos])) { - break; - } - if (IsBreakSpace(ll->chars[pos - 1]) && !IsBreakSpace(ll->chars[pos])) { - break; - } - pos = model.pdoc->MovePositionOutsideChar(pos + posLineStart - 1, -1) - posLineStart; - } - if (pos > lastLineStart) { - lastGoodBreak = pos; - } - } + while (p < ll->numCharsInLine) { + if ((ll->positions[p + 1] - startOffset) >= width) { if (lastGoodBreak == lastLineStart) { // Try moving to start of last character if (p > 0) { - lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) - posLineStart; + lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; } if (lastGoodBreak == lastLineStart) { // Ensure at least one character on line. - lastGoodBreak = model.pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) - posLineStart; + lastGoodBreak = model.pdoc->MovePositionOutsideChar(lastGoodBreak + posLineStart + 1, 1) + - posLineStart; } } lastLineStart = lastGoodBreak; ll->lines++; - ll->SetLineStart(ll->lines, static_cast(lastLineStart)); - startOffset = ll->positions[lastLineStart]; + ll->SetLineStart(ll->lines, static_cast(lastGoodBreak)); + startOffset = ll->positions[lastGoodBreak]; // take into account the space for start wrap mark and indent - startOffset += width - ll->wrapIndent; - p = lastLineStart + 1; + startOffset -= ll->wrapIndent; + p = lastGoodBreak + 1; + continue; } - } - ll->lines++; - } - ll->validity = LineLayout::ValidLevel::lines; - } -} - -// Fill the LineLayout bidirectional data fields according to each char style - -void EditView::UpdateBidiData(const EditModel &model, const ViewStyle &vstyle, LineLayout *ll) { - if (model.BidirectionalEnabled()) { - ll->EnsureBidiData(); - for (int stylesInLine = 0; stylesInLine < ll->numCharsInLine; stylesInLine++) { - ll->bidiData->stylesFonts[stylesInLine] = vstyle.styles[ll->styles[stylesInLine]].font; - } - ll->bidiData->stylesFonts[ll->numCharsInLine].reset(); - - for (int charsInLine = 0; charsInLine < ll->numCharsInLine; charsInLine++) { - const int charWidth = UTF8DrawBytes(reinterpret_cast(&ll->chars[charsInLine]), ll->numCharsInLine - charsInLine); - const Representation *repr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[charsInLine], charWidth)); - - ll->bidiData->widthReprs[charsInLine] = 0.0f; - if (repr && ll->chars[charsInLine] != '\t') { - ll->bidiData->widthReprs[charsInLine] = ll->positions[charsInLine + charWidth] - ll->positions[charsInLine]; - } - if (charWidth > 1) { - for (int c = 1; c < charWidth; c++) { - charsInLine++; - ll->bidiData->widthReprs[charsInLine] = 0.0f; + if (p > 0) { + if (vstyle.wrapState == eWrapChar) { + lastGoodBreak = model.pdoc->MovePositionOutsideChar(p + posLineStart, -1) + - posLineStart; + p = model.pdoc->MovePositionOutsideChar(p + 1 + posLineStart, 1) - posLineStart; + continue; + } else if ((vstyle.wrapState == eWrapWord) && (ll->styles[p] != ll->styles[p - 1])) { + lastGoodBreak = p; + } else if (IsSpaceOrTab(ll->chars[p - 1]) && !IsSpaceOrTab(ll->chars[p])) { + lastGoodBreak = p; + } } + p++; } + ll->lines++; } - ll->bidiData->widthReprs[ll->numCharsInLine] = 0.0f; - } else { - ll->bidiData.reset(); + ll->validity = LineLayout::llLines; } } Point EditView::LocationFromPosition(Surface *surface, const EditModel &model, SelectionPosition pos, Sci::Line topLine, - const ViewStyle &vs, PointEnd pe, const PRectangle rcClient) { + const ViewStyle &vs, PointEnd pe) { Point pt; - if (pos.Position() == Sci::invalidPosition) + if (pos.Position() == INVALID_POSITION) return pt; Sci::Line lineDoc = model.pdoc->SciLineFromPosition(pos.Position()); Sci::Position posLineStart = model.pdoc->LineStart(lineDoc); - if (FlagSet(pe, PointEnd::lineEnd) && (lineDoc > 0) && (pos.Position() == posLineStart)) { + if ((pe & peLineEnd) && (lineDoc > 0) && (pos.Position() == posLineStart)) { // Want point at end of first line lineDoc--; posLineStart = model.pdoc->LineStart(lineDoc); } const Sci::Line lineVisible = model.pcs->DisplayFromDoc(lineDoc); - std::shared_ptr ll = RetrieveLineLayout(lineDoc, model); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const int posInLine = static_cast(pos.Position() - posLineStart); pt = ll->PointFromPosition(posInLine, vs.lineHeight, pe); - pt.x += vs.textStart - model.xOffset; - - if (model.BidirectionalEnabled()) { - // Fill the line bidi data - UpdateBidiData(model, vs, ll.get()); - - // Find subLine - const int subLine = ll->SubLineFromPosition(posInLine, pe); - const int caretPosition = posInLine - ll->LineStart(subLine); - - // Get the point from current position - const ScreenLine screenLine(ll.get(), subLine, vs, rcClient.right, tabWidthMinimumPixels); - std::unique_ptr slLayout = surface->Layout(&screenLine); - pt.x = slLayout->XFromPosition(caretPosition); - - pt.x += vs.textStart - model.xOffset; - - pt.y = 0; - if (posInLine >= ll->LineStart(subLine)) { - pt.y = static_cast(subLine*vs.lineHeight); - } - } pt.y += (lineVisible - topLine) * vs.lineHeight; + pt.x += vs.textStart - model.xOffset; } pt.x += pos.VirtualSpace() * vs.styles[ll->EndLineStyle()].spaceWidth; return pt; @@ -704,9 +629,9 @@ Range EditView::RangeDisplayLine(Surface *surface, const EditModel &model, Sci:: } const Sci::Line lineDoc = model.pcs->DocFromDisplay(lineVisible); const Sci::Position positionLineStart = model.pdoc->LineStart(lineDoc); - std::shared_ptr ll = RetrieveLineLayout(lineDoc, model); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc); const int subLine = static_cast(lineVisible - lineStartSet); if (subLine < ll->lines) { @@ -722,22 +647,21 @@ Range EditView::RangeDisplayLine(Surface *surface, const EditModel &model, Sci:: return rangeSubLine; } -SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid, - bool charPosition, bool virtualSpace, const ViewStyle &vs, const PRectangle rcClient) { +SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditModel &model, PointDocument pt, bool canReturnInvalid, bool charPosition, bool virtualSpace, const ViewStyle &vs) { pt.x = pt.x - vs.textStart; - Sci::Line visibleLine = static_cast(std::floor(pt.y / vs.lineHeight)); + Sci::Line visibleLine = static_cast(floor(pt.y / vs.lineHeight)); if (!canReturnInvalid && (visibleLine < 0)) visibleLine = 0; const Sci::Line lineDoc = model.pcs->DocFromDisplay(visibleLine); if (canReturnInvalid && (lineDoc < 0)) - return SelectionPosition(Sci::invalidPosition); + return SelectionPosition(INVALID_POSITION); if (lineDoc >= model.pdoc->LinesTotal()) - return SelectionPosition(canReturnInvalid ? Sci::invalidPosition : + return SelectionPosition(canReturnInvalid ? INVALID_POSITION : model.pdoc->Length()); const Sci::Position posLineStart = model.pdoc->LineStart(lineDoc); - std::shared_ptr ll = RetrieveLineLayout(lineDoc, model); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const Sci::Line lineStartSet = model.pcs->DisplayFromDoc(lineDoc); const int subLine = static_cast(visibleLine - lineStartSet); if (subLine < ll->lines) { @@ -745,19 +669,8 @@ SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditMo const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; if (subLine > 0) // Wrapped pt.x -= ll->wrapIndent; - Sci::Position positionInLine = 0; - if (model.BidirectionalEnabled()) { - // Fill the line bidi data - UpdateBidiData(model, vs, ll.get()); - - const ScreenLine screenLine(ll.get(), subLine, vs, rcClient.right, tabWidthMinimumPixels); - std::unique_ptr slLayout = surface->Layout(&screenLine); - positionInLine = slLayout->PositionFromX(static_cast(pt.x), charPosition) + - rangeSubLine.start; - } else { - positionInLine = ll->FindPositionFromX(static_cast(pt.x + subLineStart), - rangeSubLine, charPosition); - } + const Sci::Position positionInLine = ll->FindPositionFromX(static_cast(pt.x + subLineStart), + rangeSubLine, charPosition); if (positionInLine < rangeSubLine.end) { return SelectionPosition(model.pdoc->MovePositionOutsideChar(positionInLine + posLineStart, 1)); } @@ -777,7 +690,7 @@ SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditMo if (!canReturnInvalid) return SelectionPosition(ll->numCharsInLine + posLineStart); } - return SelectionPosition(canReturnInvalid ? Sci::invalidPosition : posLineStart); + return SelectionPosition(canReturnInvalid ? INVALID_POSITION : posLineStart); } /** @@ -786,10 +699,10 @@ SelectionPosition EditView::SPositionFromLocation(Surface *surface, const EditMo * This method is used for rectangular selections and does not work on wrapped lines. */ SelectionPosition EditView::SPositionFromLineX(Surface *surface, const EditModel &model, Sci::Line lineDoc, int x, const ViewStyle &vs) { - std::shared_ptr ll = RetrieveLineLayout(lineDoc, model); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { const Sci::Position posLineStart = model.pdoc->LineStart(lineDoc); - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const Range rangeSubLine = ll->SubLineRange(0, LineLayout::Scope::visibleOnly); const XYPOSITION subLineStart = ll->positions[rangeSubLine.start]; const Sci::Position positionInLine = ll->FindPositionFromX(x + subLineStart, rangeSubLine, false); @@ -807,9 +720,9 @@ SelectionPosition EditView::SPositionFromLineX(Surface *surface, const EditModel Sci::Line EditView::DisplayFromPosition(Surface *surface, const EditModel &model, Sci::Position pos, const ViewStyle &vs) { const Sci::Line lineDoc = model.pdoc->SciLineFromPosition(pos); Sci::Line lineDisplay = model.pcs->DisplayFromDoc(lineDoc); - std::shared_ptr ll = RetrieveLineLayout(lineDoc, model); + AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc, model)); if (surface && ll) { - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, lineDoc, surface, vs, ll, model.wrapWidth); const Sci::Position posLineStart = model.pdoc->LineStart(lineDoc); const Sci::Position posInLine = pos - posLineStart; lineDisplay--; // To make up for first increment ahead. @@ -824,11 +737,11 @@ Sci::Line EditView::DisplayFromPosition(Surface *surface, const EditModel &model Sci::Position EditView::StartEndDisplayLine(Surface *surface, const EditModel &model, Sci::Position pos, bool start, const ViewStyle &vs) { const Sci::Line line = model.pdoc->SciLineFromPosition(pos); - std::shared_ptr ll = RetrieveLineLayout(line, model); - Sci::Position posRet = Sci::invalidPosition; + AutoLineLayout ll(llc, RetrieveLineLayout(line, model)); + Sci::Position posRet = INVALID_POSITION; if (surface && ll) { const Sci::Position posLineStart = model.pdoc->LineStart(line); - LayoutLine(model, surface, vs, ll.get(), model.wrapWidth); + LayoutLine(model, line, surface, vs, ll, model.wrapWidth); const Sci::Position posInLine = pos - posLineStart; if (posInLine <= ll->maxLineLength) { for (int subLine = 0; subLine < ll->lines; subLine++) { @@ -841,7 +754,7 @@ Sci::Position EditView::StartEndDisplayLine(Surface *surface, const EditModel &m if (subLine == ll->lines - 1) posRet = ll->numCharsBeforeEOL + posLineStart; else - posRet = model.pdoc->MovePositionOutsideChar(ll->LineStart(subLine + 1) + posLineStart - 1, -1, false); + posRet = ll->LineStart(subLine + 1) + posLineStart - 1; } } } @@ -850,59 +763,32 @@ Sci::Position EditView::StartEndDisplayLine(Surface *surface, const EditModel &m return posRet; } -namespace { - -constexpr ColourRGBA bugColour = ColourRGBA(0xff, 0, 0xff, 0xf0); - -// Selection background colours are always defined, the value_or is to show if bug - -ColourRGBA SelectionBackground(const EditModel &model, const ViewStyle &vsDraw, InSelection inSelection) { - if (inSelection == InSelection::inNone) - return bugColour; // Not selected is a bug - - Element element = Element::SelectionBack; - if (inSelection == InSelection::inAdditional) - element = Element::SelectionAdditionalBack; - if (!model.primarySelection) - element = Element::SelectionSecondaryBack; - if (!model.hasFocus && vsDraw.ElementColour(Element::SelectionInactiveBack)) - element = Element::SelectionInactiveBack; - return vsDraw.ElementColour(element).value_or(bugColour); +static ColourDesired SelectionBackground(const ViewStyle &vsDraw, bool main, bool primarySelection) { + return main ? + (primarySelection ? vsDraw.selColours.back : vsDraw.selBackground2) : + vsDraw.selAdditionalBackground; } -std::optional SelectionForeground(const EditModel &model, const ViewStyle &vsDraw, InSelection inSelection) { - if (inSelection == InSelection::inNone) - return {}; - Element element = Element::SelectionText; - if (inSelection == InSelection::inAdditional) - element = Element::SelectionAdditionalText; - if (!model.primarySelection) // Secondary selection - element = Element::SelectionSecondaryText; - if (!model.hasFocus) { - if (vsDraw.ElementColour(Element::SelectionInactiveText)) { - element = Element::SelectionInactiveText; - } else { - return {}; +static ColourDesired TextBackground(const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, + ColourOptional background, int inSelection, bool inHotspot, int styleMain, Sci::Position i) { + if (inSelection == 1) { + if (vsDraw.selColours.back.isSet && (vsDraw.selAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw, true, model.primarySelection); + } + } else if (inSelection == 2) { + if (vsDraw.selColours.back.isSet && (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA)) { + return SelectionBackground(vsDraw, false, model.primarySelection); } - } - return vsDraw.ElementColour(element); -} - -} - -static ColourRGBA TextBackground(const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - std::optional background, InSelection inSelection, bool inHotspot, int styleMain, Sci::Position i) { - if (inSelection && (vsDraw.selection.layer == Layer::Base)) { - return SelectionBackground(model, vsDraw, inSelection).Opaque(); - } - if ((vsDraw.edgeState == EdgeVisualStyle::Background) && - (i >= ll->edgeColumn) && - (i < ll->numCharsBeforeEOL)) - return vsDraw.theEdge.colour; - if (inHotspot && vsDraw.ElementColour(Element::HotSpotActiveBack)) - return vsDraw.ElementColour(Element::HotSpotActiveBack)->Opaque(); - if (background && (styleMain != StyleBraceLight) && (styleMain != StyleBraceBad)) { - return *background; + } else { + if ((vsDraw.edgeState == EDGE_BACKGROUND) && + (i >= ll->edgeColumn) && + (i < ll->numCharsBeforeEOL)) + return vsDraw.theEdge.colour; + if (inHotspot && vsDraw.hotspotColours.back.isSet) + return vsDraw.hotspotColours.back; + } + if (background.isSet && (styleMain != STYLE_BRACELIGHT) && (styleMain != STYLE_BRACEBAD)) { + return background; } else { return vsDraw.styles[styleMain].back; } @@ -916,15 +802,21 @@ void EditView::DrawIndentGuide(Surface *surface, Sci::Line lineVisible, int line highlight ? *pixmapIndentGuideHighlight : *pixmapIndentGuide); } +static void SimpleAlphaRectangle(Surface *surface, PRectangle rc, ColourDesired fill, int alpha) { + if (alpha != SC_ALPHA_NOALPHA) { + surface->AlphaRectangle(rc, 0, fill, alpha, fill, alpha, 0); + } +} + static void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle rcSegment, - std::string_view text, ColourRGBA textBack, ColourRGBA textFore, bool fillBackground) { + const char *s, ColourDesired textBack, ColourDesired textFore, bool fillBackground) { if (rcSegment.Empty()) return; if (fillBackground) { - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + surface->FillRectangle(rcSegment, textBack); } - const Font *ctrlCharsFont = vsDraw.styles[StyleControlChar].font.get(); - const int normalCharHeight = static_cast(std::ceil(vsDraw.styles[StyleControlChar].capitalHeight)); + FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; + const int normalCharHeight = static_cast(ceil(vsDraw.styles[STYLE_CONTROLCHAR].capitalHeight)); PRectangle rcCChar = rcSegment; rcCChar.left = rcCChar.left + 1; rcCChar.top = rcSegment.top + vsDraw.maxAscent - normalCharHeight; @@ -932,50 +824,55 @@ static void DrawTextBlob(Surface *surface, const ViewStyle &vsDraw, PRectangle r PRectangle rcCentral = rcCChar; rcCentral.top++; rcCentral.bottom--; - surface->FillRectangleAligned(rcCentral, Fill(textFore)); + surface->FillRectangle(rcCentral, textFore); PRectangle rcChar = rcCChar; rcChar.left++; rcChar.right--; - surface->DrawTextClippedUTF8(rcChar, ctrlCharsFont, - rcSegment.top + vsDraw.maxAscent, text, + // In the original Scintilla code this was a call to DrawTextClipped(). + // This caused the clipping to be incorrect (triggered when EOLs are + // visible) causing text to overwrite the margins when scrolling. The + // change is consistent with the alternative code paths to where + // DrawTextBlob() is called bu tthe root cause maybe in PlatQt.cpp or in Qt + // itself. + surface->DrawTextNoClip(rcChar, ctrlCharsFont, + rcSegment.top + vsDraw.maxAscent, s, static_cast(s ? strlen(s) : 0), textBack, textFore); } -static void DrawCaretLineFramed(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, int subLine) { - const std::optional caretlineBack = vsDraw.ElementColour(Element::CaretLineBack); - if (!caretlineBack) { - return; - } - - const ColourRGBA colourFrame = (vsDraw.caretLine.layer == Layer::Base) ? - caretlineBack->Opaque() : *caretlineBack; +static void DrawFrame(Surface *surface, ColourDesired colour, int alpha, PRectangle rcFrame) { + if (alpha != SC_ALPHA_NOALPHA) + surface->AlphaRectangle(rcFrame, 0, colour, alpha, colour, alpha, 0); + else + surface->FillRectangle(rcFrame, colour); +} +static void DrawCaretLineFramed(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, int subLine) { const int width = vsDraw.GetFrameWidth(); - - // Avoid double drawing the corners by removing the left and right sides when drawing top and bottom borders - const PRectangle rcWithoutLeftRight = rcLine.Inset(Point(width, 0.0)); - - if (subLine == 0 || ll->wrapIndent == 0 || vsDraw.caretLine.layer != Layer::Base || vsDraw.caretLine.subLine) { + if (subLine == 0 || ll->wrapIndent == 0 || vsDraw.caretLineAlpha != SC_ALPHA_NOALPHA) { // Left - surface->FillRectangleAligned(Side(rcLine, Edge::left, width), colourFrame); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.left, rcLine.top, rcLine.left + width, rcLine.bottom)); } - if (subLine == 0 || vsDraw.caretLine.subLine) { + if (subLine == 0) { // Top - surface->FillRectangleAligned(Side(rcWithoutLeftRight, Edge::top, width), colourFrame); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.left + width, rcLine.top, rcLine.right - width, rcLine.top + width)); } - if (subLine == ll->lines - 1 || vsDraw.caretLine.layer != Layer::Base || vsDraw.caretLine.subLine) { + if (subLine == ll->lines - 1 || vsDraw.caretLineAlpha != SC_ALPHA_NOALPHA) { // Right - surface->FillRectangleAligned(Side(rcLine, Edge::right, width), colourFrame); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.right - width, rcLine.top, rcLine.right, rcLine.bottom)); } - if (subLine == ll->lines - 1 || vsDraw.caretLine.subLine) { + if (subLine == ll->lines - 1) { // Bottom - surface->FillRectangleAligned(Side(rcWithoutLeftRight, Edge::bottom, width), colourFrame); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.left + width, rcLine.bottom - width, rcLine.right - width, rcLine.bottom)); } } void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Sci::Line line, Sci::Position lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, - std::optional background) { + ColourOptional background) { const Sci::Position posLineStart = model.pdoc->LineStart(line); PRectangle rcSegment = rcLine; @@ -992,99 +889,79 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle if (virtualSpace > 0.0f) { rcSegment.left = xEol + xStart; rcSegment.right = xEol + xStart + virtualSpace; - const ColourRGBA backgroundFill = background.value_or(vsDraw.styles[ll->styles[ll->numCharsInLine]].back); - surface->FillRectangleAligned(rcSegment, backgroundFill); - if (!hideSelection && (vsDraw.selection.layer == Layer::Base)) { + surface->FillRectangle(rcSegment, background.isSet ? background : vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + if (!hideSelection && ((vsDraw.selAlpha == SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha == SC_ALPHA_NOALPHA))) { const SelectionSegment virtualSpaceRange(SelectionPosition(model.pdoc->LineEnd(line)), SelectionPosition(model.pdoc->LineEnd(line), model.sel.VirtualSpaceFor(model.pdoc->LineEnd(line)))); for (size_t r = 0; rEndLineStyle()].spaceWidth; - rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - - static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; - rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - - static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; - rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; - rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; - surface->FillRectangleAligned(rcSegment, Fill( - SelectionBackground(model, vsDraw, model.sel.RangeType(r)).Opaque())); + const int alpha = (r == model.sel.Main()) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; + if (alpha == SC_ALPHA_NOALPHA) { + const SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange); + if (!portion.Empty()) { + const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; + rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - + static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; + rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - + static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; + rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; + rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection)); + } } } } } - InSelection eolInSelection = InSelection::inNone; - if (!hideSelection && lastSubLine) { - eolInSelection = model.LineEndInSelection(line); + int eolInSelection = 0; + int alpha = SC_ALPHA_NOALPHA; + if (!hideSelection) { + const Sci::Position posAfterLineEnd = model.pdoc->LineStart(line + 1); + eolInSelection = (lastSubLine == true) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; + alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; } - const ColourRGBA selectionBack = SelectionBackground(model, vsDraw, eolInSelection); - // Draw the [CR], [LF], or [CR][LF] blobs if visible line ends are on XYPOSITION blobsWidth = 0; if (lastSubLine) { - for (Sci::Position eolPos = ll->numCharsBeforeEOL; eolPosnumCharsInLine;) { - const int styleMain = ll->styles[eolPos]; - const std::optional selectionFore = SelectionForeground(model, vsDraw, eolInSelection); - ColourRGBA textFore = selectionFore.value_or(vsDraw.styles[styleMain].fore); + for (Sci::Position eolPos = ll->numCharsBeforeEOL; eolPosnumCharsInLine; eolPos++) { + rcSegment.left = xStart + ll->positions[eolPos] - static_cast(subLineStart)+virtualSpace; + rcSegment.right = xStart + ll->positions[eolPos + 1] - static_cast(subLineStart)+virtualSpace; + blobsWidth += rcSegment.Width(); char hexits[4] = ""; - std::string_view ctrlChar; - Sci::Position widthBytes = 1; - RepresentationAppearance appearance = RepresentationAppearance::Blob; - const Representation *repr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[eolPos], ll->numCharsInLine - eolPos)); - if (repr) { - // Representation of whole text - widthBytes = ll->numCharsInLine - eolPos; - } else { - repr = model.reprs.RepresentationFromCharacter(std::string_view(&ll->chars[eolPos], 1)); - } - if (repr) { - ctrlChar = repr->stringRep; - appearance = repr->appearance; - if (FlagSet(appearance, RepresentationAppearance::Colour)) { - textFore = repr->colour; - } + const char *ctrlChar; + const unsigned char chEOL = ll->chars[eolPos]; + const int styleMain = ll->styles[eolPos]; + const ColourDesired textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, styleMain, eolPos); + if (UTF8IsAscii(chEOL)) { + ctrlChar = ControlCharacterString(chEOL); } else { - const unsigned char chEOL = ll->chars[eolPos]; - if (UTF8IsAscii(chEOL)) { - ctrlChar = ControlCharacterString(chEOL); + const Representation *repr = model.reprs.RepresentationFromCharacter(&ll->chars[eolPos], ll->numCharsInLine - eolPos); + if (repr) { + ctrlChar = repr->stringRep.c_str(); + eolPos = ll->numCharsInLine; } else { - Hexits(hexits, chEOL); + sprintf(hexits, "x%2X", chEOL); ctrlChar = hexits; } } - - rcSegment.left = xStart + ll->positions[eolPos] - static_cast(subLineStart)+virtualSpace; - rcSegment.right = xStart + ll->positions[eolPos + widthBytes] - static_cast(subLineStart)+virtualSpace; - blobsWidth += rcSegment.Width(); - const ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, false, styleMain, eolPos); - if (eolInSelection && (line < model.pdoc->LinesTotal() - 1)) { - if (vsDraw.selection.layer == Layer::Base) { - surface->FillRectangleAligned(rcSegment, Fill(selectionBack.Opaque())); + ColourDesired textFore = vsDraw.styles[styleMain].fore; + if (eolInSelection && vsDraw.selColours.fore.isSet) { + textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; + } + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1)) { + if (alpha == SC_ALPHA_NOALPHA) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + surface->FillRectangle(rcSegment, textBack); } } else { - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + surface->FillRectangle(rcSegment, textBack); } - const bool drawEOLSelection = eolInSelection && (line < model.pdoc->LinesTotal() - 1); - ColourRGBA blobText = textBack; - if (drawEOLSelection && (vsDraw.selection.layer == Layer::UnderText)) { - surface->FillRectangleAligned(rcSegment, selectionBack); - blobText = textBack.MixedWith(selectionBack, selectionBack.GetAlphaComponent()); - } - if (FlagSet(appearance, RepresentationAppearance::Blob)) { - DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, blobText, textFore, phasesDraw == PhasesDraw::One); - } else { - surface->DrawTextTransparentUTF8(rcSegment, vsDraw.styles[StyleControlChar].font.get(), - rcSegment.top + vsDraw.maxAscent, ctrlChar, textFore); + DrawTextBlob(surface, vsDraw, rcSegment, ctrlChar, textBack, textFore, phasesDraw == phasesOne); + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } - if (drawEOLSelection && (vsDraw.selection.layer == Layer::OverText)) { - surface->FillRectangleAligned(rcSegment, selectionBack); - } - eolPos += widthBytes; } } @@ -1092,20 +969,20 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle rcSegment.left = xEol + xStart + virtualSpace + blobsWidth; rcSegment.right = rcSegment.left + vsDraw.aveCharWidth; - if (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer == Layer::Base)) { - surface->FillRectangleAligned(rcSegment, Fill(selectionBack.Opaque())); + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { - if (background) { - surface->FillRectangleAligned(rcSegment, Fill(*background)); + if (background.isSet) { + surface->FillRectangle(rcSegment, background); } else if (line < model.pdoc->LinesTotal() - 1) { - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back)); + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back)); + surface->FillRectangle(rcSegment, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); } else { - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[StyleDefault].back)); + surface->FillRectangle(rcSegment, vsDraw.styles[STYLE_DEFAULT].back); } - if (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) { - surface->FillRectangleAligned(rcSegment, selectionBack); + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } @@ -1114,8 +991,7 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle rcSegment.left = rcLine.left; rcSegment.right = rcLine.right; - const bool drawEOLAnnotationStyledText = (vsDraw.eolAnnotationVisible != EOLAnnotationVisible::Hidden) && model.pdoc->EOLAnnotationStyledText(line).text; - const bool fillRemainder = (!lastSubLine || (!model.GetFoldDisplayText(line) && !drawEOLAnnotationStyledText)); + const bool fillRemainder = !lastSubLine || model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN || !model.pcs->GetFoldDisplayTextShown(line); if (fillRemainder) { // Fill the remainder of the line FillLineRemainder(surface, model, vsDraw, ll, line, rcSegment, subLine); @@ -1124,20 +1000,21 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle bool drawWrapMarkEnd = false; if (subLine + 1 < ll->lines) { - if (FlagSet(vsDraw.wrap.visualFlags, WrapVisualFlag::End)) { + if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_END) { drawWrapMarkEnd = ll->LineStart(subLine + 1) != 0; } if (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret)) { + const int width = vsDraw.GetFrameWidth(); // Draw right of frame under marker - surface->FillRectangleAligned(Side(rcLine, Edge::right, vsDraw.GetFrameWidth()), - vsDraw.ElementColour(Element::CaretLineBack)->Opaque()); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.right - width, rcLine.top, rcLine.right, rcLine.bottom)); } } if (drawWrapMarkEnd) { PRectangle rcPlace = rcSegment; - if (FlagSet(vsDraw.wrap.visualFlagsLocation, WrapVisualLocation::EndByText)) { + if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_END_BY_TEXT) { rcPlace.left = xEol + xStart + virtualSpace; rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; } else { @@ -1154,52 +1031,27 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle } static void DrawIndicator(int indicNum, Sci::Position startPos, Sci::Position endPos, Surface *surface, const ViewStyle &vsDraw, - const LineLayout *ll, int xStart, PRectangle rcLine, Sci::Position secondCharacter, int subLine, Indicator::State state, - int value, bool bidiEnabled, int tabWidthMinimumPixels) { - + const LineLayout *ll, int xStart, PRectangle rcLine, Sci::Position secondCharacter, int subLine, Indicator::DrawState drawState, int value) { const XYPOSITION subLineStart = ll->positions[ll->LineStart(subLine)]; - - std::vector rectangles; - const PRectangle rcIndic( ll->positions[startPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent, ll->positions[endPos] + xStart - subLineStart, rcLine.top + vsDraw.maxAscent + 3); - - if (bidiEnabled) { - ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right - xStart, tabWidthMinimumPixels); - const Range lineRange = ll->SubLineRange(subLine, LineLayout::Scope::visibleOnly); - - std::unique_ptr slLayout = surface->Layout(&screenLine); - std::vector intervals = slLayout->FindRangeIntervals( - startPos - lineRange.start, endPos - lineRange.start); - for (const Interval &interval : intervals) { - PRectangle rcInterval = rcIndic; - rcInterval.left = interval.left + xStart; - rcInterval.right = interval.right + xStart; - rectangles.push_back(rcInterval); - } + PRectangle rcFirstCharacter = rcIndic; + // Allow full descent space for character indicators + rcFirstCharacter.bottom = rcLine.top + vsDraw.maxAscent + vsDraw.maxDescent; + if (secondCharacter >= 0) { + rcFirstCharacter.right = ll->positions[secondCharacter] + xStart - subLineStart; } else { - rectangles.push_back(rcIndic); - } - - for (const PRectangle &rc : rectangles) { - PRectangle rcFirstCharacter = rc; - // Allow full descent space for character indicators - rcFirstCharacter.bottom = rcLine.top + vsDraw.maxAscent + vsDraw.maxDescent; - if (secondCharacter >= 0) { - rcFirstCharacter.right = ll->positions[secondCharacter] + xStart - subLineStart; - } else { - // Indicator continued from earlier line so make an empty box and don't draw - rcFirstCharacter.right = rcFirstCharacter.left; - } - vsDraw.indicators[indicNum].Draw(surface, rc, rcLine, rcFirstCharacter, state, value); + // Indicator continued from earlier line so make an empty box and don't draw + rcFirstCharacter.right = rcFirstCharacter.left; } + vsDraw.indicators[indicNum].Draw(surface, rcIndic, rcLine, rcFirstCharacter, drawState, value); } static void DrawIndicators(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - Sci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Position lineEnd, bool under, int tabWidthMinimumPixels) { + Sci::Line line, int xStart, PRectangle rcLine, int subLine, Sci::Position lineEnd, bool under, Sci::Position hoverIndicatorPos) { // Draw decorators const Sci::Position posLineStart = model.pdoc->LineStart(line); const Sci::Position lineStart = ll->LineStart(subLine); @@ -1215,13 +1067,12 @@ static void DrawIndicators(Surface *surface, const EditModel &model, const ViewS const Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos)); const Sci::Position endPos = std::min(rangeRun.end, posLineEnd); const bool hover = vsDraw.indicators[deco->Indicator()].IsDynamic() && - rangeRun.ContainsCharacter(model.hoverIndicatorPos); + rangeRun.ContainsCharacter(hoverIndicatorPos); const int value = deco->ValueAt(startPos); - const Indicator::State state = hover ? Indicator::State::hover : Indicator::State::normal; + const Indicator::DrawState drawState = hover ? Indicator::drawHover : Indicator::drawNormal; const Sci::Position posSecond = model.pdoc->MovePositionOutsideChar(rangeRun.First() + 1, 1); DrawIndicator(deco->Indicator(), startPos - posLineStart, endPos - posLineStart, - surface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, state, - value, model.BidirectionalEnabled(), tabWidthMinimumPixels); + surface, vsDraw, ll, xStart, rcLine, posSecond - posLineStart, subLine, drawState, value); startPos = endPos; if (!deco->ValueAt(startPos)) { startPos = deco->EndRun(startPos); @@ -1231,25 +1082,23 @@ static void DrawIndicators(Surface *surface, const EditModel &model, const ViewS } // Use indicators to highlight matching braces - if ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == StyleBraceLight)) || - (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == StyleBraceBad))) { - const int braceIndicator = (model.bracesMatchStyle == StyleBraceLight) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator; + if ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || + (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))) { + const int braceIndicator = (model.bracesMatchStyle == STYLE_BRACELIGHT) ? vsDraw.braceHighlightIndicator : vsDraw.braceBadLightIndicator; if (under == vsDraw.indicators[braceIndicator].under) { const Range rangeLine(posLineStart + lineStart, posLineEnd); if (rangeLine.ContainsCharacter(model.braces[0])) { const Sci::Position braceOffset = model.braces[0] - posLineStart; if (braceOffset < ll->numCharsInLine) { const Sci::Position secondOffset = model.pdoc->MovePositionOutsideChar(model.braces[0] + 1, 1) - posLineStart; - DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, - subLine, Indicator::State::normal, 1, model.BidirectionalEnabled(), tabWidthMinimumPixels); + DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, subLine, Indicator::drawNormal, 1); } } if (rangeLine.ContainsCharacter(model.braces[1])) { const Sci::Position braceOffset = model.braces[1] - posLineStart; if (braceOffset < ll->numCharsInLine) { const Sci::Position secondOffset = model.pdoc->MovePositionOutsideChar(model.braces[1] + 1, 1) - posLineStart; - DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, - subLine, Indicator::State::normal, 1, model.BidirectionalEnabled(), tabWidthMinimumPixels); + DrawIndicator(braceIndicator, braceOffset, braceOffset + 1, surface, vsDraw, ll, xStart, rcLine, secondOffset, subLine, Indicator::drawNormal, 1); } } } @@ -1262,18 +1111,21 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con if (!lastSubLine) return; - const char *text = model.GetFoldDisplayText(line); - if (!text) + if ((model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_HIDDEN) || !model.pcs->GetFoldDisplayTextShown(line)) return; PRectangle rcSegment = rcLine; - const std::string_view foldDisplayText(text); - const Font *fontText = vsDraw.styles[StyleFoldDisplayText].font.get(); - const int widthFoldDisplayText = static_cast(surface->WidthText(fontText, foldDisplayText)); + const char *foldDisplayText = model.pcs->GetFoldDisplayText(line); + const int lengthFoldDisplayText = static_cast(strlen(foldDisplayText)); + FontAlias fontText = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].font; + const int widthFoldDisplayText = static_cast(surface->WidthText(fontText, foldDisplayText, lengthFoldDisplayText)); - InSelection eolInSelection = InSelection::inNone; + int eolInSelection = 0; + int alpha = SC_ALPHA_NOALPHA; if (!hideSelection) { - eolInSelection = model.LineEndInSelection(line); + const Sci::Position posAfterLineEnd = model.pdoc->LineStart(line + 1); + eolInSelection = (subLine == (ll->lines - 1)) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; + alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; } const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; @@ -1282,21 +1134,24 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con rcSegment.left = xStart + static_cast(ll->positions[ll->numCharsInLine] - subLineStart) + virtualSpace + vsDraw.aveCharWidth; rcSegment.right = rcSegment.left + static_cast(widthFoldDisplayText); - const std::optional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); - const std::optional selectionFore = SelectionForeground(model, vsDraw, eolInSelection); - const ColourRGBA textFore = selectionFore.value_or(vsDraw.styles[StyleFoldDisplayText].fore); - const ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, - false, StyleFoldDisplayText, -1); + const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); + FontAlias textFont = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].font; + ColourDesired textFore = vsDraw.styles[STYLE_FOLDDISPLAYTEXT].fore; + if (eolInSelection && (vsDraw.selColours.fore.isSet)) { + textFore = (eolInSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; + } + const ColourDesired textBack = TextBackground(model, vsDraw, ll, background, eolInSelection, + false, STYLE_FOLDDISPLAYTEXT, -1); if (model.trackLineWidth) { if (rcSegment.right + 1> lineWidthMaxSeen) { - // Fold display text border drawn on rcSegment.right with width 1 is the last visible object of the line + // Fold display text border drawn on rcSegment.right with width 1 is the last visble object of the line lineWidthMaxSeen = static_cast(rcSegment.right + 1); } } - if (FlagSet(phase, DrawPhase::back)) { - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + if (phase & drawBack) { + surface->FillRectangle(rcSegment, textBack); // Fill Remainder of the line PRectangle rcRemainder = rcSegment; @@ -1307,173 +1162,45 @@ void EditView::DrawFoldDisplayText(Surface *surface, const EditModel &model, con FillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine); } - if (FlagSet(phase, DrawPhase::text)) { - if (phasesDraw != PhasesDraw::One) { - surface->DrawTextTransparent(rcSegment, fontText, + if (phase & drawText) { + if (phasesDraw != phasesOne) { + surface->DrawTextTransparent(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, foldDisplayText, - textFore); + lengthFoldDisplayText, textFore); } else { - surface->DrawTextNoClip(rcSegment, fontText, + surface->DrawTextNoClip(rcSegment, textFont, rcSegment.top + vsDraw.maxAscent, foldDisplayText, - textFore, textBack); - } - } - - if (FlagSet(phase, DrawPhase::indicatorsFore)) { - if (model.foldDisplayTextStyle == FoldDisplayTextStyle::Boxed) { - PRectangle rcBox = rcSegment; - rcBox.left = std::round(rcSegment.left); - rcBox.right = std::round(rcSegment.right); - surface->RectangleFrame(rcBox, Stroke(textFore)); - } - } - - if (FlagSet(phase, DrawPhase::selectionTranslucent)) { - if (eolInSelection && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) { - surface->FillRectangleAligned(rcSegment, SelectionBackground(model, vsDraw, eolInSelection)); - } - } -} - -void EditView::DrawEOLAnnotationText(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line line, int xStart, PRectangle rcLine, int subLine, XYACCUMULATOR subLineStart, DrawPhase phase) { - - const bool lastSubLine = subLine == (ll->lines - 1); - if (!lastSubLine) - return; - - if (vsDraw.eolAnnotationVisible == EOLAnnotationVisible::Hidden) { - return; - } - const StyledText stEOLAnnotation = model.pdoc->EOLAnnotationStyledText(line); - if (!stEOLAnnotation.text || !ValidStyledText(vsDraw, vsDraw.eolAnnotationStyleOffset, stEOLAnnotation)) { - return; - } - const std::string_view eolAnnotationText(stEOLAnnotation.text, stEOLAnnotation.length); - const size_t style = stEOLAnnotation.style + vsDraw.eolAnnotationStyleOffset; - - PRectangle rcSegment = rcLine; - const Font *fontText = vsDraw.styles[style].font.get(); - - const Surface::Ends ends = static_cast(static_cast(vsDraw.eolAnnotationVisible) & 0xff); - const Surface::Ends leftSide = static_cast(static_cast(ends) & 0xf); - const Surface::Ends rightSide = static_cast(static_cast(ends) & 0xf0); - - XYPOSITION leftBoxSpace = 0; - XYPOSITION rightBoxSpace = 0; - if (vsDraw.eolAnnotationVisible >= EOLAnnotationVisible::Boxed) { - leftBoxSpace = 1; - rightBoxSpace = 1; - if (vsDraw.eolAnnotationVisible != EOLAnnotationVisible::Boxed) { - switch (leftSide) { - case Surface::Ends::leftFlat: - leftBoxSpace = 1; - break; - case Surface::Ends::leftAngle: - leftBoxSpace = rcLine.Height() / 2.0; - break; - case Surface::Ends::semiCircles: - default: - leftBoxSpace = rcLine.Height() / 3.0; - break; - } - switch (rightSide) { - case Surface::Ends::rightFlat: - rightBoxSpace = 1; - break; - case Surface::Ends::rightAngle: - rightBoxSpace = rcLine.Height() / 2.0; - break; - case Surface::Ends::semiCircles: - default: - rightBoxSpace = rcLine.Height() / 3.0; - break; - } - } - } - const int widthEOLAnnotationText = static_cast(surface->WidthTextUTF8(fontText, eolAnnotationText) + - leftBoxSpace + rightBoxSpace); - - const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; - const XYPOSITION virtualSpace = model.sel.VirtualSpaceFor( - model.pdoc->LineEnd(line)) * spaceWidth; - rcSegment.left = xStart + - static_cast(ll->positions[ll->numCharsInLine] - subLineStart) - + virtualSpace + vsDraw.aveCharWidth; - - const char *textFoldDisplay = model.GetFoldDisplayText(line); - if (textFoldDisplay) { - const std::string_view foldDisplayText(textFoldDisplay); - rcSegment.left += (static_cast(surface->WidthText(fontText, foldDisplayText)) + vsDraw.aveCharWidth); - } - rcSegment.right = rcSegment.left + static_cast(widthEOLAnnotationText); - - const std::optional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); - const ColourRGBA textFore = vsDraw.styles[style].fore; - const ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, InSelection::inNone, - false, static_cast(style), -1); - - if (model.trackLineWidth) { - if (rcSegment.right + 1> lineWidthMaxSeen) { - // EOL Annotation text border drawn on rcSegment.right with width 1 is the last visible object of the line - lineWidthMaxSeen = static_cast(rcSegment.right + 1); + lengthFoldDisplayText, textFore, textBack); } } - if (FlagSet(phase, DrawPhase::back)) { - // This fills in the whole remainder of the line even though - // it may be double drawing. This is to allow stadiums with - // curved or angled ends to have the area outside in the correct - // background colour. - PRectangle rcRemainder = rcSegment; - rcRemainder.right = rcLine.right; - FillLineRemainder(surface, model, vsDraw, ll, line, rcRemainder, subLine); - } - - PRectangle rcText = rcSegment; - rcText.left += leftBoxSpace; - rcText.right -= rightBoxSpace; - - // For single phase drawing, draw the text then any box over it - if (FlagSet(phase, DrawPhase::text)) { - if (phasesDraw == PhasesDraw::One) { - surface->DrawTextNoClipUTF8(rcText, fontText, - rcText.top + vsDraw.maxAscent, eolAnnotationText, - textFore, textBack); - } - } - - // Draw any box or stadium shape - if (FlagSet(phase, DrawPhase::indicatorsBack)) { - if (vsDraw.eolAnnotationVisible >= EOLAnnotationVisible::Boxed) { + if (phase & drawIndicatorsFore) { + if (model.foldDisplayTextStyle == SC_FOLDDISPLAYTEXT_BOXED) { + surface->PenColour(textFore); PRectangle rcBox = rcSegment; - rcBox.left = std::round(rcSegment.left); - rcBox.right = std::round(rcSegment.right); - if (vsDraw.eolAnnotationVisible == EOLAnnotationVisible::Boxed) { - surface->RectangleFrame(rcBox, Stroke(textFore)); - } else { - if (phasesDraw == PhasesDraw::One) { - // Draw an outline around the text - surface->Stadium(rcBox, FillStroke(ColourRGBA(textBack, 0), textFore, 1.0), ends); - } else { - // Draw with a fill to fill the edges of the shape. - surface->Stadium(rcBox, FillStroke(textBack, textFore, 1.0), ends); - } - } + rcBox.left = round(rcSegment.left); + rcBox.right = round(rcSegment.right); + const IntegerRectangle ircBox(rcBox); + surface->MoveTo(ircBox.left, ircBox.top); + surface->LineTo(ircBox.left, ircBox.bottom); + surface->MoveTo(ircBox.right, ircBox.top); + surface->LineTo(ircBox.right, ircBox.bottom); + surface->MoveTo(ircBox.left, ircBox.top); + surface->LineTo(ircBox.right, ircBox.top); + surface->MoveTo(ircBox.left, ircBox.bottom - 1); + surface->LineTo(ircBox.right, ircBox.bottom - 1); } } - // For multi-phase drawing draw the text last as transparent over any box - if (FlagSet(phase, DrawPhase::text)) { - if (phasesDraw != PhasesDraw::One) { - surface->DrawTextTransparentUTF8(rcText, fontText, - rcText.top + vsDraw.maxAscent, eolAnnotationText, - textFore); + if (phase & drawSelectionTranslucent) { + if (eolInSelection && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && alpha != SC_ALPHA_NOALPHA) { + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); } } } -static constexpr bool AnnotationBoxedOrIndented(AnnotationVisible annotationVisible) noexcept { - return annotationVisible == AnnotationVisible::Boxed || annotationVisible == AnnotationVisible::Indented; +static constexpr bool AnnotationBoxedOrIndented(int annotationVisible) noexcept { + return annotationVisible == ANNOTATION_BOXED || annotationVisible == ANNOTATION_INDENTED; } void EditView::DrawAnnotation(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, @@ -1483,8 +1210,8 @@ void EditView::DrawAnnotation(Surface *surface, const EditModel &model, const Vi const int annotationLine = subLine - ll->lines; const StyledText stAnnotation = model.pdoc->AnnotationStyledText(line); if (stAnnotation.text && ValidStyledText(vsDraw, vsDraw.annotationStyleOffset, stAnnotation)) { - if (FlagSet(phase, DrawPhase::back)) { - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.styles[0].back)); + if (phase & drawBack) { + surface->FillRectangle(rcSegment, vsDraw.styles[0].back); } rcSegment.left = static_cast(xStart); if (model.trackLineWidth || AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { @@ -1508,30 +1235,34 @@ void EditView::DrawAnnotation(Surface *surface, const EditModel &model, const Vi lineInAnnotation++; } PRectangle rcText = rcSegment; - if ((FlagSet(phase, DrawPhase::back)) && AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { - surface->FillRectangleAligned(rcText, - Fill(vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back)); + if ((phase & drawBack) && AnnotationBoxedOrIndented(vsDraw.annotationVisible)) { + surface->FillRectangle(rcText, + vsDraw.styles[stAnnotation.StyleAt(start) + vsDraw.annotationStyleOffset].back); rcText.left += vsDraw.spaceWidth; } DrawStyledText(surface, vsDraw, vsDraw.annotationStyleOffset, rcText, stAnnotation, start, lengthAnnotation, phase); - if ((FlagSet(phase, DrawPhase::back)) && (vsDraw.annotationVisible == AnnotationVisible::Boxed)) { - const ColourRGBA colourBorder = vsDraw.styles[vsDraw.annotationStyleOffset].fore; - const PRectangle rcBorder = PixelAlignOutside(rcSegment, surface->PixelDivisions()); - surface->FillRectangle(Side(rcBorder, Edge::left, 1), colourBorder); - surface->FillRectangle(Side(rcBorder, Edge::right, 1), colourBorder); + if ((phase & drawBack) && (vsDraw.annotationVisible == ANNOTATION_BOXED)) { + surface->PenColour(vsDraw.styles[vsDraw.annotationStyleOffset].fore); + const IntegerRectangle ircSegment(rcSegment); + surface->MoveTo(ircSegment.left, ircSegment.top); + surface->LineTo(ircSegment.left, ircSegment.bottom); + surface->MoveTo(ircSegment.right, ircSegment.top); + surface->LineTo(ircSegment.right, ircSegment.bottom); if (subLine == ll->lines) { - surface->FillRectangle(Side(rcBorder, Edge::top, 1), colourBorder); + surface->MoveTo(ircSegment.left, ircSegment.top); + surface->LineTo(ircSegment.right, ircSegment.top); } if (subLine == ll->lines + annotationLines - 1) { - surface->FillRectangle(Side(rcBorder, Edge::bottom, 1), colourBorder); + surface->MoveTo(ircSegment.left, ircSegment.bottom - 1); + surface->LineTo(ircSegment.right, ircSegment.bottom - 1); } } } } static void DrawBlockCaret(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - int subLine, int xStart, Sci::Position offset, Sci::Position posCaret, PRectangle rcCaret, ColourRGBA caretColour) { + int subLine, int xStart, Sci::Position offset, Sci::Position posCaret, PRectangle rcCaret, ColourDesired caretColour) { const Sci::Position lineStart = ll->LineStart(subLine); Sci::Position posBefore = posCaret; @@ -1589,10 +1320,10 @@ static void DrawBlockCaret(Surface *surface, const EditModel &model, const ViewS // This character is where the caret block is, we override the colours // (inversed) for drawing the caret here. const int styleMain = ll->styles[offsetFirstChar]; - const Font *fontText = vsDraw.styles[styleMain].font.get(); - const std::string_view text(&ll->chars[offsetFirstChar], numCharsToDraw); + FontAlias fontText = vsDraw.styles[styleMain].font; surface->DrawTextClipped(rcCaret, fontText, - rcCaret.top + vsDraw.maxAscent, text, vsDraw.styles[styleMain].back, + rcCaret.top + vsDraw.maxAscent, &ll->chars[offsetFirstChar], + static_cast(numCharsToDraw), vsDraw.styles[styleMain].back, caretColour); } @@ -1607,9 +1338,7 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt for (size_t r = 0; (r model.sel.Range(r).anchor) { + if (vsDraw.caretStyle == CARETSTYLE_BLOCK && !drawDrag && posCaret > model.sel.Range(r).anchor) { if (posCaret.VirtualSpace() > 0) posCaret.SetVirtualSpace(posCaret.VirtualSpace() - 1); else @@ -1620,18 +1349,6 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt const XYPOSITION virtualOffset = posCaret.VirtualSpace() * spaceWidth; if (ll->InLine(offset, subLine) && offset <= ll->numCharsBeforeEOL) { XYPOSITION xposCaret = ll->positions[offset] + virtualOffset - ll->positions[ll->LineStart(subLine)]; - if (model.BidirectionalEnabled() && (posCaret.VirtualSpace() == 0)) { - // Get caret point - const ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right, tabWidthMinimumPixels); - - const int caretPosition = offset - ll->LineStart(subLine); - - std::unique_ptr slLayout = surface->Layout(&screenLine); - const XYPOSITION caretLeft = slLayout->XFromPosition(caretPosition); - - // In case of start of line, the cursor should be at the right - xposCaret = caretLeft + virtualOffset; - } if (ll->wrapIndent != 0) { const Sci::Position lineStart = ll->LineStart(subLine); if (lineStart != 0) // Wrapped @@ -1639,19 +1356,20 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt } const bool caretBlinkState = (model.caret.active && model.caret.on) || (!additionalCaretsBlink && !mainCaret); const bool caretVisibleState = additionalCaretsVisible || mainCaret; - if ((xposCaret >= 0) && vsDraw.IsCaretVisible(mainCaret) && - (drawDrag || (caretBlinkState && caretVisibleState))) { - bool canDrawBlockCaret = true; + if ((xposCaret >= 0) && (vsDraw.caretWidth > 0) && (vsDraw.caretStyle != CARETSTYLE_INVISIBLE) && + ((model.posDrag.IsValid()) || (caretBlinkState && caretVisibleState))) { + bool caretAtEOF = false; + bool caretAtEOL = false; bool drawBlockCaret = false; XYPOSITION widthOverstrikeCaret; XYPOSITION caretWidthOffset = 0; PRectangle rcCaret = rcLine; if (posCaret.Position() == model.pdoc->Length()) { // At end of document - canDrawBlockCaret = false; + caretAtEOF = true; widthOverstrikeCaret = vsDraw.aveCharWidth; } else if ((posCaret.Position() - posLineStart) >= ll->numCharsInLine) { // At end of line - canDrawBlockCaret = false; + caretAtEOL = true; widthOverstrikeCaret = vsDraw.aveCharWidth; } else { const int widthChar = model.pdoc->LenChar(posCaret.Position()); @@ -1663,21 +1381,19 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt if (xposCaret > 0) caretWidthOffset = 0.51f; // Move back so overlaps both character cells. xposCaret += xStart; - const ViewStyle::CaretShape caretShape = drawDrag ? ViewStyle::CaretShape::line : - vsDraw.CaretShapeForMode(model.inOverstrike, mainCaret); - if (drawDrag) { + if (model.posDrag.IsValid()) { /* Dragging text, use a line caret */ - rcCaret.left = std::round(xposCaret - caretWidthOffset); - rcCaret.right = rcCaret.left + vsDraw.caret.width; - } else if ((caretShape == ViewStyle::CaretShape::bar) && drawOverstrikeCaret) { - /* Over-strike (insert mode), use a modified bar caret */ + rcCaret.left = round(xposCaret - caretWidthOffset); + rcCaret.right = rcCaret.left + vsDraw.caretWidth; + } else if (model.inOverstrike && drawOverstrikeCaret) { + /* Overstrike (insert mode), use a modified bar caret */ rcCaret.top = rcCaret.bottom - 2; rcCaret.left = xposCaret + 1; rcCaret.right = rcCaret.left + widthOverstrikeCaret - 1; - } else if ((caretShape == ViewStyle::CaretShape::block) || imeCaretBlockOverride) { + } else if ((vsDraw.caretStyle == CARETSTYLE_BLOCK) || imeCaretBlockOverride) { /* Block caret */ rcCaret.left = xposCaret; - if (canDrawBlockCaret && !(IsControl(ll->chars[offset]))) { + if (!caretAtEOL && !caretAtEOF && (ll->chars[offset] != '\t') && !(IsControlCharacter(ll->chars[offset]))) { drawBlockCaret = true; rcCaret.right = xposCaret + widthOverstrikeCaret; } else { @@ -1685,16 +1401,14 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt } } else { /* Line caret */ - rcCaret.left = std::round(xposCaret - caretWidthOffset); - rcCaret.right = rcCaret.left + vsDraw.caret.width; + rcCaret.left = round(xposCaret - caretWidthOffset); + rcCaret.right = rcCaret.left + vsDraw.caretWidth; } - const Element elementCaret = mainCaret ? Element::Caret : Element::CaretAdditional; - const ColourRGBA caretColour = *vsDraw.ElementColour(elementCaret); - //assert(caretColour.IsOpaque()); + const ColourDesired caretColour = mainCaret ? vsDraw.caretcolour : vsDraw.additionalCaretColour; if (drawBlockCaret) { DrawBlockCaret(surface, model, vsDraw, ll, subLine, xStart, offset, posCaret.Position(), rcCaret, caretColour); } else { - surface->FillRectangleAligned(rcCaret, Fill(caretColour)); + surface->FillRectangle(rcCaret, caretColour); } } } @@ -1704,19 +1418,20 @@ void EditView::DrawCarets(Surface *surface, const EditModel &model, const ViewSt } static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, - int xStart, PRectangle rcLine, std::optional background, DrawWrapMarkerFn customDrawWrapMarker, + int xStart, PRectangle rcLine, ColourOptional background, DrawWrapMarkerFn customDrawWrapMarker, bool caretActive) { // default bgnd here.. - surface->FillRectangleAligned(rcLine, Fill(background ? *background : - vsDraw.styles[StyleDefault].back)); + surface->FillRectangle(rcLine, background.isSet ? background : + vsDraw.styles[STYLE_DEFAULT].back); if (vsDraw.IsLineFrameOpaque(caretActive, ll->containsCaret)) { + const int width = vsDraw.GetFrameWidth(); // Draw left of frame under marker - surface->FillRectangleAligned(Side(rcLine, Edge::left, vsDraw.GetFrameWidth()), - vsDraw.ElementColour(Element::CaretLineBack)->Opaque()); + DrawFrame(surface, vsDraw.caretLineBackground, vsDraw.caretLineAlpha, + PRectangle(rcLine.left, rcLine.top, rcLine.left + width, rcLine.bottom)); } - if (FlagSet(vsDraw.wrap.visualFlags, WrapVisualFlag::Start)) { + if (vsDraw.wrapVisualFlags & SC_WRAPVISUALFLAG_START) { // draw continuation rect PRectangle rcPlace = rcLine; @@ -1724,7 +1439,7 @@ static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, c rcPlace.left = static_cast(xStart); rcPlace.right = rcPlace.left + ll->wrapIndent; - if (FlagSet(vsDraw.wrap.visualFlagsLocation, WrapVisualLocation::StartByText)) + if (vsDraw.wrapVisualFlagsLocation & SC_WRAPVISUALFLAGLOC_START_BY_TEXT) rcPlace.left = rcPlace.right - vsDraw.aveCharWidth; else rcPlace.right = rcPlace.left + vsDraw.aveCharWidth; @@ -1737,35 +1452,19 @@ static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, c } } -// On the curses platform, the terminal is drawing its own caret, so if the caret is within -// the main selection, do not draw the selection at that position. -// Use iDoc from DrawBackground and DrawForeground here because TextSegment has been adjusted -// such that, if the caret is inside the main selection, the beginning or end of that selection -// is at the end of a text segment. -// This function should only be called if iDoc is within the main selection. -static InSelection CharacterInCursesSelection(Sci::Position iDoc, const EditModel &model, const ViewStyle &vsDraw) { - const SelectionPosition &posCaret = model.sel.RangeMain().caret; - const bool caretAtStart = posCaret < model.sel.RangeMain().anchor && posCaret.Position() == iDoc; - const bool caretAtEnd = posCaret > model.sel.RangeMain().anchor && - vsDraw.DrawCaretInsideSelection(false, false) && - model.pdoc->MovePositionOutsideChar(posCaret.Position() - 1, -1) == iDoc; - return (caretAtStart || caretAtEnd) ? InSelection::inNone : InSelection::inMain; -} - void EditView::DrawBackground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Range lineRange, Sci::Position posLineStart, int xStart, - int subLine, std::optional background) const { + int subLine, ColourOptional background) const { const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; // Does not take margin into account but not significant - const XYPOSITION xStartVisible = static_cast(subLineStart-xStart); + const int xStartVisible = static_cast(subLineStart)-xStart; - const BreakFinder::BreakFor breakFor = selBackDrawn ? BreakFinder::BreakFor::Selection : BreakFinder::BreakFor::Text; - BreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, breakFor, model.pdoc, &model.reprs, &vsDraw); + BreakFinder bfBack(ll, &model.sel, lineRange, posLineStart, xStartVisible, selBackDrawn, model.pdoc, &model.reprs, nullptr); - const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background; + const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; // Background drawing loop while (bfBack.More()) { @@ -1786,27 +1485,24 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi if (rcSegment.right > rcLine.right) rcSegment.right = rcLine.right; - InSelection inSelection = hideSelection ? InSelection::inNone : model.sel.CharacterInSelection(iDoc); - if (FlagSet(vsDraw.caret.style, CaretStyle::Curses) && (inSelection == InSelection::inMain)) - inSelection = CharacterInCursesSelection(iDoc, model, vsDraw); - const bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc); - ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, inSelection, + const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); + const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); + ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, ll->styles[i], i); if (ts.representation) { if (ll->chars[i] == '\t') { // Tab display - if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) { - textBack = vsDraw.ElementColour(Element::WhiteSpaceBack)->Opaque(); - } + if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) + textBack = vsDraw.whitespaceColours.back; } else { // Blob display inIndentation = false; } - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + surface->FillRectangle(rcSegment, textBack); } else { // Normal text display - surface->FillRectangleAligned(rcSegment, Fill(textBack)); - if (vsDraw.viewWhitespace != WhiteSpace::Invisible) { + surface->FillRectangle(rcSegment, textBack); + if (vsDraw.viewWhitespace != wsInvisible) { for (int cpos = 0; cpos <= i - ts.start; cpos++) { if (ll->chars[cpos + ts.start] == ' ') { if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) { @@ -1815,8 +1511,7 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi rcSegment.top, ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), rcSegment.bottom); - surface->FillRectangleAligned(rcSpace, - vsDraw.ElementColour(Element::WhiteSpaceBack)->Opaque()); + surface->FillRectangle(rcSpace, vsDraw.whitespaceColours.back); } } else { inIndentation = false; @@ -1832,15 +1527,15 @@ void EditView::DrawBackground(Surface *surface, const EditModel &model, const Vi static void DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll, PRectangle rcLine, Range lineRange, int xStart) { - if (vsDraw.edgeState == EdgeVisualStyle::Line) { + if (vsDraw.edgeState == EDGE_LINE) { PRectangle rcSegment = rcLine; const int edgeX = static_cast(vsDraw.theEdge.column * vsDraw.spaceWidth); rcSegment.left = static_cast(edgeX + xStart); if ((ll->wrapIndent != 0) && (lineRange.start != 0)) rcSegment.left -= ll->wrapIndent; rcSegment.right = rcSegment.left + 1; - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theEdge.colour)); - } else if (vsDraw.edgeState == EdgeVisualStyle::MultiLine) { + surface->FillRectangle(rcSegment, vsDraw.theEdge.colour); + } else if (vsDraw.edgeState == EDGE_MULTILINE) { for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) { if (vsDraw.theMultiEdge[edge].column >= 0) { PRectangle rcSegment = rcLine; @@ -1849,30 +1544,29 @@ static void DrawEdgeLine(Surface *surface, const ViewStyle &vsDraw, const LineLa if ((ll->wrapIndent != 0) && (lineRange.start != 0)) rcSegment.left -= ll->wrapIndent; rcSegment.right = rcSegment.left + 1; - surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theMultiEdge[edge].colour)); + surface->FillRectangle(rcSegment, vsDraw.theMultiEdge[edge].colour); } } } } -// Draw underline mark as part of background if on base layer +// Draw underline mark as part of background if not transparent static void DrawMarkUnderline(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, Sci::Line line, PRectangle rcLine) { int marks = model.pdoc->GetMark(line); for (int markBit = 0; (markBit < 32) && marks; markBit++) { - if ((marks & 1) && (vsDraw.markers[markBit].markType == MarkerSymbol::Underline) && - (vsDraw.markers[markBit].layer == Layer::Base)) { + if ((marks & 1) && (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) && + (vsDraw.markers[markBit].alpha == SC_ALPHA_NOALPHA)) { PRectangle rcUnderline = rcLine; rcUnderline.top = rcUnderline.bottom - 2; - surface->FillRectangleAligned(rcUnderline, Fill(vsDraw.markers[markBit].back)); + surface->FillRectangle(rcUnderline, vsDraw.markers[markBit].back); } marks >>= 1; } } - static void DrawTranslucentSelection(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - Sci::Line line, PRectangle rcLine, int subLine, Range lineRange, int xStart, int tabWidthMinimumPixels, Layer layer) { - if (vsDraw.selection.layer == layer) { + Sci::Line line, PRectangle rcLine, int subLine, Range lineRange, int xStart) { + if ((vsDraw.selAlpha != SC_ALPHA_NOALPHA) || (vsDraw.selAdditionalAlpha != SC_ALPHA_NOALPHA)) { const Sci::Position posLineStart = model.pdoc->LineStart(line); const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; // For each selection draw @@ -1884,40 +1578,16 @@ static void DrawTranslucentSelection(Surface *surface, const EditModel &model, c const SelectionPosition posEnd(posLineStart + lineRange.end, virtualSpaces); const SelectionSegment virtualSpaceRange(posStart, posEnd); for (size_t r = 0; r < model.sel.Count(); r++) { - const SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange); - if (!portion.Empty()) { - const ColourRGBA selectionBack = SelectionBackground( - model, vsDraw, model.sel.RangeType(r)); - const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; - if (model.BidirectionalEnabled()) { - const int selectionStart = static_cast(portion.start.Position() - posLineStart - lineRange.start); - const int selectionEnd = static_cast(portion.end.Position() - posLineStart - lineRange.start); - - const ScreenLine screenLine(ll, subLine, vsDraw, rcLine.right, tabWidthMinimumPixels); - std::unique_ptr slLayout = surface->Layout(&screenLine); - - const std::vector intervals = slLayout->FindRangeIntervals(selectionStart, selectionEnd); - for (const Interval &interval : intervals) { - const XYPOSITION rcRight = interval.right + xStart; - const XYPOSITION rcLeft = interval.left + xStart; - const PRectangle rcSelection(rcLeft, rcLine.top, rcRight, rcLine.bottom); - surface->FillRectangleAligned(rcSelection, selectionBack); - } - - if (portion.end.VirtualSpace()) { - const XYPOSITION xStartVirtual = ll->positions[lineRange.end] - - static_cast(subLineStart) + xStart; - PRectangle rcSegment = rcLine; - rcSegment.left = xStartVirtual + portion.start.VirtualSpace() * spaceWidth; - rcSegment.right = xStartVirtual + portion.end.VirtualSpace() * spaceWidth; - surface->FillRectangleAligned(rcSegment, selectionBack); - } - } else { + const int alpha = (r == model.sel.Main()) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; + if (alpha != SC_ALPHA_NOALPHA) { + const SelectionSegment portion = model.sel.Range(r).Intersect(virtualSpaceRange); + if (!portion.Empty()) { + const XYPOSITION spaceWidth = vsDraw.styles[ll->EndLineStyle()].spaceWidth; PRectangle rcSegment = rcLine; rcSegment.left = xStart + ll->positions[portion.start.Position() - posLineStart] - - static_cast(subLineStart) + portion.start.VirtualSpace() * spaceWidth; + static_cast(subLineStart)+portion.start.VirtualSpace() * spaceWidth; rcSegment.right = xStart + ll->positions[portion.end.Position() - posLineStart] - - static_cast(subLineStart) + portion.end.VirtualSpace() * spaceWidth; + static_cast(subLineStart)+portion.end.VirtualSpace() * spaceWidth; if ((ll->wrapIndent != 0) && (lineRange.start != 0)) { if ((portion.start.Position() - posLineStart) == lineRange.start && model.sel.Range(r).ContainsCharacter(portion.start.Position() - 1)) rcSegment.left -= static_cast(ll->wrapIndent); // indentation added to xStart was truncated to int, so we do the same here @@ -1925,7 +1595,7 @@ static void DrawTranslucentSelection(Surface *surface, const EditModel &model, c rcSegment.left = (rcSegment.left > rcLine.left) ? rcSegment.left : rcLine.left; rcSegment.right = (rcSegment.right < rcLine.right) ? rcSegment.right : rcLine.right; if (rcSegment.right > rcLine.left) - surface->FillRectangleAligned(rcSegment, selectionBack); + SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection), alpha); } } } @@ -1934,33 +1604,33 @@ static void DrawTranslucentSelection(Surface *surface, const EditModel &model, c // Draw any translucent whole line states static void DrawTranslucentLineState(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - Sci::Line line, PRectangle rcLine, int subLine, Layer layer) { - if ((model.caret.active || vsDraw.caretLine.alwaysShow) && vsDraw.ElementColour(Element::CaretLineBack) && ll->containsCaret && - vsDraw.caretLine.layer == layer) { - if (vsDraw.caretLine.frame) { + Sci::Line line, PRectangle rcLine, int subLine) { + if ((model.caret.active || vsDraw.alwaysShowCaretLineBackground) && vsDraw.showCaretLineBackground && ll->containsCaret && + vsDraw.caretLineAlpha != SC_ALPHA_NOALPHA) { + if (vsDraw.caretLineFrame) { DrawCaretLineFramed(surface, vsDraw, ll, rcLine, subLine); } else { - surface->FillRectangleAligned(rcLine, *vsDraw.ElementColour(Element::CaretLineBack)); + SimpleAlphaRectangle(surface, rcLine, vsDraw.caretLineBackground, vsDraw.caretLineAlpha); } } const int marksOfLine = model.pdoc->GetMark(line); int marksDrawnInText = marksOfLine & vsDraw.maskDrawInText; for (int markBit = 0; (markBit < 32) && marksDrawnInText; markBit++) { - if ((marksDrawnInText & 1) && (vsDraw.markers[markBit].layer == layer)) { - if (vsDraw.markers[markBit].markType == MarkerSymbol::Background) { - surface->FillRectangleAligned(rcLine, vsDraw.markers[markBit].BackWithAlpha()); - } else if (vsDraw.markers[markBit].markType == MarkerSymbol::Underline) { + if (marksDrawnInText & 1) { + if (vsDraw.markers[markBit].markType == SC_MARK_BACKGROUND) { + SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); + } else if (vsDraw.markers[markBit].markType == SC_MARK_UNDERLINE) { PRectangle rcUnderline = rcLine; rcUnderline.top = rcUnderline.bottom - 2; - surface->FillRectangleAligned(rcUnderline, vsDraw.markers[markBit].BackWithAlpha()); + SimpleAlphaRectangle(surface, rcUnderline, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); } } marksDrawnInText >>= 1; } int marksDrawnInLine = marksOfLine & vsDraw.maskInLine; for (int markBit = 0; (markBit < 32) && marksDrawnInLine; markBit++) { - if ((marksDrawnInLine & 1) && (vsDraw.markers[markBit].layer == layer)) { - surface->FillRectangleAligned(rcLine, vsDraw.markers[markBit].BackWithAlpha()); + if (marksDrawnInLine & 1) { + SimpleAlphaRectangle(surface, rcLine, vsDraw.markers[markBit].back, vsDraw.markers[markBit].alpha); } marksDrawnInLine >>= 1; } @@ -1968,22 +1638,21 @@ static void DrawTranslucentLineState(Surface *surface, const EditModel &model, c void EditView::DrawForeground(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line lineVisible, PRectangle rcLine, Range lineRange, Sci::Position posLineStart, int xStart, - int subLine, std::optional background) { + int subLine, ColourOptional background) { const bool selBackDrawn = vsDraw.SelectionBackgroundDrawn(); - const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background; + const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet; bool inIndentation = subLine == 0; // Do not handle indentation except on first subline. const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; const XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth; // Does not take margin into account but not significant - const XYPOSITION xStartVisible = static_cast(subLineStart-xStart); + const int xStartVisible = static_cast(subLineStart)-xStart; // Foreground drawing loop - const BreakFinder::BreakFor breakFor = (((phasesDraw == PhasesDraw::One) && selBackDrawn) || vsDraw.SelectionTextDrawn()) - ? BreakFinder::BreakFor::ForegroundAndSelection : BreakFinder::BreakFor::Foreground; - BreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, breakFor, model.pdoc, &model.reprs, &vsDraw); + BreakFinder bfFore(ll, &model.sel, lineRange, posLineStart, xStartVisible, + (((phasesDraw == phasesOne) && selBackDrawn) || vsDraw.selColours.fore.isSet), model.pdoc, &model.reprs, &vsDraw); while (bfFore.More()) { @@ -1998,13 +1667,13 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi // draw strings that are completely past the right side of the window. if (rcSegment.Intersects(rcLine)) { const int styleMain = ll->styles[i]; - ColourRGBA textFore = vsDraw.styles[styleMain].fore; - const Font *textFont = vsDraw.styles[styleMain].font.get(); - // Hot-spot foreground - const bool inHotspot = model.hotspot.Valid() && model.hotspot.ContainsCharacter(iDoc); + ColourDesired textFore = vsDraw.styles[styleMain].fore; + FontAlias textFont = vsDraw.styles[styleMain].font; + //hotspot foreground + const bool inHotspot = (ll->hotspot.Valid()) && ll->hotspot.ContainsCharacter(iDoc); if (inHotspot) { - if (vsDraw.ElementColour(Element::HotSpotActive)) - textFore = *vsDraw.ElementColour(Element::HotSpotActive); + if (vsDraw.hotspotColours.fore.isSet) + textFore = vsDraw.hotspotColours.fore; } if (vsDraw.indicatorsSetFore) { // At least one indicator sets the text colour so see if it applies to this segment @@ -2012,20 +1681,17 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi const int indicatorValue = deco->ValueAt(ts.start + posLineStart); if (indicatorValue) { const Indicator &indicator = vsDraw.indicators[deco->Indicator()]; - bool hover = false; - if (indicator.IsDynamic()) { - const Sci::Position startPos = ts.start + posLineStart; - const Range rangeRun(deco->StartRun(startPos), deco->EndRun(startPos)); - hover = rangeRun.ContainsCharacter(model.hoverIndicatorPos); - } + const bool hover = indicator.IsDynamic() && + ((model.hoverIndicatorPos >= ts.start + posLineStart) && + (model.hoverIndicatorPos <= ts.end() + posLineStart)); if (hover) { - if (indicator.sacHover.style == IndicatorStyle::TextFore) { + if (indicator.sacHover.style == INDIC_TEXTFORE) { textFore = indicator.sacHover.fore; } } else { - if (indicator.sacNormal.style == IndicatorStyle::TextFore) { - if (FlagSet(indicator.Flags(), IndicFlag::ValueFore)) - textFore = ColourRGBA::FromRGB(indicatorValue & static_cast(IndicValue::Mask)); + if (indicator.sacNormal.style == INDIC_TEXTFORE) { + if (indicator.Flags() & SC_INDICFLAG_VALUEFORE) + textFore = ColourDesired(indicatorValue & SC_INDICVALUEMASK); else textFore = indicator.sacNormal.fore; } @@ -2033,43 +1699,42 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi } } } - InSelection inSelection = hideSelection ? InSelection::inNone : model.sel.CharacterInSelection(iDoc); - if (FlagSet(vsDraw.caret.style, CaretStyle::Curses) && (inSelection == InSelection::inMain)) - inSelection = CharacterInCursesSelection(iDoc, model, vsDraw); - const std::optional selectionFore = SelectionForeground(model, vsDraw, inSelection); - if (selectionFore) { - textFore = *selectionFore; + const int inSelection = hideSelection ? 0 : model.sel.CharacterInSelection(iDoc); + if (inSelection && (vsDraw.selColours.fore.isSet)) { + textFore = (inSelection == 1) ? vsDraw.selColours.fore : vsDraw.selAdditionalForeground; } - ColourRGBA textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, styleMain, i); + ColourDesired textBack = TextBackground(model, vsDraw, ll, background, inSelection, inHotspot, styleMain, i); if (ts.representation) { if (ll->chars[i] == '\t') { // Tab display - if (phasesDraw == PhasesDraw::One) { + if (phasesDraw == phasesOne) { if (drawWhitespaceBackground && vsDraw.WhiteSpaceVisible(inIndentation)) - textBack = vsDraw.ElementColour(Element::WhiteSpaceBack)->Opaque(); - surface->FillRectangleAligned(rcSegment, Fill(textBack)); + textBack = vsDraw.whitespaceColours.back; + surface->FillRectangle(rcSegment, textBack); } - if (inIndentation && vsDraw.viewIndentationGuides == IndentView::Real) { + if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { for (int indentCount = static_cast((ll->positions[i] + epsilon) / indentWidth); indentCount <= (ll->positions[i + 1] - epsilon) / indentWidth; indentCount++) { if (indentCount > 0) { - const XYPOSITION xIndent = std::floor(indentCount * indentWidth); + const XYPOSITION xIndent = floor(indentCount * indentWidth); DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, (ll->xHighlightGuide == xIndent)); } } } - if (vsDraw.viewWhitespace != WhiteSpace::Invisible) { + if (vsDraw.viewWhitespace != wsInvisible) { if (vsDraw.WhiteSpaceVisible(inIndentation)) { + if (vsDraw.whitespaceColours.fore.isSet) + textFore = vsDraw.whitespaceColours.fore; + surface->PenColour(textFore); const PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight, rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); - const int segmentTop = static_cast(rcSegment.top) + vsDraw.lineHeight / 2; - const ColourRGBA whiteSpaceFore = vsDraw.ElementColour(Element::WhiteSpace).value_or(textFore); + const int segmentTop = static_cast(rcSegment.top + vsDraw.lineHeight / 2); if (!customDrawTabArrow) - DrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(whiteSpaceFore, 1.0f)); + DrawTabArrow(surface, rcTab, segmentTop, vsDraw); else - customDrawTabArrow(surface, rcTab, segmentTop, vsDraw, Stroke(whiteSpaceFore, 1.0f)); + customDrawTabArrow(surface, rcTab, segmentTop); } } } else { @@ -2078,67 +1743,61 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi // Using one font for all control characters so it can be controlled independently to ensure // the box goes around the characters tightly. Seems to be no way to work out what height // is taken by an individual character - internal leading gives varying results. - const Font *ctrlCharsFont = vsDraw.styles[StyleControlChar].font.get(); + FontAlias ctrlCharsFont = vsDraw.styles[STYLE_CONTROLCHAR].font; const char cc[2] = { static_cast(vsDraw.controlCharSymbol), '\0' }; surface->DrawTextNoClip(rcSegment, ctrlCharsFont, rcSegment.top + vsDraw.maxAscent, - cc, textBack, textFore); + cc, 1, textBack, textFore); } else { - if (FlagSet(ts.representation->appearance, RepresentationAppearance::Colour)) { - textFore = ts.representation->colour; - } - if (FlagSet(ts.representation->appearance, RepresentationAppearance::Blob)) { - DrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep, - textBack, textFore, phasesDraw == PhasesDraw::One); - } else { - surface->DrawTextTransparentUTF8(rcSegment, vsDraw.styles[StyleControlChar].font.get(), - rcSegment.top + vsDraw.maxAscent, ts.representation->stringRep, textFore); - } + DrawTextBlob(surface, vsDraw, rcSegment, ts.representation->stringRep.c_str(), + textBack, textFore, phasesDraw == phasesOne); } } } else { // Normal text display if (vsDraw.styles[styleMain].visible) { - const std::string_view text(&ll->chars[ts.start], i - ts.start + 1); - if (phasesDraw != PhasesDraw::One) { + if (phasesDraw != phasesOne) { surface->DrawTextTransparent(rcSegment, textFont, - rcSegment.top + vsDraw.maxAscent, text, textFore); + rcSegment.top + vsDraw.maxAscent, &ll->chars[ts.start], + static_cast(i - ts.start + 1), textFore); } else { surface->DrawTextNoClip(rcSegment, textFont, - rcSegment.top + vsDraw.maxAscent, text, textFore, textBack); + rcSegment.top + vsDraw.maxAscent, &ll->chars[ts.start], + static_cast(i - ts.start + 1), textFore, textBack); } } - if (vsDraw.viewWhitespace != WhiteSpace::Invisible || - (inIndentation && vsDraw.viewIndentationGuides != IndentView::None)) { + if (vsDraw.viewWhitespace != wsInvisible || + (inIndentation && vsDraw.viewIndentationGuides != ivNone)) { for (int cpos = 0; cpos <= i - ts.start; cpos++) { if (ll->chars[cpos + ts.start] == ' ') { - if (vsDraw.viewWhitespace != WhiteSpace::Invisible) { + if (vsDraw.viewWhitespace != wsInvisible) { + if (vsDraw.whitespaceColours.fore.isSet) + textFore = vsDraw.whitespaceColours.fore; if (vsDraw.WhiteSpaceVisible(inIndentation)) { const XYPOSITION xmid = (ll->positions[cpos + ts.start] + ll->positions[cpos + ts.start + 1]) / 2; - if ((phasesDraw == PhasesDraw::One) && drawWhitespaceBackground) { - textBack = vsDraw.ElementColour(Element::WhiteSpaceBack)->Opaque(); + if ((phasesDraw == phasesOne) && drawWhitespaceBackground) { + textBack = vsDraw.whitespaceColours.back; const PRectangle rcSpace( ll->positions[cpos + ts.start] + xStart - static_cast(subLineStart), rcSegment.top, ll->positions[cpos + ts.start + 1] + xStart - static_cast(subLineStart), rcSegment.bottom); - surface->FillRectangleAligned(rcSpace, Fill(textBack)); + surface->FillRectangle(rcSpace, textBack); } const int halfDotWidth = vsDraw.whitespaceSize / 2; PRectangle rcDot(xmid + xStart - halfDotWidth - static_cast(subLineStart), rcSegment.top + vsDraw.lineHeight / 2, 0.0f, 0.0f); rcDot.right = rcDot.left + vsDraw.whitespaceSize; rcDot.bottom = rcDot.top + vsDraw.whitespaceSize; - const ColourRGBA whiteSpaceFore = vsDraw.ElementColour(Element::WhiteSpace).value_or(textFore); - surface->FillRectangleAligned(rcDot, Fill(whiteSpaceFore)); + surface->FillRectangle(rcDot, textFore); } } - if (inIndentation && vsDraw.viewIndentationGuides == IndentView::Real) { + if (inIndentation && vsDraw.viewIndentationGuides == ivReal) { for (int indentCount = static_cast((ll->positions[cpos + ts.start] + epsilon) / indentWidth); indentCount <= (ll->positions[cpos + ts.start + 1] - epsilon) / indentWidth; indentCount++) { if (indentCount > 0) { - const XYPOSITION xIndent = std::floor(indentCount * indentWidth); + const XYPOSITION xIndent = floor(indentCount * indentWidth); DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcSegment, (ll->xHighlightGuide == xIndent)); } @@ -2150,19 +1809,19 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi } } } - if (inHotspot && vsDraw.hotspotUnderline) { + if (ll->hotspot.Valid() && vsDraw.hotspotUnderline && ll->hotspot.ContainsCharacter(iDoc)) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; - if (vsDraw.ElementColour(Element::HotSpotActive)) - surface->FillRectangleAligned(rcUL, Fill(*vsDraw.ElementColour(Element::HotSpotActive))); + if (vsDraw.hotspotColours.fore.isSet) + surface->FillRectangle(rcUL, vsDraw.hotspotColours.fore); else - surface->FillRectangleAligned(rcUL, Fill(textFore)); + surface->FillRectangle(rcUL, textFore); } else if (vsDraw.styles[styleMain].underline) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; - surface->FillRectangleAligned(rcUL, Fill(textFore)); + surface->FillRectangle(rcUL, textFore); } } else if (rcSegment.left > rcLine.right) { break; @@ -2172,7 +1831,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line line, Sci::Line lineVisible, PRectangle rcLine, int xStart, int subLine) { - if ((vsDraw.viewIndentationGuides == IndentView::LookForward || vsDraw.viewIndentationGuides == IndentView::LookBoth) + if ((vsDraw.viewIndentationGuides == ivLookForward || vsDraw.viewIndentationGuides == ivLookBoth) && (subLine == 0)) { const Sci::Position posLineStart = model.pdoc->LineStart(line); int indentSpace = model.pdoc->GetLineIndentation(line); @@ -2188,12 +1847,12 @@ void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &mode xStartText = 100000; // Don't limit to visible indentation on empty line // This line is empty, so use indentation of last line with text int indentLastWithText = model.pdoc->GetLineIndentation(lineLastWithText); - const int isFoldHeader = LevelIsHeader(model.pdoc->GetFoldLevel(lineLastWithText)); + const int isFoldHeader = model.pdoc->GetLevel(lineLastWithText) & SC_FOLDLEVELHEADERFLAG; if (isFoldHeader) { // Level is one more level than parent indentLastWithText += model.pdoc->IndentSize(); } - if (vsDraw.viewIndentationGuides == IndentView::LookForward) { + if (vsDraw.viewIndentationGuides == ivLookForward) { // In viLookForward mode, previous line only used if it is a fold header if (isFoldHeader) { indentSpace = std::max(indentSpace, indentLastWithText); @@ -2215,7 +1874,7 @@ void EditView::DrawIndentGuidesOverEmpty(Surface *surface, const EditModel &mode } for (int indentPos = model.pdoc->IndentSize(); indentPos < indentSpace; indentPos += model.pdoc->IndentSize()) { - const XYPOSITION xIndent = std::floor(indentPos * vsDraw.spaceWidth); + const XYPOSITION xIndent = floor(indentPos * vsDraw.spaceWidth); if (xIndent < xStartText) { DrawIndentGuide(surface, lineVisible, vsDraw.lineHeight, xIndent + xStart, rcLine, (ll->xHighlightGuide == xIndent)); @@ -2232,8 +1891,8 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl return; // No further drawing } - // See if something overrides the line background colour. - const std::optional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); + // See if something overrides the line background color. + const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); const Sci::Position posLineStart = model.pdoc->LineStart(line); @@ -2242,54 +1901,47 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl const XYACCUMULATOR subLineStart = ll->positions[lineRange.start]; if ((ll->wrapIndent != 0) && (subLine > 0)) { - if (FlagSet(phase, DrawPhase::back)) { + if (phase & drawBack) { DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background, customDrawWrapMarker, model.caret.active); } xStart += static_cast(ll->wrapIndent); } - if (phasesDraw != PhasesDraw::One) { - if (FlagSet(phase, DrawPhase::back)) { + if (phasesDraw != phasesOne) { + if (phase & drawBack) { DrawBackground(surface, model, vsDraw, ll, rcLine, lineRange, posLineStart, xStart, subLine, background); - DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, DrawPhase::back); - DrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, DrawPhase::back); - // Remove drawBack to not draw again in DrawFoldDisplayText - phase = static_cast(static_cast(phase) & ~static_cast(DrawPhase::back)); + DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, drawBack); + phase = static_cast(phase & ~drawBack); // Remove drawBack to not draw again in DrawFoldDisplayText DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, xStart, subLine, subLineStart, background); if (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret)) DrawCaretLineFramed(surface, vsDraw, ll, rcLine, subLine); } - if (FlagSet(phase, DrawPhase::indicatorsBack)) { - DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, - lineRangeIncludingEnd.end, true, tabWidthMinimumPixels); + if (phase & drawIndicatorsBack) { + DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRangeIncludingEnd.end, true, model.hoverIndicatorPos); DrawEdgeLine(surface, vsDraw, ll, rcLine, lineRange, xStart); DrawMarkUnderline(surface, model, vsDraw, line, rcLine); } } - if (FlagSet(phase, DrawPhase::text)) { - DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart, tabWidthMinimumPixels, Layer::UnderText); - DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine, Layer::UnderText); + if (phase & drawText) { DrawForeground(surface, model, vsDraw, ll, lineVisible, rcLine, lineRange, posLineStart, xStart, subLine, background); } - if (FlagSet(phase, DrawPhase::indentationGuides)) { + if (phase & drawIndentationGuides) { DrawIndentGuidesOverEmpty(surface, model, vsDraw, ll, line, lineVisible, rcLine, xStart, subLine); } - if (FlagSet(phase, DrawPhase::indicatorsFore)) { - DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, - lineRangeIncludingEnd.end, false, tabWidthMinimumPixels); + if (phase & drawIndicatorsFore) { + DrawIndicators(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, lineRangeIncludingEnd.end, false, model.hoverIndicatorPos); } DrawFoldDisplayText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase); - DrawEOLAnnotationText(surface, model, vsDraw, ll, line, xStart, rcLine, subLine, subLineStart, phase); - if (phasesDraw == PhasesDraw::One) { + if (phasesDraw == phasesOne) { DrawEOL(surface, model, vsDraw, ll, rcLine, line, lineRange.end, xStart, subLine, subLineStart, background); if (vsDraw.IsLineFrameOpaque(model.caret.active, ll->containsCaret)) @@ -2298,49 +1950,36 @@ void EditView::DrawLine(Surface *surface, const EditModel &model, const ViewStyl DrawMarkUnderline(surface, model, vsDraw, line, rcLine); } - if (!hideSelection && FlagSet(phase, DrawPhase::selectionTranslucent)) { - DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart, tabWidthMinimumPixels, Layer::OverText); + if (!hideSelection && (phase & drawSelectionTranslucent)) { + DrawTranslucentSelection(surface, model, vsDraw, ll, line, rcLine, subLine, lineRange, xStart); } - if (FlagSet(phase, DrawPhase::lineTranslucent)) { - DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine, Layer::OverText); + if (phase & drawLineTranslucent) { + DrawTranslucentLineState(surface, model, vsDraw, ll, line, rcLine, subLine); } } -static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, - Sci::Line line, PRectangle rcLine, int subLine) { - const bool lastSubLine = subLine == (ll->lines - 1); +static void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, Sci::Line line, PRectangle rcLine) { const bool expanded = model.pcs->GetExpanded(line); - const FoldLevel level = model.pdoc->GetFoldLevel(line); - const FoldLevel levelNext = model.pdoc->GetFoldLevel(line + 1); - if (LevelIsHeader(level) && + const int level = model.pdoc->GetLevel(line); + const int levelNext = model.pdoc->GetLevel(line + 1); + if ((level & SC_FOLDLEVELHEADERFLAG) && (LevelNumber(level) < LevelNumber(levelNext))) { - const ColourRGBA foldLineColour = vsDraw.ElementColour(Element::FoldLine).value_or( - vsDraw.styles[StyleDefault].fore); // Paint the line above the fold - if ((subLine == 0) && - ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeExpanded))) + if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED)) || - (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineBeforeContracted))))) { - surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), foldLineColour); + (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEBEFORE_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.bottom = rcFoldLine.top + 1; + surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); } // Paint the line below the fold - if (lastSubLine && - ((expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterExpanded))) + if ((expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_EXPANDED)) || - (!expanded && (FlagSet(model.foldFlags, FoldFlag::LineAfterContracted))))) { - surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), foldLineColour); - // If contracted fold line drawn then don't overwrite with hidden line - // as fold lines are more specific then hidden lines. - if (!expanded) { - return; - } - } - } - if (lastSubLine && model.pcs->GetVisible(line) && !model.pcs->GetVisible(line + 1)) { - std::optional hiddenLineColour = vsDraw.ElementColour(Element::HiddenLine); - if (hiddenLineColour) { - surface->FillRectangleAligned(Side(rcLine, Edge::bottom, 1.0), *hiddenLineColour); + (!expanded && (model.foldFlags & SC_FOLDFLAG_LINEAFTER_CONTRACTED))) { + PRectangle rcFoldLine = rcLine; + rcFoldLine.top = rcFoldLine.bottom - 1; + surface->FillRectangle(rcFoldLine, vsDraw.styles[STYLE_DEFAULT].fore); } } } @@ -2359,16 +1998,18 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan surface = pixmapLine.get(); PLATFORM_ASSERT(pixmapLine->Initialised()); } - surface->SetMode(SurfaceMode(model.pdoc->dbcsCodePage, model.BidirectionalR2L())); + surface->SetUnicodeMode(SC_CP_UTF8 == model.pdoc->dbcsCodePage); + surface->SetDBCSMode(model.pdoc->dbcsCodePage); const Point ptOrigin = model.GetVisibleOriginInMain(); const int screenLinePaintFirst = static_cast(rcArea.top) / vsDraw.lineHeight; const int xStart = vsDraw.textStart - model.xOffset + static_cast(ptOrigin.x); - const SelectionPosition posCaret = model.posDrag.IsValid() ? model.posDrag : model.sel.RangeMain().caret; + SelectionPosition posCaret = model.sel.RangeMain().caret; + if (model.posDrag.IsValid()) + posCaret = model.posDrag; const Sci::Line lineCaret = model.pdoc->SciLineFromPosition(posCaret.Position()); - const int caretOffset = static_cast(posCaret.Position() - model.pdoc->LineStart(lineCaret)); PRectangle rcTextArea = rcClient; if (vsDraw.marginInside) { @@ -2380,8 +2021,7 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan // Remove selection margin from drawing area so text will not be drawn // on it in unbuffered mode. - const bool clipping = !bufferedDraw && vsDraw.marginInside; - if (clipping) { + if (!bufferedDraw && vsDraw.marginInside) { PRectangle rcClipText = rcTextArea; rcClipText.left -= leftTextOverlap; surfaceWindow->SetClip(rcClipText); @@ -2394,18 +2034,18 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan double durCopy = 0.0; ElapsedPeriod epWhole; #endif - const bool bracesIgnoreStyle = ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == StyleBraceLight)) || - (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == StyleBraceBad))); + const bool bracesIgnoreStyle = ((vsDraw.braceHighlightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACELIGHT)) || + (vsDraw.braceBadLightIndicatorSet && (model.bracesMatchStyle == STYLE_BRACEBAD))); Sci::Line lineDocPrevious = -1; // Used to avoid laying out one document line multiple times - std::shared_ptr ll; + AutoLineLayout ll(llc, nullptr); std::vector phases; - if ((phasesDraw == PhasesDraw::Multiple) && !bufferedDraw) { - for (DrawPhase phase = DrawPhase::back; phase <= DrawPhase::carets; phase = static_cast(static_cast(phase) * 2)) { + if ((phasesDraw == phasesMultiple) && !bufferedDraw) { + for (DrawPhase phase = drawBack; phase <= drawCarets; phase = static_cast(phase * 2)) { phases.push_back(phase); } } else { - phases.push_back(DrawPhase::all); + phases.push_back(drawAll); } for (const DrawPhase &phase : phases) { int ypos = 0; @@ -2427,16 +2067,17 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan ElapsedPeriod ep; #endif if (lineDoc != lineDocPrevious) { - ll = RetrieveLineLayout(lineDoc, model); - LayoutLine(model, surface, vsDraw, ll.get(), model.wrapWidth); + ll.Set(nullptr); + ll.Set(RetrieveLineLayout(lineDoc, model)); + LayoutLine(model, lineDoc, surface, vsDraw, ll, model.wrapWidth); lineDocPrevious = lineDoc; } #if defined(TIME_PAINTING) durLayout += ep.Duration(true); #endif if (ll) { - ll->containsCaret = !hideSelection && (lineDoc == lineCaret) - && (ll->lines == 1 || !vsDraw.caretLine.subLine || ll->InLine(caretOffset, subLine)); + ll->containsCaret = !hideSelection && (lineDoc == lineCaret); + ll->hotspot = model.GetHotSpotRange(); PRectangle rcLine = rcTextArea; rcLine.top = static_cast(ypos); @@ -2449,32 +2090,27 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan ll->SetBracesHighlight(rangeLine, model.braces, static_cast(model.bracesMatchStyle), static_cast(model.highlightGuideColumn * vsDraw.spaceWidth), bracesIgnoreStyle); - if (leftTextOverlap && (bufferedDraw || ((phasesDraw < PhasesDraw::Multiple) && (FlagSet(phase, DrawPhase::back))))) { + if (leftTextOverlap && (bufferedDraw || ((phasesDraw < phasesMultiple) && (phase & drawBack)))) { // Clear the left margin PRectangle rcSpacer = rcLine; rcSpacer.right = rcSpacer.left; rcSpacer.left -= 1; - surface->FillRectangleAligned(rcSpacer, Fill(vsDraw.styles[StyleDefault].back)); + surface->FillRectangle(rcSpacer, vsDraw.styles[STYLE_DEFAULT].back); } - if (model.BidirectionalEnabled()) { - // Fill the line bidi data - UpdateBidiData(model, vsDraw, ll.get()); - } - - DrawLine(surface, model, vsDraw, ll.get(), lineDoc, visibleLine, xStart, rcLine, subLine, phase); + DrawLine(surface, model, vsDraw, ll, lineDoc, visibleLine, xStart, rcLine, subLine, phase); #if defined(TIME_PAINTING) durPaint += ep.Duration(true); #endif // Restore the previous styles for the brace highlights in case layout is in cache. ll->RestoreBracesHighlight(rangeLine, model.braces, bracesIgnoreStyle); - if (FlagSet(phase, DrawPhase::foldLines)) { - DrawFoldLines(surface, model, vsDraw, ll.get(), lineDoc, rcLine, subLine); + if (phase & drawFoldLines) { + DrawFoldLines(surface, model, vsDraw, lineDoc, rcLine); } - if (FlagSet(phase, DrawPhase::carets)) { - DrawCarets(surface, model, vsDraw, ll.get(), lineDoc, xStart, rcLine, subLine); + if (phase & drawCarets) { + DrawCarets(surface, model, vsDraw, ll, lineDoc, xStart, rcLine, subLine); } if (bufferedDraw) { @@ -2482,7 +2118,6 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan const PRectangle rcCopyArea = PRectangle::FromInts(vsDraw.textStart - leftTextOverlap, yposScreen, static_cast(rcClient.right - vsDraw.rightMarginWidth), yposScreen + vsDraw.lineHeight); - pixmapLine->FlushDrawing(); surfaceWindow->Copy(rcCopyArea, from, *pixmapLine); } @@ -2501,7 +2136,7 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan visibleLine++; } } - ll.reset(); + ll.Set(nullptr); #if defined(TIME_PAINTING) if (durPaint < 0.00000001) durPaint = 0.00000001; @@ -2512,27 +2147,23 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan rcBeyondEOF.right = rcBeyondEOF.right - ((vsDraw.marginInside) ? vsDraw.rightMarginWidth : 0); rcBeyondEOF.top = static_cast((model.pcs->LinesDisplayed() - model.TopLineOfMain()) * vsDraw.lineHeight); if (rcBeyondEOF.top < rcBeyondEOF.bottom) { - surfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.styles[StyleDefault].back)); - if (vsDraw.edgeState == EdgeVisualStyle::Line) { + surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.styles[STYLE_DEFAULT].back); + if (vsDraw.edgeState == EDGE_LINE) { const int edgeX = static_cast(vsDraw.theEdge.column * vsDraw.spaceWidth); rcBeyondEOF.left = static_cast(edgeX + xStart); rcBeyondEOF.right = rcBeyondEOF.left + 1; - surfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.theEdge.colour)); - } else if (vsDraw.edgeState == EdgeVisualStyle::MultiLine) { + surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theEdge.colour); + } else if (vsDraw.edgeState == EDGE_MULTILINE) { for (size_t edge = 0; edge < vsDraw.theMultiEdge.size(); edge++) { if (vsDraw.theMultiEdge[edge].column >= 0) { const int edgeX = static_cast(vsDraw.theMultiEdge[edge].column * vsDraw.spaceWidth); rcBeyondEOF.left = static_cast(edgeX + xStart); rcBeyondEOF.right = rcBeyondEOF.left + 1; - surfaceWindow->FillRectangleAligned(rcBeyondEOF, Fill(vsDraw.theMultiEdge[edge].colour)); + surfaceWindow->FillRectangle(rcBeyondEOF, vsDraw.theMultiEdge[edge].colour); } } } } - - if (clipping) - surfaceWindow->PopClip(); - //Platform::DebugPrintf("start display %d, offset = %d\n", model.pdoc->Length(), model.xOffset); #if defined(TIME_PAINTING) Platform::DebugPrintf( @@ -2544,59 +2175,62 @@ void EditView::PaintText(Surface *surfaceWindow, const EditModel &model, PRectan void EditView::FillLineRemainder(Surface *surface, const EditModel &model, const ViewStyle &vsDraw, const LineLayout *ll, Sci::Line line, PRectangle rcArea, int subLine) const { - InSelection eolInSelection = InSelection::inNone; - if ((!hideSelection) && (subLine == (ll->lines - 1))) { - eolInSelection = model.LineEndInSelection(line); - } + int eolInSelection = 0; + int alpha = SC_ALPHA_NOALPHA; + if (!hideSelection) { + const Sci::Position posAfterLineEnd = model.pdoc->LineStart(line + 1); + eolInSelection = (subLine == (ll->lines - 1)) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; + alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha; + } - const std::optional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); + const ColourOptional background = vsDraw.Background(model.pdoc->GetMark(line), model.caret.active, ll->containsCaret); - if (eolInSelection && vsDraw.selection.eolFilled && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer == Layer::Base)) { - surface->FillRectangleAligned(rcArea, Fill(SelectionBackground(model, vsDraw, eolInSelection).Opaque())); - } else { - if (background) { - surface->FillRectangleAligned(rcArea, Fill(*background)); - } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { - surface->FillRectangleAligned(rcArea, Fill(vsDraw.styles[ll->styles[ll->numCharsInLine]].back)); + if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha == SC_ALPHA_NOALPHA)) { + surface->FillRectangle(rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection)); } else { - surface->FillRectangleAligned(rcArea, Fill(vsDraw.styles[StyleDefault].back)); - } - if (eolInSelection && vsDraw.selection.eolFilled && (line < model.pdoc->LinesTotal() - 1) && (vsDraw.selection.layer != Layer::Base)) { - surface->FillRectangleAligned(rcArea, SelectionBackground(model, vsDraw, eolInSelection)); + if (background.isSet) { + surface->FillRectangle(rcArea, background); + } else if (vsDraw.styles[ll->styles[ll->numCharsInLine]].eolFilled) { + surface->FillRectangle(rcArea, vsDraw.styles[ll->styles[ll->numCharsInLine]].back); + } else { + surface->FillRectangle(rcArea, vsDraw.styles[STYLE_DEFAULT].back); + } + if (eolInSelection && vsDraw.selEOLFilled && vsDraw.selColours.back.isSet && (line < model.pdoc->LinesTotal() - 1) && (alpha != SC_ALPHA_NOALPHA)) { + SimpleAlphaRectangle(surface, rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha); + } } - } } // Space (3 space characters) between line numbers and text when printing. #define lineNumberPrintSpace " " -static ColourRGBA InvertedLight(ColourRGBA orig) noexcept { +static ColourDesired InvertedLight(ColourDesired orig) { unsigned int r = orig.GetRed(); unsigned int g = orig.GetGreen(); unsigned int b = orig.GetBlue(); const unsigned int l = (r + g + b) / 3; // There is a better calculation for this that matches human eye const unsigned int il = 0xff - l; if (l == 0) - return ColourRGBA(0xff, 0xff, 0xff); + return ColourDesired(0xff, 0xff, 0xff); r = r * il / l; g = g * il / l; b = b * il / l; - return ColourRGBA(std::min(r, 0xffu), std::min(g, 0xffu), std::min(b, 0xffu)); + return ColourDesired(std::min(r, 0xffu), std::min(g, 0xffu), std::min(b, 0xffu)); } -Sci::Position EditView::FormatRange(bool draw, const RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, +Sci::Position EditView::FormatRange(bool draw, const Sci_RangeToFormat *pfr, Surface *surface, Surface *surfaceMeasure, const EditModel &model, const ViewStyle &vs) { // Can't use measurements cached for screen posCache.Clear(); ViewStyle vsPrint(vs); - vsPrint.technology = Technology::Default; + vsPrint.technology = SC_TECHNOLOGY_DEFAULT; // Modify the view style for printing as do not normally want any of the transient features to be printed // Printing supports only the line number margin. int lineNumberIndex = -1; for (size_t margin = 0; margin < vs.ms.size(); margin++) { - if ((vsPrint.ms[margin].style == MarginType::Number) && (vsPrint.ms[margin].width > 0)) { + if ((vsPrint.ms[margin].style == SC_MARGIN_NUMBER) && (vsPrint.ms[margin].width > 0)) { lineNumberIndex = static_cast(margin); } else { vsPrint.ms[margin].width = 0; @@ -2605,35 +2239,40 @@ Sci::Position EditView::FormatRange(bool draw, const RangeToFormat *pfr, Surface vsPrint.fixedColumnWidth = 0; vsPrint.zoomLevel = printParameters.magnification; // Don't show indentation guides - // If this ever gets changed, cached pixmap would need to be recreated if technology != Technology::Default - vsPrint.viewIndentationGuides = IndentView::None; + // If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT + vsPrint.viewIndentationGuides = ivNone; // Don't show the selection when printing - vsPrint.elementColours.clear(); - vsPrint.elementBaseColours.clear(); - vsPrint.caretLine.alwaysShow = false; + vsPrint.selColours.back.isSet = false; + vsPrint.selColours.fore.isSet = false; + vsPrint.selAlpha = SC_ALPHA_NOALPHA; + vsPrint.selAdditionalAlpha = SC_ALPHA_NOALPHA; + vsPrint.whitespaceColours.back.isSet = false; + vsPrint.whitespaceColours.fore.isSet = false; + vsPrint.showCaretLineBackground = false; + vsPrint.alwaysShowCaretLineBackground = false; // Don't highlight matching braces using indicators vsPrint.braceHighlightIndicatorSet = false; vsPrint.braceBadLightIndicatorSet = false; // Set colours for printing according to users settings - const PrintOption colourMode = printParameters.colourMode; - const std::vector - - - Lexilla - - - - - - - - - - -
- - A library of language lexers for use with Scintilla - - Release version 5.1.4
- Site last modified December 7 2021
-
-   -
- - - - -
-
    -
  • Version 5.1.4 adds lexers for AsciiDoc and GDScript.
  • -
  • Version 5.1.3 improves Rust.
  • -
  • Version 5.1.2 improves CSS, F#, Inno Setup, Markdown, and PHP.
  • -
  • Version 5.1.1 improves C++, Julia, Markdown, Matlab, and PHP.
  • -
  • Version 5.1.0 is a stable release: the interfaces between Scintilla and Lexilla and between - platform-independent code and platform layers should remain compatible through 5.x releases. - Improvements were made for ASP, Erlang, F#, Raku, Ruby, Tcl, and YAML.
  • -
- - -

- Lexilla is a free library of language - lexers that can be used with the Scintilla - editing component. - It comes with complete source code and a license that - permits use in any free project or commercial product. -

-

- Originally, this functionality was incorporated inside Scintilla. - It has been extracted as a separate project to make it easier for contributors to work on - support for new languages and to fix bugs in existing lexers. - It also defines a protocol where projects can implement their own lexers and distribute - them as they wish. -

-

- Current development requires a recent C++ compiler that supports C++17. - The testing framework uses some C++20 features but the basic library only uses C++17. -

-

- Lexilla is currently available for Intel Win32, OS X, and Linux compatible operating - systems. It has been run on Windows 10, OS X 10.13+, and on Ubuntu 20.04 but is likely - to run on earlier systems as it has no GUI functionality. -

-

- You can download Lexilla. -

-

- The source code can be downloaded via Git at GitHub - Lexilla project page.
- git clone https://github.com/ScintillaOrg/lexilla -

-

Current repository status:
-
-
- -

-

- Related sites. -

-

- Bugs and other issues. -

-

- History and contribution credits. -

-

- Questions and comments about Lexilla should be directed to the - scintilla-interest - mailing list, - which is for discussion of Scintilla and related projects, their bugs and future features. - This is a low traffic list, averaging less than 20 messages per week. - To avoid spam, only list members can write to the list. - New versions of Lexilla are announced on scintilla-interest. -
-

- - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDoc.html b/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDoc.html deleted file mode 100644 index ac8fb9b69..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDoc.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - - - Lexilla Documentation - - - - - - - - - - - -
Lexilla iconLexilla
- -

Lexilla Documentation

- -

Last edited 21 April 2021 NH

- -

Introduction

- -

Lexilla is a library containing lexers for use with Scintilla. It can be either a static library - that is linked into an application or a shared library that is loaded at runtime.

- -

Lexilla does not interact with the display so there is no need to compile it for a - particular GUI toolkit. Therefore there can be a common library shared by applications using - different GUI toolkits. In some circumstances there may need to be both 32-bit and 64-bit versions - on one system to match different applications.

- -

Different extensions are commonly used for shared libraries: .so on Linux, .dylib on macOS, and .DLL on Windows. -

- -

The Lexilla protocol

- -

A set of functions is defined by Lexilla for use by applications. Libraries that provide these functions - can be used as a replacement for Lexilla or to add new lexers beyond those provided by Lexilla.

- -

The Lexilla protocol is a superset of the external lexer protocol and defines these functions that may be exported from a shared library:
- int GetLexerCount()
- void GetLexerName(unsigned int index, char *name, int buflength)
- LexerFactoryFunction GetLexerFactory(unsigned int index)
- ILexer5 *CreateLexer(const char *name)
- const char *LexerNameFromID(int identifier)
- const char *GetLibraryPropertyNames()
- void SetLibraryProperty(const char *key, const char *value)
- const char *GetNameSpace() -

- -

ILexer5 is defined by Scintilla in include/ILexer.h as the interface provided by lexers which is called by Scintilla. - Many clients do not actually need to call methods on ILexer5 - they just take the return from CreateLexer and plug it - straight into Scintilla so it can be treated as a machine pointer (void *). -

- -

LexerFactoryFunction is defined as a function that takes no arguments and returns an ILexer5 *: - ILexer5 *(*LexerFactoryFunction)() but this can be ignored by most client code. -

- -

The Lexilla protocol is a superset of the earlier external lexer protocol that defined the first 3 functions - (GetLexerCount, GetLexerName, GetLexerFactory) - so Lexilla be loaded by applications that support that protocol. - GetLexerFactory will rarely be used now as it is easier to call CreateLexer. -

- -

CreateLexer is the main call that will create a lexer for a particular language. The returned lexer can then be - set as the current lexer in Scintilla by calling - SCI_SETILEXER.

- -

LexerNameFromID is an optional function that returns the name for a lexer identifier. - LexerNameFromID(SCLEX_CPP) → "cpp". - This is a temporary affordance to make it easier to convert applications to using Lexilla. - Applications should move to using lexer names instead of IDs. - This function is deprecated, showing warnings with some compilers, and will be removed in a future version of Lexilla.

- -

SetLibraryProperty and GetLibraryPropertyNames - are optional functions that can be - defined if a library requires initialisation before calling other methods. - For example, a lexer library that reads language definitions from XML files may require that the - directory containing these files be set before a call to CreateLexer. - SetLibraryProperty("definitions.directory", "/usr/share/xeditor/language-definitions") - If a library implements SetLibraryProperty then it may also provide a set of valid property names with - GetLibraryPropertyNames that can then be used by the application to define configuration file property - names or user interface elements for options dialogs.

- -

GetNameSpace is an optional function that returns a namespace string - that can be used to disambiguate lexers with the same name from different providers. - If Lexilla and XMLLexers both provide a "cpp" lexer than a request for "cpp" may be satisfied by either but "xmllexers.cpp" - unambiguously refers to the "cpp" lexer from XMLLexers.

- -

Building Lexilla

- -

Before using Lexilla it must be built or downloaded.

-

Lexilla requires some headers from Scintilla to build and expects a directory named - "scintilla" containing a copy of Scintilla 5+ to be a peer of the Lexilla top level - directory conventionally called "lexilla".

- -
To build Lexilla, in the lexilla/src directory, run make (for gcc or clang)
-
make
-
or nmake for MSVC
-
nmake -f lexilla.mak
-
- -
After building Lexilla, its test suite can be run with make/nmake in the lexilla/test directory. For gcc or clang
-
make test
- or for MSVC
-
nmake -f testlexers.mak test
-
Each test case should show "Lexing ..." and errors will display a diagnostic, commonly showing - a difference between the actual and expected result:
- C:\u\hg\lexilla\test\examples\python\x.py:1: is different -
- -

There are also RunTest.sh / RunTest.bat scripts in the scripts directory to build Lexilla and then build and run the tests. - These both use gcc/clang, not MSVC.

- -

There are Microsoft Visual C++ and Xcode projects that can be used to build Lexilla. - For Visual C++: src/Lexilla.vcxproj. For Xcode: src/Lexilla/Lexilla.xcodeproj. - There is also test/TestLexers.vcxproj to build the tests with Visual C++.

- -

Using Lexilla

- -

Definitions for using Lexilla from C and C++ are included in lexilla/include/Lexilla.h. - For C++, scintilla/include/ILexer.h should be included before Lexilla.h as the - ILexer5 type is used. - For C, ILexer.h should not be included as C does not understand it and from C, - void* is used instead of ILexer5*. -

- -

For many applications the main Lexilla operations are loading the Lexilla library, creating a - lexer and using that lexer in Scintilla. - Applications need to define the location (or locations) they expect - to find Lexilla or libraries that support the Lexilla protocol. - They also need to define how they request particular lexers, perhaps with a mapping from - file extensions to lexer names.

- -

From C - CheckLexilla

- -

An example C program for accessing Lexilla is provided in lexilla/examples/CheckLexilla. - Build with make and run with make check. -

- -

From C++ - LexillaAccess

- -

A C++ module, LexillaAccess.cxx / LexillaAccess.h is provided in lexilla/access. - This can either be compiled into the application when it is sufficient - or the source code can be copied into the application and customized when the application has additional requirements - (such as checking code signatures). - SciTE uses LexillaAccess.

- -

LexillaAccess supports loading multiple shared libraries implementing the Lexilla protocol at one time.

- -

From Qt

- -

For Qt, use either LexillaAccess from above or Qt's QLibrary class. With 'Call' defined to call Scintilla APIs.
- -#if _WIN32
-    typedef void *(__stdcall *CreateLexerFn)(const char *name);
-#else
-    typedef void *(*CreateLexerFn)(const char *name);
-#endif
-    QFunctionPointer fn = QLibrary::resolve("lexilla", "CreateLexer");
-    void *lexCpp = ((CreateLexerFn)fn)("cpp");
-    Call(SCI_SETILEXER, 0, (sptr_t)(void *)lexCpp);
-

- -

Applications may discover the set of lexers provided by a library by first calling - GetLexerCount to find the number of lexers implemented in the library then looping over calling - GetLexerName with integers 0 to GetLexerCount()-1.

- -

Applications may set properties on a library by calling SetLibraryProperty if provided. - This may be needed for initialisation so should before calling GetLexerCount or CreateLexer. - A set of property names may be available from GetLibraryPropertyNames if provided. - It returns a string pointer where the string contains a list of property names separated by '\n'. - It is up to applications to define how properties are defined and persisted in its user interface - and configuration files.

- -

Modifying or adding lexers

- -

Lexilla can be modified or a new library created that can be used to replace or augment Lexilla.

- -

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 SetLibraryProperty(const char *key, const char *value) - 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 const char *GetLibraryPropertyNames() function. -

- -

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.

- -

An example of a simple lexer housed in a shared library that is compatible with the - Lexilla protocol can be found in lexilla/examples/SimpleLexer. It is implemented in C++. - Build with make and check by running CheckLexilla against it with - make check. -

- - - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDownload.html b/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDownload.html deleted file mode 100644 index 3ec1155d1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaDownload.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - Download Lexilla - - - - - - - - -
- Scintilla icon - - Download - Lexilla -
- - - - -
- - Windows   - - GTK/Linux   - -
-

- Download. -

-

- The license for using Lexilla is similar to that of Python - containing very few restrictions. -

-

- Release 4.4.6 -

-

- Source Code -

- The source code package contains all of the source code for Lexilla but no binary - executable code and is available in -
    -
  • zip format (1.1M) commonly used on Windows
  • -
  • tgz format (0.8M) commonly used on Linux and compatible operating systems
  • -
- Instructions for building on both Windows and Linux are included in the readme file. -

- Windows Executable Code -

- There is no download available containing only the Lexilla DLL. - However, it is included in the SciTE - executable full download as Lexilla.DLL. -

- SciTE is a good demonstration of Lexilla. -

-

- Previous versions can be downloaded from the history - page. -

- - diff --git a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaHistory.html b/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaHistory.html deleted file mode 100644 index 548095566..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaHistory.html +++ /dev/null @@ -1,13369 +0,0 @@ - - - - - - - - - - Lexilla - - - - - - - - - -
- Scintilla icon - - Lexilla -
-

History of Lexilla

-

- Lexilla was originally code that was part of the Scintilla project. - Thus it shares much of the history and contributors of Scintilla before it was extracted as its own project. -

-

Contributors

-

- Thanks to all the people that have contributed patches, bug reports and suggestions. -

-

- Source code and documentation have been contributed by -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Atsuo IshimotoMark HammondFrancois Le CoguiecDale Nagata
Ralf ReinhardtPhilippe LhosteAndrew McKinlayStephan R. A. Deibel
Hans EckardtVassili BourdoMaksim LinRobin Dunn
John EhresmanSteffen GoeldnerDeepak S.DevelopMentor
Yann GaillardAubin PaulJason DiamondAhmad Baitalmal
Paul WinwoodMaxim BaranovRagnar HøjlandChristian Obrecht
Andreas NeukoetterAdam GatesSteve LhommeFerdinand Prantl
Jan DriesMarkus GritschTahir KaracaAhmad Zawawi
Laurent le TynevezWalter BraeuAshley CambrellGarrett Serack
Holger SchmidtActiveStateJames LarcombeAlexey Yutkin
Jan HercekRichard PeclEdward K. ReamValery Kondakoff
Smári McCarthyClemens WyssSimon SteeleSerge A. Baranov
Xavier NodetWilly DevauxDavid ClainBrendon Yenson
Vamsi PotluruPraveen AmbekarAlan KnowlesKengo Jinno
Valentin ValchevMarcos E. WurziusMartin AldersonRobert Gustavsson
José FonsecaHolger KiemesFrancis IrvingScott Kirkwood
Brian QuinlanUbiMichael R. DuerigDeepak T
Don Paul BeletskyGerhard KalabOlivier DagenaisJosh Wingstrom
Bruce DodsonSergey KoshcheyevChuan-jian ShenShane Caraveo
Alexander ScripnikRyan ChristiansonMartin SteffensenJakub Vrána
The Black HorusBernd KreussThomas LauerMike Lansdaal
Yukihiro NakaiJochen TuchtGreg SmithSteve Schoettler
Mauritius ThinnesDarren SchroederPedro GuerreiroSteven te Brinke
Dan PetittBiswapesh ChattopadhyayKein-Hong ManPatrizio Bekerle
Nigel HathawayHrishikesh DesaiSergey PuljajevMathias Rauen
Angelo MandatoDenis SureauKaspar SchiessChristoph Hösler
João Paulo F FariasRon SchofieldStefan WosnikMarius Gheorghe
Naba KumarSean O'DellStefanos TogoulidisHans Hagen
Jim CapeRoland WalterBrian MosherNicholas Nemtsev
Roy WoodPeter-Henry ManderRobert BoucherChristoph Dalitz
April WhiteS. UmarTrent MickFilip Yaghob
Avi YegudinVivi OrunitiaManfred BeckerDimitris Keletsekis
YuigaDavide ScolaJason BoggsReinhold Niesner
Jos van der ZandePescumaPavol BosikJohannes Schmid
Blair McGlashanMikael HultgrenFlorian BalmerHadar Raz
Herr PfarrerBen KeyGene BarryNiki Spahiev
Carsten SperberPhil ReidIago RubioRégis Vaquette
Massimo CoràElias PschernigChris JonesJosiah Reynolds
Robert Roessler rftp.comSteve DonovanJan Martin PettersenSergey Philippov
BorujoaMichael OwensFranck MarciaMassimo Maria Ghisalberti
Frank WunderlichJosepmaria RocaTobias EngvallSuzumizaki Kimitaka
Michael CartmellPascal HurniAndreRandy Butler
Georg RitterMichael GoffioulBen HarperAdam Strzelecki
Kamen StanevSteve MenardOliver YeohEric Promislow
Joseph GalbraithJeffrey RenArmel AsselinJim Pattee
Friedrich VedderSebastian PippingAndre ArpinStanislav Maslovski
Martin StoneFabien ProriolmimirNicola Civran
SnowMitchell ForalPieter HoltzhausenWaldemar Augustyn
Jason HaslamSebastian SteinlechnerChris RickardRob McMullen
Stefan SchwendelerCristian AdamNicolas ChachereauIstvan Szollosi
Xie RenhuiEnrico TrögerTodd WhitemanYuval Papish
instantonSergio LucatoVladVRODmitry Maslov
chupakabraJuan Carlos Arevalo BaezaNick TreleavenStephen Stagg
Jean-Paul IribarrenTim GerundtSam HarwellBoris
Jason OsterGertjan KloostermanalexbodnSergiu Dotenco
Anders KarlssonozlooperMarko NjezicEugen Bitter
Christoph BaumannChristopher BeanSergey KishchenkoKai Liu
Andreas RumpfJames MoffattYuzhou XinNic Jansma
Evan JonesMike LischkeEric KiddmaXmo
David SeverwrightJon StraitOliver KiddleEtienne Girondel
Haimag RenAndrey MoskalyovXaviToby Inkster
Eric ForgeotColomban WendlingNeoJordan Russell
Farshid LashkariSam RawlinsMichael MullinCarlos SS
vimMartial DemolinsTino WeinkaufJérôme Laforge
Udo LechnerMarco FaldaDariusz KnocińskiBen Fisher
Don GobinJohn YeungAdobeElizabeth A. Irizarry
Mike SchroederMorten MacFlyJaime GimenoThomas Linder Puls
Artyom ZuikovGerritOccam's RazorBen Bluemel
David WolfendaleChris AngelicoMarat DukhanStefan Weil
Rex ConnRoss McKayBruno BarbieriGordon Smith
dimitarSébastien GranjouxzenikoJames Ribe
Markus NißlMartin PanterMark YenPhilippe Elsass
Dimitar ZhekovFan YangDenis Shelomovskijdarmar
John VellaChinh NguyenSakshi VermaJoel B. Mohler
IsiledhelVidya WasiG. HuByron Hawkins
AlphaJohn DonoghuekudahIgor Shaula
Pavel BulochkinYosef Or BoczkoBrian GriffinÖzgür Emir
NeomiOmegaPhilSiegeLordErik
TJFMark RobinsonThomas Martitzfelix
Christian WaltherEbbenRobert GiesekeMike M
nkmathewAndreas TscharnerLee Wilmottjohnsonj
VicenteNick GravgaardIan GoldbyHolger Stenger
danselmiMat BerchtoldMichael StaszewskiBaurzhan Muftakhidinov
Erik AngelinYusuf Ramazan KaragözMarkus HeidelbergJoe Mueller
Mika AttilaJoMazMMarkus MoserStefan Küng
Jiří TechetJonathan HuntSerg StetsukJordan Jueckstock
Yury DubinskySam HocevarLuyomiMatt Gilarde
Mark CJohannes SasongkofstirlitzRobin Haberkorn
Pavel SountsovDirk LorenzenKasper B. GraversenChris Mayo
Van de BuggerTse Kit YamSmartShare SystemsMorten Brørup
Alexey DenisovJustin DaileyoirfeodentA-R-C-A
Roberto RossiKenny LiuIain Clarkedesto
John FlatnessThorsten KaniBernhard M. WiedemannBaldur Karlsson
Martin KleusbergJannickZufu LiuSimon Sobisch
Georger AraújoTobias KühneDimitar RadevLiang Bai
Gunter KönigsmannNicholai BenalalUnifaceRaghda Morsy
Giuseppe CorbelliAndreas RönnquistHenrik HankLuke Rasmussen
PhilippmaboroshinGokul KrishnanJohn Horigan
jj5Jad AltahanAndrea RicchiJuarez Rudsatz
Wil van AntwerpenHodong KimMichael ConradDejan Budimir
Andreas FalkenhahnMark ReayDavid ShumanMcLoo
Shmuel ZeigermanChris GrahamHugues LarrivePrakash Sahni
Michel Sauvarduhf7gnombatDerek Brown
Robert Di PardoriQQYX HaoBertrand Lacoste
Ivan UstûžaninRainer Kottenhofffeitoivsl7
Michael HeathAntonio CebriánDavid Yu Yang
-

Releases

-

- Release 5.1.4 -

-
    -
  • - Released 7 December 2021. -
  • -
  • - Add AsciiDoc lexer. - Pull request #39. -
  • -
  • - Add GDScript lexer. - Some behaviour and lexical states may change before this lexer is stable. - Pull request #41. -
  • -
  • - Fix strings ending in escaped '\' in F#. - Issue #38, -
  • -
  • - Better handling of bad terminators and folding for X12. - Feature #1420. -
  • -
-

- Release 5.1.3 -

-
    -
  • - Released 8 November 2021. -
  • -
  • - Fix parsing of 128-bit integer literals in Rust. - Issue #33. -
  • -
  • - Fix different styles between \r and \n at end of line comments for Rust. - Issue #34. -
  • -
  • - For Rust, don't go past end when file ends with unterminated block comment. - Issue #35. -
  • -
-

- Release 5.1.2 -

-
    -
  • - Released 23 September 2021. -
  • -
  • - Implement conditional group rules in CSS. - Issue #25, - Pull request #28. -
  • -
  • - Allow F# triple-quoted strings to interpolate string literals. - Issue #21. -
  • -
  • - Highlight F# printf specifiers in type-checked interpolated strings. - Issue #24. -
  • -
  • - Fix styling for Inno Setup scripts handling unterminated strings, - message sections, and avoid terminating comments between CR and LF. - Pull request #29. - Feature #1415. -
  • -
  • - Fix Markdown hang when document ends with "`", "*", "_", or similar. - Issue #23. -
  • -
  • - Treat '.' as an operator instead of part of a word for PHP. - Issue #22. - Bug #2225. -
  • -
  • - Check PHP numeric literals, showing invalid values with default style instead of numeric. - Issue #20. -
  • -
  • - For PHP, recognize start of comment after numeric literal. - Issue #20. - Bug #2143. -
  • -
  • - For PHP, recognize PHP code within JavaScript strings. - Pull request #27. -
  • -
-

- Release 5.1.1 -

-
    -
  • - Released 26 July 2021. -
  • -
  • - On 32-bit Win32 using Visual C++ projects, stop exported functions ending with @n causing failures with GetProcAddress. -
  • -
  • - Fixed crash when calling TagsOfStyle on C++ lexer after allocating substyles. -
  • -
  • - Fixed folding for Julia which could be inconsistent depending on range folded. - Added SCE_JULIA_KEYWORD4 and SCE_JULIA_TYPEOPERATOR lexical styles and - changed keyword set 4 from "Raw string literals" to "Built in functions". - Property lexer.julia.string.interpolation removed. - Updated set of characters for identifiers. - Pull request #13. -
  • -
  • - Fixed Markdown emphasis spans to only be recognized when closed in same paragraph. - Bug #1216. -
  • -
  • - Fixed Markdown code block to terminate when end marker is indented. - Display all of end marker in code block style. - Only recognize inline code when closed in same paragraph. - Bug #2247. -
  • -
  • - Fixed Matlab to not allow escape sequences in double-quoted strings. - Issue #18. -
  • -
  • - Support flexible heredoc and nowdoc syntax for PHP. - Issue #19. -
  • -
  • - Enabled '_' digit separator in numbers for PHP. - Issue #19. -
  • -
  • - Stop styling attributes as comments for PHP. - Issue #19. -
  • -
-

- Release 5.1.0 -

-
    -
  • - Released 23 June 2021. -
  • -
  • - This is a stable release. The Lexilla protocol should remain compatible through 5.x releases. -
  • -
  • - Fixed bugs with styling Erlang by handling \n and \r\n line endings consistently. -
  • -
  • - Fixed folding for F# open statements and for strings that contain comment prefixes. -
  • -
  • - Format specifiers lexed in F# strings. -
  • -
  • - Fixed folding for ASP files where scripts were treated inconsistently when '<%' was included - or not included in range examined. -
  • -
  • - Fixed folding of Raku heredocs that start with "q:to" or "qq:to". -
  • -
  • - Fixed folding at end of Ruby files where these is no final new line. -
  • -
  • - Made folding of Tcl files more consistent by always treating completely empty lines as whitespace. -
  • -
  • - Fixed styling of "a:b" with no spaces in YAML as a single piece of text instead of a key-value pair. - Pull request #15. -
  • -
-

- Release 5.0.3 -

-
    -
  • - Released 2 June 2021. -
  • -
  • - Add namespace feature with GetNameSpace function. -
  • -
  • - Add Julia lexer. - Feature #1380. -
  • -
  • - Fix transition to comment for --> inside JavaScript string. - Bug #2207. -
  • -
  • - Fix variable expansion in Batch. - Issue #4. -
  • -
  • - Fix empty link titles in Markdown. - Bug #2235. - Also fix detection of whether the previous line had content which treated '\n' and '\r\n' line endings differently. -
  • -
  • - Remove nested comment and long string support as these were removed from Lua. - Bug #2205. -
  • -
  • - Update to Unicode 13. - Feature #1379. -
  • -
  • - AddStaticLexerModule function adds a static lexer to Lexilla's list. -
  • -
  • - On Win32 enable hardware-enforced stack protection. - Feature #1405. -
  • -
  • - On 32-bit Win32 using g++, stop exported functions ending with @n causing failures with GetProcAddress. - Issue #10. -
  • -
-

- Release 5.0.2 -

-
    -
  • - Released 23 April 2021. -
  • -
  • - Fix assertion in cpp lexer handling of preprocessor. - Empty preprocessor statement '#' caused preprocessor history to be stored on incorrect line number. - Dangling #else or #elif without corresponding #if led to inconsistent state. - Change treatment of empty preprocessor statement to set subsequent line end characters in - preprocessor style as this is more consistent with other preprocessor directives and avoids - differences between \n and \r\n line ends. - Bug #2245. -
  • -
-

- Release 5.0.1 -

-
    -
  • - Released 9 April 2021. -
  • -
  • - Add LexerNameFromID function to Lexilla protocol as optional and temporary to - help applications migrate to Lexilla. - It is marked deprecated and will be removed in a future release. -
  • -
  • - The cpp lexer supports XML styled comment doc keywords. - Pull request #2. -
  • -
  • - The errorlist lexer detects NMAKE fatal errors and Microsoft linker errors as SCE_ERR_MS. -
  • -
-

- Release 5.0.0 -

-
    -
  • - Released 5 March 2021. -
  • -
  • - First version that separates Lexilla from Scintilla. - Each of the 3 projects now has a separate history page but history before 5.0.0 remains combined. -
  • -
  • - Lexer added for F#. -
  • -
-

- Lexilla became a separate project at this point. -

-

- Release 4.4.6 -

-
    -
  • - Released 1 December 2020. -
  • -
  • - Fix building with Xcode 12. - Bug #2187. -
  • -
-

- Release 4.4.5 -

-
    -
  • - Released 11 September 2020. -
  • -
  • - 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.". -
  • -
  • - Allow cross-building for GTK by choosing pkg-config. - Bug #2189. -
  • -
  • - On GTK, allow setting CPPFLAGS (and LDFLAGS for SciTE) to support hardening. - Bug #2191. -
  • -
  • - Changed SciTE's indent.auto mode to set tab size to indent size when file uses tabs for indentation. - Bug #2198. -
  • -
  • - Fix position of marker symbols for SC_MARGIN_RTEXT which were being moved based on - width of text. -
  • -
  • - Fixed bug on Win32 where cursor was flickering between hand and text over an - indicator with hover style. - Bug #2170. -
  • -
  • - Fixed bug where hovered indicator was not returning to non-hover - appearance when mouse moved out of window or into margin. - Bug #2193. -
  • -
  • - Fixed bug where a hovered INDIC_TEXTFORE indicator was not applying the hover - colour to the whole range. - Bug #2199. -
  • -
  • - Fixed bug where gradient indicators were not showing hovered appearance. -
  • -
  • - Fixed bug where layout caching was ineffective. - Bug #2197. -
  • -
  • - For SciTE, don't show the output pane for quiet jobs. - Feature #1365. -
  • -
  • - Support command.quiet for SciTE on GTK. - Feature #1365. -
  • -
  • - 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. - Bug #2176. -
  • -
  • - Added method for iterating through multiple vertical edges: SCI_GETMULTIEDGECOLUMN. - Feature #1350. -
  • -
-

- Release 4.4.4 -

-
    -
  • - Released 21 July 2020. -
  • -
  • - End of line annotations implemented. - Bug #2141. -
  • -
  • - Add SCI_BRACEMATCHNEXT API. - Feature #1368. -
  • -
  • - The latex lexer supports lstlisting environment that is similar to verbatim. - Feature #1358. -
  • -
  • - For SciTE on Linux, place liblexilla.so and libscintilla.so in /usr/lib/scite. - Bug #2184. -
  • -
  • - Round SCI_TEXTWIDTH instead of truncating as this may be more accurate when sizing application - elements to match text. - Feature #1355. -
  • -
  • - Display DEL control character as visible "DEL" block like other control characters. - Feature #1369. -
  • -
  • - Allow caret width to be up to 20 pixels. - Feature #1361. -
  • -
  • - SciTE on Windows adds create.hidden.console option to stop console window flashing - when Lua script calls os.execute or io.popen. -
  • -
  • - 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. -
  • -
  • - Fix printing on Windows to use correct text size. - Bug #2185. -
  • -
  • - Fix bug on Win32 where calling WM_GETTEXT for more text than in document could return - less text than in document. -
  • -
  • - Fixed a bug in SciTE with Lua stack balance causing failure to find - functions after reloading script. - Bug #2176. -
  • -
-

- Release 4.4.3 -

-
    -
  • - Released 3 June 2020. -
  • -
  • - Fix syntax highlighting for SciTE on Windows by setting executable directory for loading Lexilla. - Bug #2181. -
  • -
-

- Release 4.4.2 -

-
    -
  • - Released 2 June 2020. -
  • -
  • - On Cocoa using Xcode changed Lexilla.dylib install path to @rpath as would otherwise try /usr/lib which - won't work for sandboxed applications. -
  • -
  • - On Cocoa using Xcode made work on old versions of macOS by specifying deployment target as 10.8 - instead of 10.15. -
  • -
  • - On Win32 fix static linking of Lexilla by specifying calling convention in Lexilla.h. -
  • -
  • - SciTE now uses default shared library extension even when directory contains '.'. -
  • -
-

- Release 4.4.0 -

-
    -
  • - Released 1 June 2020. -
  • -
  • - Added Xcode project files for Lexilla and Scintilla with no lexers (cocoa/Scintilla). -
  • -
  • - For GTK, build a shared library with no lexers libscintilla.so or libscintilla.dll. -
  • -
  • - 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. -
  • -
  • - Constants in Scintilla.h can be disabled with SCI_DISABLE_AUTOGENERATED. -
  • -
  • - 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. - Bug #2171, - Bug #2063. -
  • -
  • - Optimized performance when opening huge files. - Feature #1347. -
  • -
  • - Add Appearance and Contrast properties to SciTE that allow customising visuals for dark mode and - high contrast modes. -
  • -
  • - Fixed bug in Batch lexer where a single character line with a single character line end continued - state onto the next line. -
  • -
  • - Added SCE_ERR_GCC_EXCERPT style for GCC 9 diagnostics in errorlist lexer. -
  • -
  • - Fixed buffer over-read bug with absolute references in MMIXAL lexer. - Bug #2019. -
  • -
  • - Fixed bug with GTK on recent Linux distributions where underscores were invisible. - Bug #2173. -
  • -
  • - Fixed GTK on Linux bug when pasting from closed application. - Bug #2175. -
  • -
  • - Fixed bug in SciTE with Lua stack balance. - Bug #2176. -
  • -
  • - For macOS, SciTE reverts to running python (2) due to python3 not being available in the sandbox. -
  • -
-

- Release 4.3.3 -

-
    -
  • - Released 27 April 2020. -
  • -
  • - Added Visual Studio project files for Lexilla and Scintilla with no lexers. -
  • -
  • - Add methods for iterating through the marker handles and marker numbers on a line: - SCI_MARKERHANDLEFROMLINE and SCI_MARKERNUMBERFROMLINE. - Feature #1344. -
  • -
  • - Assembler lexers asm and as can change comment character with lexer.as.comment.character property. - Feature #1314. -
  • -
  • - Fix brace styling in Batch lexer so that brace matching works. - Bug #1624, - Bug #1906, - Bug #1997, - Bug #2065. -
  • -
  • - 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. - Bug #2164. -
  • -
  • - When a lexer has been set with SCI_SETILEXER, fix SCI_GETLEXER and avoid - sending SCN_STYLENEEDED notifications. -
  • -
  • - On Win32 fix handling Japanese IME input when both GCS_COMPSTR and - GCS_RESULTSTR set. -
  • -
  • - With Qt on Win32 add support for line copy format on clipboard, compatible with Visual Studio. - Bug #2167. -
  • -
  • - On Qt with default encoding (ISO 8859-1) fix bug where 'µ' (Micro Sign) case-insensitively matches '?' - Bug #2168. -
  • -
  • - On GTK with Wayland fix display of windowed IME. - Bug #2149. -
  • -
  • - 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. -
  • -
-

- Release 4.3.2 -

-
    -
  • - Released 6 March 2020. -
  • -
  • - On Win32 fix new bug that treated all dropped text as rectangular. -
  • -
-

- Release 4.3.1 -

-
    -
  • - Released 4 March 2020. -
  • -
  • - Add default argument for StyleContext::GetRelative. - Feature #1336. -
  • -
  • - Fix drag and drop between different encodings on Win32 by always providing CF_UNICODETEXT only. - Bug #2151. -
  • -
  • - Automatically scroll while dragging text. - Feature #497. -
  • -
  • - 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. - Bug #2152. -
  • -
  • - Crash fixed with Direct2D on Win32 when updating driver. - Bug #2138. -
  • -
  • - For SciTE on Win32, fix crashes when Lua script closes application. - Bug #2155. -
  • -
-

- Release 4.3.0 -

-
    -
  • - Released 16 January 2020. -
  • -
  • - Lexers made available as Lexilla library. - TestLexers program with tests for Lexilla and lexers added in lexilla/test. -
  • -
  • - SCI_SETILEXER implemented to use lexers from Lexilla or other sources. -
  • -
  • - ILexer5 interface defined provisionally to support use of Lexilla. - The details of this interface may change before being stabilised in Scintilla 5.0. -
  • -
  • - SCI_LOADLEXERLIBRARY implemented on Cocoa. -
  • -
  • - Build Scintilla with SCI_EMPTYCATALOGUE to avoid making lexers available. -
  • -
  • - Lexer and folder added for Raku language. - Feature #1328. -
  • -
  • - Don't clear clipboard before copying text with Qt. - Bug #2147. -
  • -
  • - On Win32, remove support for CF_TEXT clipboard format as Windows will convert to - CF_UNICODETEXT. -
  • -
  • - Improve IME behaviour on GTK. - Set candidate position for windowed IME. - Improve location of candidate window. - Prevent movement of candidate window while typing. - Bug #2135. -
  • -
-

- Release 4.2.3 -

-
    -
  • - Released 11 December 2019. -
  • -
  • - Fix failure in SciTE's Complete Symbol command. -
  • -
-

- Release 4.2.2 -

-
    -
  • - Released 7 December 2019. -
  • -
  • - Move rather than grow selection when insertion at start. - Bug #2140. -
  • -
  • - Allow target to have virtual space. - Add methods for finding the virtual space at start and end of multiple selections. - Feature #1316. -
  • -
  • - SciTE on Win32 adds mouse button "Forward" and "Backward" key definitions for use in - properties like user.shortcuts. - Feature #1317. -
  • -
  • - Lexer and folder added for Hollywood language. - Feature #1324. -
  • -
  • - HTML lexer treats custom tags from HTML5 as known tags. These contain "-" like "custom-tag". - Feature #1299. -
  • -
  • - HTML lexer fixes bug with some non-alphabetic characters in unknown tags. - Feature #1320. -
  • -
  • - Fix bug in properties file lexer where long lines were only styled for the first 1024 characters. - Bug #1933. -
  • -
  • - Ruby lexer recognizes squiggly heredocs. - Feature #1326. -
  • -
  • - Avoid unnecessary IME caret movement on Win32. - Feature #1304. -
  • -
  • - Clear IME state when switching language on Win32. - Bug #2137. -
  • -
  • - Fixed drawing of translucent rounded rectangles on Win32 with Direct2D. - Bug #2144. -
  • -
  • - Setting rectangular selection made faster. - Bug #2130. -
  • -
  • - SciTE reassigns *.s extension to the GNU Assembler language from the S+ statistical language. -
  • -
-

- Release 4.2.1 -

-
    -
  • - Released 24 October 2019. -
  • -
  • - 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. - Bug #2118. -
  • -
  • - SciTE enables use of SCI_ commands in user.context.menu. -
  • -
  • - XML folder adds fold.xml.at.tag.open option to fold tags at the start of the tag "<" instead of the end ">". - Bug #2128. -
  • -
  • - Metapost lexer fixes crash with 'interface=none' comment. - Bug #2129. -
  • -
  • - Perl lexer supports indented here-docs. - Bug #2121. -
  • -
  • - Perl folder folds qw arrays. - Feature #1306. -
  • -
  • - TCL folder can turn off whitespace flag by setting fold.compact property to 0. - Bug #2131. -
  • -
  • - Optimize setting up keyword lists in lexers. - Feature #1305. -
  • -
  • - Updated case conversion and character categories to Unicode 12.1. - Feature #1315. -
  • -
  • - On Win32, stop the IME candidate window moving unnecessarily and position it better.
    - Stop candidate window overlapping composition text and taskbar.
    - Position candidate window closer to composition text.
    - Stop candidate window moving while typing.
    - Align candidate window to target part of composition text.
    - Stop Google IME on Windows 7 moving while typing.
    - Bug #2120. - Feature #1300. -
  • -
-

- Release 4.2.0 -

-
    -
  • - Released 5 July 2019. -
  • -
  • - Scintilla.iface adds line and pointer types, increases use of the position type, uses enumeration - types in methods and properties, and adds enumeration aliases to produce better CamelCase - identifiers. - Feature #1297. -
  • -
  • - Source of input (direct / IME composition / IME result) reported in SCN_CHARADDED so applications - can treat temporary IME composition input differently. - Bug #2038. -
  • -
  • - Lexer added for DataFlex. - Feature #1295. -
  • -
  • - Matlab lexer now treats keywords as case-sensitive. - Bug #2112. -
  • -
  • - SQL lexer fixes single quoted strings where '" (quote, double quote) was seen as continuing the string. - Bug #2098. -
  • -
  • - Platform layers should use InsertCharacter method to perform keyboard and IME input, replacing - AddCharUTF method. - Feature #1293. -
  • -
  • - Add CARETSTYLE_BLOCK_AFTER option to always display block caret after selection. - Bug #1924. -
  • -
  • - On Win32, limit text returned from WM_GETTEXT to the length specified in wParam. - This could cause failures when using assistive technologies like NVDA. - Bug #2110, - Bug #2114. -
  • -
  • - Fix deletion of isolated invalid bytes. - Bug #2116. -
  • -
  • - Fix position of line caret when overstrike caret set to block. - Bug #2106. -
  • -
-

- Release 4.1.7 -

-
    -
  • - Released 13 June 2019. -
  • -
  • - Fixes an incorrect default setting in SciTE which caused multiple visual features to fail to display. -
  • -
-

- Release 4.1.6 -

-
    -
  • - Released 10 June 2019. -
  • -
  • - For Visual C++ 2019, /std:c++latest now includes some C++20 features so switch to /std:c++17. -
  • -
  • - SciTE supports editing files larger than 2 gigabytes when built as a 64-bit application. -
  • -
  • - Lexer added for X12. - Feature #1280. -
  • -
  • - CMake folder folds function - endfunction. - Feature #1289. -
  • -
  • - VB lexer adds support for VB2017 binary literal &B and digit separators 123_456. - Feature #1288. -
  • -
  • - Improved performance of line folding code on large files when no folds are contracted. - This improves the time taken to open or close large files. -
  • -
  • - Fix bug where changing identifier sets in lexers preserved previous identifiers. -
  • -
  • - Fixed bug where changing to Unicode would rediscover line end positions even if still - sticking to ASCII (not Unicode NEL, LS, PS) line ends. - Only noticeable on huge files with over 100,000 lines. -
  • -
  • - Changed behaviour of SCI_STYLESETCASE(*,SC_CASE_CAMEL) so that it only treats 'a-zA-Z' - as word characters because this covers the feature's intended use (viewing case-insensitive ASCII-only - keywords in a specified casing style) and simplifies the behaviour and code. - Feature #1238. -
  • -
  • - In SciTE added Camel case option "case:c" for styles to show keywords with initial capital. -
  • -
-

- Release 4.1.5 -

-
    -
  • - Released 17 April 2019. -
  • -
  • - On Win32, removed special handling of non-0 wParam to WM_PAINT. -
  • -
  • - Implement high-priority idle on Win32 to make redraw smoother and more efficient. -
  • -
  • - Add vertical bookmark symbol SC_MARK_VERTICALBOOKMARK. - Feature #1276. -
  • -
  • - Set default fold display text SCI_SETDEFAULTFOLDDISPLAYTEXT(text). - Feature #1272. -
  • -
  • - Add SCI_SETCHARACTERCATEGORYOPTIMIZATION API to optimize speed - of character category features like determining whether a character is a space or number - at the expense of memory. - Feature #1259. -
  • -
  • - Improve the styling of numbers in Nim. - Feature #1268. -
  • -
  • - Fix exception when inserting DBCS text. - Bug #2093. -
  • -
  • - Improve performance of accessibility on GTK. - Bug #2094. -
  • -
  • - Fix text reported for deletion with accessibility on GTK. - Bug #2095. -
  • -
  • - Fix flicker when inserting primary selection on GTK. - Bug #2087. -
  • -
  • - Support coloured text in Windows 8.1+. - Feature #1277. -
  • -
  • - Avoid potential long hangs with idle styling for huge documents on Cocoa and GTK. -
  • -
-

- Release 4.1.4 -

-
    -
  • - Released 7 March 2019. -
  • -
  • - Calltips implemented on Qt. - Bug #1548. -
  • -
  • - Block caret in overtype mode SCI_SETCARETSTYLE(caretStyle | CARETSTYLE_OVERSTRIKE_BLOCK). - Feature #1217. -
  • -
  • - SciTE supports changing caret style via caret.style property. - Feature #1624. -
  • -
  • - Lexer added for .NET's Common Intermediate Language CIL. - Feature #1265. -
  • -
  • - The C++ lexer, with styling.within.preprocessor on, now interprets "(" in preprocessor "#if(" - as an operator instead of part of the directive. This improves folding as well which could become - unbalanced. -
  • -
  • - Fix raw strings in Nim. - Feature #1253. -
  • -
  • - Fix inconsistency with dot styling in Nim. - Feature #1260. -
  • -
  • - Enhance the styling of backticks in Nim. - Feature #1261. -
  • -
  • - Enhance raw string identifier styling in Nim. - Feature #1262. -
  • -
  • - Fix fold behaviour with comments in Nim. - Feature #1254. -
  • -
  • - Fix TCL lexer recognizing '"' after "," inside a bracketed substitution. - Bug #1947. -
  • -
  • - Fix garbage text from SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN - for rectangular or thin selection by performing no action. - Bug #2078. -
  • -
  • - Ensure container notified if Insert pressed when caret off-screen. - Bug #2083. -
  • -
  • - Fix memory leak when checking running instance on GTK. - Feature #1267. -
  • -
  • - Platform layer font cache removed on Win32 as there is a platform-independent cache. -
  • -
  • - SciTE for GTK easier to build on macOS. - Bug #2084. -
  • -
-

- Release 4.1.3 -

-
    -
  • - Released 10 January 2019. -
  • -
  • - Add SCI_SETCOMMANDEVENTS API to allow turning off command events as they - can be a significant performance cost. -
  • -
  • - Improve efficiency of idle wrapping by wrapping in blocks as large as possible while - still remaining responsive. -
  • -
  • - Updated case conversion and character categories to Unicode 11. -
  • -
  • - Errorlist lexer recognizes negative line numbers as some programs show whole-file - errors occurring on line -1. - SciTE's parsing of diagnostics also updated to handle this case. -
  • -
  • - Added "nim" lexer (SCLEX_NIM) for the Nim language which was previously called Nimrod. - For compatibility, the old "nimrod" lexer is still present but is deprecated and will be removed at the - next major version. - Feature #1242. -
  • -
  • - The Bash lexer implements substyles for multiple sets of keywords and supports SCI_PROPERTYNAMES. - Bug #2054. -
  • -
  • - The C++ lexer interprets continued preprocessor lines correctly by reading all of - the logical line. - Bug #2062. -
  • -
  • - The C++ lexer interprets preprocessor arithmetic expressions containing multiplicative and additive - operators correctly by following operator precedence rules. - Bug #2069. -
  • -
  • - The EDIFACT lexer handles message groups as well as messages. - Feature #1247. -
  • -
  • - For SciTE's Find in Files, allow case-sensitivity and whole-word options when running - a user defined command. - Bug #2053. -
  • -
  • - Notify with SC_UPDATE_SELECTION when user performs a multiple selection add. -
  • -
  • - On macOS 10.14 Cocoa, fix incorrect horizontal offset. - Bug #2022. -
  • -
  • - On Cocoa, fix a crash that occurred when entering a dead key diacritic then a character - that can not take that diacritic, such as option+e (acute accent) followed by g. - Bug #2061. -
  • -
  • - On Cocoa, use dark info bar background when system is set to Dark Appearance. - Bug #2055. -
  • -
  • - Fixed a crash on Cocoa in bidirectional mode where some patterns of invalid UTF-8 - caused failures to create Unicode strings. -
  • -
  • - SCI_MARKERADD returns -1 for invalid lines as documented instead of 0. - Bug #2051. -
  • -
  • - Improve performance of text insertion when Unicode line indexing off. -
  • -
  • - For Qt on Windows, stop specifying -std:c++latest as that is no longer needed - to enable C++17 with MSVC 2017 and Qt 5.12 and it caused duplicate flag warnings. -
  • -
  • - On Linux, enable Lua to access dynamic libraries. - Bug #2058. -
  • -
-

- Release 4.1.2 -

-
    -
  • - Released 2 October 2018. -
  • -
  • - C++ lexer fixes evaluation of "#elif". - Bug #2045. -
  • -
  • - Markdown lexer fixes highlighting of non-ASCII characters in links. -
  • -
  • - SciTE on Win32 drops menukey feature, makes Del key work again in find and replace strips - and disables F5 while command running. - Bug #2044. -
  • -
-

- Release 4.1.1 -

-
    -
  • - Released 9 September 2018. -
  • -
  • - Optional indexing of line starts in UTF-8 documents by UTF-32 code points and UTF-16 code units added. - This can improve performance for clients that provide UTF-32 or UTF-16 interfaces or that need to interoperate - with UTF-32 or UTF-16 components. -
  • -
  • - Lexers added for SAS and Stata. - Feature #1185. -
  • -
  • - Shell folder folds "if", "do", and "case". - Feature #1144. -
  • -
  • - SciTE's menukey feature implemented on Windows. -
  • -
  • - For SciTE on Windows, user defined strip lists are now scrollable. - Cursor no longer flickers in edit and combo boxes. - Focus in and out events occur for combo boxes. -
  • -
  • - Fix a leak in the bidirectional code on Win32. -
  • -
  • - Fix crash on Win32 when switching technology to default after setting bidirectional mode. -
  • -
  • - Fix margin cursor on Cocoa to point more accurately. -
  • -
  • - Fix SciTE crash on GTK+ when using director interface. -
  • -
-

- Release 4.1.0 -

-
    -
  • - Released 19 June 2018. -
  • -
  • - Experimental and incomplete support added for bidirectional text on Windows using DirectWrite and Cocoa for - UTF-8 documents by calling SCI_SETBIDIRECTIONAL(SC_BIDIRECTIONAL_L2R). - This allows documents that contain Arabic or Hebrew to be edited more easily in a way that is similar - to other editors. -
  • -
  • - INDIC_GRADIENT and INDIC_GRADIENTCENTRE indicator types added. - INDIC_GRADIENT starts with a specified colour and alpha at top of line and fades - to fully transparent at bottom. - INDIC_GRADIENTCENTRE starts with a specified colour and alpha at centre of line and fades - to fully transparent at top and bottom. -
  • -
  • - Wrap indent mode SC_WRAPINDENT_DEEPINDENT added which indents two tabs from previous line. -
  • -
  • - Indicators are drawn for line end characters when displayed. -
  • -
  • - Most invalid bytes in DBCS encodings are displayed as blobs to make problems clear - and ensure something is shown. -
  • -
  • - On Cocoa, invalid text in DBCS encodings will be interpreted through the - single-byte MacRoman encoding as that will accept any byte. -
  • -
  • - Diff lexer adds styles for diffs containing patches. -
  • -
  • - Crashes fixed on macOS for invalid DBCS characters when dragging text, - changing case of text, case-insensitive searching, and retrieving text as UTF-8. -
  • -
  • - Regular expression crash fixed on macOS when linking to libstdc++. -
  • -
  • - SciTE on GTK+, when running in single-instance mode, now forwards all command line arguments - to the already running instance. - This allows "SciTE filename -goto:line" to work. -
  • -
-

- Release 4.0.5 -

-
    -
  • - Released 10 May 2018. -
  • -
  • - Add experimental SC_DOCUMENTOPTION_TEXT_LARGE option to accommodate documents larger than - 2 GigaBytes. -
  • -
  • - Additional print option SC_PRINT_SCREENCOLOURS prints with the same colours used on screen - including line numbers. -
  • -
  • - SciTE can read settings in EditorConfig format when enabled with editor.config.enable property. -
  • -
  • - EDIFACT lexer adds property lexer.edifact.highlight.un.all to highlight all UN* segments. - Feature #1166. -
  • -
  • - Fortran folder understands "change team" and "endteam". - Feature #1216. -
  • -
  • - Set the last X chosen when SCI_REPLACESEL called to ensure macros work - when text insertion followed by caret up or down. -
  • -
  • - Bugs fixed in regular expression searches in Scintilla where some matches did not occur in an - effort to avoid infinite loops when replacing on empty matches like "^" and "$". - Applications should always handle empty matches in a way that avoids infinite loops, commonly - by incrementing the search position after replacing an empty match. - SciTE fixes a bug where replacing "^" always matched on the first line even when it was an - "in selection" replace and the selection started after the line start. -
  • -
  • - Bug fixed in SciTE where invalid numeric properties could crash. -
  • -
  • - Runtime warnings fixed with SciTE on GTK after using Find in Files. -
  • -
  • - SciTE on Windows find and replace strips place caret at end of text after search. -
  • -
  • - Bug fixed with SciTE on macOS where corner debris appeared in the margin when scrolling. - Fixed by not completely hiding the status bar so the curved corner is no longer part of the - scrolling region. - By default, 4 pixels of the status bar remain visible and this can be changed with - the statusbar.minimum.height property or turned off if the debris are not a problem by - setting the property to 0. -
  • -
-

- Release 4.0.4 -

-
    -
  • - Released 10 April 2018. -
  • -
  • - On Win32, the standard makefiles build a libscintilla static library as well as the existing dynamic libraries. - The statically linked version of SciTE, Sc1, links to this static library. A new file, ScintillaDLL.cxx, provides - the DllMain function required for a stand-alone Scintilla DLL. Build and project files should include this - file when producing a DLL and omit it when producing a static library or linking Scintilla statically. - The STATIC_BUILD preprocessor symbol is no longer used. -
  • -
  • - On Win32, Direct2D support is no longer automatically detected during build. - DISABLE_D2D may still be defined to remove Direct2D features. -
  • -
  • - In some cases, invalid UTF-8 is handled in a way that is a little friendlier. - For example, when copying to the clipboard on Windows, an invalid lead byte will be copied as the - equivalent ISO 8859-1 character and will not hide the following byte. - Feature #1211. -
  • -
  • - Lexer added for the Maxima computer algebra language. - Feature #1210. -
  • -
  • - Fix hang in Lua lexer when lexing a label upto the terminating "::". - Bug #1999. -
  • -
  • - Lua lexer matches identifier chains with dots and colons. - Bug #1952. -
  • -
  • - For rectangular selections, pressing Home or End now moves the caret to the Home or End - position instead of the limit of the rectangular selection. -
  • -
  • - Fix move-extends-selection mode for rectangular and line selections. -
  • -
  • - On GTK+, change lifetime of selection widget to avoid runtime warnings. -
  • -
  • - Fix building on Mingw/MSYS to perform file copies and deletions. - Bug #1993. -
  • -
  • - SciTE can match a wider variety of file patterns where '*' is in the middle of - the pattern and where there are multiple '*'. - A '?' matches any single character. -
  • -
  • - SciTE on Windows can execute Python scripts directly by name when on path. - Feature #1209. -
  • -
  • - SciTE on Windows Find in Files checks for cancel after every 10,000 lines read so - can be stopped on huge files. -
  • -
  • - SciTE remembers entered values in lists in more cases for find, replace and find in files. - Bug #1715. -
  • -
-

- Release 4.0.3 -

-
    -
  • - Released 12 February 2018. -
  • -
  • - Features from C++14 and C++17 are used more often, with build files now specifying - c++17, gnu++17, c++1z, or std:c++latest (MSVC). - Requires Microsoft Visual C++ 2017.5, GCC 7, Xcode 9.2 or Clang 4.0 or newer. -
  • -
  • - SCI_CREATEDOCUMENT adds a bytes argument to allocate memory for an initial size. - SCI_CREATELOADER and SCI_CREATEDOCUMENT add a documentOption argument to - allow choosing different document capabilities. -
  • -
  • - Add SC_DOCUMENTOPTION_STYLES_NONE option to stop allocating memory for styles. -
  • -
  • - Add SCI_GETMOVEEXTENDSSELECTION to allow applications to add more - complex selection commands. -
  • -
  • - SciTE property bookmark.symbol allows choosing symbol used for bookmarks. - Feature #1208. -
  • -
  • - Improve VHDL lexer's handling of character literals and escape characters in strings. -
  • -
  • - Fix double tap word selection on Windows 10 1709 Fall Creators Update. - Bug #1983. -
  • -
  • - Fix closing autocompletion lists on Cocoa for macOS 10.13 where the window - was emptying but staying visible. - Bug #1981. -
  • -
  • - Fix drawing failure on Cocoa with animated find indicator in large files with macOS 10.12 - by disabling animation. -
  • -
  • - SciTE on GTK+ installs its desktop file as non-executable and supports the common - LDLIBS make variable. - Bug #1989, - Bug #1990. -
  • -
  • - SciTE shows correct column number when caret in virtual space. - Bug #1991. -
  • -
  • - SciTE preserves selection positions when saving with strip.trailing.spaces - and virtual space turned on. - Bug #1992. -
  • -
-

- Release 4.0.2 -

-
    -
  • - Released 26 October 2017. -
  • -
  • - Fix HTML lexer handling of Django so that nesting a {{ }} or {% %} - Django tag inside of a {# #} Django comment does not break highlighting of rest of file -
  • -
  • - The Matlab folder now treats "while" as a fold start. - Bug #1985. -
  • -
  • - Fix failure on Cocoa with animated find indicator in large files with macOS 10.13 - by disabling animation on 10.13. -
  • -
  • - Fix Cocoa hang when Scintilla loaded from SMB share on macOS 10.13. - Bug #1979. -
  • -
-

- Release 4.0.1 -

-
    -
  • - Released 23 October 2017. -
  • -
  • - The ILoader interface is defined in its own header ILoader.h as it is not - related to lexing so doesn't belong in ILexer.h. -
  • -
  • - The Scintilla namespace is always active for internal symbols and for the lexer interfaces - ILexer4 and IDocument. -
  • -
  • - The Baan lexer checks that matches to 3rd set of keywords are function calls and leaves as identifiers if not. - Baan lexer and folder support #context_on / #context_off preprocessor feature. -
  • -
  • - The C++ lexer improved preprocessor conformance.
    - Default value of 0 for undefined preprocessor symbols.
    - #define A is treated as #define A 1.
    - "defined A" removes "A" before replacing "defined" with value. - Bug #1966. -
  • -
  • - The Python folder treats triple-quoted f-strings like triple-quoted strings. - Bug #1977. -
  • -
  • - The SQL lexer uses sql.backslash.escapes for double quoted strings. - Bug #1968. -
  • -
  • - Minor undefined behaviour fixed. - Bug #1978. -
  • -
  • - On Cocoa, improve scrolling on macOS 10.12. - Bug #1885. -
  • -
  • - On Cocoa, fix line selection by clicking in the margin when scrolled. - Bug #1971. -
  • -
-

- Release 4.0.0 -

-
    -
  • - Released 16 August 2017. -
  • -
  • - This is an unstable release with changes to interfaces used for lexers and platform access. - Some more changes may occur to internal and external interfaces before stability is regained with 4.1.0. -
  • -
  • - Uses C++14 features. Requires Microsoft Visual C++ 2017, GCC 7, and Clang 4.0 or newer. -
  • -
  • - Support dropped for GTK+ versions before 2.24. -
  • -
  • - The lexer interfaces ILexer and ILexerWithSubStyles, along with additional style metadata methods, were merged into ILexer4. - Most lexers will need to be updated to match the new interfaces. -
  • -
  • - The IDocumentWithLineEnd interface was merged into IDocument. -
  • -
  • - The platform layer interface has changed with unused methods removed, a new mechanism for - reporting events, removal of methods that take individual keyboard modifiers, and removal of old timer methods. -
  • -
  • - Style metadata may be retrieved from lexers that support this through the SCI_GETNAMEDSTYLES, SCI_NAMEOFSTYLE, - SCI_TAGSOFSTYLE, and SCI_DESCRIPTIONOFSTYLE APIs. -
  • -
  • - The Cocoa platform layer uses Automatic Reference Counting (ARC). -
  • -
  • - The default encoding in Scintilla is UTF-8. -
  • -
  • - An SCN_AUTOCSELECTIONCHANGE notification is sent when items are highlighted in an autocompletion or user list. -
  • -
  • - The data parameter to ILoader::AddData made const. - Bug #1955. -
  • -
  • - SciTE's embedded Lua interpreter updated to Lua 5.3. -
  • -
  • - SciTE allows event handlers to be arbitrary callables, not just functions. - Feature #1190. -
  • -
  • - SciTE allows user.shortcuts to be defined with symbolic Scintilla messages like - 'Ctrl+L|SCI_LINEDELETE|'. -
  • -
  • - The Matlab lexer treats 'end' as a number rather than a keyword when used as a index. - This also stops incorrect folding. - Bug #1951. -
  • -
  • - The Matlab folder implements "fold", "fold.comment", and "fold.compact" properties. - Bug #1965. -
  • -
  • - The Rust lexer recognizes 'usize' numeric literal suffixes. - Bug #1919. -
  • -
  • - Ensure redraw when application changes overtype mode so caret change visible even when not blinking. - Notify application with SC_UPDATE_SELECTION when overtype changed - previously - sent SC_UPDATE_CONTENT. -
  • -
  • - Fix drawing failure when in wrap mode for delete to start/end of line which - affects later lines but did not redraw them. - Also fixed drawing for wrap mode on GTK+ 2.x. - Bug #1949. -
  • -
  • - On GTK+ fix drawing problems including incorrect scrollbar redrawing and flickering of text. - Bug #1876. -
  • -
  • - On Linux, both for GTK+ and Qt, the default modifier key for rectangular selection is now Alt. - This is the same as Windows and macOS. - This was changed from Ctrl as window managers are less likely to intercept Alt+Drag for - moving windows than in the past. -
  • -
  • - On Cocoa, fix doCommandBySelector but avoid double effect of 'delete' - key. - Bug #1958. -
  • -
  • - On Qt, the updateUi signal includes the 'updated' flags. - No updateUi signal is sent for focus in events. - These changes make Qt behave more like the other platforms. -
  • -
  • - On Qt, dropping files on Scintilla now fires the SCN_URIDROPPED notification - instead of inserting text. -
  • -
  • - On Qt, focus changes send the focusChanged signal. - Bug #1957. -
  • -
  • - On Qt, mouse tracking is reenabled when the window is reshown. - Bug #1948. -
  • -
  • - On Windows, the DirectWrite modes SC_TECHNOLOGY_DIRECTWRITEDC and - SC_TECHNOLOGY_DIRECTWRITERETAIN are no longer provisional. -
  • -
  • - SciTE on macOS fixes a crash when platform-specific and platform-independent - session restoration clashed. - Bug #1960. -
  • -
  • - SciTE on GTK+ implements find.close.on.find. - Bug #1152, - Bug #1254, - Bug #1762, - Feature #849. -
  • -
-

- Release 3.7.6 -

-
    -
  • - Released 8 August 2017. -
  • -
  • - This is the first release of the - long term branch - which avoids using features from C++14 or later in order to support older systems. -
  • -
  • - The Baan lexer correctly highlights numbers when followed by an operator. -
  • -
  • - On Cocoa, fix a bug with retrieving encoded bytes. -
  • -
-

- Release 3.7.5 -

-
    -
  • - Released 26 May 2017. -
  • -
  • - This is the final release of SciTE 3.x. -
  • -
  • - Support dropped for Microsoft Visual C++ 2013 due to increased use of C++11 features. -
  • -
  • - Added a caret line frame as an alternative visual for highlighting the caret line. -
  • -
  • - Added "Reverse Selected Lines" feature. -
  • -
  • - SciTE adds "Select All Bookmarks" command. -
  • -
  • - SciTE adds a save.path.suggestion setting to suggest a file name when saving an - unnamed buffer. -
  • -
  • - Updated case conversion and character categories to Unicode 9. -
  • -
  • - The Baan lexer recognizes numeric literals in a more compliant manner including - hexadecimal numbers and exponentials. -
  • -
  • - The Bash lexer recognizes strings in lists in more cases. - Bug #1944. -
  • -
  • - The Fortran lexer recognizes a preprocessor line after a line continuation &. - Bug #1935. -
  • -
  • - The Fortran folder can fold comments. - Bug #1936. -
  • -
  • - The PowerShell lexer recognizes escaped quotes in strings. - Bug #1929. -
  • -
  • - The Python lexer recognizes identifiers more accurately when they include non-ASCII characters. -
  • -
  • - The Python folder treats comments at the end of the file as separate from the preceding structure. -
  • -
  • - The YAML lexer recognizes comments in more situations and styles a - "..." line like a "---" line. - Bug #1931. -
  • -
  • - Update scroll bar when annotations added, removed, or visibility changed. - Feature #1187. -
  • -
  • - Canceling modes with the Esc key preserves a rectangular selection. - Bug #1940. -
  • -
  • - Builds are made with a sorted list of lexers to be more reproducible. - Bug #1946. -
  • -
  • - On Cocoa, a leak of mouse tracking areas was fixed. -
  • -
  • - On Cocoa, the autocompletion is 4 pixels wider to avoid text truncation. -
  • -
  • - On Windows, stop drawing a focus rectangle on the autocompletion list and - raise the default list length to 9 items. -
  • -
  • - SciTE examines at most 1 MB of a file to automatically determine indentation - for indent.auto to avoid a lengthy pause when loading very large files. -
  • -
  • - SciTE user interface uses lighter colours and fewer 3D elements to match current desktop environments. -
  • -
  • - SciTE sets buffer dirty and shows message when file deleted if load.on.activate on. -
  • -
  • - SciTE on Windows Find strip Find button works in incremental no-close mode. - Bug #1926. -
  • -
-

- Release 3.7.4 -

-
    -
  • - Released 21 March 2017. -
  • -
  • - Requires a C++11 compiler. GCC 4.8 and MSVC 2015 are supported. -
  • -
  • - Support dropped for Windows NT 4. -
  • -
  • - Accessibility support may be queried with SCI_GETACCESSIBILITY. - On GTK+, accessibility may be disabled by calling SCI_SETACCESSIBILITY. -
  • -
  • - Lexer added for "indent" language which is styled as plain text but folded by indentation level. -
  • -
  • - The Progress ABL lexer handles nested comments where comment starts or ends - are adjacent like "/*/*" or "*/*/". -
  • -
  • - In the Python lexer, improve f-string support. - Add support for multiline expressions in triple quoted f-strings. - Handle nested "()", "[]", and "{}" in f-string expressions and terminate expression colouring at ":" or "!". - End f-string if ending quote is seen in a "{}" expression. - Fix terminating single quoted f-string at EOL. - Bug #1918. -
  • -
  • - The VHDL folder folds an "entity" on the first line of the file. -
  • -
  • - For IMEs, do not clear selected text when there is no composition text to show. -
  • -
  • - Fix to crash with fold tags where line inserted at start. -
  • -
  • - Fix to stream selection mode when moving caret up or down. - Bug #1905. -
  • -
  • - Drawing fixes for fold tags include fully drawing lines and not overlapping some - drawing and ensuring edges and mark underlines are visible. -
  • -
  • - Fix Cocoa failure to display accented character chooser for European - languages by partially reverting a change made to prevent a crash with - Chinese input by special-casing the Cangjie input source. - Bug #1881. -
  • -
  • - Fix potential problems with IME on Cocoa when document contains invalid - UTF-8. -
  • -
  • - Fix crash on Cocoa with OS X 10.9 due to accessibility API not available. - Bug #1915. -
  • -
  • - Improved speed of accessibility code on GTK+ by using additional memory - as a cache. - Bug #1910. -
  • -
  • - Fix crash in accessibility code on GTK+ < 3.3.6 caused by previous bug fix. - Bug #1907. -
  • -
  • - Fix to prevent double scrolling on GTK+ with X11. - Bug #1901. -
  • -
  • - SciTE on GTK+ adds an "accessibility" property to allow disabling accessibility - on GTK+ as an optimization. -
  • -
  • - SciTE on GTK+ has changed file chooser behaviour for some actions: - overwriting an existing file shows a warning; - the default session file name "SciTE.session" is shown and a "*.session" filter is applied; - appropriate filters are applied when exporting; - the current file name is displayed in "Save As" even when that file no longer exists. -
  • -
  • - SciTE fixed a bug where, on GTK+, when the output pane had focus, menu commands - performed by mouse were sent instead to the edit pane. -
  • -
  • - SciTE on Windows 8+ further restricts the paths searched for DLLs to the application - and system directories which may prevent some binary planting attacks. -
  • -
  • - Fix failure to load Direct2D on Windows when used on old versions of Windows. - Bug #1653. -
  • -
-

- Release 3.7.3 -

-
    -
  • - Released 19 February 2017. -
  • -
  • - Display block caret over the character at the end of a selection to be similar - to other editors. -
  • -
  • - In SciTE can choose colours for fold markers. - Feature #1172. -
  • -
  • - In SciTE can hide buffer numbers in tabs. - Feature #1173. -
  • -
  • - The Diff lexer recognizes deleted lines that start with "--- ". -
  • -
  • - The Lua lexer requires the first line to start with "#!" to be treated as a shebang comment, - not just "#". - Bug #1900. -
  • -
  • - The Matlab lexer requires block comment start and end to be alone on a line. - Bug #1902. -
  • -
  • - The Python lexer supports f-strings with new styles, allows Unicode identifiers, - and no longer allows @1 to be a decorator. - Bug #1848. -
  • -
  • - Fix folding inconsistency when fold header added above a folded part. - Avoid unnecessary unfolding when a deletion does not include a line end. - Bug #1896. -
  • -
  • - Fix finalization crash on Cocoa. - Bug #1909. -
  • -
  • - SciTE on GTK+ can have a wide divider between the panes with the - split.wide property. -
  • -
  • - Fix display of autocompletion lists and calltips on GTK+ 3.22 on Wayland. - Newer APIs used on GTK+ 3.22 as older APIs were deprecated. -
  • -
  • - Fix crash in accessibility code on GTK+ due to signal receipt after destruction. - Bug #1907. -
  • -
  • - Make trackpad scrolling work on Wayland. - Bug #1901. -
  • -
-

- Release 3.7.2 -

-
    -
  • - Released 30 December 2016. -
  • -
  • - Minimize redrawing for SCI_SETSELECTIONN* APIs. - Bug #1888. -
  • -
  • - Use more precision to allow selecting individual lines in files with - more than 16.7 million lines. -
  • -
  • - For Qt 5, define QT_WS_MAC or QT_WS_X11 on those platforms. - Bug #1887. -
  • -
  • - For Cocoa, fix crash on view destruction with macOS 10.12.2. - Bug #1891. -
  • -
  • - Fix crash on GTK+ <3.8 due to incorrect lifetime of accessibility object. - More accurate reporting of attribute ranges and deletion lengths for accessibility. -
  • -
  • - In SciTE, if a Lua script causes a Scintilla failure exception, display error - message in output pane instead of exiting. - Bug #1773. -
  • -
-

- Release 3.7.1 -

-
    -
  • - Released 4 December 2016. -
  • -
  • - The Scintilla namespace is no longer applied to struct definitions in Scintilla.h even - when SCI_NAMESPACE defined. - Client code should not define SCI_NAMESPACE. -
  • -
  • - Structure names in Scintilla.h without prefixes are deprecated and will now only - be usable with INCLUDE_DEPRECATED_FEATURES defined.
    - Use the newer names with the "Sci_" prefix:
    - CharacterRange → Sci_CharacterRange
    - TextRange → Sci_TextRange
    - TextToFind → Sci_TextToFind
    - RangeToFormat → Sci_RangeToFormat
    - NotifyHeader → Sci_NotifyHeader -
  • -
  • - Previously deprecated features SC_CP_DBCS, SCI_SETUSEPALETTE. and SCI_GETUSEPALETTE - have been removed and can no longer be used in client code. -
  • -
  • - Single phase drawing SC_PHASES_ONE is deprecated along with the - SCI_SETTWOPHASEDRAW and SCI_GETTWOPHASEDRAW messages. -
  • -
  • - Accessibility support allowing screen readers to work added on GTK+ and Cocoa. -
  • -
  • - Textual tags may be displayed to the right on folded lines with SCI_TOGGLEFOLDSHOWTEXT. - This is commonly something like "{ ... }" or "<tr>...</tr>". - It is displayed with the STYLE_FOLDDISPLAYTEXT style and may have a box drawn around it - with SCI_FOLDDISPLAYTEXTSETSTYLE. -
  • -
  • - A mouse right-click over the margin may send an SCN_MARGINRIGHTCLICK event. - This only occurs when popup menus are turned off. - SCI_USEPOPUP now has three states: SC_POPUP_NEVER, SC_POPUP_ALL, or SC_POPUP_TEXT. -
  • -
  • - INDIC_POINT and INDIC_POINTCHARACTER indicators added to display small arrows - underneath positions or characters. -
  • -
  • - Added alternate appearance for visible tabs which looks like a horizontal line. - Controlled with SCI_SETTABDRAWMODE. - Feature #1165. -
  • -
  • - On Cocoa, a modulemap file is included to allow Scintilla to be treated as a module. - This makes it easier to use Scintilla from the Swift language. -
  • -
  • - Baan folder accommodates sections and lexer fixes definition of SCE_BAAN_FUNCDEF. -
  • -
  • - EDIFACT lexer and folder added. - Feature #1166. -
  • -
  • - JSON folder fixed where it didn't resume folding with the correct fold level. -
  • -
  • - Matlab folder based on syntax instead of indentation so more accurate. - Bug #1692. -
  • -
  • - YAML lexer fixed style of references and keywords when followed by a comment. - Bug #1872. -
  • -
  • - Margin click to select line now clears rectangular and additional selections. -
  • -
  • - Fixed a NULL access bug on GTK+ where the scrollbars could be used during destruction. - Bug #1873. -
  • -
  • - A potential bug on GTK+ fixed where asynchronous clipboard could be delivered after its - target Scintilla instance was destroyed. -
  • -
  • - Cocoa IME made more compliant with documented behaviour to avoid bugs that caused - huge allocations. - Bug #1881. -
  • -
  • - On Win32 fix EM_SETSEL to match Microsoft documentation.. - Bug #1886. -
  • -
  • - SciTE on GTK+ allows localizing tool bar tool tips. - Feature #1167. -
  • -
  • - SciTE on Windows restores focus to edit pane after closing user strip. -
  • -
  • - SciTE measures files larger that 2 GB which allows it to refuse to open huge files more consistently - and to show better warning messages. -
  • -
-

- Release 3.7.0 -

-
    -
  • - Released 16 October 2016. -
  • -
  • - Word selection, navigation, and manipulation is now performed on characters instead of bytes - leading to more natural behaviour for multi-byte encodings like UTF-8. - For UTF-8 characters 0x80 and above, classification into word; punctuation; space; or line-end - is based on the Unicode general category of the character and is not customizable. - Bug #1832. -
  • -
  • - Two enums changed in Scintilla.iface which may lead to changed bindings. - There were 2 FontQuality enums and the first is now PhasesDraw. - The prefix for FoldAction was SC_FOLDACTION and is now SC_FOLDACTION_ - which is similar to other enums. - These changes do not affect the standard C/C++ binding. -
  • -
  • - EDGE_MULTILINE and SCI_MULTIEDGEADDLINE added to allow displaying multiple - vertical edges simultaneously. -
  • -
  • - The number of margins can be changed with SCI_SETMARGINS. -
  • -
  • - Margin type SC_MARGIN_COLOUR added so that the application may - choose any colour for a margin with SCI_SETMARGINBACKN. -
  • -
  • - On Win32, mouse wheel scrolling can be restricted to only occur when the mouse is - within the window. -
  • -
  • - The WordList class in lexlib used by lexers adds an InListAbridged method for - matching keywords that have particular prefixes and/or suffixes. -
  • -
  • - The Baan lexer was changed significantly with more lexical states, keyword sets, - and support for abridged keywords. -
  • -
  • - The CoffeeScript lexer styles interpolated code in strings. - Bug #1865. -
  • -
  • - The Progress lexer "progress" has been replaced with a new lexer "abl" - (Advanced Business Language) - with a different set of lexical states and more functionality. - The lexical state prefix has changed from SCE_4GL_ to SCE_ABL_. - Feature #1143. -
  • -
  • - The PowerShell lexer understands the grave accent escape character. - Bug #1868. -
  • -
  • - The YAML lexer recognizes inline comments. - Bug #1660. -
  • -
  • - SciTE on Windows can retain coloured selection when inactive with - selection.always.visible property. -
  • -
  • - SciTE on Windows adds a state to close.on.find to close the find strip when - a match is found. -
  • -
  • - Fix caret position after left or right movement with rectangular selection. - Bug #1861. -
  • -
  • - In SciTE, optional prefix argument added to scite.ConstantName method. - Bug #1860. -
  • -
  • - On Cocoa, include ILexer.h in the public headers of the framework. - Bug #1855. -
  • -
  • - On Cocoa, allow subclass of SCIContentView to set cursor. - Bug #1863. -
  • -
  • - On Cocoa, recognize the numeric keypad '+', '-', and '/' keys as - SCK_ADD, SCK_SUBTRACT, and SCK_DIVIDE. - Bug #1867. -
  • -
  • - On GTK+ 3.21+ fix incorrect font size in auto-completion list. - Bug #1859. -
  • -
  • - Fix SciTE crash when command.mode ends with comma. - Bug #1857. -
  • -
  • - SciTE on Windows has a full size toolbar icon for "Close". -
  • -
-

- Release 3.6.7 -

-
    -
  • - Released 4 September 2016. -
  • -
  • - C++11 range-based for loops used in SciTE so GCC 4.6 is now the minimum supported version. -
  • -
  • - SC_CHARSET_DEFAULT now means code page 1252 on Windows unless a code page is set. - This prevents unexpected behaviour and crashes on East Asian systems where default locales are commonly DBCS. - Projects which want to default to DBCS code pages in East Asian locales should set the code page and - character set explicitly. -
  • -
  • - SCVS_NOWRAPLINESTART option stops left arrow from wrapping to the previous line. - Most commonly wanted when virtual space is used. - Bug #1648. -
  • -
  • - The C++ lexer can fold on #else and #elif with the fold.cpp.preprocessor.at.else property. - Bug #210. -
  • -
  • - The errorlist lexer detects warnings from Visual C++ which do not contain line numbers. -
  • -
  • - The HTML lexer no longer treats "<?" inside a string in a script as potentially starting an XML document. - Bug #767. -
  • -
  • - The HTML lexer fixes a problem resuming at a script start where the starting state continued - past where it should. - Bug #1849. -
  • -
  • - When inserting spaces for virtual space and the position is in indentation and tabs are enabled - for indentation then use tabs. - Bug #1850. -
  • -
  • - Fix fold expand when some child text not styled. - Caused by fixes for Bug #1799. - Bug #1842. -
  • -
  • - Fix key binding bug on Cocoa for control+. - Bug #1854. -
  • -
  • - Fix scroll bar size warnings on GTK+ caused by #1831. - Bug #1851. -
  • -
  • - Small fixes for GTK+ makefile. - Bug #1844. - Bug #1845. - Bug #1846. -
  • -
  • - Fix SciTE indentation after code like "void function () {}". -
  • -
  • - Fix SciTE global regex replace of "^" with something which missed the line after empty - lines with LF line ends. - Bug #1839. -
  • -
  • - Fix SciTE on GTK+ 3.20 bug where toggle buttons on find and replace strips - did not show active state. - Bug #1853. -
  • -
-

- Release 3.6.6 -

-
    -
  • - Released 24 May 2016. -
  • -
  • - C++ 11 <regex> support built by default. Can be disabled by defining NO_CXX11_REGEX. -
  • -
  • - SciTE_USERHOME environment variable allows separate location for writeable properties files. - Feature #965. -
  • -
  • - GObject introspection supports notify and command events. -
  • -
  • - The Progress lexer now allows comments preceded by a tab. -
  • -
  • - Scripts reading Scintilla.iface file include comments for enu and lex definitions. - Bug #1829. -
  • -
  • - Fix crashes on GTK+ if idle work active when destroyed. - Bug #1827. -
  • -
  • - Fixed bugs when used on GTK+ 3.20. - Bug #1825. - Bug #1831. -
  • -
  • - Fix SciTE search field background with dark theme on GTK+ 2.x. - Bug #1826. -
  • -
  • - Fixed bug on Win32 that allowed resizing autocompletion from bottom when it was - located above the caret. -
  • -
  • - On Win32, when using a screen reader and selecting text using Shift+Arrow, - fix bug when scrolling made the caret stay at the same screen location - so the screen reader did not speak the added or removed selection. -
  • -
-

- Release 3.6.5 -

-
    -
  • - Released 26 April 2016. -
  • -
  • - JSON lexer added. - Feature #1140. -
  • -
  • - The C++ lexer fixes a bug with multi-line strings with line continuation where the string style - overflowed after an edit. - Bug #1824. -
  • -
  • - The Python lexer treats '@' as an operator except when it is the first visible character on a line. - This is for Python 3.5. -
  • -
  • - The Rust lexer allows '?' as an operator. - Feature #1146. -
  • -
  • - Doubled size of compiled regex buffer. - Bug #1822. -
  • -
  • - For GTK+, the Super modifier key can be used in key bindings. - Feature #1142. -
  • -
  • - For GTK+, fix some crashes when using multiple threads. -
  • -
  • - Platform layer font cache removed on GTK+ as platform-independent caches are used. - This avoids the use of thread locking and initialization of threads so any GTK+ - applications that rely on Scintilla initializing threads will have to do that themselves. -
  • -
  • - SciTE bug fixed with exported HTML where extra line shown. - Bug #1816. -
  • -
  • - SciTE on Windows fixes bugs with pop-up menus in the find and replace strips. - For the replace strip, menu choices change the state. - For the find strip, menu choices are reflected in the appearance of their corresponding buttons. -
  • -
  • - SciTE on Windows on high DPI displays fixes the height of edit boxes in user strips. -
  • -
-

- Release 3.6.4 -

-
    -
  • - Released 13 March 2016. -
  • -
  • - SciTE allows setting the autocompletion type separator character. -
  • -
  • - The C++ folder folds code on '(' and ')' to allow multi-line calls to be folded. - Feature #1138. -
  • -
  • - For the HTML lexer, limit the extent of Mako line comments to finish before - the line end characters. -
  • -
  • - Folds unfolded when two fold regions are merged by either deleting an intervening line - or changing its fold level by adding characters. - This was fixed both in Scintilla and in SciTE's equivalent code. - Bug #1799.
    -
  • -
  • - The Progress lexer supports hexadecimal numeric literals, - single-line comments, abbreviated keywords and - extends nested comments to unlimited levels. -
  • -
  • - Ruby lexer treats alternate hash key syntax "key:" as a symbol. - Bug #1810. -
  • -
  • - Rust lexer handles bracketed Unicode string escapes like "\u{123abc}". - Bug #1809. -
  • -
  • - For GTK+ on Windows fix 64-bit build which was broken in 3.6.3. -
  • -
  • - For Qt, release builds have assertions turned off. -
  • -
  • - For Qt on Windows, fix compilation failure for Qt 4.x. -
  • -
  • - IME target range displayed on Qt for OS X. -
  • -
  • - On Windows, make clipboard operations more robust by retrying OpenClipboard if it fails - as this may occur when another application has opened the clipboard. -
  • -
  • - On Windows back out change that removed use of def file to ensure - Scintilla_DirectFunction exported without name mangling. - Bug #1813. -
  • -
  • - On GTK+ and Qt over Win32 in Korean fix bug caused by last release's word input change. -
  • -
  • - For SciTE, more descriptive error messages are displayed when there are problems loading the - Lua startup script. - Feature #1139. -
  • -
-

- Release 3.6.3 -

-
    -
  • - Released 18 January 2016. -
  • -
  • - Allow painting without first styling all visible text then styling in the background - using idle-time. This helps performance when scrolling down in very large documents. - Can also incrementally style after the visible area to the end of the document so that - the document is already styled when the user scrolls to it. -
  • -
  • - Support GObject introspection on GTK+. -
  • -
  • - SciTE supports pasting to each selection with the selection.multipaste setting. - Feature #1123. -
  • -
  • - SciTE can optionally display a read-only indicator on tabs and in the Buffers menu. -
  • -
  • - Bash lexer flags incomplete here doc delimiters as syntax errors. - Bug #1789.
    - Support added for using '#' in non-comment ways as is possible with zsh. - Bug #1794.
    - Recognize more characters as here-doc delimiters. - Bug #1778. -
  • -
  • - Errorlist lexer highlights warning messages from the Microsoft linker. -
  • -
  • - Errorlist lexer fixes bug with final line in escape sequence recognition mode. -
  • -
  • - Lua lexer includes '&' and '|' bitwise operators for Lua 5.3. - Bug #1790. -
  • -
  • - Perl lexer updated for Perl 5.20 and 5.22.
    - Allow '_' for subroutine prototypes. - Bug #1791.
    - Double-diamond operator <<>>.
    - Hexadecimal floating point literals.
    - Repetition in list assignment. - Bug #1793.
    - Highlight changed subroutine prototype syntax for Perl 5.20. - Bug #1797.
    - Fix module ::-syntax when special characters such as 'x' are used.
    - Added ' and " detection as prefix chars for x repetition operator. - Bug #1800. -
  • -
  • - Visual Prolog lexer recognizes numbers more accurately and allows non-ASCII verbatim - quoting characters. - Feature #1130. -
  • -
  • - Send SCN_UPDATEUI with SC_UPDATE_SELECTION when the application changes multiple - selection. -
  • -
  • - Expand folded areas before deleting fold header line. - Bug #1796. -
  • -
  • - Treat Unicode line ends like common line ends when maintaining fold state. -
  • -
  • - Highlight whole run for hover indicator when wrapped. - Bug #1784. -
  • -
  • - On Cocoa, fix crash when autocompletion list closed during scroll bounce-back. - Bug #1788. -
  • -
  • - On Windows, fix non-BMP input through WM_CHAR and allow WM_UNICHAR to work - with non-BMP characters and on non-Unicode documents. - Bug #1779. -
  • -
  • - On Windows using DirectWrite, for ligatures and other character clusters, - display caret and selections part-way through clusters so that the caret doesn't stick - to the end of the cluster making it easier to understand editing actions. -
  • -
  • - On Windows, Scintilla no longer uses a .DEF file during linking as it duplicates - source code directives. -
  • -
  • - On GTK+ and Qt, Korean input by word fixed. -
  • -
  • - On GTK+, Qt, and Win32 block IME input when document is read-only or any selected text - is protected. -
  • -
  • - On GTK+ on OS X, fix warning during destruction. - Bug #1777. -
  • -
  • - Fix SciTE crashes when using LPEG lexers. -
  • -
-

- Release 3.6.2 -

-
    -
  • - Released 6 November 2015. -
  • -
  • - Whitespace may be made visible just in indentation. -
  • -
  • - Whitespace dots are centred when larger than 1 pixel. -
  • -
  • - The Scintilla framework on Cocoa now contains version numbers. -
  • -
  • - SciTE's standard properties collect values from all active .properties file to produce the Language menu - and the file types pull-down in the File open dialog. -
  • -
  • - The single executable version of SciTE, Sc1, uses 'module' statements within its embedded - properties. This makes it act more like the full distribution allowing languages to be turned on - and off by setting imports.include and imports.exclude. - The default imports.exclude property adds eiffel, erlang, ps, and pov so these languages are - turned off by default. -
  • -
  • - SciTE adds an output.blank.margin.left property to allow setting the output pane - margin to a different width than the edit pane. -
  • -
  • - CoffeeScript lexer highlights ranges correctly. - Bug #1765. -
  • -
  • - Markdown lexer treats line starts consistently to always highlight *foo* or similar at line start. - Bug #1766. -
  • -
  • - Optimize marker redrawing by only drawing affected lines when markers shown in the text. -
  • -
  • - On Cocoa, timers and idling now work in modal dialogs. This also stops some crashes. -
  • -
  • - On Cocoa, fix crashes when deleting a ScintillaView. These crashes could occur when scrolling - at the time the ScintillaView was deleted although there may have been other cases. -
  • -
  • - On GTK+ 2.x, fix height of lines in autocompletion lists. - Bug #1774. -
  • -
  • - Fix bug with SCI_LINEENDDISPLAY where the caret moved to the next document line instead of the - end of the display line. - Bug #1772. -
  • -
  • - Report error (SC_STATUS_FAILURE) when negative length passed to SCI_SETSTYLING. - Bug #1768. -
  • -
  • - When SC_MARK_UNDERLINE is not assigned to a margin, stop drawing the whole line. -
  • -
  • - When reverting an untitled document in SciTE, just clear it with no message about a file. - Bug #1764. -
  • -
  • - SciTE on GTK+ allows use of Ctrl+A (Select All) inside find and replace strips. - Bug #1769. -
  • -
-

- Release 3.6.1 -

-
    -
  • - Released 15 September 2015. -
  • -
  • - The oldest version of GTK+ supported now is 2.18 and for glib it is 2.22. -
  • -
  • - On GTK+, SC_CHARSET_OEM866 added to allow editing Russian files encoded in code page 866. - Feature #1019. -
  • -
  • - On Windows, reconversion is performed when requested by the IME. -
  • -
  • - CoffeeScript lexer adds lexical class for instance properties and fixes some cases of regex highlighting. - Bug #1749. -
  • -
  • - The errorlist lexer understands some ANSI escape sequences to change foreground colour and intensity. - This is sufficient to colour diagnostic output from gcc and clang when -fdiagnostics-color set. -
  • -
  • - The errorlist lexer allows the line number to be 0 in GCC errors as some tools report whole file - errors as line 0. -
  • -
  • - MySql lexer fixes empty comments /**/ so the comment state does not continue. -
  • -
  • - VHDL folder supports "protected" keyword. -
  • -
  • - Treat CRLF line end as two characters in SCI_COUNTCHARACTERS. - Bug #1757. -
  • -
  • - On GTK+ 3.x, fix height of lines in autocompletion lists to match the font. - Switch from deprecated style calls to CSS styling. - Removed setting list colours on GTK+ 3.16+ as no longer appears needed. -
  • -
  • - On GTK+, avoid "Invalid rectangle passed" warning messages by never reporting the client - rectangle with a negative width or height. - Bug #1743. -
  • -
  • - On Cocoa, copy Sci_Position.h into the framework so clients can build. -
  • -
  • - On Cocoa fix bug with drag and drop that could lead to crashes. - Bug #1751. -
  • -
  • - Fix SciTE disk exhaustion bug by reporting failures when writing files. - Bug #1760. -
  • -
  • - Fix find strip in SciTE on Windows XP to be visible. -
  • -
  • - SciTE on Windows changes the way it detects that a tool has finished executing to ensure all output data - from the process is read. -
  • -
  • - SciTE on Windows improves the time taken to read output from tools that produce a large amount - of output by a factor of around 10. -
  • -
  • - On GTK+ the keyboard command for View | End of Line was changed to Ctrl+Shift+N - to avoid clash with Search | Selection Add Next. - Bug #1750. -
  • -
-

- Release 3.6.0 -

-
    -
  • - Released 3 August 2015. -
  • -
  • - External interfaces use the Sci_Position and Sci_PositionU typedefs instead of int and unsigned int - to allow for changes to a 64-bit interface on 64-bit platforms in the future. - Applications and external lexers should start using the new type names so that - they will be compatible when the 64-bit change occurs. - There is also Sci_PositionCR (long) for use in the Sci_CharacterRange struct which will - also eventually become 64-bit. -
  • -
  • - Multiple selection now works over more key commands. - The new multiple-selection handling commands include horizontal movement and selection commands, - line up and down movement and selection commands, word and line deletion commands, and - line end insertion. - This change in behaviours is conditional on setting the SCI_SETADDITIONALSELECTIONTYPING property. -
  • -
  • - Autocompletion lists send an SCN_AUTOCCOMPLETED notification after the text has been inserted. - Feature #1109. -
  • -
  • - The case mode style attribute can now be SC_CASE_CAMEL. -
  • -
  • - The Python lexer supports substyles for identifiers. -
  • -
  • - SciTE adds support for substyles. -
  • -
  • - SciTE's Export as RTF and Copy as RTF commands support UTF-8. -
  • -
  • - SciTE can display autocompletion on all IME input with ime.autocomplete property. -
  • -
  • - SciTE properties files now discard trailing white space on variable names. -
  • -
  • - Calling SCI_SETIDENTIFIERS resets styling to ensure any added identifier are highlighted. -
  • -
  • - Avoid candidate box randomly popping up away from edit pane with (especially - Japanese) IME input. -
  • -
  • - On Cocoa fix problems with positioning of autocompletion lists near screen edge - or under dock. Cancel autocompletion when window moved. - Bug #1740. -
  • -
  • - Fix drawing problem when control characters are in a hidden style as they then - have a zero width rectangle to draw but modify that rectangle in a way that - clears some pixels. -
  • -
  • - Report error when attempt to resize buffer to more than 2GB with SC_STATUS_FAILURE. -
  • -
  • - Fix bug on GTK+ with scroll bars leaking. - Bug #1742. -
  • -
  • - LexOthers.cxx file split into one file per lexer: LexBatch, LexDiff, - LexErrorList, LexMake, LexNull, and LexProps. -
  • -
  • - SciTE exporters handle styles > 127 correctly now. -
  • -
  • - SciTE on Windows can scale window element sizes based on the system DPI setting. -
  • -
  • - SciTE implements find.in.files.close.on.find on all platforms, not just Windows. -
  • -
-

- Release 3.5.7 -

-
    -
  • - Released 20 June 2015. -
  • -
  • - Added SCI_MULTIPLESELECTADDNEXT to add the next occurrence of the main selection within the - target to the set of selections as main. If the current selection is empty then select word around caret. - SCI_MULTIPLESELECTADDEACH adds each occurrence of the main selection within the - target to the set of selections. -
  • -
  • - SciTE adds "Selection Add Next" and "Selection Add Each" commands to the Search menu. -
  • -
  • - Added SCI_ISRANGEWORD to determine if the parameters are at the start and end of a word. -
  • -
  • - Added SCI_TARGETWHOLEDOCUMENT to set the target to the whole document. -
  • -
  • - Verilog lexer recognizes protected regions and the folder folds protected regions. -
  • -
  • - A performance problem with markers when deleting many lines was fixed. - Bug #1733. -
  • -
  • - On Cocoa fix crash when ScintillaView destroyed if no autocompletion ever displayed. - Bug #1728. -
  • -
  • - On Cocoa fix crash in drag and drop. -
  • -
  • - On GTK+ 3.4+, when there are both horizontal and vertical scrollbars, draw the lower-right corner - so that it does not appear black when text selected. - Bug #1611. -
  • -
  • - Fixed most calls deprecated in GTK+ 3.16. Does not fix style override calls - as they are more complex. -
  • -
  • - SciTE on GTK+ 3.x uses a different technique for highlighting the search strip when there is - no match which is more compatible with future and past versions and different themes. -
  • -
-

- Release 3.5.6 -

-
    -
  • - Released 26 May 2015. -
  • -
  • - On Qt, use fractional positioning calls and avoid rounding to ensure consistency. -
  • -
  • - SCI_TARGETASUTF8 and SCI_ENCODEDFROMUTF8 implemented on - Win32 as well as GTK+ and Cocoa. -
  • -
  • - C++ lexer fixes empty backquoted string. - Bug #1711. -
  • -
  • - C++ lexer fixes #undef directive. - Bug #1719. -
  • -
  • - Fortran folder fixes handling of "selecttype" and "selectcase". - Bug #1724. -
  • -
  • - Verilog folder folds interface definitions. -
  • -
  • - VHDL folder folds units declarations and fixes a case insensitivity bug with not treating "IS" the same as "is". -
  • -
  • - Fix bug when drawing text margins in buffered mode which would use default - encoding instead of chosen encoding. - Bug #1703. -
  • -
  • - Fix bug with Korean Hanja conversions in DBCS encoding on Windows. -
  • -
  • - Fix for reading a UTF-16 file in SciTE where a non-BMP character is split over a read buffer boundary. - Bug #1710. -
  • -
  • - Fix bug on GTK+ 2.x for Windows where there was an ABI difference between - compiler version. - Bug #1726. -
  • -
  • - Fix undo bug on Cocoa that could lose data.. -
  • -
  • - Fix link error on Windows when SCI_NAMESPACE used. -
  • -
  • - Fix exporting from SciTE when using Scintillua for lexing. -
  • -
  • - SciTE does not report twice that a search string can not be found when "Replace" pressed. - Bug #1716. -
  • -
  • - SciTE on GTK+ 3.x disables arrow in search combo when no entries. - Bug #1717. -
  • -
-

- Release 3.5.5 -

-
    -
  • - Released 17 April 2015. -
  • -
  • - Scintilla on Windows is now always a wide character window so SCI_SETKEYSUNICODE has no effect - and SCI_GETKEYSUNICODE always returns true. These APIs are deprecated and should not be called. -
  • -
  • - The wxWidgets-specific ascent member of Font has been removed which breaks - compatibility with current wxStyledTextCtrl. - Bug #1682. -
  • -
  • - IME on Qt supports multiple carets and behaves more like other platforms. -
  • -
  • - Always use inline IME on GTK+ for Korean. -
  • -
  • - SQL lexer fixes handling of '+' and '-' in numbers so the '-' in '1-1' is seen as an operator and for - '1--comment' the comment is recognized. -
  • -
  • - TCL lexer reverts change to string handling. - Bug #1642. -
  • -
  • - Verilog lexer fixes bugs with macro styling. - Verilog folder fixes bugs with `end completing an `if* instead of `endif and fold.at.else, and implements - folding at preprocessor `else. -
  • -
  • - VHDL lexer supports extended identifiers. -
  • -
  • - Fix bug on Cocoa where the calltip would display incorrectly when - switching calltips and the new calltip required a taller window. -
  • -
  • - Fix leak on Cocoa with autocompletion lists. - Bug #1706. -
  • -
  • - Fix potential crash on Cocoa with drag and drop. - Bug #1709. -
  • -
  • - Fix bug on Windows when compiling with MinGW-w64 which caused text to not be drawn - when in wrap mode. - Bug #1705. -
  • -
  • - Fix SciTE bug with missing file open filters and add hex to excluded set of properties files so that its - settings don't appear. - Bug #1707. -
  • -
  • - Fix SciTE bug where files without extensions like "makefile" were not highlighted correctly. -
  • -
-

- Release 3.5.4 -

-
    -
  • - Released 8 March 2015. -
  • -
  • - Indicators may have a different colour and style when the mouse is over them or the caret is moved into them. -
  • -
  • - An indicator may display in a large variety of colours with the SC_INDICFLAG_VALUEFORE - flag taking the colour from the indicator's value, which may differ for every character, instead of its - foreground colour attribute. -
  • -
  • - On Cocoa, additional IME methods implemented so that more commands are enabled. - For Japanese: Reverse Conversion, Convert to Related Character, and Search Similar Kanji - can now be performed. - The global definition hotkey Command+Control+D and the equivalent three finger tap gesture - can be used. -
  • -
  • - Minimum version of Qt supported is now 4.8 due to the use of QElapsedTimer::nsecsElapsed. -
  • -
  • - On Windows, for Korean, the VK_HANJA key is implemented to choose Hanja for Hangul and - to convert from Hanja to Hangul. -
  • -
  • - C++ lexer adds lexer.cpp.verbatim.strings.allow.escapes option that allows verbatim (@") strings - to contain escape sequences. This should remain off (0) for C# and be turned on (1) for Objective C. -
  • -
  • - Rust lexer accepts new 'is'/'us' integer suffixes instead of 'i'/'u'. - Bug #1098. -
  • -
  • - Ruby folder can fold multiline comments. - Bug #1697. -
  • -
  • - SQL lexer fixes a bug with the q-quote operator. -
  • -
  • - TCL lexer fixes a bug with some strings. - Bug #1642. -
  • -
  • - Verilog lexer handles escaped identifiers that begin with \ and end with space like \reset* . - Verilog folder fixes one bug with inconsistent folding when fold.comment is on and another - with typedef class statements creating a fold point, expecting an endclass statement. -
  • -
  • - VHDL folder fixes hang in folding when document starts with "entity". -
  • -
  • - Add new indicators INDIC_COMPOSITIONTHIN, INDIC_FULLBOX, and INDIC_TEXTFORE. - INDIC_COMPOSITIONTHIN is a thin underline that mimics the appearance of non-target segments in OS X IME. - INDIC_FULLBOX is similar to INDIC_STRAIGHTBOX but covers the entire character area which means that - indicators with this style on contiguous lines may touch. INDIC_TEXTFORE changes the text foreground colour. -
  • -
  • - Fix adaptive scrolling speed for GTK+ on OS X with GTK Quartz backend (as opposed to X11 backend). - Bug #1696. -
  • -
  • - Fix position of autocompletion and calltips on Cocoa when there were two screens stacked vertically. -
  • -
  • - Fix crash in SciTE when saving large files in background when closing application. - Bug #1691. -
  • -
  • - Fix decoding of MSVC warnings in SciTE so that files in the C:\Program Files (x86)\ directory can be opened. - This is a common location of system include files. -
  • -
  • - Fix compilation failure of C++11 <regex> on Windows using gcc. -
  • -
-

- Release 3.5.3 -

-
    -
  • - Released 20 January 2015. -
  • -
  • - Support removed for Windows 95, 98, and ME. -
  • -
  • - Lexers added for Motorola S-Record files, Intel hex files, and Tektronix extended hex files with folding for Intel hex files. - Feature #1091. - Feature #1093. - Feature #1095. - Feature #1096. -
  • -
  • - C++ folder allows folding on square brackets '['. - Feature #1087. -
  • -
  • - Shell lexer fixes three issues with here-documents. - Bug #1672. -
  • -
  • - Verilog lexer highlights doc comment keywords; has separate styles for input, output, and inout ports - (lexer.verilog.portstyling); fixes a bug in highlighting numbers; can treat upper-case identifiers as - keywords (lexer.verilog.allupperkeywords); and can use different styles for code that is inactive due - to preprocessor commands (lexer.verilog.track.preprocessor, lexer.verilog.update.preprocessor). -
  • -
  • - When the calltip window is taller than the Scintilla window, leave it in a - position that avoids overlapping the Scintilla text. -
  • -
  • - When a text margin is displayed, for annotation lines, use the background colour of the base line. -
  • -
  • - On Windows GDI, assume font names are encoded in UTF-8. This matches the Direct2D code path. -
  • -
  • - Fix paste for GTK+ on OS X. - Bug #1677. -
  • -
  • - Reverted a fix on Qt where Qt 5.3 has returned to the behaviour of 4.x. - Bug #1575. -
  • -
  • - When the mouse is on the line between margin and text changed to treat as within text. - This makes the PLAT_CURSES character cell platform work better. -
  • -
  • - Fix a crash in SciTE when the command line is just "-close:". - Bug #1675. -
  • -
  • - Fix unexpected dialog in SciTE on Windows when the command line has a quoted filename then ends with a space. - Bug #1673. -
  • -
  • - On Windows and GTK+, use indicators for inline IME. -
  • -
  • - SciTE shuts down quicker when there is no user-written OnClose function and no directors are attached. -
  • -
-

- Release 3.5.2 -

-
    -
  • - Released 2 December 2014. -
  • -
  • - For OS X Cocoa switch C++ runtime to libc++ to enable use of features that will never - be added to libstdc++ including those part of C++11. - Scintilla will now run only on OS X 10.7 or later and only in 64-bit mode. -
  • -
  • - Include support for using C++11 <regex> for regular expression searches. - Enabling this requires rebuilding Scintilla with a non-default option. - This is a provisional feature and may change API before being made permanent. -
  • -
  • - Allocate indicators used for Input Method Editors after 31 which was the previous limit of indicators to - ensure no clash between the use of indicators for IME and for the application. -
  • -
  • - ANNOTATION_INDENTED added which is similar to ANNOTATION_BOXED in terms of positioning - but does not show a border. - Feature #1086. -
  • -
  • - Allow platform overrides for drawing tab arrows, wrap markers, and line markers. - Size of double click detection area is a variable. - These enable better visuals and behaviour for PLAT_CURSES as it is character cell based. -
  • -
  • - CoffeeScript lexer fixes "/*" to not be a comment. - Bug #1420. -
  • -
  • - VHDL folder fixes "block" keyword. - Bug #1664. -
  • -
  • - Prevent caret blinking when holding down Delete key. - Bug #1657. -
  • -
  • - On Windows, allow right click selection in popup menu. - Feature #1080. -
  • -
  • - On Windows, only call ShowCaret in GDI mode as it interferes with caret drawing when using Direct2D. - Bug #1643. -
  • -
  • - On Windows, another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITEDC added - which may avoid drawing failures in some circumstances by drawing into a GDI DC. - This feature is provisional and may be changed or removed if a better solution is found. -
  • -
  • - On Windows, avoid processing mouse move events where the mouse has not moved as these can - cause unexpected dwell start notifications. - Bug #1670. -
  • -
  • - For GTK+ on Windows, avoid extra space when pasting from external application. -
  • -
  • - On GTK+ 2.x allow Scintilla to be used inside tool tips by changing when preedit window created. - Bug #1662. -
  • -
  • - Support MinGW compilation under Linux. - Feature #1077. -
  • -
-

- Release 3.5.1 -

-
    -
  • - Released 30 September 2014. -
  • -
  • - BibTeX lexer added. - Feature #1071. -
  • -
  • - SQL lexer supports the q-quote operator as SCE_SQL_QOPERATOR(24). -
  • -
  • - VHDL lexer supports block comments. - Bug #1527. -
  • -
  • - VHDL folder fixes case where "component" used before name. - Bug #613. -
  • -
  • - Restore fractional pixel tab positioning which was truncated to whole pixels in 3.5.0. - Bug #1652. -
  • -
  • - Allow choice between windowed and inline IME on some platforms. -
  • -
  • - On GTK+ cache autocomplete window to avoid platform bug where windows - were sometimes lost. - Bug #1649. -
  • -
  • - On GTK+ size autocomplete window more accurately. -
  • -
  • - On Windows only unregister windows classes registered. - Bug #1639. -
  • -
  • - On Windows another DirectWrite mode SC_TECHNOLOGY_DIRECTWRITERETAIN added - which may avoid drawing failures on some cards and drivers. - This feature is provisional and may be changed or removed if a better solution is found. -
  • -
  • - On Windows support the Visual Studio 2010+ clipboard format that indicates a line copy. - Bug #1636. -
  • -
  • - SciTE session files remember the scroll position. -
  • -
-

- Release 3.5.0 -

-
    -
  • - Released 13 August 2014. -
  • -
  • - Text may share space vertically so that extreme ascenders and descenders are - not cut off by calling SCI_SETPHASESDRAW(SC_PHASES_MULTIPLE). -
  • -
  • - Separate timers are used for each type of periodic activity and they are turned on and off - as required. This saves power as there are fewer wake ups. - On recent releases of OS X Cocoa and Windows, coalescing timers are used to further - save power. - Bug #1086. - Bug #1532. -
  • -
  • - Explicit tab stops may be set for each line. -
  • -
  • - On Windows and GTK+, when using Korean input methods, IME composition is moved from a - separate window into the Scintilla window. -
  • -
  • - SciTE adds a "Clean" command to the "Tools" menu which is meant to be bound to a command like - "make clean". -
  • -
  • - Lexer added for Windows registry files. -
  • -
  • - HTML lexer fixes a crash with SGML after a Mako comment. - Bug #1622. -
  • -
  • - KiXtart lexer adds a block comment state. - Feature #1053. -
  • -
  • - Matlab lexer fixes transpose operations like "X{1}'". - Bug #1629. -
  • -
  • - Ruby lexer fixes bugs with the syntax of symbols including allowing a symbol to end with '?'. - Bug #1627. -
  • -
  • - Rust lexer supports byte string literals, naked CR can be escaped in strings, and files starting with - "#![" are not treated as starting with a hashbang comment. - Feature #1063. -
  • -
  • - Bug fixed where style data was stale when deleting a rectangular selection. -
  • -
  • - Bug fixed where annotations disappeared when SCI_CLEARDOCUMENTSTYLE called. -
  • -
  • - Bug fixed where selection not redrawn after SCI_DELWORDRIGHT. - Bug #1633. -
  • -
  • - Change the function prototypes to be complete for functions exported as "C". - Bug #1618. -
  • -
  • - Fix a memory leak on GTK+ with autocompletion lists. - Bug #1638. -
  • -
  • - On GTK+, use the full character width for the overstrike caret for multibyte characters. -
  • -
  • - On Qt, set list icon size to largest icon. Add padding on OS X. - Bug #1634. -
  • -
  • - On Qt, fix building on FreeBSD 9.2. - Bug #1635. -
  • -
  • - On Qt, add a get_character method on the document. - Feature #1064. -
  • -
  • - On Qt, add SCI_* for methods to ScintillaConstants.py. - Feature #1065. -
  • -
  • - SciTE on GTK+ crash fixed with Insert Abbreviation command. -
  • -
  • - For SciTE with read-only files and are.you.sure=0 reenable choice to save to another - location when using Save or Close commands. -
  • -
  • - Fix SciTE bug where toggle bookmark did not work after multiple lines with bookmarks merged. - Bug #1617. -
  • -
-

- Release 3.4.4 -

-
    -
  • - Released 3 July 2014. -
  • -
  • - Style byte indicators removed. They were deprecated in 2007. Standard indicators should be used instead. - Some elements used by lexers no longer take number of bits or mask arguments so lexers may need to be - updated for LexAccessor::StartAt, LexAccessor::SetFlags (removed), LexerModule::LexerModule. -
  • -
  • - When multiple selections are active, autocompletion text may be inserted at each selection with new - SCI_AUTOCSETMULTI method. -
  • -
  • - C++ lexer fixes crash for "#define x(". - Bug #1614. -
  • -
  • - C++ lexer fixes raw string recognition so that R"xxx(blah)xxx" is styled as SCE_C_STRINGRAW. -
  • -
  • - The Postscript lexer no longer marks token edges with indicators as this used style byte indicators. -
  • -
  • - The Scriptol lexer no longer displays indicators for poor indentation as this used style byte indicators. -
  • -
  • - TCL lexer fixes names of keyword sets. - Bug #1615. -
  • -
  • - Shell lexer fixes fold matching problem caused by "<<<". - Bug #1605. -
  • -
  • - Fix bug where indicators were not removed when fold highlighting on. - Bug #1604. -
  • -
  • - Fix bug on Cocoa where emoji were treated as being zero width. -
  • -
  • - Fix crash on GTK+ with Ubuntu 12.04 and overlay scroll bars. -
  • -
  • - Avoid creating a Cairo context when measuring text on GTK+ as future versions of GTK+ - may prohibit calling gdk_cairo_create except inside drawing handlers. This prohibition may - be required on Wayland. -
  • -
  • - On Cocoa, the registerNotifyCallback method is now marked as deprecated so client code that - uses it will display an error message. - Client code should use the delegate mechanism or subclassing instead. - The method will be removed in the next version. -
  • -
  • - On Cocoa, package Scintilla more in compliance with platform conventions. - Only publish public headers in the framework headers directory. - Only define the Scintilla namespace in Scintilla.h when compiling as C++. - Use the Cocoa NS_ENUM and NS_OPTIONS macros for exposed enumerations. - Hide internal methods from public headers. - These changes are aimed towards publishing Scintilla as a module which will allow it to - be used from the Swift programming language, although more changes will be needed here. -
  • -
  • - Fix crash in SciTE when stream comment performed at line end. - Bug #1610. -
  • -
  • - For SciTE on Windows, display error message when common dialogs fail. - Bug #156. -
  • -
  • - For SciTE on GTK+ fix bug with initialization of toggle buttons in find and replace strips. - Bug #1612. -
  • -
-

- Release 3.4.3 -

-
    -
  • - Released 27 May 2014. -
  • -
  • - Fix hangs and crashes in DLL at shutdown on Windows when using Direct2D. -
  • -
-

- Release 3.4.2 -

-
    -
  • - Released 22 May 2014. -
  • -
  • - Insertions can be filtered or modified by calling SCI_CHANGEINSERTION inside a handler for - SC_MOD_INSERTCHECK. -
  • -
  • - DMIS lexer added. DMIS is a language for coordinate measuring machines. - Feature #1049. -
  • -
  • - Line state may be displayed in the line number margin to aid in debugging lexing and folding with - SC_FOLDFLAG_LINESTATE (128). -
  • -
  • - C++ lexer understands more preprocessor statements. #if defined SYMBOL is understood. - Some macros with arguments can be understood and these may be predefined in keyword set 4 - (keywords5 for SciTE) - with syntax similar to CHECKVERSION(x)=(x<3). - Feature #1051. -
  • -
  • - C++ lexer can highlight task marker keywords in comments as SCE_C_TASKMARKER. -
  • -
  • - C++ lexer can optionally highlight escape sequences in strings as SCE_C_ESCAPESEQUENCE. -
  • -
  • - C++ lexer supports Go back quoted raw string literals with lexer.cpp.backquoted.strings option. - Feature #1047. -
  • -
  • - SciTE performs word and search match highlighting as an idle task to improve interactivity - and allow use of these features on large files. -
  • -
  • - Bug fixed on Cocoa where previous caret lines were visible. - Bug #1593. -
  • -
  • - Bug fixed where caret remained invisible when period set to 0. - Bug #1592. -
  • -
  • - Fixed display flashing when scrolling with GTK+ 3.10. - Bug #1567. -
  • -
  • - Fixed calls and constants deprecated in GTK+ 3.10. -
  • -
  • - Fixed bug on Windows where WM_GETTEXT did not provide data in UTF-16 for Unicode window. - Bug #685. -
  • -
  • - For SciTE, protect access to variables used by threads with a mutex to prevent data races. -
  • -
  • - For SciTE on GTK+ fix thread object leaks. - Display the version of GTK+ compiled against in the about box. -
  • -
  • - For SciTE on GTK+ 3.10, fix the size of the tab bar's content and use - freedesktop.org standard icon names where possible. -
  • -
  • - For SciTE on Windows, fix bug where invoking help resubmitted the - running program. - Bug #272. -
  • -
  • - SciTE's highlight current word feature no longer matches the selection when it contains space. -
  • -
  • - For building SciTE in Visual C++, the win\SciTE.vcxproj project file should be used. - The boundscheck directory and its project and solution files have been removed. -
  • -
-

- Release 3.4.1 -

-
    -
  • - Released 1 April 2014. -
  • -
  • - Display Unicode line ends as [LS], [PS], and [NEL] blobs. -
  • -
  • - Bug fixed where cursor down failed on wrapped lines. - Bug #1585. -
  • -
  • - Caret positioning changed a little to appear inside characters less often by - rounding the caret position to the pixel grid instead of truncating. - Bug #1588. -
  • -
  • - Bug fixed where automatic indentation wrong when caret in virtual space. - Bug #1586. -
  • -
  • - Bug fixed on Windows where WM_LBUTTONDBLCLK was no longer sent to window. - Bug #1587. -
  • -
  • - Bug fixed with SciTE on Windows XP where black stripes appeared inside the find and - replace strips. -
  • -
  • - Crash fixed in SciTE with recursive properties files. - Bug #1507. -
  • -
  • - Bug fixed with SciTE where Ctrl+E before an unmatched end brace jumps to file start. - Bug #315. -
  • -
  • - Fixed scrolling on Cocoa to avoid display glitches and be smoother. -
  • -
  • - Fixed crash on Cocoa when character composition used when autocompletion list active. -
  • -
-

- Release 3.4.0 -

-
    -
  • - Released 22 March 2014. -
  • -
  • - The Unicode line ends and substyles features added as provisional in 3.2.5 are now finalized. - There are now no provisional features. -
  • -
  • - Added wrap mode SC_WRAP_WHITESPACE which only wraps on whitespace, not on style changes. -
  • -
  • - SciTE find and replace strips can perform incremental searching and temporary highlighting of all - matches with the find.strip.incremental, replace.strip.incremental, and find.indicator.incremental settings. -
  • -
  • - SciTE default settings changed to use strips for find and replace and to draw with Direct2D and - DirectWrite on Windows. -
  • -
  • - SciTE on Windows scales image buttons on the find and replace strips to match the current system scale factor. -
  • -
  • - Additional assembler lexer variant As(SCLEX_AS) for Unix assembly code which uses '#' for comments and - ';' to separate statements. -
  • -
  • - Fix Coffeescript lexer for keyword style extending past end of word. - Also fixes styling 0...myArray.length all as a number. - Bug #1583. -
  • -
  • - Fix crashes and other bugs in Fortran folder by removing folding of do-label constructs. -
  • -
  • - Deleting a whole line deletes the annotations on that line instead of the annotations on the next line. - Bug #1577. -
  • -
  • - Changed position of tall calltips to prefer lower half of screen to cut off end instead of start. -
  • -
  • - Fix Qt bug where double click treated as triple click. - Bug #1575. -
  • -
  • - On Qt, selecting an item in an autocompletion list that is not currently visible positions it at the top. -
  • -
  • - Fix bug on Windows when resizing autocompletion list with only short strings caused the list to move. -
  • -
  • - On Cocoa reduce scrollable height by one line to fix bugs with moving caret - up or down. -
  • -
  • - On Cocoa fix calltips which did not appear when they were created in an off-screen position. -
  • -
-

- Release 3.3.9 -

-
    -
  • - Released 31 January 2014. -
  • -
  • - Fix 3.3.8 bug where external lexers became inaccessible. - Bug #1574. -
  • -
-

- Release 3.3.8 -

-
    -
  • - Released 28 January 2014. -
  • -
  • - DropSelectionN API added to drop a selection from a multiple selection. -
  • -
  • - CallTipSetPosStart API added to change the position at which backspacing removes the calltip. -
  • -
  • - SC_MARK_BOOKMARK marker symbol added which looks like bookmark ribbons used in - book reading applications. -
  • -
  • - Basic lexer highlights hex, octal, and binary numbers in FreeBASIC which use the prefixes - &h, &o and &b respectively. - Feature #1041. -
  • -
  • - C++ lexer fixes bug where keyword followed immediately by quoted string continued - keyword style. - Bug #1564. -
  • -
  • - Matlab lexer treats '!' differently for Matlab and Octave languages. - Bug #1571. -
  • -
  • - Rust lexer improved with nested comments, more compliant doc-comment detection, - octal literals, NUL characters treated as valid, and highlighting of raw string literals and float literals fixed. - Feature #1038. - Bug #1570. -
  • -
  • - On Qt expose the EOLMode on the document object. -
  • -
  • - Fix hotspot clicking where area was off by half a character width. - Bug #1562. -
  • -
  • - Tweaked scroll positioning by either 2 pixels or 1 pixel when caret is at left or right of view - to ensure caret is inside visible area. -
  • -
  • - Send SCN_UPDATEUI with SC_UPDATE_SELECTION for Shift+Tab inside text. -
  • -
  • - On Windows update the system caret position when scrolling to help screen readers - see the scroll quickly. -
  • -
  • - On Cocoa, GTK+, and Windows/Direct2D draw circles more accurately so that - circular folding margin markers appear circular, of consistent size, and centred. - Make SC_MARK_ARROWS drawing more even. - Fix corners of SC_MARK_ROUNDRECT with Direct2D to be similar to other platforms. -
  • -
  • - SciTE uses a bookmark ribbon symbol for bookmarks as it scales better to higher resolutions - than the previous blue gem bitmap. -
  • -
  • - SciTE will change the width of margins while running when the margin.width and fold.margin.width - properties are changed. -
  • -
  • - SciTE on Windows can display a larger tool bar with the toolbar.large property. -
  • -
  • - SciTE displays a warning message when asked to open a directory. - Bug #1568. -
  • -
-

- Release 3.3.7 -

-
    -
  • - Released 12 December 2013. -
  • -
  • - Lexer added for DMAP language. - Feature #1026. -
  • -
  • - Basic lexer supports multiline comments in FreeBASIC. - Feature #1023. -
  • -
  • - Bash lexer allows '#' inside words.. - Bug #1553. -
  • -
  • - C++ lexer recognizes C++11 user-defined literals and applies lexical class SCE_C_USERLITERAL. -
  • -
  • - C++ lexer allows single quote characters as digit separators in numeric literals like 123'456 as this is - included in C++14. -
  • -
  • - C++ lexer fixes bug with #include statements without " or > terminating filename. - Bug #1538. -
  • -
  • - C++ lexer fixes split of Doxygen keywords @code{.fileExtension} and @param[in,out]. - Bug #1551. -
  • -
  • - C++ lexer styles Doxygen keywords at end of document. -
  • -
  • - Cmake lexer fixes bug with empty comments. - Bug #1550. -
  • -
  • - Fortran folder improved. Treats "else" as fold header. - Feature #962. -
  • -
  • - Fix bug with adjacent instances of the same indicator with different values where only the first was drawn. - Bug #1560. -
  • -
  • - For DirectWrite, use the GDI ClearType gamma value for SC_EFF_QUALITY_LCD_OPTIMIZED as - this results in text that is similar in colour intensity to GDI. - For the duller default DirectWrite ClearType text appearance, use SC_EFF_QUALITY_DEFAULT. - Feature #887. -
  • -
  • - Fix another problem with drawing on Windows with Direct2D when returning from lock screen. - The whole window is redrawn as just redrawing the initially required area left other areas black. -
  • -
  • - When scroll width is tracked, take width of annotation lines into account. -
  • -
  • - For Cocoa on OS X 10.9, responsive scrolling is supported. -
  • -
  • - On Cocoa, apply font quality setting to line numbers. - Bug #1544. -
  • -
  • - On Cocoa, clicking in margin now sets focus. - Bug #1542. -
  • -
  • - On Cocoa, correct cursor displayed in margin after showing dialog. -
  • -
  • - On Cocoa, multipaste mode now works. - Bug #1541. -
  • -
  • - On GTK+, chain up to superclass finalize so that all finalization is performed. - Bug #1549. -
  • -
  • - On GTK+, fix horizontal scroll bar range to not be double the needed width. - Bug #1546. -
  • -
  • - On OS X GTK+, report control key as SCI_META for mouse down events. -
  • -
  • - On Qt, bug fixed with drawing of scrollbars, where previous contents were not drawn over with some - themes. -
  • -
  • - On Qt, bug fixed with finding monitor rectangle which could lead to autocomplete showing at wrong location. -
  • -
  • - SciTE fix for multiple message boxes when failing to save a file with save.on.deactivate. - Bug #1540. -
  • -
  • - SciTE on GTK+ fixes SIGCHLD handling so that Lua scripts can determine the exit status of processes - they start. - Bug #1557. -
  • -
  • - SciTE on Windows XP fixes bad display of find and replace values when using strips. -
  • -
-

- Release 3.3.6 -

-
    -
  • - Released 15 October 2013. -
  • -
  • - Added functions to help convert between substyles and base styles and between secondary and primary styles. - SCI_GETSTYLEFROMSUBSTYLE finds the base style of substyles. - Can be used to treat all substyles of a style equivalent to that style. - SCI_GETPRIMARYSTYLEFROMSTYLE finds the primary style of secondary styles. - StyleFromSubStyle and PrimaryStyleFromStyle methods were added to ILexerWithSubStyles so each lexer can implement these. -
  • -
  • - Lexer added for Rust language. - Feature #1024. -
  • -
  • - Avoid false matches in errorlist lexer which is used for the SciTE output pane - by stricter checking of ctags lines. -
  • -
  • - Perl lexer fixes bugs with multi-byte characters, including in HEREDOCs and PODs. - Bug #1528. -
  • -
  • - SQL folder folds 'create view' statements. - Feature #1020. -
  • -
  • - Visual Prolog lexer updated with better support for string literals and Unicode. - Feature #1025. -
  • -
  • - For SCI_SETIDENTIFIERS, \t, \r, and \n are allowed as well as space between identifiers. - Bug #1521. -
  • -
  • - Gaining and losing focus is now reported as a notification with the code set to SCN_FOCUSIN - or SCN_FOCUSOUT. - This allows clients to uniformly use notifications instead of commands. - Since there is no longer a need for commands they will be deprecated in a future version. - Clients should switch any code that currently uses SCEN_SETFOCUS or SCEN_KILLFOCUS. -
  • -
  • - On Cocoa, clients should use the delegate mechanism or subclass ScintillaView in preference - to registerNotifyCallback: which will be deprecated in the future. -
  • -
  • - On Cocoa, the ScintillaView.h header hides internal implementation details from Platform.h and ScintillaCocoa.h. - InnerView was renamed to SCIContentView and MarginView was renamed to SCIMarginView. - dealloc removed from @interface. -
  • -
  • - On Cocoa, clients may customize SCIContentView by subclassing both SCIContentView and ScintillaView - and implementing the contentViewClass class method on the ScintillaView subclass to return the class of - the SCIContentView subclass. -
  • -
  • - On Cocoa, fixed appearance of alpha rectangles to use specified alpha and colour for outline as well as corner size. - This makes INDIC_STRAIGHTBOX and INDIC_ROUNDBOX look correct. -
  • -
  • - On Cocoa, memory leak fixed for MarginView. -
  • -
  • - On Cocoa, make drag and drop work when destination view is empty. - Bug #1534. -
  • -
  • - On Cocoa, drag image fixed when view scrolled. -
  • -
  • - On Cocoa, SCI_POSITIONFROMPOINTCLOSE fixed when view scrolled. - Feature #1021. -
  • -
  • - On Cocoa, don't send selection change notification when scrolling. - Bug #1522. -
  • -
  • - On Qt, turn off idle events on destruction to prevent repeatedly calling idle. -
  • -
  • - Qt bindings in ScintillaEdit changed to use signed first parameter. -
  • -
  • - Compilation errors fixed on Windows and GTK+ with SCI_NAMESPACE. -
  • -
  • - On Windows, building with gcc will check if Direct2D headers are available and enable Direct2D if they are. -
  • -
  • - Avoid attempts to redraw empty areas when lexing beyond the currently visible lines. -
  • -
  • - Control more attributes of indicators in SciTE with find.mark.indicator and highlight.current.word.indicator - properties. -
  • -
  • - Fix SciTE bug with buffers becoming read-only. - Bug #1525. -
  • -
  • - Fix linking SciTE on non-Linux Unix systems with GNU toolchain by linking to libdl. - Bug #1523. -
  • -
  • - On Windows, SciTE's Incremental Search displays match failures by changing the background colour - instead of not adding the character that caused failure. -
  • -
  • - Fix SciTE on GTK+ 3.x incremental search to change foreground colour when no match as - changing background colour is difficult. -
  • -
-

- Release 3.3.5 -

-
    -
  • - Released 31 August 2013. -
  • -
  • - Characters may be represented by strings. - In Unicode mode C1 control characters are represented by their mnemonics. -
  • -
  • - Added SCI_POSITIONRELATIVE to optimize navigation by character. -
  • -
  • - Option to allow mouse selection to switch to rectangular by pressing Alt after start of gesture. - Feature #1007. -
  • -
  • - Lexer added for KVIrc script. - Feature #1008. -
  • -
  • - Bash lexer fixed quoted HereDoc delimiters. - Bug #1500. -
  • -
  • - MS SQL lexer fixed ';' to appear as an operator. - Bug #1509. -
  • -
  • - Structured Text lexer fixed styling of enumeration members. - Bug #1508. -
  • -
  • - Fixed bug with horizontal caret position when margin changed. - Bug #1512. -
  • -
  • - Fixed bug on Cocoa where coordinates were relative to text subview instead of whole view. -
  • -
  • - Ensure selection redrawn correctly in two cases. - When switching from stream to rectangular selection with Alt+Shift+Up. - When reducing the range of an additional selection by moving mouse up. - Feature #1007. -
  • -
  • - Copy and paste of rectangular selections compatible with Borland Delphi IDE on Windows. - Feature #1002. - Bug #1513. -
  • -
  • - Initialize extended styles to the default style. -
  • -
  • - On Windows, fix painting on an explicit HDC when first paint attempt abandoned. -
  • -
  • - Qt bindings in ScintillaEdit made to work on 64-bit Unix systems. -
  • -
  • - Easier access to printing on Qt with formatRange method. -
  • -
  • - Fixed SciTE failure to save initial buffer in single buffer mode. - Bug #1339. -
  • -
  • - Fixed compilation problem with Visual C++ in non-English locales. - Bug #1506. -
  • -
  • - Disable Direct2D when compiling with MinGW gcc on Windows because of changes in the recent MinGW release. -
  • -
  • - SciTE crash fixed for negative line.margin.width. - Bug #1504. -
  • -
  • - SciTE fix for infinite dialog boxes when failing to automatically save a file. - Bug #1503. -
  • -
  • - SciTE settings buffered.draw, two.phase.draw, and technology are applied to the - output pane as well as the edit pane. -
  • -
-

- Release 3.3.4 -

-
    -
  • - Released 19 July 2013. -
  • -
  • - Handling of UTF-8 and DBCS text in lexers improved with methods ForwardBytes and - GetRelativeCharacter added to StyleContext. - Bug #1483. -
  • -
  • - For Unicode text, case-insensitive searching and making text upper or lower case is now - compliant with Unicode standards on all platforms and is much faster for non-ASCII characters. -
  • -
  • - A CategoriseCharacter function was added to return the Unicode general category of a character - which can be useful in lexers. -
  • -
  • - On Cocoa, the LCD Optimized font quality level turns font smoothing on. -
  • -
  • - SciTE 'immediate' subsystem added to allow scripts that work while tools are executed. -
  • -
  • - Font quality exposed in SciTE as font.quality setting. -
  • -
  • - On Cocoa, message:... methods simplify direct access to Scintilla and avoid call layers.. -
  • -
  • - A68K lexer updated. -
  • -
  • - CoffeeScript lexer fixes a bug with comment blocks. - Bug #1495 -
  • -
  • - ECL lexer regular expression code fixed. - Bug #1491. -
  • -
  • - errorlist lexer only recognizes Perl diagnostics when there is a filename between - "at" and "line". Had been triggering for MSVC errors containing "at line". -
  • -
  • - Haskell lexer fixed to avoid unnecessary full redraws. - Don't highlight CPP inside comments when styling.within.preprocessor is on. - Bug #1459. -
  • -
  • - Lua lexer fixes bug in labels with UTF-8 text. - Bug #1483. -
  • -
  • - Perl lexer fixes bug in string interpolation with UTF-8 text. - Bug #1483. -
  • -
  • - Fixed bugs with case conversion when the result was longer or shorter than the original text. - Could access past end of string potentially crashing. - Selection now updated to result length. -
  • -
  • - Fixed bug where data being inserted and removed was not being reported in - notification messages. Bug was introduced in 3.3.2. -
  • -
  • - Word wrap bug fixed where the last line could be shown twice. -
  • -
  • - Word wrap bug fixed for lines wrapping too short on Windows and GTK+. -
  • -
  • - Word wrap performance improved. -
  • -
  • - Minor memory leak fixed. - Bug #1487. -
  • -
  • - On Cocoa, fixed insertText: method which was broken when implementing a newer protocol. -
  • -
  • - On Cocoa, fixed a crash when performing string folding for bytes that do not represent a character - in the current encoding. -
  • -
  • - On Qt, fixed layout problem when QApplication construction delayed. -
  • -
  • - On Qt, find_text reports failure with -1 as first element of return value. -
  • -
  • - Fixed SciTE on GTK+ bug where a tool command could be performed using the keyboard while one was - already running leading to confusion and crashes. - Bug #1486. -
  • -
  • - Fixed SciTE bug in Copy as RTF which was limited to first 32 styles. - Bug #1011. -
  • -
  • - Fixed SciTE on Windows user strip height when the system text scaling factor is 125% or 150%. -
  • -
  • - Compile time checks for Digital Mars C++ removed. -
  • -
  • - Visual C++ 2013 supported. - Bug #1492. -
  • -
  • - Python scripts used for building and maintenance improved and moved into scripts directory. -
  • -
  • - Testing scripts now work on Linux using Qt and PySide. -
  • -
  • - Tk platform defined. - Implementation for Tk will be available separately from main Scintilla distribution. -
  • -
-

- Release 3.3.3 -

-
    -
  • - Released 2 June 2013. -
  • -
  • - Lexer and folder added for Structured Text language. - Feature #959. -
  • -
  • - Out of bounds access fixed for GTK+. - Bug #1480. -
  • -
  • - Crash fixed for GTK+ on Windows paste. -
  • -
  • - Bug fixed with incorrect event copying on GTK+ 3.x. - Bug #1481. -
  • -
  • - Bug fixed with right to left locales, like Hebrew, on GTK+. - Bug #1477. -
  • -
  • - Bug fixed with undo grouping of tab and backtab commands. - Bug #1478. -
  • -
-

- Release 3.3.2 -

-
    -
  • - Released 22 May 2013. -
  • -
  • - Basic implementations of common folding methods added to Scintilla to make it - easier for containers to implement folding. -
  • -
  • - Add indicator INDIC_COMPOSITIONTHICK, a thick low underline, to mimic an - appearance used for Asian language input composition. -
  • -
  • - On Cocoa, implement font quality setting. - Feature #988. -
  • -
  • - On Cocoa, implement automatic enabling of commands and added clear command. - Feature #987. -
  • -
  • - C++ lexer adds style for preprocessor doc comment. - Feature #990. -
  • -
  • - Haskell lexer and folder improved. Separate mode for literate Haskell "literatehaskell" SCLEX_LITERATEHASKELL. - Bug #1459 . -
  • -
  • - LaTeX lexer bug fixed for Unicode character following '\'. - Bug #1468 . -
  • -
  • - PowerShell lexer recognizes here strings and doccomment keywords. - #region folding added. - Feature #985. -
  • -
  • - Fix multi-typing when two carets are located in virtual space on one line so that spaces - are preserved. -
  • -
  • - Fixes to input composition on Cocoa and implementation of accented character input through - press and hold. Set selection correctly so that changes to pieces of composition text are easier to perform. - Restore undo collection after a sequence of composition actions. - Composition popups appear near input. -
  • -
  • - Fix lexer problem where no line end was seen at end of document. -
  • -
  • - Fix crash on Cocoa when view deallocated. - Bug #1466. -
  • -
  • - Fix Qt window positioning to not assume the top right of a monitor is at 0, 0. -
  • -
  • - Fix Qt to not track mouse when widget is hidden. -
  • -
  • - Qt now supports Qt 5.0. - Bug #1448. -
  • -
  • - Fix drawing on Windows with Direct2D when returning from lock screen. - The render target had to be recreated and an area would be black since the drawing was not retried. -
  • -
  • - Fix display of DBCS documents on Windows Direct2D/DirectWrite with default character set. -
  • -
  • - For SciTE on Windows, fixed most-recently-used menu when files opened through check.if.already.opened. -
  • -
  • - In SciTE, do not call OnSave twice when files saved asynchronously. -
  • -
  • - Scintilla no longer builds with Visual C++ 6.0. -
  • -
-

- Release 3.3.1 -

-
    -
  • - Released 11 April 2013. -
  • -
  • - Autocompletion lists can now appear in priority order or be sorted by Scintilla. - Feature #981. -
  • -
  • - Most lexers now lex an extra NUL byte at the end of the - document which makes it more likely they will classify keywords at document end correctly. - Bug #574, - Bug #588. -
  • -
  • - Haskell lexer improved in several ways. - Bug #1459. -
  • -
  • - Matlab/Octave lexer recognizes block comments and ... comments. - Bug #1414. -
  • -
  • - Ruby lexer crash fixed with keyword at start of document. -
  • -
  • - The PLAT_NCURSES platform now called PLAT_CURSES as may work on other implementations. -
  • -
  • - Bug on Cocoa fixed where input composition with multiple selection or virtual space selection - could make undo stop working. -
  • -
  • - Direct2D/DirectWrite mode on Windows now displays documents in non-Latin1 8-bit encodings correctly. -
  • -
  • - Character positioning corrected in Direct2D/DirectWrite mode on Windows to avoid text moving and cutting off - lower parts of characters. -
  • -
  • - Position of calltip and autocompletion lists fixed on Cocoa. -
  • -
  • - While regular expression search in DBCS text is still not working, matching partial characters is now avoided - by moving end of match to end of character. -
  • -
-

- Release 3.3.0 -

-
    -
  • - Released 30 March 2013. -
  • -
  • - Overlay scrollers and kinetic scrolling implemented on Cocoa. -
  • -
  • - To improve display smoothness, styling and UI Update notifications will, when possible, be performed in - a high-priority idle task on Cocoa instead of during painting. - Performing these jobs inside painting can cause paints to be abandoned and a new paint scheduled. - On GTK+, the high-priority idle task is used in more cases. -
  • -
  • - SCI_SCROLLRANGE added to scroll the view to display a range of text. - If the whole range can not be displayed, priority is given to one end. -
  • -
  • - C++ lexer no longer recognizes raw (R"") strings when the first character after " - is invalid. - Bug #1454. -
  • -
  • - HTML lexer recognizes JavaScript RegEx literals in more contexts. - Bug #1412. -
  • -
  • - Fixed automatic display of folded text when return pressed at end of fold header and - first folded line was blank. - Bug #1455. -
  • -
  • - SCI_VISIBLEFROMDOCLINE fixed to never return a line beyond the document end. -
  • -
  • - SCI_LINESCROLL fixed for a negative column offset. - Bug #1450. -
  • -
  • - On GTK+, fix tab markers so visible if indent markers are visible. - Bug #1453. -
  • -
-

- Release 3.2.5 -

-
    -
  • - Released 26 February 2013. -
  • -
  • - To allow cooperation between different uses of extended (beyond 255) styles they should be allocated - using SCI_ALLOCATEEXTENDEDSTYLES. -
  • -
  • - For Unicode documents, lexers that use StyleContext will retrieve whole characters - instead of bytes. - LexAccessor provides a LineEnd method which can be a more efficient way to - handle line ends and can enable Unicode line ends. -
  • -
  • - The C++ lexer understands the #undef directive when determining preprocessor definitions. - Feature #978. -
  • -
  • - The errorlist lexer recognizes gcc include path diagnostics that appear before an error. -
  • -
  • - Folding implemented for GetText (PO) translation language. - Bug #1437. -
  • -
  • - HTML lexer does not interrupt comment style for processing instructions. - Bug #1447. -
  • -
  • - Fix SciTE forgetting caret x-position when switching documents. - Bug #1442. -
  • -
  • - Fixed bug where vertical scrollbar thumb appeared at beginning of document when - scrollbar shown. - Bug #1446. -
  • -
  • - Fixed brace-highlighting bug on OS X 10.8 where matching brace is on a different line. -
  • -
  • - Provisional features - are new features that may change or be removed if they cause problems but should become - permanent if they work well. - For this release Unicode line ends and - substyles - are provisional features. -
  • -
-

- Release 3.2.4 -

-
    -
  • - Released 17 January 2013. -
  • -
  • - Caret line highlight can optionally remain visible when window does not have focus. - Feature #964. -
  • -
  • - Delegate mechanism for notifications added on Cocoa. -
  • -
  • - NUL characters in selection are copied to clipboard as spaces to avoid truncating - at the NUL. - Bug #1289. -
  • -
  • - C++ lexer fixes problem with showing inactive sections when preprocessor lines contain trailing comment. - Bug #1413. -
  • -
  • - C++ lexer fixes problem with JavaScript regular expressions with '/' in character ranges. - Bug #1415. -
  • -
  • - LaTeX folder added. - Feature #970. -
  • -
  • - LaTeX lexer improves styling of math environments. - Feature #970. -
  • -
  • - MySQL lexer implements hidden commands. -
  • -
  • - Only produce a single undo step when autocompleting a single word. - Bug #1421. -
  • -
  • - Fixed crash when printing lines longer than 8000 characters. - Bug #1430. -
  • -
  • - Fixed problem in character movement extends selection mode where reversing - direction collapsed the selection. -
  • -
  • - Memory issues fixed on Cocoa, involving object ownership, - lifetime of timers, and images held by the info bar. - Bug #1436. -
  • -
  • - Cocoa key binding for Alt+Delete changed to delete previous word to be more compatible with - platform standards. -
  • -
  • - Fixed crash on Cocoa with scrollbar when there is no scrolling possible. - Bug #1416. -
  • -
  • - On Cocoa with retina display fixed positioning of autocompletion lists. -
  • -
  • - Fixed SciTE on Windows failure to run a batch file with a name containing a space by - quoting the path in the properties file. - Bug #1423. -
  • -
  • - Fixed scaling bug when printing on GTK+. - Bug #1427. -
  • -
  • - SciTE on GTK toolbar.detachable feature removed. -
  • -
  • - Fixed some background saving bugs in SciTE. - Bug #1366. - Bug #1339. -
  • -
-

- Release 3.2.3 -

-
    -
  • - Released 21 October 2012. -
  • -
  • - Improve speed when performing multiple searches. -
  • -
  • - SciTE adds definition of PLAT_UNIX for both PLAT_GTK and PLAT_MAC to allow consolidation of - settings valid on all Unix variants. -
  • -
  • - Signal autoCompleteCancelled added on Qt. -
  • -
  • - Bash lexer supports nested delimiter pairs. - Feature #3569352. - Bug #1515556. - Bug #3008483. - Bug #3512208. - Bug #3515392. -
  • -
  • - For C/C++, recognize exponent in floating point hexadecimal literals. - Bug #3576454. -
  • -
  • - For C #include statements, do not treat // in the path as a comment. - Bug #3519260. -
  • -
  • - Lexer for GetText translations (PO) improved with additional styles and single instance limitation fixed. -
  • -
  • - Ruby for loop folding fixed. - Bug #3240902. - Bug #3567391. -
  • -
  • - Ruby recognition of here-doc after class or instance variable fixed. - Bug #3567809. -
  • -
  • - SQL folding of loop and case fixed. - Bug #3567905. -
  • -
  • - SQL folding of case with assignment fixed. - Bug #3571820. -
  • -
  • - Fix hang when removing all characters from indicator at end of document. -
  • -
  • - Fix failure of \xhh in regular expression search for values greater than 0x79. -
  • -
  • - On Cocoa on OS X 10.8, fix inverted drawing of find indicator. -
  • -
  • - On Cocoa, fix double drawing when horizontal scroll range small and user swipes horizontally. -
  • -
  • - On Cocoa, remove incorrect setting of save point when reading information through 'string' and 'selectedString'. -
  • -
  • - On Cocoa, fix incorrect memory management of infoBar. -
  • -
  • - On GTK+ 3 Ubuntu, fix crash when drawing margin. -
  • -
  • - On ncurses, fix excessive spacing with italics line end. -
  • -
  • - On Windows, search for D2D1.DLL and DWRITE.DLL in system directory to avoid loading from earlier - in path where could be planted by malware. -
  • -
-

- Release 3.2.2 -

-
    -
  • - Released 31 August 2012. -
  • -
  • - Retina display support for Cocoa. Text size fixed. - Scale factor for images implemented so they can be displayed in high definition. -
  • -
  • - Implement INDIC_SQUIGGLEPIXMAP as a faster version of INDIC_SQUIGGLE. - Avoid poor drawing at right of INDIC_SQUIGGLE. - Align INDIC_DOTBOX to pixel grid for full intensity. -
  • -
  • - Implement SCI_GETSELECTIONEMPTY API. - Bug #3543121. -
  • -
  • - Added SCI_VCHOMEDISPLAY and SCI_VCHOMEDISPLAYEXTEND key commands. - Feature #3561433. -
  • -
  • - Allow specifying SciTE Find in Files directory with find.in.directory property. - Feature #3558594. -
  • -
  • - Override SciTE global strip.trailing.spaces with strip.trailing.spaces by pattern files. - Feature #3556320. -
  • -
  • - Fix long XML script tag handling in XML lexer. - Bug #3534190. -
  • -
  • - Fix rectangular selection range after backspace. - Bug #3543097. -
  • -
  • - Send SCN_UPDATEUI with SC_UPDATE_SELECTION for backspace in virtual space. - Bug #3543121. -
  • -
  • - Avoid problems when calltip highlight range is negative. - Bug #3545938. -
  • -
  • - On Cocoa, fix image drawing code so that image is not accessed after being freed - and is drawn in the correct location. -
  • -
  • - On Cocoa, limit horizontal touch scrolling to existing established width. -
  • -
  • - On Cocoa, decrease sensitivity of pinch-zoom. -
  • -
  • - Fix Cocoa drawing where style changes were not immediately visible. -
  • -
  • - Fix Cocoa memory leak due to reference cycle. -
  • -
  • - Fix Cocoa bug where notifications were sent after Scintilla was freed. -
  • -
  • - SciTE on OS X user shortcuts treats "Ctrl+D" as equivalent to "Ctrl+d". -
  • -
  • - On Windows, saving SciTE's Lua startup script causes it to run. -
  • -
  • - Limit time allowed to highlight current word in SciTE to 0.25 seconds to remain responsive. -
  • -
  • - Fixed SciTE read-only mode to stick with buffer. -
  • -
  • - For SciTE on Windows, enable Ctrl+Z, Ctrl+X, and Ctrl+C (Undo, Cut, and Copy) in the - editable fields of find and replace strips -
  • -
  • - Remove limit on logical line length in SciTE .properties files. - Bug #3544312. -
  • -
  • - Improve performance of SciTE Save As command. -
  • -
  • - Fix SciTE crash with empty .properties files. Bug #3545938. - Bug #3555308. -
  • -
  • - Fix repeated letter in SciTE calltips. - Bug #3545938. -
  • -
  • - Refine build time checking for Direct2D and DirectWrite. -
  • -
  • - Avoid potential build problems on Windows with MultiMon.h by explicitly checking for multi-monitor APIs. -
  • -
  • - Automatically disable themed drawing in SciTE when building on Windows 2000. - Reenable building for Windows NT 4 on NT 4 . -
  • -
  • - Added ncurses platform definitions. Implementation is maintained separately as - Scinterm. -
  • -
-

- Release 3.2.1 -

-
    -
  • - Released 14 July 2012. -
  • -
  • - In Scintilla.iface, specify features as properties instead of functions where possible and fix some enumerations. -
  • -
  • - In SciTE Lua scripts, string properties in Scintilla API can be retrieved as well as set using property notation. -
  • -
  • - Added character class APIs: SCI_SETPUNCTUATIONCHARS, SCI_GETWORDCHARS, SCI_GETWHITESPACECHARS, - and SCI_GETPUNCTUATIONCHARS. - Feature #3529805. -
  • -
  • - Less/Hss support added to CSS lexer. - Feature #3532413. -
  • -
  • - C++ lexer style SCE_C_PREPROCESSORCOMMENT added for stream comments in preprocessor. - Bug #3487406. -
  • -
  • - Fix incorrect styling of inactive code in C++ lexer. - Bug #3533036. -
  • -
  • - Fix incorrect styling by C++ lexer after empty lines in preprocessor style. -
  • -
  • - C++ lexer option "lexer.cpp.allow.dollars" fixed so can be turned off after being on. - Bug #3541461. -
  • -
  • - Fortran fixed format lexer fixed to style comments from column 73. - Bug #3540486. -
  • -
  • - Fortran folder folds CRITICAL .. END CRITICAL. - Bug #3540486. -
  • -
  • - Fortran lexer fixes styling after comment line ending with '&'. - Bug #3087226. -
  • -
  • - Fortran lexer styles preprocessor lines so they do not trigger incorrect folding. - Bug #2906275. -
  • -
  • - Fortran folder fixes folding of nested ifs. - Bug #2809176. -
  • -
  • - HTML folder fixes folding of CDATA when fold.html.preprocessor=0. - Bug #3540491. -
  • -
  • - On Cocoa, fix autocompletion font lifetime issue and row height computation. -
  • -
  • - In 'choose single' mode, autocompletion will close an existing list if asked to display a single entry list. -
  • -
  • - Fixed SCI_MARKERDELETE to only delete one marker per call. - Bug #3535806. -
  • -
  • - Properly position caret after undoing coalesced delete operations. - Bug #3523326. -
  • -
  • - Ensure margin is redrawn when SCI_MARGINSETSTYLE called. -
  • -
  • - Fix clicks in first pixel of margins to send SCN_MARGINCLICK. -
  • -
  • - Fix infinite loop when drawing block caret for a zero width space character at document start. -
  • -
  • - Crash fixed for deleting negative range. -
  • -
  • - For characters that overlap the beginning of their space such as italics descenders and bold serifs, allow start - of text to draw 1 pixel into margin. - Bug #699587. - Bug #3537799. -
  • -
  • - Fixed problems compiling Scintilla for Qt with GCC 4.7.1 x64. -
  • -
  • - Fixed problem with determining GTK+ sub-platform caused when adding Qt support in 3.2.0. -
  • -
  • - Fix incorrect measurement of untitled file in SciTE on Linux leading to message "File ...' is 2147483647 bytes long". - Bug #3537764. -
  • -
  • - In SciTE, fix open of selected filename with line number to go to that line. -
  • -
  • - Fix problem with last visible buffer closing in SciTE causing invisible buffers to be active. -
  • -
  • - Avoid blinking of SciTE's current word highlight when output pane changes. -
  • -
  • - SciTE properties files can be longer than 60K. -
  • -
-

- Release 3.2.0 -

-
    -
  • - Released 1 June 2012. -
  • -
  • - Platform layer added for the Qt open-source cross-platform application and user interface framework - for development in C++ or in Python with the PySide bindings for Qt. -
  • -
  • - Direct access provided to the document bytes for ranges within Scintilla. - This is similar to the existing SCI_GETCHARACTERPOINTER API but allows for better performance. -
  • -
  • - Ctrl+Double Click and Ctrl+Triple Click add the word or line to the set of selections. - Feature #3520037. -
  • -
  • - A SCI_DELETERANGE API was added for deleting a range of text. -
  • -
  • - Line wrap markers may now be drawn in the line number margin. - Feature #3518198. -
  • -
  • - SciTE on OS X adds option to hide hidden files in the open dialog box. -
  • -
  • - Lexer added for OScript language. - Feature #3523197. -
  • -
  • - Lexer added for Visual Prolog language. - Feature #3523018. -
  • -
  • - UTF-8 validity is checked more stringently and consistently. All 66 non-characters are now treated as invalid. -
  • -
  • - HTML lexer bug fixed with inconsistent highlighting for PHP when attribute on separate line from tag. - Bug #3520027. -
  • -
  • - HTML lexer bug fixed for JavaScript block comments. - Bug #3520032. -
  • -
  • - Annotation drawing bug fixed when box displayed with different colours on different lines. - Bug #3519872. -
  • -
  • - On Windows with Direct2D, fix drawing with 125% and 150% DPI system settings. -
  • -
  • - Virtual space selection bug fixed for rectangular selections. - Bug #3519246. -
  • -
  • - Replacing multiple selection with newline changed to only affect main selection. - Bug #3522251. -
  • -
  • - Replacing selection with newline changed to group deletion and insertion as a single undo action. - Bug #3522250. -
  • -
  • - Auto-completion lists on GTK+ 3 set height correctly instead of showing too few lines. -
  • -
  • - Mouse wheel scrolling changed to avoid GTK+ bug in recent distributions. -
  • -
  • - IME bug on Windows fixed for horizontal jump. - Bug #3529728. -
  • -
  • - SciTE case-insensitive autocompletion filters equal identifiers better. - Calltip arrows work with bare word identifiers. - Bug #3517810. -
  • -
  • - SciTE bug fixed where shbang lines not setting file type when switching - to file loaded in background. -
  • -
  • - SciTE on GTK+ shows open and save dialogs with the directory of the current file displayed. -
  • -
-

- Release 3.1.0 -

-
    -
  • - Released 20 April 2012. -
  • -
  • - Animated find indicator added on Cocoa. -
  • -
  • - Buttons can be made default in SciTE user strips. -
  • -
  • - SciTE allows find and replace histories to be saved in session. -
  • -
  • - Option added to allow case-insensitive selection in auto-completion lists. - Bug #3516538. -
  • -
  • - Replace \0 by complete found text in regular expressions. - Feature #3510979. -
  • -
  • - Fixed single quoted strings in bash lexer. - Bug #3512208. -
  • -
  • - Incorrect highlighting fixed in C++ lexer for continued lines. - Bug #3509317. -
  • -
  • - Hang fixed in diff lexer. - Bug #3508602. -
  • -
  • - Folding improved for SQL CASE/MERGE statement. - Bug #3503277. -
  • -
  • - Fix extra drawing of selection inside word wrap indentation. - Bug #3515555. -
  • -
  • - Fix problem with determining the last line that needs styling when drawing. - Bug #3514882. -
  • -
  • - Fix problems with drawing in margins. - Bug #3514882. -
  • -
  • - Fix printing crash when using Direct2D to display on-screen. - Bug #3513946. -
  • -
  • - Fix SciTE bug where background.*.size disabled restoration of bookmarks and positions from session. - Bug #3514885. -
  • -
  • - Fixed the Move Selected Lines command when last line does not end with a line end character. - Bug #3511023. -
  • -
  • - Fix word wrap indentation printing to use printer settings instead of screen settings. - Bug #3512961. -
  • -
  • - Fix SciTE bug where executing an empty command prevented executing further commands - Bug #3512976. -
  • -
  • - Fix SciTE bugs with focus in user strips and made strips more robust with invalid definitions. -
  • -
  • - Suppress SciTE regular expression option when searching with find next selection. - Bug #3510985. -
  • -
  • - SciTE Find in Files command matches empty pattern to all files. - Feature #3495918. -
  • -
  • - Fix scroll with mouse wheel on GTK+. - Bug #3501321. -
  • -
  • - Fix column finding method so that tab is counted correctly. - Bug #3483713. -
  • -
-

- Release 3.0.4 -

-
    -
  • - Released 8 March 2012. -
  • -
  • - SciTE scripts can create user interfaces as strips. -
  • -
  • - SciTE can save files automatically in the background. -
  • -
  • - Pinch zoom implemented on Cocoa. -
  • -
  • - ECL lexer added. - Feature #3488209. -
  • -
  • - CPP lexer fixes styling after document comment keywords. - Bug #3495445. -
  • -
  • - Pascal folder improves handling of some constructs. - Feature #3486385. -
  • -
  • - XML lexer avoids entering a bad mode due to complex preprocessor instructions. - Bug #3488060. -
  • -
  • - Duplicate command is always remembered as a distinct command for undo. - Bug #3495836. -
  • -
  • - SciTE xml.auto.close.tags no longer closes with PHP code similar to <a $this-> - Bug #3488067. -
  • -
  • - Fix bug where setting an indicator for the whole document would fail. - Bug #3487440. -
  • -
  • - Crash fixed for SCI_MOVESELECTEDLINESDOWN with empty vertical selection. - Bug #3496403. -
  • -
  • - Differences between buffered and unbuffered mode on Direct2D eliminated. - Bug #3495791. -
  • -
  • - Font leading implemented for Direct2D to improve display of character blobs. - Bug #3494744. -
  • -
  • - Fractional widths used for line numbers, character markers and other situations. - Bug #3494492. -
  • -
  • - Translucent rectangles drawn using Direct2D with sharper corners. - Bug #3494492. -
  • -
  • - RGBA markers drawn sharper when centred using Direct2D. - Bug #3494202. -
  • -
  • - RGBA markers are drawn centred when taller than line. - Bug #3494184. -
  • -
  • - Image marker drawing problem fixed for markers taller than line. - Bug #3493503. -
  • -
  • - Markers are drawn horizontally off-centre based on margin type instead of dimensions. - Bug #3488696. -
  • -
  • - Fold tail markers drawn vertically centred. - Feature #3488289. -
  • -
  • - On Windows, Scintilla is more responsive in wrap mode. - Bug #3487397. -
  • -
  • - Unimportant "Gdk-CRITICAL" messages are no longer displayed. - Bug #3488481. -
  • -
  • - SciTE on Windows Find in Files sets focus to dialog when already created; allows opening dialog when a job is running. - Bug #3480635. - Bug #3486657. -
  • -
  • - Fixed problems with multiple clicks in margin and with mouse actions combined with virtual space. - Bug #3484370. -
  • -
  • - Fixed bug with using page up and down and not returning to original line. - Bug #3485669. -
  • -
  • - Down arrow with wrapped text no longer skips lines. - Bug #1776560. -
  • -
  • - Fix problem with dwell ending immediately due to word wrap. - Bug #3484416. -
  • -
  • - Wrapped lines are rewrapped more consistently while resizing window. - Bug #3484179. -
  • -
  • - Selected line ends are highlighted more consistently. - Bug #3484330. -
  • -
  • - Fix grey background on files that use shbang to choose language. - Bug #3482777. -
  • -
  • - Fix failure messages from empty commands in SciTE. - Bug #3480645. -
  • -
  • - Redrawing reduced for some marker calls. - Feature #3493530. -
  • -
  • - Match brace and select brace commands work in SciTE output pane. - Feature #3486598. -
  • -
  • - Performing SciTE "Show Calltip" command when a calltip is already visible shows the next calltip. - Feature #3487017. -
  • -
  • - SciTE allows saving file even when file unchanged. - Feature #3486654. -
  • -
  • - SciTE allows optional use of character escapes in calltips. - Feature #3495239. -
  • -
  • - SciTE can open file:// URLs with Ctrl+Shift+O. - Feature #3495389. -
  • -
  • - Key modifiers updated for GTK+ on OS X to match upstream changes. -
  • -
  • - SciTE hang when marking all occurrences of regular expressions fixed. -
  • -
-

- Release 3.0.3 -

-
    -
  • - Released 28 January 2012. -
  • -
  • - Printing works on GTK+ version 2.x as well as 3.x. -
  • -
  • - Lexer added for the AviSynth language. - Feature #3475611. -
  • -
  • - Lexer added for the Take Command / TCC scripting language. - Feature #3462462. -
  • -
  • - CSS lexer gains support for SCSS. - Feature #3268017. -
  • -
  • - CPP lexer fixes problems in the preprocessor structure caused by continuation lines. - Bug #3458508. -
  • -
  • - Errorlist lexer handles column numbers for GCC format diagnostics. - In SciTE, Next Message goes to column where this can be decoded from GCC format diagnostics. - Feature #3453075. -
  • -
  • - HTML folder fixes spurious folds on some tags. - Bug #3459262. -
  • -
  • - Ruby lexer fixes bug where '=' at start of file caused whole file to appear as a comment. - Bug #3452488. -
  • -
  • - SQL folder folds blocks of single line comments. - Feature #3467425. -
  • -
  • - On Windows using Direct2D, defer invalidation of render target until completion of painting to avoid failures. -
  • -
  • - Further support of fractional positioning. Spaces, tabs, and single character tokens can take fractional space - and wrapped lines are positioned taking fractional positions into account. - Bug #3471998. -
  • -
  • - On Windows using Direct2D, fix extra carets appearing. - Bug #3471998. -
  • -
  • - For autocompletion lists Page Up and Down move by the list height instead of by 5 lines. - Bug #3455493. -
  • -
  • - For SCI_LINESCROLLDOWN/UP don't select into virtual space. - Bug #3451681. -
  • -
  • - Fix fold highlight not being fully drawn. - Bug #3469936. -
  • -
  • - Fix selection margin appearing black when starting in wrap mode. -
  • -
  • - Fix crash when changing end of document after adding an annotation. - Bug #3476637. -
  • -
  • - Fix problems with building to make RPMs. - Bug #3476149. -
  • -
  • - Fix problem with building on GTK+ where recent distributions could not find gmodule. - Bug #3469056. -
  • -
  • - Fix problem with installing SciTE on GTK+ due to icon definition in .desktop file including an extension. - Bug #3476117. -
  • -
  • - Fix SciTE bug where new buffers inherited some properties from previously opened file. - Bug #3457060. -
  • -
  • - Fix focus when closing tab in SciTE with middle click. Focus moves to edit pane instead of staying on tab bar. - Bug #3440142. -
  • -
  • - For SciTE on Windows fix bug where Open Selected Filename for URL would append a file extension. - Feature #3459185. -
  • -
  • - For SciTE on Windows fix key handling of control characters in Parameters dialog so normal editing (Ctrl+C, ...) works. - Bug #3459345. -
  • -
  • - Fix SciTE bug where files became read-only after saving. Drop the "*" dirty marker after save completes. - Bug #3467432. -
  • -
  • - For SciTE handling of diffs with "+++" and "---" lines, also handle case where not followed by tab. - Go to correct line for diff "+++" message. - Bug #3467143. - Bug #3467178. -
  • -
  • - SciTE on GTK+ now performs threaded actions even on GTK+ versions before 2.12. -
  • -
-

- Release 3.0.2 -

-
    -
  • - Released 9 December 2011. -
  • -
  • - SciTE saves files in the background without blocking the user interface. -
  • -
  • - Printing implemented in SciTE on GTK+ 3.x. -
  • -
  • - ILoader interface for background loading finalized and documented. -
  • -
  • - CoffeeScript lexer added. -
  • -
  • - C++ lexer fixes crash with "#if defined( XXX 1". -
  • -
  • - Crash with Direct2D on Windows fixed. -
  • -
  • - Backspace removing protected range fixed. - Bug #3445911. -
  • -
  • - Cursor setting failure on Windows when screen saver on fixed. - Bug #3438780. -
  • -
  • - SciTE on GTK+ hang fixed with -open:file option. - Bug #3441980. -
  • -
  • - Failure to evaluate shbang fixed in SciTE. - Bug #3441801. -
  • -
  • - SciTE failure to treat files starting with "<?xml" as XML fixed. - Bug #3440718. -
  • -
  • - Made untitled tab saveable when created by closing all files. - Bug #3440244. -
  • -
  • - SciTE crash fixed when using Scintillua. -
  • -
  • - SciTE revert command fixed so that undo works on individual actions instead of undoing to revert point. -
  • -
  • - Focus loss in SciTE when opening a recent file fixed. - Bug #3440142. -
  • -
  • - Fixed SciTE SelLength property to measure characters instead of bytes. - Bug #3283519. -
  • -
-

- Release 3.0.1 -

-
    -
  • - Released 15 November 2011. -
  • -
  • - SciTE on Windows now runs Lua scripts directly on the main thread instead of starting them on a - secondary thread and then moving back to the main thread. -
  • -
  • - Highlight "else" as a keyword for TCL in the same way as other languages. - Bug #1836954. -
  • -
  • - Fix problems with setting fonts for autocompletion lists on Windows where - font handles were copied and later deleted causing a system default font to be used. -
  • -
  • - Fix font size used on Windows for Asian language input methods which sometimes led to IME not being visible. - Bug #3436753. -
  • -
  • - Fixed polygon drawing on Windows so fold symbols are visible again. - Bug #3433558. -
  • -
  • - Changed background drawing on GTK+ to allow for fractional character positioning as occurs on OS X - as this avoids faint lines at lexeme boundaries. -
  • -
  • - Ensure pixmaps allocated before painting as there was a crash when Scintilla drew without common initialization calls. - Bug #3432354. -
  • -
  • - Fixed SciTE on Windows bug causing wrong caret position after indenting a selection. - Bug #3433433. -
  • -
  • - Fixed SciTE session saving to store buffer position matching buffer. - Bug #3434372. -
  • -
  • - Fixed leak of document objects in SciTE. -
  • -
  • - Recognize URL characters '?' and '%' for Open Selected command in SciTE. - Bug #3429409. -
  • -
-

- Release 3.0.0 -

-
    -
  • - Released 1 November 2011. -
  • -
  • - Carbon platform support removed. OS X applications should switch to Cocoa. -
  • -
  • - On Windows Vista or newer, drawing may be performed with Direct2D and DirectWrite instead of GDI. -
  • -
  • - Cairo is now used for all drawing on GTK+. GDK drawing was removed. -
  • -
  • - Paletted display support removed. -
  • -
  • - Fractional font sizes can be specified. -
  • -
  • - Different weights of text supported on some platforms instead of just normal and bold. -
  • -
  • - Sub-pixel character positioning supported. -
  • -
  • - SciTE loads files in the background without blocking the user interface. -
  • -
  • - SciTE can display diagnostic messages interleaved with the text of files immediately after the - line referred to by the diagnostic. -
  • -
  • - New API to see if all lines are visible which can be used to optimize processing fold structure notifications. -
  • -
  • - Scrolling optimized by avoiding invalidation of fold margin when redrawing whole window. -
  • -
  • - Optimized SCI_MARKERNEXT. -
  • -
  • - C++ lexer supports Pike hash quoted strings when turned on with lexer.cpp.hashquoted.strings. -
  • -
  • - Fixed incorrect line height with annotations in wrapped mode when there are multiple views. - Bug #3388159. -
  • -
  • - Calltips may be displayed above the text as well as below. - Bug #3410830. -
  • -
  • - For huge files SciTE only examines the first megabyte for newline discovery. -
  • -
  • - SciTE on GTK+ removes the fileselector.show.hidden property and check box as this was buggy and GTK+ now - supports an equivalent feature. - Bug #3413630. -
  • -
  • - SciTE on GTK+ supports mnemonics in dynamic menus. -
  • -
  • - SciTE on GTK+ displays the user's home directory as '~' in menus to make them shorter. -
  • -
-

- Release 2.29 -

-
    -
  • - Released 16 September 2011. -
  • -
  • - To automatically discover the encoding of a file when opening it, SciTE can run a program set with command.discover.properties. - Feature #3324341. -
  • -
  • - Cairo always used for drawing on GTK+. -
  • -
  • - The set of properties files imported by SciTE can be controlled with the properties imports.include and imports.exclude. - The import statement has been extended to allow "import *". - The properties files for some languages are no longer automatically loaded by default. The properties files affected are - avenue, baan, escript, lot, metapost, and mmixal. -
  • -
  • - C++ lexer fixed a bug with raw strings being recognized too easily. - Bug #3388122. -
  • -
  • - LaTeX lexer improved with more states and fixes to most outstanding bugs. - Bug #1493111. - Bug #1856356. - Bug #3081692. -
  • -
  • - Lua lexer updates for Lua 5.2 beta with goto labels and "\z" string escape. - Feature #3386330. -
  • -
  • - Perl string styling highlights interpolated variables. - Feature #3394258. - Bug #3076629. -
  • -
  • - Perl lexer updated for Perl 5.14.0 with 0X and 0B numeric literal prefixes, break keyword and "+" supported in subroutine prototypes. - Feature #3388802. -
  • -
  • - Perl bug fixed with CRLF line endings. -
  • -
  • - Markdown lexer fixed to not change state with "_" in middle of word. - Bug #3398184. -
  • -
  • - Cocoa restores compatibility with OS X 10.5. -
  • -
  • - Mouse pointer changes over selection to an arrow near start when scrolled horizontally. - Bug #3389055. -
  • -
  • - Indicators that finish at the end of the document no longer expand when text is appended. - Bug #3378718. -
  • -
  • - SparseState merge fixed to check if other range is empty. - Bug #3387053. -
  • -
  • - On Windows, autocompletion lists will scroll instead of document when mouse wheel spun. - Feature #3403600. -
  • -
  • - SciTE performs more rapid polling for command completion so will return faster and report more accurate times. -
  • -
  • - SciTE resizes panes proportionally when switched between horizontal and vertical layout. - Feature #3376784. -
  • -
  • - SciTE on GTK+ opens multiple files into a single instance more reliably. - Bug #3363754. -
  • -
-

- Release 2.28 -

-
    -
  • - Released 1 August 2011. -
  • -
  • - GTK+ Cairo support works back to GTK+ version 2.8. Requires changing Scintilla source code to enable before GTK+ 2.22. - Bug #3322351. -
  • -
  • - Translucent images in RGBA format can be used for margin markers and in autocompletion lists. -
  • -
  • - INDIC_DOTBOX added as a translucent dotted rectangular indicator. -
  • -
  • - Asian text input using IME works for GTK+ 3.x and GTK+ 2.x with Cairo. -
  • -
  • - On GTK+, IME works for Ctrl+Shift+U Unicode input in Scintilla. For SciTE, Ctrl+Shift+U is still Make Selection Uppercase. -
  • -
  • - Key bindings for GTK+ on OS X made compatible with Cocoa port and platform conventions. -
  • -
  • - Cocoa port supports different character encodings, improves scrolling performance and drag image appearance. - The control ID is included in WM_COMMAND notifications. Text may be deleted by dragging to the trash. - ScrollToStart and ScrollToEnd key commands added to simplify implementation of standard OS X Home and End - behaviour. -
  • -
  • - SciTE on GTK+ uses a paned widget to contain the edit and output panes instead of custom code. - This allows the divider to be moved easily on GTK+ 3 and its appearance follows GTK+ conventions more closely. -
  • -
  • - SciTE builds and installs on BSD. - Bug #3324644. -
  • -
  • - Cobol supports fixed format comments. - Bug #3014850. -
  • -
  • - Mako template language block syntax extended and ## comments recognized. - Feature #3325178. - Bug #3318818. -
  • -
  • - Folding of Mako template language within HTML fixed. - Bug #3324563. -
  • -
  • - Python lexer has lexer.python.keywords2.no.sub.identifiers option to avoid highlighting second set of - keywords following '.'. - Bug #3325333. -
  • -
  • - Python folder fixes bug where fold would not extend to final line. - Bug #3349157. -
  • -
  • - SciTE treats LPEG lexers the same as script lexers by setting all 8 style bits. -
  • -
  • - For Cocoa, crashes with unsupported font variants and memory leaks for colour objects fixed. -
  • -
  • - Shift-JIS lead byte ranges modified to match Windows. -
  • -
  • - Mouse pointer changes over selection to an arrow more consistently. - Bug #3315756. -
  • -
  • - Bug fixed with annotations beyond end of document. - Bug #3347268. -
  • -
  • - Incorrect drawing fixed for combination of background colour change and translucent selection. - Bug #3377116. -
  • -
  • - Lexers initialized correctly when started at position other than start of line. - Bug #3377148. -
  • -
  • - Fold highlight drawing fixed for some situations. - Bug #3323015. - Bug #3323805. -
  • -
  • - Case insensitive search fixed for cases where folded character uses fewer bytes than base character. - Bug #3362038. -
  • -
  • - SciTE bookmark.alpha setting fixed. - Bug #3373907. -
  • -
-

- Release 2.27 -

-
    -
  • - Released 20 June 2011. -
  • -
  • - On recent GTK+ 2.x versions when using Cairo, bug fixed where wrong colours were drawn. -
  • -
  • - SciTE on GTK+ slow performance in menu maintenance fixed. - Bug #3315233. -
  • -
  • - Cocoa platform supports 64-bit builds and uses only non-deprecated APIs. - Asian Input Method Editors are supported. - Autocompletion lists and calltips implemented. - Control identifier used in notifications. -
  • -
  • - On Cocoa, rectangular selection now uses Option/Alt key to be compatible with Apple Human - Interface Guidelines and other applications. - The Control key is reported with an SCMOD_META modifier bit. -
  • -
  • - API added for setting and retrieving the identifier number used in notifications. -
  • -
  • - SCI_SETEMPTYSELECTION added to set selection without scrolling or redrawing more than needed. - Feature #3314877. -
  • -
  • - Added new indicators. INDIC_DASH and INDIC_DOTS are variants of underlines. - INDIC_SQUIGGLELOW indicator added as shorter alternative to INDIC_SQUIGGLE for small fonts. - Bug #3314591 -
  • -
  • - Margin line selection can be changed to select display lines instead of document lines. - Bug #3312763. -
  • -
  • - On Windows, SciTE can perform reverse searches by pressing Shift+Enter - in the Find or Replace strips or dialogs. -
  • -
  • - Matlab lexer does not special case '\' in single quoted strings. - Bug #948757 - Bug #1755950 - Bug #1888738 - Bug #3316852. -
  • -
  • - Verilog lexer supports SystemVerilog folding and keywords. -
  • -
  • - Font leak fixed. - Bug #3306156. -
  • -
  • - Automatic scrolling works for long wrapped lines. - Bug #3312763. -
  • -
  • - Multiple typing works for cases where selections collapse together. - Bug #3309906. -
  • -
  • - Fold expanded when needed in word wrap mode. - Bug #3291579. -
  • -
  • - Bug fixed with edge drawn in wrong place on wrapped lines. - Bug #3314807. -
  • -
  • - Bug fixed with unnecessary scrolling for SCI_GOTOLINE. - Bug #3303406. -
  • -
  • - Bug fixed where extra step needed to undo SCI_CLEAR in virtual space. - Bug #3159691. -
  • -
  • - Regular expression search fixed for \$ on last line of search range. - Bug #3313746. -
  • -
  • - SciTE performance improved when switching to a tab with a very large file. - Bug #3311421. -
  • -
  • - On Windows, SciTE advanced search remembers the "Search only in this style" setting. - Bug #3313344. -
  • -
  • - On GTK+, SciTE opens help using "xdg-open" instead of "netscape" as "netscape" no longer commonly installed. - Bug #3314377. -
  • -
  • - SciTE script lexers can use 256 styles. -
  • -
  • - SciTE word highlight works for words containing DBCS characters. - Bug #3315173. -
  • -
  • - Compilation fixed for wxWidgets. - Bug #3306156. -
  • -
-

- Release 2.26 -

-
    -
  • - Released 25 May 2011. -
  • -
  • - Folding margin symbols can be highlighted for the current folding block. - Feature #3147069. -
  • -
  • - Selected lines can be moved up or down together. - Feature #3304850. -
  • -
  • - SciTE can highlight all occurrences of the current word or selected text. - Feature #3291636. -
  • -
  • - Experimental GTK+ 3.0 support: build with "make GTK3=1". -
  • -
  • - INDIC_STRAIGHTBOX added. Is similar to INDIC_ROUNDBOX but without rounded corners. - Bug #3290435. -
  • -
  • - Can show brace matching and mismatching with indicators instead of text style. - Translucency of outline can be altered for INDIC_ROUNDBOX and INDIC_STRAIGHTBOX. - Feature #3290434. -
  • -
  • - SciTE can automatically indent python by examining previous line for scope-starting ':' with indent.python.colon. -
  • -
  • - Batch file lexer allows braces '(' or ')' inside variable names. -
  • -
  • - The cpp lexer only recognizes Vala triple quoted strings when lexer.cpp.triplequoted.strings property is set. - Bug #3239234. -
  • -
  • - Make file lexer treats a variable with a nested variable like $(f$(qx)b) as one variable. - Bug #3298223. -
  • -
  • - Folding bug fixed for JavaScript with nested PHP. - Bug #3193530. -
  • -
  • - HTML lexer styles Django's {# #} comments. - Bug #3013798. -
  • -
  • - HTML lexer styles JavaScript regular expression correctly for /abc/i.test('abc');. - Bug #3209108. -
  • -
  • - Inno Setup Script lexer now works properly when it restarts from middle of [CODE] section. - Bug #3283880. - Bug #3129044. -
  • -
  • - Lua lexer updated for Lua 5.2 with hexadecimal floating-point numbers and '\*' whitespace escaping in strings. - Feature #3243811. -
  • -
  • - Perl folding folds "here doc"s and adds options fold.perl.at.else and fold.perl.comment.explicit. Fold structure for Perl fixed. - Feature #3112671. - Bug #3265401. -
  • -
  • - Python lexer supports cpdef keyword for Cython. - Bug #3279728. -
  • -
  • - SQL folding option lexer.sql.fold.at.else renamed to fold.sql.at.else. - Bug #3271474. -
  • -
  • - SQL lexer no longer treats ';' as terminating a comment. - Bug #3196071. -
  • -
  • - Text drawing and measurement segmented into smaller runs to avoid platform bugs. - Bug #3277449. - Bug #3165743. -
  • -
  • - SciTE on Windows adds temp.files.sync.load property to open dropped temporary files synchronously as they may - be removed before they can be opened asynchronously. - Bug #3072009. -
  • -
  • - Bug fixed with indentation guides ignoring first line in SC_IV_LOOKBOTH mode. - Bug #3291317. -
  • -
  • - Bugs fixed in backward regex search. - Bug #3292659. -
  • -
  • - Bugs with display of folding structure fixed for wrapped lines and where there is a fold header but no body. - Bug #3291579. - Bug #3265401. -
  • -
  • - SciTE on Windows cursor changes to an arrow now when over horizontal splitter near top of window. - Bug #3286620. -
  • -
  • - Fixed default widget size problem on GTK+. - Bug #3267892. -
  • -
  • - Fixed font size when using Cairo on GTK+. - Bug #3272662. -
  • -
  • - Fixed primary selection and cursor issues on GTK+ when unrealized then realized. - Bug #3256153. -
  • -
  • - Right click now cancels selection on GTK+ like on Windows. - Bug #3235190. -
  • -
  • - SciTE on GTK+ implements z-order buffer switching like on Windows. - Bug #3228384. -
  • -
  • - Improve selection position after SciTE Insert Abbreviation command when abbreviation expansion includes '|'. -
  • -
-

- Release 2.25 -

-
    -
  • - Released 21 March 2011. -
  • -
  • - SparseState class makes it easier to write lexers which have to remember complex state between lines. -
  • -
  • - Visual Studio project (.dsp) files removed. The make files should be used instead as described in the README. -
  • -
  • - Modula 3 lexer added along with SciTE support. - Feature #3173374. -
  • -
  • - Asm, Basic, and D lexers add extra folding properties. -
  • -
  • - Raw string literals for C++0x supported in C++ lexer. -
  • -
  • - Triple-quoted strings used in Vala language supported in C++ lexer. - Feature #3177601. -
  • -
  • - The errorlist lexer used in SciTE's output pane colours lines that start with '<' as diff deletions. - Feature #3172878. -
  • -
  • - The Fortran lexer correctly folds type-bound procedures from Fortran 2003. -
  • -
  • - LPeg lexer support‎ improved in SciTE. -
  • -
  • - SciTE on Windows-64 fixes for menu localization and Lua scripts. - Bug #3204502. -
  • -
  • - SciTE on Windows avoids locking folders when using the open or save dialogs. - Bug #1795484. -
  • -
  • - Diff lexer fixes problem where diffs of diffs producing lines that start with "----". - Bug #3197952. -
  • -
  • - Bug fixed when searching upwards in Chinese code page 936. - Bug #3176271. -
  • -
  • - On Cocoa, translucent drawing performed as on other platforms instead of 2.5 times less translucent. -
  • -
  • - Performance issue and potential bug fixed on GTK+ with caret line for long lines. -
  • -
-

- Release 2.24 -

-
    -
  • - Released 3 February 2011. -
  • -
  • - Fixed memory leak in GTK+ Cairo code. - Feature #3157655. -
  • -
  • - Insert Abbreviation dialog added to SciTE on GTK+. -
  • -
  • - SCN_UPDATEUI notifications received when window scrolled. An 'updated' bit mask indicates which - types of update have occurred from SC_UPDATE_SELECTION, SC_UPDATE_CONTENT, SC_UPDATE_H_SCROLL - or SC_UPDATE_V_SCROLL. - Feature #3125977. -
  • -
  • - On Windows, to ensure reverse arrow cursor matches platform default, it is now generated by - reflecting the platform arrow cursor. - Feature #3143968. -
  • -
  • - Can choose mouse cursor used in margins. - Feature #3161326. -
  • -
  • - On GTK+, SciTE sets a mime type of text/plain in its .desktop file so that it will appear in the shell context menu. - Feature #3137126. -
  • -
  • - Bash folder handles here docs. - Feature #3118223. -
  • -
  • - C++ folder adds fold.cpp.syntax.based, fold.cpp.comment.multiline, fold.cpp.explicit.start, fold.cpp.explicit.end, - and fold.cpp.explicit.anywhere properties to allow more control over folding and choice of explicit fold markers. -
  • -
  • - C++ lexer fixed to always handle single quote strings continued past a line end. - Bug #3150522. -
  • -
  • - Ruby folder handles here docs. - Feature #3118224. -
  • -
  • - SQL lexer allows '.' to be part of words. - Feature #3103129. -
  • -
  • - SQL folder handles case statements in more situations. - Feature #3135027. -
  • -
  • - SQL folder adds fold points inside expressions based on bracket structure. - Feature #3165488. -
  • -
  • - SQL folder drops fold.sql.exists property as 'exists' is handled automatically. - Bug #3164194. -
  • -
  • - SciTE only forwards properties to lexers when they have been explicitly set so the defaults set by lexers are used - rather than 0. -
  • -
  • - Mouse double click word selection chooses the word around the character under the mouse rather than - the inter-character position under the mouse. This makes double clicking select what the user is pointing - at and avoids selecting adjacent non-word characters. - Bug #3111174. -
  • -
  • - Fixed mouse double click to always perform word select, not line select. - Bug #3143635. -
  • -
  • - Right click cancels autocompletion. - Bug #3144531. -
  • -
  • - Fixed multiPaste to work when additionalSelectionTyping off. - Bug #3126221. -
  • -
  • - Fixed virtual space problems when text modified at caret. - Bug #3154986. -
  • -
  • - Fixed memory leak in lexer object code. - Bug #3133672. -
  • -
  • - Fixed SciTE on GTK+ search failure when using regular expression. - Bug #3156217. -
  • -
  • - Avoid unnecessary full window redraw for SCI_GOTOPOS. - Feature #3146650. -
  • -
  • - Avoid unnecessary redraw when indicator fill range makes no real change. -
  • -
-

- Release 2.23 -

-
    -
  • - Released 7 December 2010. -
  • -
  • - On GTK+ version 2.22 and later, drawing is performed with Cairo rather than GDK. - This is in preparation for GTK+ 3.0 which will no longer support GDK drawing. - The appearance of some elements will be different with Cairo as it is anti-aliased and uses sub-pixel positioning. - Cairo may be turned on for GTK+ versions before 2.22 by defining USE_CAIRO although this has not - been extensively tested. -
  • -
  • - New lexer a68k for Motorola 68000 assembler. - Feature #3101598. -
  • -
  • - Borland C++ is no longer supported for building Scintilla or SciTE on Windows. -
  • -
  • - Performance improved when creating large rectangular selections. -
  • -
  • - PHP folder recognizes #region and #endregion comments. - Feature #3101624. -
  • -
  • - SQL lexer has a lexer.sql.numbersign.comment option to turn off use of '#' comments - as these are a non-standard feature only available in some implementations. - Feature #3098071. -
  • -
  • - SQL folder recognizes case statements and understands the fold.at.else property. - Bug #3104091. - Bug #3107362. -
  • -
  • - SQL folder fixes bugs with end statements when fold.sql.only.begin=1. - Bug #3104091. -
  • -
  • - SciTE on Windows bug fixed with multi-line tab bar not adjusting correctly when maximizing and demaximizing. - Bug #3097517. -
  • -
  • - Crash fixed on GTK+ when Scintilla widget destroyed while it still has an outstanding style idle pending. -
  • -
  • - Bug fixed where searching backwards in DBCS text (code page 936 or similar) failed to find occurrences at the start of the line. - Bug #3103936. -
  • -
  • - SciTE on Windows supports Unicode file names when executing help applications with winhelp and htmlhelp subsystems. -
  • -
-

- Release 2.22 -

-
    -
  • - Released 27 October 2010. -
  • -
  • - SciTE includes support for integrating with Scintillua which allows lexers to be implemented in Lua as a - Parsing Expression Grammar (PEG). -
  • -
  • - Regular expressions allow use of '?' for non-greedy matches or to match 0 or 1 instances of an item. -
  • -
  • - SCI_CONTRACTEDFOLDNEXT added to allow rapid retrieval of folding state. -
  • -
  • - SCN_HOTSPOTRELEASECLICK notification added which is similar to SCN_HOTSPOTCLICK but occurs - when the mouse is released. - Feature #3082409. -
  • -
  • - Command added for centring current line in window. - Feature #3064696. -
  • -
  • - SciTE performance improved by not examining document for line ends when switching buffers and not - storing folds when folding turned off. -
  • -
  • - Bug fixed where scrolling to ensure the caret is visible did not take into account all pixels of the line. - Bug #3081721. -
  • -
  • - Bug fixed for autocompletion list overlapping text when WS_EX_CLIENTEDGE used. - Bug #3079778. -
  • -
  • - After autocompletion, the caret's X is updated. - Bug #3079114. -
  • -
  • - On Windows, default to the system caret blink time. - Feature #3079784. -
  • -
  • - PgUp/PgDn fixed to allow virtual space. - Bug #3077452. -
  • -
  • - Crash fixed when AddMark and AddMarkSet called with negative argument. - Bug #3075074. -
  • -
  • - Dwell notifications fixed so that they do not occur when the mouse is outside Scintilla. - Bug #3073481. -
  • -
  • - Bash lexer bug fixed for here docs starting with <<-. - Bug #3063822. -
  • -
  • - C++ lexer bug fixed for // comments that are continued onto a second line by a \. - Bug #3066031. -
  • -
  • - C++ lexer fixes wrong highlighting for float literals containing +/-. - Bug #3058924. -
  • -
  • - JavaScript lexer recognize regexes following return keyword.‎ - Bug #3062287. -
  • -
  • - Ruby lexer handles % quoting better and treats range dots as operators in 1..2 and 1...2. - Ruby folder handles "if" keyword used as a modifier even when it is separated from the modified statement by an escaped new line. - Bug #2093767. - Bug #3058496. -
  • -
  • - Bug fixed where upwards search failed with DBCS code pages. - Bug #3065912. -
  • -
  • - SciTE has a default Lua startup script name distributed in SciTEGlobal.properties. - No error message is displayed if this file does not exist. -
  • -
  • - SciTE on Windows tab control height is calculated better. - Bug #2635702. -
  • -
  • - SciTE on Windows uses better themed check buttons in find and replace strips. -
  • -
  • - SciTE on Windows fixes bug with Find strip appearing along with Incremental Find strip. -
  • -
  • - SciTE setting find.close.on.find added to allow preventing the Find dialog from closing. -
  • -
  • - SciTE on Windows attempts to rerun commands that fail by prepending them with "cmd.exe /c". - This allows commands built in to the command processor like "dir" to run. -
  • -
-

- Release 2.21 -

-
    -
  • - Released 1 September 2010. -
  • -
  • - Asian Double Byte Character Set (DBCS) support improved. - Case insensitive search works and other operations are much faster. - Bug #2999125, - Bug #2774616, - Bug #2991942, - Bug #3005688. -
  • -
  • - Scintilla on GTK+ uses only non-deprecated APIs (for GTK+ 2.20) except for GdkFont and GdkFont use can be disabled - with the preprocessor symbol DISABLE_GDK_FONT. -
  • -
  • - IDocument interface used by lexers adds BufferPointer and GetLineIndentation methods. -
  • -
  • - On Windows, clicking sets focus before processing the click or sending notifications. -
  • -
  • - Bug on OS X (macosx platform) fixed where drag/drop overwrote clipboard. - Bug #3039732. -
  • -
  • - GTK+ drawing bug when the view was horizontally scrolled more than 32000 pixels fixed. -
  • -
  • - SciTE bug fixed with invoking Complete Symbol from output pane. - Bug #3050957. -
  • -
  • - Bug fixed where it was not possible to disable folding. - Bug #3040649. -
  • -
  • - Bug fixed with pressing Enter on a folded fold header line not opening the fold. - Bug #3043419. -
  • -
  • - SciTE 'Match case' option in find and replace user interfaces changed to 'Case sensitive' to allow use of 'v' - rather than 'c' as the mnemonic. -
  • -
  • - SciTE displays stack trace for Lua when error occurs.. - Bug #3051397. -
  • -
  • - SciTE on Windows fixes bug where double clicking on error message left focus in output pane. - Bug #1264835. -
  • -
  • - SciTE on Windows uses SetDllDirectory to avoid a security problem. -
  • -
  • - C++ lexer crash fixed with preprocessor expression that looked like division by 0. - Bug #3056825. -
  • -
  • - Haskell lexer improved. - Feature #3039490. -
  • -
  • - HTML lexing fixed around Django {% %} tags. - Bug #3034853. -
  • -
  • - HTML JavaScript lexing fixed when line end escaped. - Bug #3038381. -
  • -
  • - HTML lexer stores line state produced by a line on that line rather than on the next line. -
  • -
  • - Markdown lexer fixes infinite loop. - Bug #3045386. -
  • -
  • - MySQL folding bugs with END statements fixed. - Bug #3031742. -
  • -
  • - PowerShell lexer allows '_' as a word character. - Feature #3042228. -
  • -
  • - SciTE on GTK+ abandons processing of subsequent commands if a command.go.needs command fails. -
  • -
  • - When SciTE is closed, all buffers now receive an OnClose call. - Bug #3033857. -
  • -
-

- Release 2.20 -

-
    -
  • - Released 30 July 2010. -
  • -
  • - Lexers are implemented as objects so that they may retain extra state. - The interfaces defined for this are tentative and may change before the next release. - Compatibility classes allow current lexers compiled into Scintilla to run with few changes. - The interface to external lexers has changed and existing external lexers will need to have changes - made and be recompiled. - A single lexer object is attached to a document whereas previously lexers were attached to views - which could lead to different lexers being used for split views with confusing results. -
  • -
  • - C++ lexer understands the preprocessor enough to grey-out inactive code due to conditional compilation. -
  • -
  • - SciTE can use strips within the main window for find and replace rather than dialogs. - On Windows SciTE always uses a strip for incremental search. -
  • -
  • - Lexer added for Txt2Tags language. - Feature #3018736. -
  • -
  • - Sticky caret feature enhanced with additional SC_CARETSTICKY_WHITESPACE mode . - Feature #3027559. -
  • -
  • - Bash lexer implements basic parsing of compound commands and constructs. - Feature #3033135. -
  • -
  • - C++ folder allows disabling explicit fold comments. -
  • -
  • - Perl folder works for array blocks, adjacent package statements, nested PODs, and terminates package folding at __DATA__, ^D and ^Z. - Feature #3030887. -
  • -
  • - PowerShell lexer supports multiline <# .. #> comments and adds 2 keyword classes. - Feature #3015176. -
  • -
  • - Lexing performed incrementally when needed by wrapping to make user interface more responsive. -
  • -
  • - SciTE setting replaceselection:yes works on GTK+. -
  • -
  • - SciTE Lua scripts calling io.open or io.popen on Windows have arguments treated as UTF-8 and converted to Unicode - so that non-ASCII file paths will work. Lua files with non-ASCII paths run. - Bug #3016951. -
  • -
  • - Crash fixed when searching for empty string. - Bug #3017572. -
  • -
  • - Bugs fixed with folding and lexing when Enter pressed at start of line. - Bug #3032652. -
  • -
  • - Bug fixed with line selection mode not affecting selection range. - Bug #3021480. -
  • -
  • - Bug fixed where indicator alpha was limited to 100 rather than 255. - Bug #3021473. -
  • -
  • - Bug fixed where changing annotation did not cause automatic redraw. -
  • -
  • - Regular expression bug fixed when a character range included non-ASCII characters. -
  • -
  • - Compilation failure with recent compilers fixed on GTK+. - Bug #3022027. -
  • -
  • - Bug fixed on Windows with multiple monitors where autocomplete pop up would appear off-screen - or straddling monitors. - Bug #3017512. -
  • -
  • - SciTE on Windows bug fixed where changing directory to a Unicode path failed. - Bug #3011987. -
  • -
  • - SciTE on Windows bug fixed where combo boxes were not allowing Unicode characters. - Bug #3012986. -
  • -
  • - SciTE on GTK+ bug fixed when dragging files into SciTE on KDE. - Bug #3026555. -
  • -
  • - SciTE bug fixed where closing untitled file could lose data if attempt to name file same as another buffer. - Bug #3011680. -
  • -
  • - COBOL number masks now correctly highlighted. - Bug #3012164. -
  • -
  • - PHP comments can include <?PHP without triggering state change. - Bug #2854183. -
  • -
  • - VHDL lexer styles unclosed string correctly. - Bug #3029627. -
  • -
  • - Memory leak fixed in list boxes on GTK+. - Bug #3007669. -
  • -
-

- Release 2.12 -

-
    -
  • - Released 1 June 2010. -
  • -
  • - Drawing optimizations improve speed and fix some visible flashing when scrolling. -
  • -
  • - Copy Path command added to File menu in SciTE. - Feature #2986745. -
  • -
  • - Optional warning displayed by SciTE when saving a file which has been modified by another process. - Feature #2975041. -
  • -
  • - Flagship lexer for xBase languages updated to follow the language much more closely. - Feature #2992689. -
  • -
  • - HTML lexer highlights Django templates in more regions. - Feature #3002874. -
  • -
  • - Dropping files on SciTE on Windows, releases the drag object earlier and opens the files asynchronously, - leading to smoother user experience. - Feature #2986724. -
  • -
  • - SciTE HTML exports take the Use Monospaced Font setting into account. -
  • -
  • - SciTE window title "[n of m]" localized. -
  • -
  • - When new line inserted at start of line, markers are moved down. - Bug #2986727. -
  • -
  • - On Windows, dropped text has its line ends converted, similar to pasting. - Bug #3005328. -
  • -
  • - Fixed bug with middle-click paste in block select mode where text was pasted next to selection rather than at cursor. - Bug #2984460. -
  • -
  • - Fixed SciTE crash where a style had a size parameter without a value. - Bug #3003834. -
  • -
  • - Debug assertions in multiple lexers fixed. - Bug #3000566. -
  • -
  • - CSS lexer fixed bug where @font-face displayed incorrectly - Bug #2994224. -
  • -
  • - CSS lexer fixed bug where open comment caused highlighting error. - Bug #1683672. -
  • -
  • - Shell file lexer fixed highlight glitch with here docs where the first line is a comment. - Bug #2830239. -
  • -
  • - Bug fixed in SciTE openpath property that caused Open Selected File to fail to open the selected file. -
  • -
  • - Bug fixed in SciTE FileExt property when file name with no extension evaluated to whole path. -
  • -
  • - Fixed SciTE on Windows printing bug where the $(CurrentTime), $(CurrentPage) variables were not expanded. - Bug #2994612. -
  • -
  • - SciTE compiles for 64-bit Windows and runs without crashing. - Bug #2986312. -
  • -
  • - Full Screen mode in Windows Vista/7 improved to hide Start button and size borders a little better. - Bug #3002813. -
  • -
-

- Release 2.11 -

-
    -
  • - Released 9 April 2010. -
  • -
  • - Fixes compatibility of Scintilla.h with the C language. -
  • -
  • - With a rectangular selection SCI_GETSELECTIONSTART and SCI_GETSELECTIONEND return limits of the - rectangular selection rather than the limits of the main selection. -
  • -
  • - When SciTE on Windows is minimized to tray, only takes a single click to restore rather than a double click. - Feature #981917. -
  • -
-

- Release 2.10 -

-
    -
  • - Released 4 April 2010. -
  • -
  • - Version 1.x of GTK+ is no longer supported. -
  • -
  • - SciTE is no longer supported on Windows 95, 98 or ME. -
  • -
  • - Case-insensitive search works for non-ASCII characters in UTF-8 and 8-bit encodings. - Non-regex search in DBCS encodings is always case-sensitive. -
  • -
  • - Non-ASCII characters may be changed to upper and lower case. -
  • -
  • - SciTE on Windows can access all files including those with names outside the user's preferred character encoding. -
  • -
  • - SciTE may be extended with lexers written in Lua. -
  • -
  • - When there are multiple selections, the paste command can go either to the main selection or to each - selection. This is controlled with SCI_SETMULTIPASTE. -
  • -
  • - More forms of bad UTF-8 are detected including overlong sequences, surrogates, and characters outside - the valid range. Bad UTF-8 bytes are now displayed as 2 hex digits preceded by 'x'. -
  • -
  • - SCI_GETTAG retrieves the value of captured expressions within regular expression searches. -
  • -
  • - Django template highlighting added to the HTML lexer. - Feature #2974889. -
  • -
  • - Verilog line comments can be folded. -
  • -
  • - SciTE on Windows allows specifying a filter for the Save As dialog. - Feature #2943445. -
  • -
  • - Bug fixed when multiple selection disabled where rectangular selections could be expanded into multiple selections. - Bug #2948260. -
  • -
  • - Bug fixed when document horizontally scrolled and up/down-arrow did not return to the same - column after horizontal scroll occurred. - Bug #2950799. -
  • -
  • - Bug fixed to remove hotspot highlight when mouse is moved out of the document. Windows only fix. - Bug #2951353. -
  • -
  • - R lexer now performs case-sensitive check for keywords. - Bug #2956543. -
  • -
  • - Bug fixed on GTK+ where text disappeared when a wrap occurred. - Bug #2958043. -
  • -
  • - Bug fixed where regular expression replace cannot escape the '\' character by using '\\'. - Bug #2959876. -
  • -
  • - Bug fixed on GTK+ when virtual space disabled, middle-click could still paste text beyond end of line. - Bug #2971618. -
  • -
  • - SciTE crash fixed when double clicking on a malformed error message in the output pane. - Bug #2976551. -
  • -
  • - Improved performance on GTK+ when changing parameters associated with scroll bars to the same value. - Bug #2964357. -
  • -
  • - Fixed bug with pressing Shift+Tab with a rectangular selection so that it performs an un-indent - similar to how Tab performs an indent. -
  • -
-

- Release 2.03 -

-
    -
  • - Released 14 February 2010. -
  • -
  • - Added SCI_SETFIRSTVISIBLELINE to match SCI_GETFIRSTVISIBLELINE. -
  • -
  • - Erlang lexer extended set of numeric bases recognized; separate style for module:function_name; detects - built-in functions, known module attributes, and known preprocessor instructions; recognizes EDoc and EDoc macros; - separates types of comments. - Bug #2942448. -
  • -
  • - Python lexer extended with lexer.python.strings.over.newline option that allows non-triple-quoted strings to extend - past line ends. This allows use of the Ren'Py language. - Feature #2945550. -
  • -
  • - Fixed bugs with cursor movement after deleting a rectangular selection. - Bug #2942131. -
  • -
  • - Fixed bug where calling SCI_SETSEL when there is a rectangular selection left - the additional selections selected. - Bug #2947064. -
  • -
  • - Fixed macro recording bug where not all bytes in multi-byte character insertions were reported through - SCI_REPLACESEL. -
  • -
  • - Fixed SciTE bug where using Ctrl+Enter followed by Ctrl+Space produced an autocompletion list - with only a single line containing all the identifiers. -
  • -
  • - Fixed SciTE on GTK+ bug where running a tool made the user interface completely unresponsive. -
  • -
  • - Fixed SciTE on Windows Copy to RTF bug. - Bug #2108574. -
  • -
-

- Release 2.02 -

-
    -
  • - Released on 25 January 2010. -
  • -
  • - Markdown lexer added. - Feature #2844081. -
  • -
  • - On GTK+, include code that understands the ranges of lead bytes for code pages 932, 936, and 950 - so that most Chinese and Japanese text can be used on systems that are not set to the corresponding locale. -
  • -
  • - Allow changing the size of dots in visible whitespace using SCI_SETWHITESPACESIZE. - Feature #2839427. -
  • -
  • - Additional carets can be hidden with SCI_SETADDITIONALCARETSVISIBLE. -
  • -
  • - Can choose anti-aliased, non-anti-aliased or lcd-optimized text using SCI_SETFONTQUALITY. -
  • -
  • - Retrieve the current selected text in the autocompletion list with SCI_AUTOCGETCURRENTTEXT. -
  • -
  • - Retrieve the name of the current lexer with SCI_GETLEXERLANGUAGE. -
  • -
  • - Progress 4GL lexer improves handling of comments in preprocessor declaration. - Feature #2902206. -
  • -
  • - HTML lexer extended to handle Mako template language. -
  • -
  • - SQL folder extended for SQL Anywhere "EXISTS" and "ENDIF" keywords. - Feature #2887524. -
  • -
  • - SciTE adds APIPath and AbbrevPath variables. -
  • -
  • - SciTE on GTK+ uses pipes instead of temporary files for running tools. This should be more secure. -
  • -
  • - Fixed crash when calling SCI_STYLEGETFONT for a style which does not have a font set. - Bug #2857425. -
  • -
  • - Fixed crash caused by not having sufficient styles allocated after choosing a lexer. - Bug #2881279. -
  • -
  • - Fixed crash in SciTE using autocomplete word when word characters includes space. - Bug #2840141. -
  • -
  • - Fixed bug with handling upper-case file extensions SciTE on GTK+. -
  • -
  • - Fixed SciTE loading files from sessions with folded folds where it would not - be scrolled to the correct location. - Bug #2882775. -
  • -
  • - Fixed SciTE loading files from sessions when file no longer exists. - Bug #2883437. -
  • -
  • - Fixed SciTE export to HTML using the wrong background colour. -
  • -
  • - Fixed crash when adding an annotation and then adding a new line after the annotation. - Bug #2929708. -
  • -
  • - Fixed crash in SciTE setting a property to nil from Lua. -
  • -
  • - SCI_GETSELTEXT fixed to return correct length. - Bug #2929441. -
  • -
  • - Fixed text positioning problems with selection in some circumstances. -
  • -
  • - Fixed text positioning problems with ligatures on GTK+. -
  • -
  • - Fixed problem pasting into rectangular selection with caret at bottom caused text to go from the caret down - rather than replacing the selection. -
  • -
  • - Fixed problem replacing in a rectangular selection where only the final line was changed. -
  • -
  • - Fixed inability to select a rectangular area using Alt+Shift+Click at both corners. - Bug #2899746. -
  • -
  • - Fixed problem moving to start/end of a rectangular selection with left/right key. - Bug #2871358. -
  • -
  • - Fixed problem with Select All when there's a rectangular selection. - Bug #2930488. -
  • -
  • - Fixed SCI_LINEDUPLICATE on a rectangular selection to not produce multiple discontinuous selections. -
  • -
  • - Virtual space removed when performing delete word left or delete line left. - Virtual space converted to real space for delete word right. - Preserve virtual space when pressing Delete key. - Bug #2882566. -
  • -
  • - Fixed problem where Shift+Alt+Down did not move through wrapped lines. - Bug #2871749. -
  • -
  • - Fixed incorrect background colour when using coloured lines with virtual space. - Bug #2914691. -
  • -
  • - Fixed failure to display wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT. - Bug #2936108. -
  • -
  • - Fixed blank background colour with EOLFilled style on last line. - Bug #2890105. -
  • -
  • - Fixed problem in VB lexer with keyword at end of file. - Bug #2901239. -
  • -
  • - Fixed SciTE bug where double clicking on a tab closed the file. -
  • -
  • - Fixed SciTE brace matching commands to only work when the caret is next to the brace, not when - it is in virtual space. - Bug #2885560. -
  • -
  • - Fixed SciTE on Windows Vista to access files in the Program Files directory rather than allow Windows - to virtualize access. - Bug #2916685. -
  • -
  • - Fixed NSIS folder to handle keywords that start with '!'. - Bug #2872157. -
  • -
  • - Changed linkage of Scintilla_LinkLexers to "C" so that it can be used by clients written in C. - Bug #2844718. -
  • -
-

- Release 2.01 -

-
    -
  • - Released on 19 August 2009. -
  • -
  • - Fix to positioning rectangular paste when viewing line ends. -
  • -
  • - Don't insert new lines and indentation for line ends at end of rectangular paste. -
  • -
  • - When not in additional selection typing mode, cutting a rectangular selection removes all of the selected text. -
  • -
  • - Rectangular selections are copied to the clipboard in document order, not in the order of selection. -
  • -
  • - SCI_SETCURRENTPOS and SCI_SETANCHOR work in rectangular mode. -
  • -
  • - On GTK+, drag and drop to a later position in the document now drops at the position. -
  • -
  • - Fix bug where missing property did not use default value. -
  • -
-

- Release 2.0 -

-
    -
  • - Released on 11 August 2009. -
  • -
  • - Multiple pieces of text can be selected simultaneously by holding control while dragging the mouse. - Typing, backspace and delete may affect all selections together. -
  • -
  • - Virtual space allows selecting beyond the last character on a line. -
  • -
  • - SciTE on GTK+ path bar is now optional and defaults to off. -
  • -
  • - MagikSF lexer recognizes numbers correctly. -
  • -
  • - Folding of Python comments and blank lines improved. Bug #210240. -
  • -
  • - Bug fixed where background colour of last character in document leaked past that character. -
  • -
  • - Crash fixed when adding marker beyond last line in document. Bug #2830307. -
  • -
  • - Resource leak fixed in SciTE for Windows when printing fails. Bug #2816524. -
  • -
  • - Bug fixed on Windows where the system caret was destroyed during destruction when another window - was using the system caret. Bug #2830223. -
  • -
  • - Bug fixed where indentation guides were drawn over text when the indentation used a style with a different - space width to the default style. -
  • -
  • - SciTE bug fixed where box comment added a bare line feed rather than the chosen line end. Bug #2818104. -
  • -
  • - Reverted fix that led to wrapping whole document when displaying the first line of the document. -
  • -
  • - Export to LaTeX in SciTE fixed to work in more cases and not use as much space. Bug #1286548. -
  • -
  • - Bug fixed where EN_CHANGE notification was sent when performing a paste operation in a - read-only document. Bug #2825485. -
  • -
  • - Refactored code so that Scintilla exposes less of its internal implementation and uses the C++ standard - library for some basic collections. Projects that linked to Scintilla's SString or PropSet classes - should copy this code from a previous version of Scintilla or from SciTE. -
  • -
-

- Release 1.79 -

-
    -
  • - Released on 1 July 2009. -
  • -
  • - Memory exhaustion and other exceptions handled by placing an error value into the - status property rather than crashing. - Scintilla now builds with exception handling enabled and requires exception handling to be enabled.
    - This is a major change and application developers should consider how they will deal with Scintilla exhausting - memory since Scintilla may not be in a stable state. -
  • -
  • - Deprecated APIs removed. The symbols removed are: -
      -
    • SCI_SETCARETPOLICY
    • -
    • CARET_CENTER
    • -
    • CARET_XEVEN
    • -
    • CARET_XJUMPS
    • -
    • SC_FOLDFLAG_BOX
    • -
    • SC_FOLDLEVELBOXHEADERFLAG
    • -
    • SC_FOLDLEVELBOXFOOTERFLAG
    • -
    • SC_FOLDLEVELCONTRACTED
    • -
    • SC_FOLDLEVELUNINDENT
    • -
    • SCN_POSCHANGED
    • -
    • SCN_CHECKBRACE
    • -
    • SCLEX_ASP
    • -
    • SCLEX_PHP
    • -
    -
  • -
  • - Cocoa platform added. -
  • -
  • - Names of struct types in Scintilla.h now start with "Sci_" to avoid possible clashes with platform - definitions. Currently, the old names still work but these will be phased out. -
  • -
  • - When lines are wrapped, subsequent lines may be indented to match the indent of the initial line, - or one more indentation level. Feature #2796119. -
  • -
  • - APIs added for finding the character at a point rather than an inter-character position. Feature #2646738. -
  • -
  • - A new marker SC_MARK_BACKGROUND_UNDERLINE is drawn in the text area as an underline - the full width of the window. -
  • -
  • - Batch file lexer understands variables surrounded by '!'. -
  • -
  • - CAML lexer also supports SML. -
  • -
  • - D lexer handles string and numeric literals more accurately. Feature #2793782. -
  • -
  • - Forth lexer is now case-insensitive and better supports numbers like $hex and %binary. Feature #2804894. -
  • -
  • - Lisp lexer treats '[', ']', '{', and '}' as balanced delimiters which is common usage. Feature #2794989. -
    - It treats keyword argument names as being equivalent to symbols. Feature #2794901. -
  • -
  • - Pascal lexer bug fixed to prevent hang when 'interface' near beginning of file. Bug #2802863. -
  • -
  • - Perl lexer bug fixed where previous lexical states persisted causing "/" special case styling and - subroutine prototype styling to not be correct. Bug #2809168. -
  • -
  • - XML lexer fixes bug where Unicode entities like '&—' were broken into fragments. Bug #2804760. -
  • -
  • - SciTE on GTK+ enables scrolling the tab bar on recent versions of GTK+. Feature #2061821. -
  • -
  • - SciTE on Windows allows tab bar tabs to be reordered by drag and drop. -
  • -
  • - Unit test script for Scintilla on Windows included with source code. -
  • -
  • - User defined menu items are now localized when there is a matching translation. -
  • -
  • - Width of icon column of autocompletion lists on GTK+ made more consistent. -
  • -
  • - Bug with slicing UTF-8 text into character fragments when there is a sequence of 100 or more 3 byte characters. Bug #2780566. -
  • -
  • - Folding bugs introduced in 1.78 fixed. Some of the fix was generic and there was also a specific fix for C++. -
  • -
  • - Bug fixed where a rectangular paste was not padding the line with sufficient spaces to align the pasted text. -
  • -
  • - Bug fixed with showing all text on each line of multi-line annotations when styling the whole annotation using SCI_ANNOTATIONSETSTYLE. Bug #2789430. -
  • -
-

- Release 1.78 -

-
    -
  • - Released on 28 April 2009. -
  • -
  • - Annotation lines may be added to each line. -
  • -
  • - A text margin may be defined with different text on each line. -
  • -
  • - Application actions may be added to the undo history. -
  • -
  • - Can query the symbol defined for a marker. - An available symbol added for applications to indicate that plugins may allocate a marker. -
  • -
  • - Can increase the amount of font ascent and descent. -
  • -
  • - COBOL lexer added. Feature #2127406. -
  • -
  • - Nimrod lexer added. Feature #2642620. -
  • -
  • - PowerPro lexer added. Feature #2195308. -
  • -
  • - SML lexer added. Feature #2710950. -
  • -
  • - SORCUS Installation file lexer added. Feature #2343375. -
  • -
  • - TACL lexer added. Feature #2127406. -
  • -
  • - TAL lexer added. Feature #2127406. -
  • -
  • - Rewritten Pascal lexer with improved folding and other fixes. Feature #2190650. -
  • -
  • - INDIC_ROUNDBOX translucency level can be modified. Feature #2586290. -
  • -
  • - C++ lexer treats angle brackets in #include directives as quotes when styling.within.preprocessor. Bug #2551033. -
  • -
  • - Inno Setup lexer is sensitive to whether within the [Code] section and handles comments better. Bug #2552973. -
  • -
  • - HTML lexer does not go into script mode when script tag is self-closing. -
  • -
  • - HTML folder fixed where confused by comments when fold.html.preprocessor off. Bug #2532774. -
  • -
  • - Perl lexer fixes problem with string matching caused by line endings. Bug #2648342. -
  • -
  • - Progress lexer fixes problem with "last-event:function" phrase. Bug #2483619. -
  • -
  • - Properties file lexer extended to handle RFC2822 text when lexer.props.allow.initial.spaces on. -
  • -
  • - Python lexer adds options for Python 3 and Cython. -
  • -
  • - Shell lexer fixes heredoc problem caused by line endings. Bug #2635257. -
  • -
  • - TeX lexer handles comment at end of line correctly. Bug #2698766. -
  • -
  • - SciTE retains selection range when performing a replace selection command. Feature #2339160. -
  • -
  • - SciTE definition of word characters fixed to match documentation. Bug #2464531. -
  • -
  • - SciTE on GTK+ performing Search or Replace when dialog already shown now brings dialog to foreground. - Bug #2634224. -
  • -
  • - Fixed encoding bug with calltips on GTK+. -
  • -
  • - Block caret drawn in correct place on wrapped lines. Bug #2126144. -
  • -
  • - Compilation for 64 bit Windows works using MinGW. Bug #2515578. -
  • -
  • - Incorrect memory freeing fixed on OS X. - Bug #2354098, - Bug #2671749. -
  • -
  • - SciTE on GTK+ crash fixed on startup when child process exits before initialization complete. - Bug #2716987. -
  • -
  • - Crash fixed when AutoCompleteGetCurrent called with no active autocompletion. -
  • -
  • - Flickering diminished when pressing Tab. Bug #2723006. -
  • -
  • - Namespace compilation issues with GTK+ on OS X fixed. -
  • -
  • - Increased maximum length of SciTE's Language menu on GTK+ to 100 items. Bug #2528241. -
  • -
  • - Fixed incorrect Python lexing for multi-line continued strings. Bug #2450963. -
  • -
-

- Release 1.77 -

-
    -
  • - Released on 18 October 2008. -
  • -
  • - Direct temporary access to Scintilla's text buffer to allow simple efficient interfacing - to libraries like regular expression libraries. -
  • -
  • - Scintilla on Windows can interpret keys as Unicode even when a narrow character - window with SCI_SETKEYSUNICODE. -
  • -
  • - Notification sent when autocompletion cancelled. -
  • -
  • - MySQL lexer added. -
  • -
  • - Lexer for gettext .po files added. -
  • -
  • - Abaqus lexer handles program structure more correctly. -
  • -
  • - Assembler lexer works with non-ASCII text. -
  • -
  • - C++ lexer allows mixed case doc comment tags. -
  • -
  • - CSS lexer updated and works with non-ASCII. -
  • -
  • - Diff lexer adds style for changed lines, handles subversion diffs better and - fixes styling and folding for lines containing chunk dividers ("---"). -
  • -
  • - FORTRAN lexer accepts more styles of compiler directive. -
  • -
  • - Haskell lexer allows hexadecimal literals. -
  • -
  • - HTML lexer improves PHP and JavaScript folding. - PHP heredocs, nowdocs, strings and comments processed more accurately. - Internet Explorer's non-standard >comment< tag supported. - Script recognition in XML can be controlled with lexer.xml.allow.scripts property. -
  • -
  • - Lua lexer styles last character correctly. -
  • -
  • - Perl lexer update. -
  • -
  • - Comment folding implemented for Ruby. -
  • -
  • - Better TeX folding. -
  • -
  • - Verilog lexer updated. -
  • -
  • - Windows Batch file lexer handles %~ and %*. -
  • -
  • - YAML lexer allows non-ASCII text. -
  • -
  • - SciTE on GTK+ implements "Replace in Buffers" in advanced mode. -
  • -
  • - The extender OnBeforeSave method can override the default file saving behaviour by retuning true. -
  • -
  • - Window position and recent files list may be saved into the session file. -
  • -
  • - Right button press outside the selection moves the caret. -
  • -
  • - SciTE load.on.activate works when closing a document reveals a changed document. -
  • -
  • - SciTE bug fixed where eol.mode not used for initial buffer. -
  • -
  • - SciTE bug fixed where a file could be saved as the same name as another - buffer leading to confusing behaviour. -
  • -
  • - Fixed display bug for long lines in same style on Windows. -
  • -
  • - Fixed SciTE crash when finding matching preprocessor command used on some files. -
  • -
  • - Drawing performance improved for files with many blank lines. -
  • -
  • - Folding bugs fixed where changing program text produced a decrease in fold level on a fold header line. -
  • -
  • - Clearing document style now clears all indicators. -
  • -
  • - SciTE's embedded Lua updated to 5.1.4. -
  • -
  • - SciTE will compile with versions of GTK+ before 2.8 again. -
  • -
  • - SciTE on GTK+ bug fixed where multiple files not opened. -
  • -
  • - Bug fixed with SCI_VCHOMEWRAP and SCI_VCHOMEWRAPEXTEND on white last line. -
  • -
  • - Regular expression bug fixed where "^[^(]+$" matched empty lines. -
  • -
-

- Release 1.76 -

-
    -
  • - Released on 16 March 2008. -
  • -
  • - Support for PowerShell. -
  • -
  • - Lexer added for Magik. -
  • -
  • - Director extension working on GTK+. -
  • -
  • - Director extension may set focus to SciTE through "focus:" message on GTK+. -
  • -
  • - C++ folder handles final line better in some cases. -
  • -
  • - SCI_COPYALLOWLINE added which is similar to SCI_COPY except that if the selection is empty then - the line holding the caret is copied. On Windows an extra clipboard format allows pasting this as a whole - line before the current selection. This behaviour is compatible with Visual Studio. -
  • -
  • - On Windows, the horizontal scroll bar can handle wider files. -
  • -
  • - On Windows, a system palette leak was fixed. Should not affect many as palette mode is rarely used. -
  • -
  • - Install command on GTK+ no longer tries to set explicit owner. -
  • -
  • - Perl lexer handles defined-or operator "//". -
  • -
  • - Octave lexer fixes "!=" operator. -
  • -
  • - Optimized selection change drawing to not redraw as much when not needed. -
  • -
  • - SciTE on GTK+ no longer echoes Lua commands so is same as on Windows. -
  • -
  • - Automatic vertical scrolling limited to one line at a time so is not too fast. -
  • -
  • - Crash fixed when line states set beyond end of line states. This occurred when lexers did not - set a line state for each line. -
  • -
  • - Crash in SciTE on Windows fixed when search for 513 character string fails. -
  • -
  • - SciTE disables translucent features on Windows 9x due to crashes reported when using translucency. -
  • -
  • - Bug fixed where whitespace background was not seen on wrapped lines. -
  • -
-

- Release 1.75 -

-
    -
  • - Released on 22 November 2007. -
  • -
  • - Some WordList and PropSet functionality moved from Scintilla to SciTE. - Projects that link to Scintilla's code for these classes may need to copy - code from SciTE. -
  • -
  • - Borland C++ can no longer build Scintilla. -
  • -
  • - Invalid bytes in UTF-8 mode are displayed as hex blobs. This also prevents crashes due to - passing invalid UTF-8 to platform calls. -
  • -
  • - Indentation guides enhanced to be visible on completely empty lines when possible. -
  • -
  • - The horizontal scroll bar may grow to match the widest line displayed. -
  • -
  • - Allow autocomplete pop ups to appear outside client rectangle in some cases. -
  • -
  • - When line state changed, SC_MOD_CHANGELINESTATE modification notification sent and - margin redrawn. -
  • -
  • - SciTE scripts can access the menu command values IDM_*. -
  • -
  • - SciTE's statement.end property has been implemented again. -
  • -
  • - SciTE shows paths and matches in different styles for Find In Files. -
  • -
  • - Incremental search in SciTE for Windows is modeless to make it easier to exit. -
  • -
  • - Folding performance improved. -
  • -
  • - SciTE for GTK+ now includes a Browse button in the Find In Files dialog. -
  • -
  • - On Windows versions that support Unicode well, Scintilla is a wide character window - which allows input for some less common languages like Armenian, Devanagari, - Tamil, and Georgian. To fully benefit, applications should use wide character calls. -
  • -
  • - Lua function names are exported from SciTE to allow some extension libraries to work. -
  • -
  • - Lexers added for Abaqus, Ansys APDL, Asymptote, and R. -
  • -
  • - SCI_DELWORDRIGHTEND added for closer compatibility with GTK+ entry widget. -
  • -
  • - The styling buffer may now use all 8 bits in each byte for lexical states with 0 bits for indicators. -
  • -
  • - Multiple characters may be set for SciTE's calltip.<lexer>.parameters.start property. -
  • -
  • - Bash lexer handles octal literals. -
  • -
  • - C++/JavaScript lexer recognizes regex literals in more situations. -
  • -
  • - Haskell lexer fixed for quoted strings. -
  • -
  • - HTML/XML lexer does not notice XML indicator if there is - non-whitespace between the "<?" and "XML". - ASP problem fixed where </ is used inside a comment. -
  • -
  • - Error messages from Lua 5.1 are recognized. -
  • -
  • - Folding implemented for Metapost. -
  • -
  • - Perl lexer enhanced for handling minus-prefixed barewords, - underscores in numeric literals and vector/version strings, - ^D and ^Z similar to __END__, - subroutine prototypes as a new lexical class, - formats and format blocks as new lexical classes, and - '/' suffixed keywords and barewords. -
  • -
  • - Python lexer styles all of a decorator in the decorator style rather than just the name. -
  • -
  • - YAML lexer styles colons as operators. -
  • -
  • - Fixed SciTE bug where undo would group together multiple separate modifications. -
  • -
  • - Bug fixed where setting background colour of calltip failed. -
  • -
  • - SciTE allows wildcard suffixes for file pattern based properties. -
  • -
  • - SciTE on GTK+ bug fixed where user not prompted to save untitled buffer. -
  • -
  • - SciTE bug fixed where property values from one file were not seen by lower priority files. -
  • -
  • - Bug fixed when showing selection with a foreground colour change which highlighted - an incorrect range in some positions. -
  • -
  • - Cut now invokes SCN_MODIFYATTEMPTRO notification. -
  • -
  • - Bug fixed where caret not shown at beginning of wrapped lines. - Caret made visible in some cases after wrapping and scroll bar updated after wrapping. -
  • -
  • - Modern indicators now work on wrapped lines. -
  • -
  • - Some crashes fixed for 64-bit GTK+. -
  • -
  • - On GTK+ clipboard features improved for VMWare tools copy and paste. - SciTE exports the clipboard more consistently on shut down. -
  • -
-

- Release 1.74 -

-
    -
  • - Released on 18 June 2007. -
  • -
  • - OS X support. -
  • -
  • - Indicators changed to be a separate data structure allowing more indicators. Storing indicators in high bits - of styling bytes is deprecated and will be removed in the next version. -
  • -
  • - Unicode support extended to all Unicode characters not just the Basic Multilingual Plane. -
  • -
  • - Performance improved on wide lines by breaking long runs in a single style into shorter segments. -
  • -
  • - Performance improved by caching layout of short text segments. -
  • -
  • - SciTE includes Lua 5.1. -
  • -
  • - Caret may be displayed as a block. -
  • -
  • - Lexer added for GAP. -
  • -
  • - Lexer added for PL/M. -
  • -
  • - Lexer added for Progress. -
  • -
  • - SciTE session files have changed format to be like other SciTE .properties files - and now use the extension .session. - Bookmarks and folds may optionally be saved in session files. - Session files created with previous versions of SciTE will not load into this version. -
  • -
  • - SciTE's extension and scripting interfaces add OnKey, OnDwellStart, and OnClose methods. -
  • -
  • - On GTK+, copying to the clipboard does not include the text/urilist type since this caused problems when - pasting into Open Office. -
  • -
  • - On GTK+, Scintilla defaults caret blink rate to platform preference. -
  • -
  • - Dragging does not start until the mouse has been dragged a certain amount. - This stops spurious drags when just clicking inside the selection. -
  • -
  • - Bug fixed where brace highlight not shown when caret line background set. -
  • -
  • - Bug fixed in Ruby lexer where out of bounds access could occur. -
  • -
  • - Bug fixed in XML folding where tags were not being folded because they are singletons in HTML. -
  • -
  • - Bug fixed when many font names used. -
  • -
  • - Layout bug fixed on GTK+ where fonts have ligatures available. -
  • -
  • - Bug fixed with SCI_LINETRANSPOSE on a blank line. -
  • -
  • - SciTE hang fixed when using UNC path with directory properties feature. -
  • -
  • - Bug on Windows fixed by examining dropped text for Unicode even in non-Unicode mode so it - can work when source only provides Unicode or when using an encoding different from the - system default. -
  • -
  • - SciTE bug on GTK+ fixed where Stop Executing did not work when more than a single process started. -
  • -
  • - SciTE bug on GTK+ fixed where mouse wheel was not switching between buffers. -
  • -
  • - Minor line end fix to PostScript lexer. -
  • -
-

- Release 1.73 -

-
    -
  • - Released on 31 March 2007. -
  • -
  • - SciTE adds a Directory properties file to configure behaviour for files in a directory and its subdirectories. -
  • -
  • - Style changes may be made during text modification events. -
  • -
  • - Regular expressions recognize \d, \D, \s, \S, \w, \W, and \xHH. -
  • -
  • - Support for cmake language added. -
  • -
  • - More Scintilla properties can be queried. -
  • -
  • - Edge line drawn under text. -
  • -
  • - A savesession command added to SciTE director interface. -
  • -
  • - SciTE File | Encoding menu item names changed to be less confusing. -
  • -
  • - SciTE on GTK+ dialog buttons reordered to follow guidelines. -
  • -
  • - SciTE on GTK+ removed GTK+ 1.x compatible file dialog code. -
  • -
  • - SciTE on GTK+ recognizes key names KeypadMultiply and KeypadDivide. -
  • -
  • - Background colour of line wrapping visual flag changed to STYLE_DEFAULT. -
  • -
  • - Makefile lexing enhanced for ':=' operator and when lines start with tab. -
  • -
  • - TADS3 lexer and folder improved. -
  • -
  • - SCN_DOUBLECLICK notification may set SCI_SHIFT, SCI_CTRL, and SCI_ALT flags on modifiers field. -
  • -
  • - Slow folding of large constructs in Python fixed. -
  • -
  • - MSSQL folding fixed to be case-insensitive and fold at more keywords. -
  • -
  • - SciTE's brace matching works better for HTML. -
  • -
  • - Determining API list items checks for specified parameters start character before default '('. -
  • -
  • - Hang fixed in HTML lexer. -
  • -
  • - Bug fixed in with LineTranspose command where markers could move to different line. -
  • -
  • - Memory released when buffer completely emptied. -
  • -
  • - If translucency not available on Windows, draw rectangular outline instead. -
  • -
  • - Bash lexer handles "-x" in "--x-includes..." better. -
  • -
  • - AutoIt3 lexer fixes string followed by '+'. -
  • -
  • - LinesJoin fixed where it stopped early due to not adjusting for inserted spaces.. -
  • -
  • - StutteredPageDown fixed when lines wrapped. -
  • -
  • - FormatRange fixed to not double count line number width which could lead to a large space. -
  • -
  • - SciTE Export As PDF and Latex commands fixed to format floating point numbers with '.' even in locales - that use ','. -
  • -
  • - SciTE bug fixed where File | New could produce buffer with contents of previous file when using read-only mode. -
  • -
  • - SciTE retains current scroll position when switching buffers and fold.on.open set. -
  • -
  • - SciTE crash fixed where '*' used to invoke parameters dialog. -
  • -
  • - SciTE bugs when writing large UCS-2 files fixed. -
  • -
  • - Bug fixed when scrolling inside a SCN_PAINTED event by invalidating window - rather than trying to perform synchronous painting. -
  • -
  • - SciTE for GTK+ View | Full Screen works on recent versions of GTK+. -
  • -
  • - SciTE for Windows enables and disables toolbar commands correctly. -
  • -
-

- Release 1.72 -

-
    -
  • - Released on 15 January 2007. -
  • -
  • - Performance of per-line data improved. -
  • -
  • - SC_STARTACTION flag set on the first modification notification in an undo - transaction to help synchronize the container's undo stack with Scintilla's. -
  • -
  • - On GTK+ drag and drop defaults to move rather than copy. -
  • -
  • - Scintilla supports extending appearance of selection to right hand margin. -
  • -
  • - Incremental search available on GTK+. -
  • -
  • - SciTE Indentation Settings dialog available on GTK+ and adds a "Convert" button. -
  • -
  • - Find in Files can optionally ignore binary files or directories that start with ".". -
  • -
  • - Lexer added for "D" language. -
  • -
  • - Export as HTML shows folding with underline lines and +/- symbols. -
  • -
  • - Ruby lexer interprets interpolated strings as expressions. -
  • -
  • - Lua lexer fixes some cases of numeric literals. -
  • -
  • - C++ folder fixes bug with "@" in doc comments. -
  • -
  • - NSIS folder handles !if and related commands. -
  • -
  • - Inno setup lexer adds styling for single and double quoted strings. -
  • -
  • - Matlab lexer handles backslashes in string literals correctly. -
  • -
  • - HTML lexer fixed to allow "?>" in comments in Basic script. -
  • -
  • - Added key codes for Windows key and Menu key. -
  • -
  • - Lua script method scite.MenuCommand(x) performs a menu command. -
  • -
  • - SciTE bug fixed with box comment command near start of file setting selection to end of file. -
  • -
  • - SciTE on GTK+, fixed loop that occurred with automatic loading for an unreadable file. -
  • -
  • - SciTE asks whether to save files when Windows shuts down. -
  • -
  • - Save Session on Windows now defaults the extension to "ses". -
  • -
  • - Bug fixed with single character keywords. -
  • -
  • - Fixed infinite loop for SCI_GETCOLUMN for position beyond end of document. -
  • -
  • - Fixed failure to accept typing on Solaris/GTK+ when using default ISO-8859-1 encoding. -
  • -
  • - Fixed warning from Lua in SciTE when creating a new buffer when already have - maximum number of buffers open. -
  • -
  • - Crash fixed with "%%" at end of batch file. -
  • -
-

- Release 1.71 -

-
    -
  • - Released on 21 August 2006. -
  • - -
  • - Double click notification includes line and position. -
  • -
  • - VB lexer bugs fixed for preprocessor directive below a comment or some other states and - to use string not closed style back to the starting quote when there are internal doubled quotes. -
  • -
  • - C++ lexer allows identifiers to contain '$' and non-ASCII characters such as UTF-8. - The '$' character can be disallowed with lexer.cpp.allow.dollars=0. -
  • -
  • - Perl lexer allows UTF-8 identifiers and has some other small improvements. -
  • -
  • - SciTE's $(CurrentWord) uses word.characters.<filepattern> to define the word - rather than a hardcoded list of word characters. -
  • -
  • - SciTE Export as HTML adds encoding information for UTF-8 file and fixes DOCTYPE. -
  • -
  • - SciTE session and .recent files default to the user properties directory rather than global - properties directory. -
  • -
  • - Left and right scroll events handled correctly on GTK+ and horizontal scroll bar has more sensible - distances for page and arrow clicks. -
  • -
  • - SciTE on GTK+ tab bar fixed to work on recent versions of GTK+. -
  • -
  • - On GTK+, if the approximate character set conversion is unavailable, a second attempt is made - without approximations. This may allow keyboard input and paste to work on older systems. -
  • -
  • - SciTE on GTK+ can redefine the Insert key. -
  • -
  • - SciTE scripting interface bug fixed where some string properties could not be changed. -
  • -
-

- Release 1.70 -

-
    -
  • - Released on 20 June 2006. -
  • -
  • - On GTK+, character set conversion is performed using an option that allows approximate conversions rather - than failures when a character can not be converted. This may lead to similar characters being inserted or - when no similar character is available a '?' may be inserted. -
  • -
  • - On GTK+, the internationalized IM (Input Method) feature is used for all typed input for all character sets. -
  • -
  • - Scintilla has new margin types SC_MARGIN_BACK and SC_MARGIN_FORE that use the default - style's background and foreground colours (normally white and black) as the background to the margin. -
  • -
  • - Scintilla/GTK+ allows file drops on Windows when drop is of type DROPFILES_DND - as well as text/uri-list. -
  • -
  • - Code page can only be set to one of the listed valid values. -
  • -
  • - Text wrapping fixed for cases where insertion was not wide enough to trigger - wrapping before being styled but was after styling. -
  • -
  • - SciTE find marks are removed before printing or exporting to avoid producing incorrect styles. -
  • -
-

- Release 1.69 -

-
    -
  • - Released on 29 May 2006. -
  • -
  • - SciTE supports z-order based buffer switching on Ctrl+Tab. -
  • -
  • - Translucent support for selection and whole line markers. -
  • -
  • - SciTE may have per-language abbreviations files. -
  • -
  • - Support for Spice language. -
  • -
  • - On GTK+ autocompletion lists are optimized and use correct selection colours. -
  • -
  • - On GTK+ the URI data type is preferred in drag and drop so that applications - will see files dragged from the shell rather than dragging the text of the file name - into the document. -
  • -
  • - Increased number of margins to 5. -
  • -
  • - Basic lexer allows include directive $include: "file name". -
  • -
  • - SQL lexer no longer bases folding on indentation. -
  • -
  • - Line ends are transformed when copied to clipboard on - Windows/GTK+2 as well as Windows/GTK+ 1. -
  • -
  • - Lexing code masks off the indicator bits on the start style before calling the lexer - to avoid confusing the lexer when an application has used an indicator. -
  • -
  • - SciTE savebefore:yes only saves the file when it has been changed. -
  • -
  • - SciTE adds output.initial.hide setting to allow setting the size of the output pane - without it showing initially. -
  • -
  • - SciTE on Windows Go To dialog allows line number with more digits. -
  • -
  • - Bug in HTML lexer fixed where a segment of PHP could switch scripting language - based on earlier text on that line. -
  • -
  • - Memory bug fixed when freeing regions on GTK+. - Other minor bugs fixed on GTK+. -
  • -
  • - Deprecated GTK+ calls in Scintilla replaced with current calls. -
  • -
  • - Fixed a SciTE bug where closing the final buffer, if read-only, left the text present in an - untitled buffer. -
  • -
  • - Bug fixed in bash lexer that prevented folding. -
  • -
  • - Crash fixed in bash lexer when backslash at end of file. -
  • -
  • - Crash on recent releases of GTK+ 2.x avoided by changing default font from X - core font to Pango font "!Sans". -
  • -
  • - Fix for SciTE properties files where multiline properties continued over completely blank lines. -
  • -
  • - Bug fixed in SciTE/GTK+ director interface where more data available than - buffer size. -
  • -
  • - Minor visual fixes to SciTE splitter on GTK+. -
  • -
-

- Release 1.68 -

-
    -
  • - Released on 9 March 2006. -
  • -
  • - Translucent drawing implemented for caret line and box indicators. -
  • -
  • - Lexer specifically for TCL is much more accurate than reusing C++ lexer. -
  • -
  • - Support for Inno Setup scripts. -
  • -
  • - Support for Opal language. -
  • -
  • - Calltips may use a new style, STYLE_CALLTIP which allows choosing a - different font for calltips. -
  • -
  • - Python lexer styles comments on decorators. -
  • -
  • - HTML lexer refined handling of "?>" and "%>" within server - side scripts. -
  • -
  • - Batch file lexer improved. -
  • -
  • - Eiffel lexer doesn't treat '.' as a name character. -
  • -
  • - Lua lexer handles length operator, #, and hex literals. -
  • -
  • - Properties file lexer has separate style for keys. -
  • -
  • - PL/SQL folding improved. -
  • -
  • - SciTE Replace dialog always searches in forwards direction. -
  • -
  • - SciTE can detect language of file from initial #! line. -
  • -
  • - SciTE on GTK+ supports output.scroll=2 setting. -
  • -
  • - SciTE can perform an import a properties file from the command line. -
  • -
  • - Set of word characters used for regular expression \< and \>. -
  • -
  • - Bug fixed with SCI_COPYTEXT stopping too early. -
  • -
  • - Bug fixed with splitting lines so that all lines are split. -
  • -
  • - SciTE calls OnSwitchFile when closing one buffer causes a switch to another. -
  • -
  • - SciTE bug fixed where properties were being reevaluated without good reason - after running a macro. -
  • -
  • - Crash fixed when clearing document with some lines contracted in word wrap mode. -
  • -
  • - Palette expands as more entries are needed. -
  • -
  • - SCI_POSITIONFROMPOINT returns more reasonable value when close to - last text on a line. -
  • -
  • - On Windows, long pieces of text may be drawn in segments if they fail to draw - as a whole. -
  • -
  • - Bug fixed with bad drawing when some visual changes made inside SCN_UPDATEUI - notification. -
  • -
  • - SciTE bug fixed with groupundo setting. -
  • -
-

- Release 1.67 -

-
    -
  • - Released on 17 December 2005. -
  • -
  • - Scintilla checks the paint region more accurately when seeing if an area is being - repainted. Platform layer implementations may need to change for this to take - effect. This fixes some drawing and styling bugs. Also optimized some parts of - marker code to only redraw the line of the marker rather than whole of the margin. -
  • -
  • - Quoted identifier style for SQL. SQL folding performed more simply. -
  • -
  • - Ruby lexer improved to better handle here documents and non-ASCII - characters. -
  • -
  • - Lua lexer supports long string and block comment syntax from Lua 5.1. -
  • -
  • - Bash lexer handles here documents better. -
  • -
  • - JavaScript lexing recognizes regular expressions more accurately and includes flag - characters in the regular expression style. This is both in JavaScript files and when - JavaScript is embedded in HTML. -
  • -
  • - Scintilla API provided to reveal how many style bits are needed for the - current lexer. -
  • -
  • - Selection duplicate added. -
  • -
  • - Scintilla API for adding a set of markers to a line. -
  • -
  • - DBCS encodings work on Windows 9x. -
  • -
  • - Convention defined for property names to be used by lexers and folders - so they can be automatically discovered and forwarded from containers. -
  • -
  • - Default bookmark in SciTE changed to a blue sphere image. -
  • -
  • - SciTE stores the time of last asking for a save separately for each buffer - which fixes bugs with automatic reloading. -
  • -
  • - On Windows, pasted text has line ends converted to current preference. - GTK+ already did this. -
  • -
  • - Kid template language better handled by HTML lexer by finishing ASP Python - mode when a ?> is found. -
  • -
  • - SciTE counts number of characters in a rectangular selection correctly. -
  • -
  • - 64-bit compatibility improved. One change that may affect user code is that - the notification message header changed to include a pointer-sized id field - to match the current Windows definition. -
  • -
  • - Empty ranges can no longer be dragged. -
  • -
  • - Crash fixed when calls made that use layout inside the painted notification. -
  • -
  • - Bug fixed where Scintilla created pixmap buffers that were too large leading - to failures when many instances used. -
  • -
  • - SciTE sets the directory of a new file to the directory of the currently - active file. -
  • -
  • - SciTE allows choosing a code page for the output pane. -
  • -
  • - SciTE HTML exporter no longer honours monospaced font setting. -
  • -
  • - Line layout cache in page mode caches the line of the caret. An assertion is - now used to ensure that the layout reentrancy problem that caused this - is easier to find. -
  • -
  • - Speed optimized for long lines and lines containing many control characters. -
  • -
  • - Bug fixed in brace matching in DBCS files where byte inside character - is same as brace. -
  • -
  • - Indent command does not indent empty lines. -
  • -
  • - SciTE bug fixed for commands that operate on files with empty extensions. -
  • -
  • - SciTE bug fixed where monospaced option was copied for subsequently opened files. -
  • -
  • - SciTE on Windows bug fixed in the display of a non-ASCII search string - which can not be found. -
  • -
  • - Bugs fixed with nested calls displaying a new calltip while one is already - displayed. -
  • -
  • - Bug fixed when styling PHP strings. -
  • -
  • - Bug fixed when styling C++ continued preprocessor lines. -
  • -
  • - SciTE bug fixed where opening file from recently used list reset choice of - language. -
  • -
  • - SciTE bug fixed when compiled with NO_EXTENSIONS and - closing one file closes the application. -
  • -
  • - SciTE crash fixed for error messages that look like Lua messages but aren't - in the same order. -
  • -
  • - Remaining fold box support deprecated. The symbols SC_FOLDLEVELBOXHEADERFLAG, - SC_FOLDLEVELBOXFOOTERFLAG, SC_FOLDLEVELCONTRACTED, - SC_FOLDLEVELUNINDENT, and SC_FOLDFLAG_BOX are deprecated. -
  • -
-

- Release 1.66 -

-
    -
  • - Released on 26 August 2005. -
  • -
  • - New, more ambitious Ruby lexer. -
  • -
  • - SciTE Find in Files dialog has options for matching case and whole words which are - enabled when the internal find command is used. -
  • -
  • - SciTE output pane can display automatic completion after "$(" typed. - An initial ">" on a line is ignored when Enter pressed. -
  • -
  • - C++ lexer recognizes keywords within line doc comments. It continues styles over line - end characters more consistently so that eolfilled style can be used for preprocessor lines - and line comments. -
  • -
  • - VB lexer improves handling of file numbers and date literals. -
  • -
  • - Lua folder handles repeat until, nested comments and nested strings. -
  • -
  • - POV lexer improves handling of comment lines. -
  • -
  • - AU3 lexer and folder updated. COMOBJ style added. -
  • -
  • - Bug fixed with text display on GTK+ with Pango 1.8. -
  • -
  • - Caret painting avoided when not focused. -
  • -
  • - SciTE on GTK+ handles file names used to reference properties as case-sensitive. -
  • -
  • - SciTE on GTK+ Save As and Export commands set the file name field. - On GTK+ the Export commands modify the file name in the same way as on Windows. -
  • -
  • - Fixed SciTE problem where confirmation was not displaying when closing a file where all - contents had been deleted. -
  • -
  • - Middle click on SciTE tab now closes correct buffer on Windows when tool bar is visible. -
  • -
  • - SciTE bugs fixed where files contained in directory that includes '.' character. -
  • -
  • - SciTE bug fixed where import in user options was reading file from directory of - global options. -
  • -
  • - SciTE calltip bug fixed where single line calltips had arrow displayed incorrectly. -
  • -
  • - SciTE folding bug fixed where empty lines were shown for no reason. -
  • -
  • - Bug fixed where 2 byte per pixel XPM images caused crash although they are still not - displayed. -
  • -
  • - Autocompletion list size tweaked. -
  • -
-

- Release 1.65 -

-
    -
  • - Released on 1 August 2005. -
  • -
  • - FreeBasic support. -
  • -
  • - SciTE on Windows handles command line arguments - "-" (read standard input into buffer), - "--" (read standard input into output pane) and - "-@" (read file names from standard input and open each). -
  • -
  • - SciTE includes a simple implementation of Find in Files which is used if no find.command is set. -
  • -
  • - SciTE can close tabs with a mouse middle click. -
  • -
  • - SciTE includes a save.all.for.build setting. -
  • -
  • - Folder for MSSQL. -
  • -
  • - Batch file lexer understands more of the syntax and the behaviour of built in commands. -
  • -
  • - Perl lexer handles here docs better; disambiguates barewords, quote-like delimiters, and repetition operators; - handles Pods after __END__; recognizes numbers better; and handles some typeglob special variables. -
  • -
  • - Lisp adds more lexical states. -
  • -
  • - PHP allows spaces after <<<. -
  • -
  • - TADS3 has a simpler set of states and recognizes identifiers. -
  • -
  • - Avenue elseif folds better. -
  • -
  • - Errorlist lexer treats lines starting with '+++' and '---' as separate - styles from '+' and '-' as they indicate file names in diffs. -
  • -
  • - SciTE error recognizer handles file paths in extra explanatory lines from MSVC - and in '+++' and '---' lines from diff. -
  • -
  • - Bugs fixed in SciTE and Scintilla folding behaviour when text pasted before - folded text caused unnecessary - unfolding and cutting text could lead to text being irretrievably hidden. -
  • -
  • - SciTE on Windows uses correct font for dialogs and better font for tab bar - allowing better localization -
  • -
  • - When Windows is used with a secondary monitor before the primary - monitor, autocompletion lists are not forced onto the primary monitor. -
  • -
  • - Scintilla calltip bug fixed where down arrow setting wrong value in notification - if not in first line. SciTE bug fixed where second arrow only shown on multiple line - calltip and was therefore misinterpreting the notification value. -
  • -
  • - Lexers will no longer be re-entered recursively during, for example, fold level setting. -
  • -
  • - Undo of typing in overwrite mode undoes one character at a time rather than requiring a removal - and addition step for each character. -
  • -
  • - EM_EXSETSEL(0,-1) fixed. -
  • -
  • - Bug fixed where part of a rectangular selection was not shown as selected. -
  • -
  • - Autocomplete window size fixed. -
  • -
-

- Release 1.64 -

-
    -
  • - Released on 6 June 2005. -
  • -
  • - TADS3 support -
  • -
  • - Smalltalk support. -
  • -
  • - Rebol support. -
  • -
  • - Flagship (Clipper / XBase) support. -
  • -
  • - CSound support. -
  • -
  • - SQL enhanced to support SQL*Plus. -
  • -
  • - SC_MARK_FULLRECT margin marker fills the whole marker margin for marked - lines with a colour. -
  • -
  • - Performance improved for some large undo and redo operations and modification flags - added in notifications. -
  • -
  • - SciTE adds command equivalents for fold margin mouse actions. -
  • -
  • - SciTE adds OnUpdateUI to set of events that can be handled by a Lua script. -
  • -
  • - Properties set in Scintilla can be read. -
  • -
  • - GTK+ SciTE exit confirmation adds Cancel button. -
  • -
  • - More accurate lexing of numbers in PHP and Caml. -
  • -
  • - Perl can fold POD and package sections. POD verbatim section style. - Globbing syntax recognized better. -
  • -
  • - Context menu moved slightly on GTK+ so that it will be under the mouse and will - stay open if just clicked rather than held. -
  • -
  • - Rectangular selection paste works the same whichever direction the selection was dragged in. -
  • -
  • - EncodedFromUTF8 handles -1 length argument as documented. -
  • -
  • - Undo and redo can cause SCN_MODIFYATTEMPTRO notifications. -
  • -
  • - Indicators display correctly when they start at the second character on a line. -
  • -
  • - SciTE Export As HTML uses standards compliant CSS. -
  • -
  • - SciTE automatic indentation handles keywords for indentation better. -
  • -
  • - SciTE fold.comment.python property removed as does not work. -
  • -
  • - Fixed problem with character set conversion when pasting on GTK+. -
  • -
  • - SciTE default character set changed from ANSI_CHARSET to DEFAULT_CHARSET. -
  • -
  • - Fixed crash when creating empty autocompletion list. -
  • -
  • - Autocomplete window size made larger under some conditions to make truncation less common. -
  • -
  • - Bug fixed where changing case of a selection did not affect initial character of lines - in multi-byte encodings. -
  • -
  • - Bug fixed where rectangular selection not displayed after Alt+Shift+Click. -
  • -
-

- Release 1.63 -

-
    -
  • - Released on 4 April 2005. -
  • -
  • - Autocompletion on Windows changed to use pop up window, be faster, - allow choice of maximum width and height, and to highlight only the text of the - selected item rather than both the text and icon if any. -
  • -
  • - Extra items can be added to the context menu in SciTE. -
  • -
  • - Character wrap mode in Scintilla helps East Asian languages. -
  • -
  • - Lexer added for Haskell. -
  • -
  • - Objective Caml support. -
  • -
  • - BlitzBasic and PureBasic support. -
  • -
  • - CSS support updated to handle CSS2. -
  • -
  • - C++ lexer is more selective about document comment keywords. -
  • -
  • - AutoIt 3 lexer improved. -
  • -
  • - Lua lexer styles end of line characters on comment and preprocessor - lines so that the eolfilled style can be applied to them. -
  • -
  • - NSIS support updated for line continuations, box comments, SectionGroup and - PageEx, and with more up-to-date properties. -
  • -
  • - Clarion lexer updated to perform folding and have more styles. -
  • -
  • - SQL lexer gains second set of keywords. -
  • -
  • - Errorlist lexer recognizes Borland Delphi error messages. -
  • -
  • - Method added for determining number of visual lines occupied by a document - line due to wrapping. -
  • -
  • - Sticky caret mode does not modify the preferred caret x position when typing - and may be useful for typing columns of text. -
  • -
  • - Dwell end notification sent when scroll occurs. -
  • -
  • - On GTK+, Scintilla requisition height is screen height rather than large fixed value. -
  • -
  • - Case insensitive autocompletion prefers exact case match. -
  • -
  • - SCI_PARADOWN and SCI_PARAUP treat lines containing only white - space as empty and handle text hidden by folding. -
  • -
  • - Scintilla on Windows supports WM_PRINTCLIENT although there are some - limitations. -
  • -
  • - SCN_AUTOCSELECTION notification sent when user selects from autoselection list. -
  • -
  • - SciTE's standard properties file sets buffers to 10, uses Pango fonts on GTK+ and - has dropped several languages to make the menu fit on screen. -
  • -
  • - SciTE's encoding cookie detection loosened so that common XML files will load - in UTF-8 if that is their declared encoding. -
  • -
  • - SciTE on GTK+ changes menus and toolbars to not be detachable unless turned - on with a property. Menus no longer tear off. The toolbar may be set to use the - default theme icons rather than SciTE's set. Changed key for View | End of Line - because of a conflict. Language menu can contain more items. -
  • -
  • - SciTE on GTK+ 2.x allows the height and width of the file open file chooser to - be set, for the show hidden files check box to be set from an option and for it - to be opened in the directory of the current file explicitly. Enter key works in - save chooser. -
  • -
  • - Scintilla lexers should no longer see bits in style bytes that are outside the set - they modify so should be able to correctly lex documents where the container - has used indicators. -
  • -
  • - SciTE no longer asks to save before performing a revert. -
  • -
  • - SciTE director interface adds a reloadproperties command to reload properties - from files. -
  • -
  • - Allow build on CYGWIN platform. -
  • -
  • - Allow use from LccWin compiler. -
  • -
  • - SCI_COLOURISE for SCLEX_CONTAINER causes a - SCN_STYLENEEDED notification. -
  • -
  • - Bugs fixed in lexing of HTML/ASP/JScript. -
  • -
  • - Fix for folding becoming confused. -
  • -
  • - On Windows, fixes for Japanese Input Method Editor and for 8 bit Katakana - characters. -
  • -
  • - Fixed buffer size bug avoided when typing long words by making buffer bigger. -
  • -
  • - Undo after automatic indentation more sensible. -
  • -
  • - SciTE menus on GTK+ uses Shift and Ctrl rather than old style abbreviations. -
  • -
  • - SciTE full screen mode on Windows calculates size more correctly. -
  • -
  • - SciTE on Windows menus work better with skinning applications. -
  • -
  • - Searching bugs fixed. -
  • -
  • - Colours reallocated when changing image using SCI_REGISTERIMAGE. -
  • -
  • - Caret stays visible when Enter held down. -
  • -
  • - Undo of automatic indentation more reasonable. -
  • -
  • - High processor usage fixed in background wrapping under some - circumstances. -
  • -
  • - Crashing bug fixed on AMD64. -
  • -
  • - SciTE crashing bug fixed when position.height or position.width not set. -
  • -
  • - Crashing bug on GTK+ fixed when setting cursor and window is NULL. -
  • -
  • - Crashing bug on GTK+ preedit window fixed. -
  • -
  • - SciTE crashing bug fixed in incremental search on Windows ME. -
  • -
  • - SciTE on Windows has a optional find and replace dialogs that can search through - all buffers and search within a particular style number. -
  • -
-

- Release 1.62 -

-
    -
  • - Released on 31 October 2004. -
  • -
  • - Lexer added for ASN.1. -
  • -
  • - Lexer added for VHDL. -
  • -
  • - On Windows, an invisible system caret is used to allow screen readers to determine - where the caret is. The visible caret is still drawn by the painting code. -
  • -
  • - On GTK+, Scintilla has methods to read the target as UTF-8 and to convert - a string from UTF-8 to the document encoding. This eases integration with - containers that use the UTF-8 encoding which is the API encoding for GTK+ 2. -
  • -
  • - SciTE on GTK+2 and Windows NT/2000/XP allows search and replace of Unicode text. -
  • -
  • - SciTE calltips allow setting the characters used to start and end parameter lists and - to separate parameters. -
  • -
  • - FindColumn method converts a line and column into a position, taking into account - tabs and multi-byte characters. -
  • -
  • - On Windows, when Scintilla copies text to the clipboard as Unicode, it avoids - adding an ANSI copy as the system will automatically convert as required in - a context-sensitive manner. -
  • -
  • - SciTE indent.auto setting automatically determines indent.size and use.tabs from - document contents. -
  • -
  • - SciTE defines a CurrentMessage property that holds the most recently selected - output pane message. -
  • -
  • - SciTE Lua scripting enhanced with -
      -
    • A Lua table called 'buffer' is associated with each buffer and can be used to - maintain buffer-specific state.
    • -
    • A 'scite' object allows interaction with the application such as opening - files from script.
    • -
    • Dynamic properties can be reset by assigning nil to a given key in - the props table.
    • -
    • An 'OnClear' event fires whenever properties and extension scripts are - about to be reloaded.
    • -
    • On Windows, loadlib is enabled and can be used to access Lua - binary modules / DLLs.
    -
  • -
  • - SciTE Find in Files on Windows can be used in a modeless way and gains a '..' - button to move up to the parent directory. It is also wider so that longer paths - can be seen. -
  • -
  • - Close buttons added to dialogs in SciTE on Windows. -
  • -
  • - SciTE on GTK+ 2 has a "hidden files" check box in file open dialog. -
  • -
  • - SciTE use.monospaced setting removed. More information in the - FAQ. -
  • -
  • - APDL lexer updated with more lexical classes -
  • -
  • - AutoIt3 lexer updated. -
  • -
  • - Ada lexer fixed to support non-ASCII text. -
  • -
  • - Cpp lexer now only matches exactly three slashes as starting a doc-comment so that - lines of slashes are seen as a normal comment. - Line ending characters are appear in default style on preprocessor and single line - comment lines. -
  • -
  • - CSS lexer updated to support CSS2 including second set of keywords. -
  • -
  • - Errorlist lexer now understands Java stack trace lines. -
  • -
  • - SciTE's handling of HTML Tidy messages jumps to column as well as line indicated. -
  • -
  • - Lisp lexer allows multiline strings. -
  • -
  • - Lua lexer treats .. as an operator when between identifiers. -
  • -
  • - PHP lexer handles 'e' in numerical literals. -
  • -
  • - PowerBasic lexer updated for macros and optimized. -
  • -
  • - Properties file folder changed to leave lines before a header at the base level - and thus avoid a vertical line when using connected folding symbols. -
  • -
  • - GTK+ on Windows version uses Alt for rectangular selection to be compatible with - platform convention. -
  • -
  • - SciTE abbreviations file moved from system directory to user directory - so each user can have separate abbreviations. -
  • -
  • - SciTE on GTK+ has improved .desktop file and make install support that may - lead to better integration with system shell. -
  • -
  • - Disabling of themed background drawing on GTK+ extended to all cases. -
  • -
  • - SciTE date formatting on Windows performed with the user setting rather than the - system setting. -
  • -
  • - GTK+ 2 redraw while scrolling fixed. -
  • -
  • - Recursive property definitions are safer, avoiding expansion when detected. -
  • -
  • - SciTE thread synchronization for scripts no longer uses HWND_MESSAGE - so is compatible with older versions of Windows. - Other Lua scripting bugs fixed. -
  • -
  • - SciTE on Windows localization of menu accelerators changed to be compatible - with alternative UI themes. -
  • -
  • - SciTE on Windows full screen mode now fits better when menu different height - to title bar height. -
  • -
  • - SC_MARK_EMPTY marker is now invisible and does not change the background - colour. -
  • -
  • - Bug fixed in HTML lexer to allow use of <?xml in strings in scripts without - triggering xml mode. -
  • -
  • - Bug fixed in SciTE abbreviation expansion that could break indentation or crash. -
  • -
  • - Bug fixed when searching for a whole word string that ends one character before - end of document. -
  • -
  • - Drawing bug fixed when indicators drawn on wrapped lines. -
  • -
  • - Bug fixed when double clicking a hotspot. -
  • -
  • - Bug fixed where autocompletion would remove typed text if no match found. -
  • -
  • - Bug fixed where display does not scroll when inserting in long wrapped line. -
  • -
  • - Bug fixed where SCI_MARKERDELETEALL would only remove one of the markers - on a line that contained multiple markers with the same number. -
  • -
  • - Bug fixed where markers would move when converting line endings. -
  • -
  • - Bug fixed where SCI_LINEENDWRAP would move too far when line ends are visible. -
  • -
  • - Bugs fixed where calltips with unicode or other non-ASCII text would display - incorrectly. -
  • -
  • - Bug fixed in determining if at save point after undoing from save point and then - performing changes. -
  • -
  • - Bug fixed on GTK+ using unsupported code pages where extraneous text could - be drawn. -
  • -
  • - Bug fixed in drag and drop code on Windows where dragging from SciTE to - Firefox could hang both applications. -
  • -
  • - Crashing bug fixed on GTK+ when no font allocation succeeds. -
  • -
  • - Crashing bug fixed when autocompleting word longer than 1000 characters. -
  • -
  • - SciTE crashing bug fixed when both Find and Replace dialogs shown by disallowing - this situation. -
  • -
-

- Release 1.61 -

-
    -
  • - Released on 29 May 2004. -
  • -
  • - Improvements to selection handling on GTK+. -
  • -
  • - SciTE on GTK+ 2.4 uses the improved file chooser which allows - file extension filters, multiple selection, and remembers favourite - directories. -
  • -
  • - SciTE Load Session and Save Session commands available on GTK+. -
  • -
  • - SciTE lists Lua Startup Script in Options menu when loaded. -
  • -
  • - In SciTE, OnUserListSelection can be implemented in Lua. -
  • -
  • - SciTE on Windows has a context menu on the file tabs. -
  • -
  • - SQL lexer allows '#' comments and optionally '\' quoting inside strings. -
  • -
  • - Mssql lexer improved. -
  • -
  • - AutoIt3 lexer updated. -
  • -
  • - Perl lexer recognizes regular expression use better. -
  • -
  • - Errorlist lexer understands Lua tracebacks and copes with findstr - output for file names that end with digits. -
  • -
  • - Drawing of lines on GTK+ improved and made more like Windows - without final point. -
  • -
  • - SciTE on GTK+ uses a high resolution window icon. -
  • -
  • - SciTE can be set to warn before loading files larger than a particular size. -
  • -
  • - SciTE Lua scripting bugs fixed included a crashing bug when using - an undefined function name that would go before first actual name. -
  • -
  • - SciTE bug fixed where a modified buffer was not saved if it was - the last buffer and was not current when the New command used. -
  • -
  • - SciTE monofont mode no longer affects line numbers. -
  • -
  • - Crashing bug in SciTE avoided by not allowing both the Find and Replace - dialogs to be visible at one time. -
  • -
  • - Crashing bug in SciTE fixed when Lua scripts were being run - concurrently. -
  • -
  • - Bug fixed that caused incorrect line number width in SciTE. -
  • -
  • - PHP folding bug fixed. -
  • -
  • - Regression fixed when setting word characters to not include - some of the standard word characters. -
  • -
-

- Release 1.60 -

-
    -
  • - Released on 1 May 2004. -
  • -
  • - SciTE can be scripted using the Lua programming language. -
  • -
  • - command.mode is a better way to specify tool command options in SciTE. -
  • -
  • - Continuation markers can be displayed so that you can see which lines are wrapped. -
  • -
  • - Lexer for Gui4Cli language. -
  • -
  • - Lexer for Kix language. -
  • -
  • - Lexer for Specman E language. -
  • -
  • - Lexer for AutoIt3 language. -
  • -
  • - Lexer for APDL language. -
  • -
  • - Lexer for Bash language. Also reasonable for other Unix shells. -
  • -
  • - SciTE can load lexers implemented in external shared libraries. -
  • -
  • - Perl treats "." not as part of an identifier and interprets '/' and '->' - correctly in more circumstances. -
  • -
  • - PHP recognizes variables within strings. -
  • -
  • - NSIS has properties "nsis.uservars" and "nsis.ignorecase". -
  • -
  • - MSSQL lexer adds keyword list for operators and stored procedures, - defines '(', ')', and ',' as operators and changes some other details. -
  • -
  • - Input method preedit window on GTK+ 2 may support some Asian languages. -
  • -
  • - Platform interface adds an extra platform-specific flag to Font::Create. - Used on wxWidgets to choose antialiased text display but may be used for - any task that a platform needs. -
  • -
  • - OnBeforeSave method added to Extension interface. -
  • -
  • - Scintilla methods that return strings can be called with a NULL pointer - to find out how long the string should be. -
  • -
  • - Visual Studio .NET project file now in VS .NET 2003 format so can not be used - directly in VS .NET 2002. -
  • -
  • - Scintilla can be built with GTK+ 2 on Windows. -
  • -
  • - Updated RPM spec for SciTE on GTK+. -
  • -
  • - GTK+ makefile for SciTE allows selection of destination directory, creates destination - directories and sets file modes and owners better. -
  • -
  • - Tab indents now go to next tab multiple rather than add tab size. -
  • -
  • - SciTE abbreviations now use the longest possible match rather than the shortest. -
  • -
  • - Autocompletion does not remove prefix when actioned with no choice selected. -
  • -
  • - Autocompletion cancels when moving beyond the start position, not at the start position. -
  • -
  • - SciTE now shows only calltips for functions that match exactly, not - those that match as a prefix. -
  • -
  • - SciTE can repair box comment sections where some lines were added without - the box comment middle line prefix. -
  • -
  • - Alt+ works in user.shortcuts on Windows. -
  • -
  • - SciTE on GTK+ enables replace in selection for rectangular selections. -
  • -
  • - Key bindings for command.shortcut implemented in a way that doesn't break - when the menus are localized. -
  • -
  • - Drawing of background on GTK+ faster as theme drawing disabled. -
  • -
  • - On GTK+, calltips are moved back onto the screen if they extend beyond the screen bounds. -
  • -
  • - On Windows, the Scintilla object is destroyed on WM_NCDESTROY rather than - WM_DESTROY which arrives earlier. This fixes some problems when Scintilla was subclassed. -
  • -
  • - The zorder switching feature removed due to number of crashing bugs. -
  • -
  • - Code for XPM images made more robust. -
  • -
  • - Bug fixed with primary selection on GTK+. -
  • -
  • - On GTK+ 2, copied or cut text can still be pasted after the Scintilla widget is destroyed. -
  • -
  • - Styling change not visible problem fixed when line was cached. -
  • -
  • - Bug in SciTE on Windows fixed where clipboard commands stopped working. -
  • -
  • - Crashing bugs in display fixed in line layout cache. -
  • -
  • - Crashing bug may be fixed on AMD64 processor on GTK+. -
  • -
  • - Rare hanging crash fixed in Python lexer. -
  • -
  • - Display bugs fixed with DBCS characters on GTK+. -
  • -
  • - Autocompletion lists on GTK+ 2 are not sorted by the ListModel as the - contents are sorted correctly by Scintilla. -
  • -
  • - SciTE fixed to not open extra untitled buffers with check.if.already.open. -
  • -
  • - Sizing bug fixed on GTK+ when window resized while unmapped. -
  • -
  • - Text drawing crashing bug fixed on GTK+ with non-Pango fonts and long strings. -
  • -
  • - Fixed some issues if characters are unsigned. -
  • -
  • - Fixes in NSIS support. -
  • -
-

- Release 1.59 -

-
    -
  • - Released on 19 February 2004. -
  • -
  • - SciTE Options and Language menus reduced in length by commenting - out some languages. Languages can be enabled by editing the global - properties file. -
  • -
  • - Verilog language supported. -
  • -
  • - Lexer for Microsoft dialect of SQL. SciTE properties file available from extras page. -
  • -
  • - Perl lexer disambiguates '/' better. -
  • -
  • - NSIS lexer improved with a lexical class for numbers, option for ignoring case - of keywords, and folds only occurring when folding keyword first on line. -
  • -
  • - PowerBasic lexer improved with styles for constants and assembler and - folding improvements. -
  • -
  • - On GTK+, input method support only invoked for Asian languages and not - European languages as the old European keyboard code works better. -
  • -
  • - Scintilla can be requested to allocate a certain amount and so avoid repeated - reallocations and memory inefficiencies. SciTE uses this and so should require - less memory. -
  • -
  • - SciTE's "toggle current fold" works when invoked on child line as well as - fold header. -
  • -
  • - SciTE output pane scrolling can be set to not scroll back to start after - completion of command. -
  • -
  • - SciTE has a $(SessionPath) property. -
  • -
  • - SciTE on Windows can use VK_* codes for keys in user.shortcuts. -
  • -
  • - Stack overwrite bug fixed in SciTE's command to move to the end of a - preprocessor conditional. -
  • -
  • - Bug fixed where vertical selection appeared to select a different set of characters - then would be used by, for example, a copy. -
  • -
  • - SciTE memory leak fixed in fold state remembering. -
  • -
  • - Bug fixed where changing the style of some text outside the - standard StyleNeeded notification would not be visible. -
  • -
  • - On GTK+ 2 g_iconv is used in preference to iconv, as it is provided by GTK+ - so should avoid problems finding the iconv library. -
  • -
  • - On GTK+ fixed a style reference count bug. -
  • -
  • - Memory corruption bug fixed with GetSelText. -
  • -
  • - On Windows Scintilla deletes memory on WM_NCDESTROY rather than - the earlier WM_DESTROY to avoid problems when the window is subclassed. -
  • -
-

- Release 1.58 -

-
    -
  • - Released on 11 January 2004. -
  • -
  • - Method to discover the currently highlighted element in an autocompletion list. -
  • -
  • - On GTK+, the lexers are now included in the scintilla.a library file. This - will require changes to the make files of dependent projects. -
  • -
  • - Octave support added alongside related Matlab language and Matlab support improved. -
  • -
  • - VB lexer gains an unterminated string state and 4 sets of keywords. -
  • -
  • - Ruby lexer handles $' correctly. -
  • -
  • - Error line handling improved for FORTRAN compilers from Absoft and Intel. -
  • -
  • - International input enabled on GTK+ 2 although there is no way to choose an - input method. -
  • -
  • - MultiplexExtension in SciTE allows multiple extensions to be used at once. -
  • -
  • - Regular expression replace interprets backslash expressions \a, \b, \f, \n, \r, \t, - and \v in the replacement value. -
  • -
  • - SciTE Replace dialog displays number of replacements made when Replace All or - Replace in Selection performed. -
  • -
  • - Localization files may contain a translation.encoding setting which is used - on GTK+ 2 to automatically reencode the translation to UTF-8 so it will be - the localized text will be displayed correctly. -
  • -
  • - SciTE on GTK+ implements check.if.already.open. -
  • -
  • - Make files for Mac OS X made more robust. -
  • -
  • - Performance improved in SciTE when switching buffers when there - is a rectangular selection. -
  • -
  • - Fixed failure to display some text when wrapped. -
  • -
  • - SciTE crashes from Ctrl+Tab buffer cycling fixed. - May still be some rare bugs here. -
  • -
  • - Crash fixed when decoding an error message that appears similar to a - Borland error message. -
  • -
  • - Fix to auto-scrolling allows containers to implement enhanced double click selection. -
  • -
  • - Hang fixed in idle word wrap. -
  • -
  • - Crash fixed in hotspot display code.. -
  • -
  • - SciTE on Windows Incremental Search no longer moves caret back. -
  • -
  • - SciTE hang fixed when performing a replace with a find string that - matched zero length strings such as ".*". -
  • -
  • - SciTE no longer styles the whole file when saving buffer fold state - as that was slow. -
  • -
-

- Release 1.57 -

-
    -
  • - Released on 27 November 2003. -
  • -
  • - SciTE remembers folding of each buffer. -
  • -
  • - Lexer for Erlang language. -
  • -
  • - Scintilla allows setting the set of white space characters. -
  • -
  • - Scintilla has 'stuttered' page movement commands to first move - to top or bottom within current visible lines before scrolling. -
  • -
  • - Scintilla commands for moving to end of words. -
  • -
  • - Incremental line wrap enabled on Windows. -
  • -
  • - SciTE PDF exporter produces output that is more compliant with reader - applications, is smaller and allows more configuration. - HTML exporter optimizes size of output files. -
  • -
  • - SciTE defines properties PLAT_WINNT and PLAT_WIN95 on the - corresponding platforms. -
  • -
  • - SciTE can adjust the line margin width to fit the largest line number. - The line.numbers property is split between line.margin.visible and - line.margin.width. -
  • -
  • - SciTE on GTK+ allows user defined menu accelerators. - Alt can be included in user.shortcuts. -
  • -
  • - SciTE Language menu can have items commented out. -
  • -
  • - SciTE on Windows Go to dialog allows choosing a column number as - well as a line number. -
  • -
  • - SciTE on GTK+ make file uses prefix setting more consistently. -
  • -
  • - Bug fixed that caused word wrapping to fail to display all text. -
  • -
  • - Crashing bug fixed in GTK+ version of Scintilla when using GDK fonts - and opening autocompletion. -
  • -
  • - Bug fixed in Scintilla SCI_GETSELTEXT where an extra NUL - was included at end of returned string -
  • -
  • - Crashing bug fixed in SciTE z-order switching implementation. -
  • -
  • - Hanging bug fixed in Perl lexer. -
  • -
  • - SciTE crashing bug fixed for using 'case' without argument in style definition. -
  • -
-

- Release 1.56 -

-
    -
  • - Released on 25 October 2003. -
  • -
  • - Rectangular selection can be performed using the keyboard. - Greater programmatic control over rectangular selection. - This has caused several changes to key bindings. -
  • -
  • - SciTE Replace In Selection works on rectangular selections. -
  • -
  • - Improved lexer for TeX, new lexer for Metapost and other support for these - languages. -
  • -
  • - Lexer for PowerBasic. -
  • -
  • - Lexer for Forth. -
  • -
  • - YAML lexer improved to include error styling. -
  • -
  • - Perl lexer improved to correctly handle more cases. -
  • -
  • - Assembler lexer updated to support single-quote strings and fix some - problems. -
  • -
  • - SciTE on Windows can switch between buffers in order of use (z-order) rather - than static order. -
  • -
  • - SciTE supports adding an extension for "Open Selected Filename". - The openpath setting works on GTK+. -
  • -
  • - SciTE can Export as XML. -
  • -
  • - SciTE $(SelHeight) variable gives a more natural result for empty and whole line - selections. -
  • -
  • - Fixes to wrapping problems, such as only first display line being visible in some - cases. -
  • -
  • - Fixes to hotspot to only highlight when over the hotspot, only use background - colour when set and option to limit hotspots to a single line. -
  • -
  • - Small fixes to FORTRAN lexing and folding. -
  • -
  • - SQL lexer treats single quote strings as a separate class to double quote strings.. -
  • -
  • - Scintilla made compatible with expectations of container widget in GTK+ 2.3. -
  • -
  • - Fix to strip out pixmap ID when automatically choosing from an autocompletion - list with only one element. -
  • -
  • - SciTE bug fixed where UTF-8 files longer than 128K were gaining more than one - BOM. -
  • -
  • - Crashing bug fixed in SciTE on GTK+ where using "Stop Executing" twice leads - to all applications exiting. -
  • -
  • - Bug fixed in autocompletion scrolling on GTK+ 2 with a case sensitive list. - The ListBox::Sort method is no longer needed or available so platform - maintainers should remove it. -
  • -
  • - SciTE check.if.already.open setting removed from GTK+ version as unmaintained. -
  • -
-

- Release 1.55 -

-
    -
  • - Released on 25 September 2003. -
  • -
  • - Fix a crashing bug in indicator display in Scintilla. -
  • -
  • - GTK+ version now defaults to building for GTK+ 2 rather than 1. -
  • -
  • - Mingw make file detects compiler version and avoids options - that are cause problems for some versions. -
  • -
  • - Large performance improvement on GTK+ 2 for long lines. -
  • -
  • - Incremental line wrap on GTK+. -
  • -
  • - International text entry works much better on GTK+ with particular - improvements for Baltic languages and languages that use 'dead' accents. - NUL key events such as those generated by some function keys, ignored. -
  • -
  • - Unicode clipboard support on GTK+. -
  • -
  • - Indicator type INDIC_BOX draws a rectangle around the text. -
  • -
  • - Clarion language support. -
  • -
  • - YAML language support. -
  • -
  • - MPT LOG language support. -
  • -
  • - On Windows, SciTE can switch buffers based on activation order rather - than buffer number. -
  • -
  • - SciTE save.on.deactivate saves all buffers rather than just the current buffer. -
  • -
  • - Lua lexer handles non-ASCII characters correctly. -
  • -
  • - Error lexer understands Borland errors with pathnames that contain space. -
  • -
  • - On GTK+ 2, autocompletion uses TreeView rather than deprecated CList. -
  • -
  • - SciTE autocompletion removed when expand abbreviation command used. -
  • -
  • - SciTE calltips support overloaded functions. -
  • -
  • - When Save fails in SciTE, choice offered to Save As. -
  • -
  • - SciTE message boxes on Windows may be moved to front when needed. -
  • -
  • - Indicators drawn correctly on wrapped lines. -
  • -
  • - Regular expression search no longer matches characters with high bit - set to characters without high bit set. -
  • -
  • - Hang fixed in backwards search in multi byte character documents. -
  • -
  • - Hang fixed in SciTE Mark All command when wrap around turned off. -
  • -
  • - SciTE Incremental Search no longer uses hot keys on Windows. -
  • -
  • - Calltips draw non-ASCII characters correctly rather than as arrows. -
  • -
  • - SciTE crash fixed when going to an error message with empty file name. -
  • -
  • - Bugs fixed in XPM image handling code. -
  • -
-

- Release 1.54 -

-
    -
  • - Released on 12 August 2003. -
  • -
  • - SciTE on GTK+ 2.x can display a tab bar. -
  • -
  • - SciTE on Windows provides incremental search. -
  • -
  • - Lexer for PostScript. -
  • -
  • - Lexer for the NSIS scripting language. -
  • -
  • - New lexer for POV-Ray Scene Description Language - replaces previous implementation. -
  • -
  • - Lexer for the MMIX Assembler language. -
  • -
  • - Lexer for the Scriptol language. -
  • -
  • - Incompatibility: SQL keywords are specified in lower case rather than upper case. - SQL lexer allows double quoted strings. -
  • -
  • - Pascal lexer: character constants that start with '#' understood, - '@' only allowed within assembler blocks, - '$' can be the start of a number, - initial '.' in 0..constant not treated as part of a number, - and assembler blocks made more distinctive. -
  • -
  • - Lua lexer allows '.' in keywords. - Multi-line strings and comments can be folded. -
  • -
  • - CSS lexer handles multiple psuedoclasses. -
  • -
  • - Properties file folder works for INI file format. -
  • -
  • - Hidden indicator style allows the container to mark text within Scintilla - without there being any visual effect. -
  • -
  • - SciTE does not prompt to save changes when the buffer is empty and untitled. -
  • -
  • - Modification notifications caused by SCI_INSERTSTYLEDSTRING - now include the contents of the insertion. -
  • -
  • - SCI_MARKERDELETEALL deletes all the markers on a line - rather than just the first match. -
  • -
  • - Better handling of 'dead' accents on GTK+ 2 for languages - that use accented characters. -
  • -
  • - SciTE now uses value of output.vertical.size property. -
  • -
  • - Crash fixed in SciTE autocompletion on long lines. -
  • -
  • - Crash fixed in SciTE comment command on long lines. -
  • -
  • - Bug fixed with backwards regular expression search skipping - every second match. -
  • -
  • - Hang fixed with regular expression replace where both target and replacement were empty. -
  • -
-

- Release 1.53 -

-
    -
  • - Released on 16 May 2003. -
  • -
  • - On GTK+ 2, encodings other than ASCII, Latin1, and Unicode are - supported for both display and input using iconv. -
  • -
  • - External lexers supported on GTK+/Linux. - External lexers must now be explicitly loaded with SCI_LOADLEXERLIBRARY - rather than relying upon a naming convention and automatic loading. -
  • -
  • - Support of Lout typesetting language. -
  • -
  • - Support of E-Scripts language used in the POL Ultima Online Emulator. -
  • -
  • - Scrolling and drawing performance on GTK+ enhanced, particularly for GTK+ 2.x - with an extra window for the text area avoiding conflicts with the scroll bars. -
  • -
  • - CopyText and CopyRange methods in Scintilla allow container to - easily copy to the system clipboard. -
  • -
  • - Line Copy command implemented and bound to Ctrl+Shift+T. -
  • -
  • - Scintilla APIs PositionBefore and PositionAfter can be used to iterate through - a document taking into account the encoding and multi-byte characters. -
  • -
  • - C++ folder can fold on the "} else {" line of an if statement by setting - fold.at.else property to 1. -
  • -
  • - C++ lexer allows an extra set of keywords. -
  • -
  • - Property names and thus abbreviations may be non-ASCII. -
  • -
  • - Removed attempt to load a file when setting properties that was - part of an old scripting experiment. -
  • -
  • - SciTE no longer warns about a file not existing when opening - properties files from the Options menu as there is a good chance - the user wants to create one. -
  • -
  • - Bug fixed with brace recognition in multi-byte encoded files where a partial - character matched a brace byte. -
  • -
  • - More protection against infinite loops or recursion with recursive property definitions. -
  • -
  • - On Windows, cursor will no longer disappear over margins in custom builds when - cursor resource not present. The Windows default cursor is displayed instead. -
  • -
  • - load.on.activate fixed in SciTE as was broken in 1.52. -
  • -
-

- Release 1.52 -

-
    -
  • - Released on 17 April 2003. -
  • -
  • - Pango font support on GTK+ 2. - Unicode input improved on GTK+ 2. -
  • -
  • - Hotspot style implemented in Scintilla. -
  • -
  • - Small up and down arrows can be displayed in calltips and the container - is notified when the mouse is clicked on a calltip. - Normal and selected calltip text colours can be set. -
  • -
  • - POSIX compatibility flag in Scintilla regular expression search - interprets bare ( and ) as tagged sections. -
  • -
  • - Error message lexer tightened to yield fewer false matches. - Recognition of Lahey and Intel FORTRAN error formats. -
  • -
  • - Scintilla keyboard commands for moving to start and end of - screen lines rather than document lines, unless already there - where these keys move to the start or end of the document line. -
  • -
  • - Line joining command. -
  • -
  • - Lexer for POV-Ray. -
  • -
  • - Calltips on Windows are no longer clipped by the parent window. -
  • -
  • - Autocompletion lists are cancelled when focus leaves their parent window. -
  • -
  • - Move to next/previous empty line delimited paragraph key commands. -
  • -
  • - SciTE hang fixed with recursive property definitions by placing limit - on number of substitutions performed. -
  • -
  • - SciTE Export as PDF reenabled and works. -
  • -
  • - Added loadsession: command line command to SciTE. -
  • -
  • - SciTE option to quit application when last document closed. -
  • -
  • - SciTE option to ask user if it is OK to reload a file that has been - modified outside SciTE. -
  • -
  • - SciTE option to automatically save before running particular command tools - or to ask user or to not save. -
  • -
  • - SciTE on Windows 9x will write a Ctrl+Z to the process input pipe before - closing the pipe when running tool commands that take input. -
  • -
  • - Added a manifest resource to SciTE on Windows to enable Windows XP - themed UI. -
  • -
  • - SciTE calltips handle nested calls and other situations better. -
  • -
  • - CSS lexer improved. -
  • -
  • - Interface to platform layer changed - Surface initialization now requires - a WindowID parameter. -
  • -
  • - Bug fixed with drawing or measuring long pieces of text on Windows 9x - by truncating the pieces. -
  • -
  • - Bug fixed with SciTE on GTK+ where a user shortcut for a visible character - inserted the character as well as executing the command. -
  • -
  • - Bug fixed where primary selection on GTK+ was reset by - Scintilla during creation. -
  • -
  • - Bug fixed where SciTE would close immediately on startup - when using save.session. -
  • -
  • - Crash fixed when entering '\' in LaTeX file. -
  • -
  • - Hang fixed when '#' last character in VB file. -
  • -
  • - Crash fixed in error message lexer. -
  • -
  • - Crash fixed when searching for long regular expressions. -
  • -
  • - Pressing return when nothing selected in user list sends notification with - empty text rather than random text. -
  • -
  • - Mouse debouncing disabled on Windows as it interfered with some - mouse utilities. -
  • -
  • - Bug fixed where overstrike mode inserted before rather than replaced last - character in document. -
  • -
  • - Bug fixed with syntax highlighting of Japanese text. -
  • -
  • - Bug fixed in split lines function. -
  • -
  • - Cosmetic fix to SciTE tab bar on Windows when window resized. - Focus sticks to either pane more consistently. -
  • -
-

- Release 1.51 -

-
    -
  • - Released on 16 February 2003. -
  • -
  • - Two phase drawing avoids cutting off text that overlaps runs by drawing - all the backgrounds of a line then drawing all the text transparently. - Single phase drawing is an option. -
  • -
  • - Scintilla method to split lines at a particular width by adding new line - characters. -
  • -
  • - The character used in autocompletion lists to separate the text from the image - number can be changed. -
  • -
  • - The scrollbar range will automatically expand when the caret is moved - beyond the current range. - The scroll bar is updated when SCI_SETXOFFSET is called. -
  • -
  • - Mouse cursors on GTK+ improved to be consistent with other applications - and the Windows version. -
  • -
  • - Horizontal scrollbar on GTK+ now disappears in wrapped mode. -
  • -
  • - Scintilla on GTK+ 2: mouse wheel scrolling, cursor over scrollbars, focus, - and syntax highlighting now work. - gtk_selection_notify avoided for compatibility with GTK+ 2.2. -
  • -
  • - Fold margin colours can now be set. -
  • -
  • - SciTE can be built for GTK+ 2. -
  • -
  • - SciTE can optionally preserve the undo history over an automatic file reload. -
  • -
  • - Tags can optionally be case insensitive in XML and HTML. -
  • -
  • - SciTE on Windows handles input to tool commands in a way that should avoid - deadlock. Output from tools can be used to replace the selection. -
  • -
  • - SciTE on GTK+ automatically substitutes '|' for '/' in menu items as '/' - is used to define the menu hierarchy. -
  • -
  • - Optional buffer number in SciTE title bar. -
  • -
  • - Crash fixed in SciTE brace matching. -
  • -
  • - Bug fixed where automatic scrolling past end of document - flipped back to the beginning. -
  • -
  • - Bug fixed where wrapping caused text to disappear. -
  • -
  • - Bug fixed on Windows where images in autocompletion lists were - shown on the wrong item. -
  • -
  • - Crash fixed due to memory bug in autocompletion lists on Windows. -
  • -
  • - Crash fixed when double clicking some error messages. -
  • -
  • - Bug fixed in word part movement where sometimes no movement would occur. -
  • -
  • - Bug fixed on Windows NT where long text runs were truncated by - treating NT differently to 9x where there is a limitation. -
  • -
  • - Text in not-changeable style works better but there remain some cases where - it is still possible to delete text protected this way. -
  • -
-

- Release 1.50 -

-
    -
  • - Released on 24 January 2003. -
  • -
  • - Autocompletion lists may have a per-item pixmap. -
  • -
  • - Autocompletion lists allow Unicode text on Windows. -
  • -
  • - Scintilla documentation rewritten. -
  • -
  • - Additional DBCS encoding support in Scintilla on GTK+ primarily aimed at - Japanese EUC encoding. -
  • -
  • - CSS (Cascading Style Sheets) lexer added. -
  • -
  • - diff lexer understands some more formats. -
  • -
  • - Fold box feature is an alternative way to show the structure of code. -
  • -
  • - Avenue lexer supports multiple keyword lists. -
  • -
  • - The caret may now be made invisible by setting the caret width to 0. -
  • -
  • - Python folder attaches comments before blocks to the next block rather - than the previous block. -
  • -
  • - SciTE openpath property on Windows searches a path for files that are - the subject of the Open Selected Filename command. -
  • -
  • - The localization file name can be changed with the locale.properties property. -
  • -
  • - On Windows, SciTE can pipe the result of a string expression into a command line tool. -
  • -
  • - On Windows, SciTE's Find dialog has a Mark All button. -
  • -
  • - On Windows, there is an Insert Abbreviation command that allows a choice from - the defined abbreviations and inserts the selection into the abbreviation at the - position of a '|'. -
  • -
  • - Minor fixes to Fortran lexer. -
  • -
  • - fold.html.preprocessor decides whether to fold <? and ?>. - Minor improvements to PHP folding. -
  • -
  • - Maximum number of keyword lists allowed increased from 6 to 9. -
  • -
  • - Duplicate line command added with default assignment to Ctrl+D. -
  • -
  • - SciTE sets $(Replacements) to the number of replacements made by the - Replace All command. $(CurrentWord) is set to the word before the caret if the caret - is at the end of a word. -
  • -
  • - Opening a SciTE session now loads files in remembered order, sets the current file - as remembered, and moves the caret to the remembered line. -
  • -
  • - Bugs fixed with printing on Windows where line wrapping was causing some text - to not print. -
  • -
  • - Bug fixed with Korean Input Method Editor on Windows. -
  • -
  • - Bugs fixed with line wrap which would sometimes choose different break positions - after switching focus away and back. -
  • -
  • - Bug fixed where wheel scrolling had no effect on GTK+ after opening a fold. -
  • -
  • - Bug fixed with file paths containing non-ASCII characters on Windows. -
  • -
  • - Crash fixed with printing on Windows after defining pixmap marker. -
  • -
  • - Crash fixed in makefile lexer when first character on line was '='. -
  • -
  • - Bug fixed where local properties were not always being applied. -
  • -
  • - Ctrl+Keypad* fold command works on GTK+. -
  • -
  • - Hangs fixed in SciTE's Replace All command when replacing regular expressions '^' - or '$'. -
  • -
  • - SciTE monospace setting behaves more sensibly. -
  • -
-

- Release 1.49 -

-
    -
  • - Released on 1 November 2002. -
  • -
  • - Unicode supported on GTK+. To perform well, this added a font cache to GTK+ - and to make that safe, a mutex is used. The mutex requires the application to link in - the threading library by evaluating `glib-config --libs gthread`. A Unicode locale - should also be set up by a call like setlocale(LC_CTYPE, "en_US.UTF-8"). - scintilla_release_resources function added to release mutex. -
  • -
  • - FORTRAN and assembler lexers added along with other support for these - languages in SciTE. -
  • -
  • - Ada lexer improved handling of based numbers, identifier validity and attributes - distinguished from character literals. -
  • -
  • - Lua lexer handles block comments and a deep level of nesting for literal strings - and block comments. -
  • -
  • - Errorlist lexer recognizes PHP error messages. -
  • -
  • - Variant of the C++ lexer with case insensitive keywords - called cppnocase. Whitespace in preprocessor text handled more correctly. -
  • -
  • - Folder added for Perl. -
  • -
  • - Compilation with GCC 3.2 supported. -
  • -
  • - Markers can be pixmaps. -
  • -
  • - Lines are wrapped when printing. - Bug fixed which printed line numbers in different styles. -
  • -
  • - Text can be appended to end with AppendText method. -
  • -
  • - ChooseCaretX method added. -
  • -
  • - Vertical scroll bar can be turned off with SetVScrollBar method. -
  • -
  • - SciTE Save All command saves all buffers. -
  • -
  • - SciTE localization compares keys case insensitively to make translations more flexible. -
  • -
  • - SciTE detects a utf-8 coding cookie "coding: utf-8" in first two - lines and goes into Unicode mode. -
  • -
  • - SciTE key bindings are definable. -
  • -
  • - SciTE Find in Files dialog can display directory browser to - choose directory to search. -
  • -
  • - SciTE enabling of undo and redo toolbar buttons improved. -
  • -
  • - SciTE on Windows file type filters in open dialog sorted. -
  • -
  • - Fixed crashing bug when using automatic tag closing in XML or HTML. -
  • -
  • - Fixed bug on Windows causing very long (>64K) lines to not display. -
  • -
  • - Fixed bug in backwards regular expression searching. -
  • -
  • - Fixed bug in calltips where wrong argument was highlighted. -
  • -
  • - Fixed bug in tab timmy feature when file has line feed line endings. -
  • -
  • - Fixed bug in compiling without INCLUDE_DEPRECATED_FEATURES - defined. -
  • -
-

- Release 1.48 -

-
    -
  • - Released on 9 September 2002. -
  • -
  • - Improved Pascal lexer with context sensitive keywords - and separate folder which handles //{ and //} folding comments and - {$region} and {$end} folding directives. - The "case" statement now folds correctly. -
  • -
  • - C++ lexer correctly handles comments on preprocessor lines. -
  • -
  • - New commands for moving to beginning and end of display lines when in line - wrap mode. Key bindings added for these commands. -
  • -
  • - New marker symbols that look like ">>>" and "..." which can be used for - interactive shell prompts for Python. -
  • -
  • - The foreground and background colours of visible whitespace can be chosen - independent of the colours chosen for the lexical class of that whitespace. -
  • -
  • - Per line data optimized by using an exponential allocation scheme. -
  • -
  • - SciTE API file loading optimized. -
  • -
  • - SciTE for GTK+ subsystem 2 documented. The exit status of commands - is decoded into more understandable fields. -
  • -
  • - SciTE find dialog remembers previous find string when there is no selection. - Find in Selection button disabled when selection is rectangular as command - did not work. -
  • -
  • - Shift+Enter made equivalent to Enter to avoid users having to let go of - the shift key when typing. Avoids the possibility of entering single carriage - returns in a file that contains CR+LF line ends. -
  • -
  • - Autocompletion does not immediately disappear when the length parameter - to SCI_AUTOCSHOW is 0. -
  • -
  • - SciTE focuses on the editor pane when File | New executed and when the - output pane is closed with F8. Double clicking on a non-highlighted output - pane line selects the word under the cursor rather than seeking the next - highlighted line. -
  • -
  • - SciTE director interface implements an "askproperty" command. -
  • -
  • - SciTE's Export as LaTeX output improved. -
  • -
  • - Better choice of autocompletion displaying above the caret rather then - below when that is more sensible. -
  • -
  • - Bug fixed where context menu would not be completely visible if invoked - when cursor near bottom or left of screen. -
  • -
  • - Crashing bug fixed when displaying long strings on GTK+ caused failure of X server - by displaying long text in segments. -
  • -
  • - Crashing bug fixed on GTK+ when a Scintilla window was removed from its parent - but was still the selection owner. -
  • -
  • - Bug fixed on Windows in Unicode mode where not all characters on a line - were displayed when that line contained some characters not in ASCII. -
  • -
  • - Crashing bug fixed in SciTE on Windows with clearing output while running command. -
  • -
  • - Bug fixed in SciTE for GTK+ with command completion not detected when - no output was produced by the command. -
  • -
  • - Bug fixed in SciTE for Windows where menus were not shown translated. -
  • -
  • - Bug fixed where words failed to display in line wrapping mode with visible - line ends. -
  • -
  • - Bug fixed in SciTE where files opened from a session file were not closed. -
  • -
  • - Cosmetic flicker fixed when using Ctrl+Up and Ctrl+Down with some caret policies. -
  • -
-

- Release 1.47 -

-
    -
  • - Released on 1 August 2002. -
  • -
  • - Support for GTK+ 2 in Scintilla. International input methods not supported - on GTK+2. -
  • -
  • - Line wrapping performance improved greatly. -
  • -
  • - New caret policy implementation that treats horizontal and vertical - positioning equivalently and independently. Old caret policy methods - deprecated and not all options work correctly with old methods. -
  • -
  • - Extra fold points for C, C++, Java, ... for fold comments //{ .. //} and - #if / #ifdef .. #endif and the #region .. #endregion feature of C#. -
  • -
  • - Scintilla method to find the height in pixels of a line. Currently returns the - same result for every line as all lines are same height. -
  • -
  • - Separate make file, scintilla_vc6.mak, for Scintilla to use Visual C++ - version 6 since main makefile now assumes VS .NET. - VS .NET project files available for combined Scintilla and - SciTE in scite/boundscheck. -
  • -
  • - SciTE automatically recognizes Unicode files based - on their Byte Order Marks and switches to Unicode mode. - On Windows, where SciTE supports Unicode display, this - allows display of non European characters. - The file is saved back into the same character encoding unless - the user decides to switch using the File | Encoding menu. -
  • -
  • - Handling of character input changed so that a fillup character, typically '(' - displays a calltip when an autocompletion list was being displayed. -
  • -
  • - Multiline strings lexed better for C++ and Lua. -
  • -
  • - Regular expressions in JavaScript within hypertext files are lexed better. -
  • -
  • - On Windows, Scintilla exports a function called Scintilla_DirectFunction - that can be used the same as the function returned by GetDirectFunction. -
  • -
  • - Scintilla converts line endings of text obtained from the clipboard to - the current default line endings. -
  • -
  • - New SciTE property ensure.final.line.end can ensure that saved files - always end with a new line as this is required by some tools. - The ensure.consistent.line.ends property ensures all line ends are the - current default when saving files. - The strip.trailing.spaces property now works on the buffer so the - buffer in memory and the file on disk are the same after a save is performed. -
  • -
  • - The SciTE expand abbreviation command again allows '|' characters - in expansions to be quoted by using '||'. -
  • -
  • - SciTE on Windows can send data to the find tool through standard - input rather than using a command line argument to avoid problems - with quoting command line arguments. -
  • -
  • - The Stop Executing command in SciTE on Windows improved to send - a Ctrl+Z character to the tool. Better messages when stopping a tool. -
  • -
  • - Autocompletion can automatically "fill up" when one of a set of characters is - type with the autocomplete.<lexer>.fillups property. -
  • -
  • - New predefined properties in SciTE, SelectionStartColumn, SelectionStartLine, - SelectionEndColumn, SelectionEndLine can be used to integrate with other - applications. -
  • -
  • - Environment variables are available as properties in SciTE. -
  • -
  • - SciTE on Windows keeps status line more current. -
  • -
  • - Abbreviations work in SciTE on Linux when first opened. -
  • -
  • - File saving fixed in SciTE to ensure files are not closed when they can not be - saved because of file permissions. Also fixed a problem with buffers that - caused files to not be saved. -
  • -
  • - SciTE bug fixed where monospace mode not remembered when saving files. - Some searching options now remembered when switching files. -
  • -
  • - SciTE on Linux now waits on child termination when it shuts a child down - to avoid zombies. -
  • -
  • - SciTE on Linux has a Print menu command that defaults to invoking a2ps. -
  • -
  • - Fixed incorrect highlighting of indentation guides in SciTE for Python. -
  • -
  • - Crash fixed in Scintilla when calling GetText for 0 characters. -
  • -
  • - Exporting as LaTeX improved when processing backslashes and tabs - and setting up font. -
  • -
  • - Crash fixed in SciTE when exporting or copying as RTF. -
  • -
  • - SciTE session loading fixed to handle more than 10 files in session. -
  • -
-

- Release 1.46 -

-
    -
  • - Released on 10 May 2002. -
  • -
  • - Set of lexers compiled into Scintilla can now be changed by adding and - removing lexer source files from scintilla/src and running LexGen.py. -
  • -
  • - SCN_ZOOM notification provided by Scintilla when user changes zoom level. - Method to determine width of strings in pixels so that elements can be sized - relative to text size. - SciTE changed to keep line number column displaying a given - number of characters. -
  • -
  • - The logical width of the document used to determine scroll bar range can be set. -
  • -
  • - Setting to allow vertical scrolling to display last line at top rather than - bottom of window. -
  • -
  • - Read-only mode improved to avoid changing the selection in most cases - when a modification is attempted. Drag and drop cursors display correctly - for read-only in some cases. -
  • -
  • - Visual C++ options in make files changed to suit Visual Studio .NET. -
  • -
  • - Scintilla.iface includes feature types for enumerations and lexers. -
  • -
  • - Lua lexer improves handling of literal strings and copes with nested literal strings. -
  • -
  • - Diff lexer changed to treat lines starting with "***" similarly to "---". - Symbolic names defined for lexical classes. -
  • -
  • - nncrontab lexer improved. -
  • -
  • - Turkish fonts (iso8859-9) supported on GTK+. -
  • -
  • - Automatic close tag feature for XML and HTML in SciTE. -
  • -
  • - Automatic indentation in SciTE improved. -
  • -
  • - Maximum number of buffers available in SciTE increased. May be up to 100 - although other restrictions on menu length limit the real maximum. -
  • -
  • - Save a Copy command added to SciTE. -
  • -
  • - Export as TeX command added to SciTE. -
  • -
  • - Export as HTML command in SciTE respects Use Monospaced Font and - background colour settings. -
  • -
  • - Compilation problem on Solaris fixed. -
  • -
  • - Order of files displayed for SciTE's previous and next menu and key commands - are now consistent. -
  • -
  • - Saving of MRU in recent file changed so files open when SciTE quit - are remembered. -
  • -
  • - More variants of ctags tags handled by Open Selected Filename in SciTE. -
  • -
  • - JavaScript embedded in XML highlighted again. -
  • -
  • - SciTE status bar updated after changing parameters in case they are being - displayed in status bar. -
  • -
  • - Crash fixed when handling some multi-byte languages. -
  • -
  • - Crash fixed when replacing end of line characters. -
  • -
  • - Bug in SciTE fixed in multiple buffer mode where automatic loading - turned on could lead to losing file contents. -
  • -
  • - Bug in SciTE on GTK+ fixed where dismissing dialogs with close box led to - those dialogs never being shown again. -
  • -
  • - Bug in SciTE on Windows fixed where position.tile with default positions - led to SciTE being positioned off-screen. -
  • -
  • - Bug fixed in read-only mode, clearing all deletes contraction state data - leading to it not being synchronized with text. -
  • -
  • - Crash fixed in SciTE on Windows when tab bar displayed. -
  • -
-

- Release 1.45 -

-
    -
  • - Released on 15 March 2002. -
  • -
  • - Line layout cache implemented to improve performance by maintaining - the positioning of characters on lines. Can be set to cache nothing, - the line with the caret, the visible page or the whole document. -
  • -
  • - Support, including a new lexer, added for Matlab programs. -
  • -
  • - Lua folder supports folding {} ranges and compact mode. - Lua lexer styles floating point numbers in number style instead of - setting the '.' in operator style. - Up to 6 sets of keywords. - Better support for [[ although only works well - when all on one line. -
  • -
  • - Python lexer improved to handle floating point numbers that contain negative - exponents and that start with '.'. -
  • -
  • - When performing a rectangular paste, the caret now remains at the - insertion point. -
  • -
  • - On Windows with a wheel mouse, page-at-a-time mode is recognized. -
  • -
  • - Read-only mode added to SciTE with a property to initialize it and another property, - $(ReadOnly) available to show this mode in the status bar. -
  • -
  • - SciTE status bar can show the number of lines in the selection - with the $(SelHeight) property. -
  • -
  • - SciTE's "Export as HTML" command uses the current character set to produce - correct output for non-Western-European character sets, such as Russian. -
  • -
  • - SciTE's "Export as RTF" fixed to produce correct output when file contains '\'. -
  • -
  • - SciTE goto command accepts a column as well as a line. - If given a column, it selects the word at that column. -
  • -
  • - SciTE's Build, Compile and Go commands are now disabled if no - action has been assigned to them. -
  • -
  • - The Refresh button in the status bar has been removed from SciTE on Windows. -
  • -
  • - Bug fixed in line wrap mode where cursor up or down command did not work. -
  • -
  • - Some styling bugs fixed that were due to a compilation problem with - gcc and inline functions with same name but different code. -
  • -
  • - The way that lexers loop over text was changed to avoid accessing beyond the - end or setting beyond the end. May fix some bugs and make the code safer but - may also cause new bugs. -
  • -
  • - Bug fixed in HTML lexer's handling of SGML. -
  • -
  • - Bug fixed on GTK+/X where lines wider than 32767 pixels did not display. -
  • -
  • - SciTE bug fixed with file name generation for standard property files. -
  • -
  • - SciTE bug fixed with Open Selected Filename command when used with - file name and line number combination. -
  • -
  • - In SciTE, indentation and tab settings stored with buffers so maintained correctly - as buffers selected. - The properties used to initialize these settings can now be set separately for different - file patterns. -
  • -
  • - Thread safety improved on Windows with a critical section protecting the font - cache and initialization of globals performed within Scintilla_RegisterClasses. - New Scintilla_ReleaseResources call provided to allow explicit freeing of resources - when statically bound into another application. Resources automatically freed - in DLL version. The window classes are now unregistered as part of resource - freeing which fixes bugs that occurred in some containers such as Internet Explorer. -
  • -
  • - 'make install' fixed on Solaris. -
  • -
  • - Bug fixed that could lead to a file being opened twice in SciTE. -
  • -
-

- Release 1.44 -

-
    -
  • - Released on 4 February 2002. -
  • -
  • - Crashing bug fixed in Editor::Paint. -
  • -
  • - Lua lexer no longer treats '.' as a word character and - handles 6 keyword sets. -
  • -
  • - WordStartPosition and WordEndPosition take an onlyWordCharacters - argument. -
  • -
  • - SciTE option for simplified automatic indentation which repeats - the indentation of the previous line. -
  • -
  • - Compilation fix on Alpha because of 64 bit. -
  • -
  • - Compilation fix for static linking. -
  • -
  • - Limited maximum line length handled to 8000 characters as previous - value of 16000 was causing stack exhaustion crashes for some. -
  • -
  • - When whole document line selected, only the last display line gets - the extra selected rectangle at the right hand side rather than - every display line. -
  • -
  • - Caret disappearing bug fixed for the case that the caret was not on the - first display line of a document line. -
  • -
  • - SciTE bug fixed where untitled buffer containing text was sometimes - deleted without chance to save. -
  • -
  • - SciTE bug fixed where use.monospaced not working with - multiple buffers. -
  • -
-

- Release 1.43 -

-
    -
  • - Released on 19 January 2002. -
  • -
  • - Line wrapping robustness and performance improved in Scintilla. -
  • -
  • - Line wrapping option added to SciTE for both edit and output panes. -
  • -
  • - Static linking on Windows handles cursor resource better. - Documentation of static linking improved. -
  • -
  • - Autocompletion has an option to delete any word characters after the caret - upon selecting an item. -
  • -
  • - FOX version identified by PLAT_FOX in Platform.h. -
  • -
  • - Calltips in SciTE use the calltip.<lexer>.word.characters setting to - correctly find calltips for functions that include characters like '$' which - is not normally considered a word character. -
  • -
  • - SciTE has a command to show help on itself which gets hooked up to displaying - SciTEDoc.html. -
  • -
  • - SciTE option calltip.<lexer>.end.definition to display help text on a - second line of calltip. -
  • -
  • - Fixed the handling of the Buffers menu on GTK+ to ensure current buffer - indicated and no warnings occur. - Changed some menu items on GTK+ version to be same as Windows version. -
  • -
  • - use.monospaced property for SciTE determines initial state of Use Monospaced Font - setting. -
  • -
  • - The SciTE Complete Symbol command now works when there are no word - characters before the caret, even though it is slow to display the whole set of - symbols. -
  • -
  • - Function names removed from SciTE's list of PHP keywords. The full list of - predefined functions is available from another web site mentioned on the - Extras page. -
  • -
  • - Crashing bug at startup on GTK+ for some configurations fixed. -
  • -
  • - Crashing bug on GTK+ on 64 bit platforms fixed. -
  • -
  • - Compilation problem with some compilers fixed in GTK+. -
  • -
  • - Japanese text entry improved on Windows 9x. -
  • -
  • - SciTE recent files directory problem on Windows when HOME and SciTE_HOME - environment variables not set is now the directory of the executable. -
  • -
  • - Session files no longer include untitled buffers. -
  • -
-

- Release 1.42 -

-
    -
  • - Released on 24 December 2001. -
  • -
  • - Better localization support including context menus and most messages. - Translations of the SciTE user interface available for Bulgarian, - French, German, Italian, Russian, and Turkish. -
  • -
  • - Can specify a character to use to indicate control characters - rather than having them displayed as mnemonics. -
  • -
  • - Scintilla key command for backspace that will not delete line - end characters. -
  • -
  • - Scintilla method to find start and end of words. -
  • -
  • - SciTE on GTK+ now supports the load.on.activate and save.on.deactivate - properties in an equivalent way to the Windows version. -
  • -
  • - The output pane of SciTE on Windows is now interactive so command line - utilities that prompt for input or confirmation can be used. -
  • -
  • - SciTE on Windows can choose directory for a "Find in Files" - command like the GTK+ version could. -
  • -
  • - SciTE can now load a set of API files rather than just one file. -
  • -
  • - ElapsedTime class added to Platform for accurate measurement of durations. - Used for debugging and for showing the user how long commands take in SciTE. -
  • -
  • - Baan lexer added. -
  • -
  • - In C++ lexer, document comment keywords no longer have to be at the start - of the line. -
  • -
  • - PHP lexer changed to match keywords case insensitively. -
  • -
  • - More shell keywords added. -
  • -
  • - SciTE support for VoiceXML added to xml.properties. -
  • -
  • - In SciTE the selection is not copied to the find field of the Search and Replace - dialogs if it contains end of line characters. -
  • -
  • - SciTE on Windows has a menu item to decide whether to respond to other - instances which are performing their check.if.already.open check. -
  • -
  • - SciTE accelerator key for Box Comment command changed to avoid problems - in non-English locales. -
  • -
  • - SciTE context menu includes Close command for the editor pane and - Hide command for the output pane. -
  • -
  • - output: command added to SciTE director interface to add text to the - output pane. The director interface can execute commands (such as tool - commands with subsystem set to 3) by sending a macro:run message. -
  • -
  • - SciTE on GTK+ will defer to the Window Manager for position if position.left or - position.top not set and for size if position.width or position.height not set. -
  • -
  • - SciTE on Windows has a position.tile property to place a second instance - to the right of the first. -
  • -
  • - Scintilla on Windows again supports EM_GETSEL and EM_SETSEL. -
  • -
  • - Problem fixed in Scintilla on Windows where control ID is no longer cached - as it could be changed by external code. -
  • -
  • - Problems fixed in SciTE on Windows when finding any other open instances at - start up when check.if.already.open is true. -
  • -
  • - Bugs fixed in SciTE where command strings were not always having - variables evaluated. -
  • -
  • - Bugs fixed with displaying partial double-byte and Unicode characters - in rectangular selections and at the edge when edge mode is EDGE_BACKGROUND. - Column numbers reported by GetColumn treat multiple byte characters as one column - rather than counting bytes. -
  • -
  • - Bug fixed with caret movement over folded lines. -
  • -
  • - Another bug fixed with tracking selection in secondary views when performing - modifications. -
  • -
  • - Horizontal scrolling and display of long lines optimized. -
  • -
  • - Cursor setting in Scintilla on GTK+ optimized. -
  • -
  • - Experimental changeable style attribute. - Set to false to make text read-only. - Currently only stops caret from being within not-changeable - text and does not yet stop deleting a range that contains - not-changeable text. - Can be used from SciTE by adding notchangeable to style entries. -
  • -
  • - Experimental line wrapping. - Currently has performance and appearance problems. -
  • -
-

- Release 1.41 -

-
    -
  • - Released on 6 November 2001. -
  • -
  • - Changed Platform.h to not include platform headers. This lessens likelihood and impact of - name clashes from system headers and also speeds up compilation. - Renamed DrawText to DrawTextNoClip to avoid name clash. -
  • -
  • - Changed way word functions work to treat a sequence of punctuation as - a word. This is more sensible and also more compatible with other editors. -
  • -
  • - Cursor changes over the margins and selection on GTK+ platform. -
  • -
  • - SC_MARK_BACKGROUND is a marker that only changes the line's background colour. -
  • -
  • - Enhanced Visual Basic lexer handles character date and octal literals, - and bracketed keywords for VB.NET. There are two VB lexers, vb and vbscript - with type indication characters like ! and $ allowed at the end of identifiers - in vb but not vbscript. Lexer states now separate from those used for C++ and - names start with SCE_B. -
  • -
  • - Lexer added for Bullant language. -
  • -
  • - The horizontal scroll position, xOffset, is now exposed through the API. -
  • -
  • - The SCN_POSCHANGED notification is deprecated as it was causing confusion. - Use SCN_UPDATEUI instead. -
  • -
  • - Compilation problems fixed for some versions of gcc. -
  • -
  • - Support for WM_GETTEXT restored on Windows. -
  • -
  • - Double clicking on an autocompletion list entry works on GTK+. -
  • -
  • - Bug fixed with case insensitive sorts for autocompletion lists. -
  • -
  • - Bug fixed with tracking selection in secondary views when performing modifications. -
  • -
  • - SciTE's abbreviation expansion feature will now indent expansions to the current - indentation level if indent.automatic is on. -
  • -
  • - SciTE allows setting up of parameters to commands from a dialog and can also - show this dialog automatically to prompt for arguments when running a command. -
  • -
  • - SciTE's Language menu (formerly Options | Use Lexer) is now defined by the - menu.language property rather than being hardcoded. -
  • -
  • - The user interface of SciTE can be localized to a particular language by editing - a locale.properties file. -
  • -
  • - On Windows, SciTE will try to move to the front when opening a new file from - the shell and using check.if.already.open. -
  • -
  • - SciTE can display the file name and directory in the title bar in the form - "file @ directory" when title.full.path=2. -
  • -
  • - The SciTE time.commands property reports the time taken by a command as well - as its status when completed. -
  • -
  • - The SciTE find.files property is now a list separated by '|' characters and this list is - added into the Files pull down of the Find in Files dialog. -
  • -
-

- Release 1.40 -

-
    -
  • - Released on 23 September 2001. -
  • -
  • - Removal of emulation of Win32 RichEdit control in core of Scintilla. - This change may be incompatible with existing client code. - Some emulation still done in Windows platform layer. -
  • -
  • - SGML support in the HTML/XML lexer. -
  • -
  • - SciTE's "Stop Executing" command will terminate GUI programs on - Windows NT and Windows 2000. -
  • -
  • - StyleContext class helps construct lexers that are simple and accurate. - Used in the C++, Eiffel, and Python lexers. -
  • -
  • - Clipboard operations in GTK+ version convert between platform '\n' line endings and - currently chosen line endings. -
  • -
  • - Any character in range 0..255 can be used as a marker. - This can be used to support numbered bookmarks, for example. -
  • -
  • - The default scripting language for ASP can be set. -
  • -
  • - New lexer and other support for crontab files used with the nncron scheduler. -
  • -
  • - Folding of Python improved. -
  • -
  • - The ` character is treated as a Python operator. -
  • -
  • - Line continuations ("\" at end of line) handled inside Python strings. -
  • -
  • - More consistent handling of line continuation ('\' at end of line) in - C++ lexer. - This fixes macro definitions that span more than one line. -
  • -
  • - C++ lexer can understand Doxygen keywords in doc comments. -
  • -
  • - SciTE on Windows allows choosing to open the "open" dialog on the directory - of the current file rather than in the default directory. -
  • -
  • - SciTE on Windows handles command line arguments in "check.if.already.open" - correctly when the current directory of the new instance is different to the - already open instance of SciTE. -
  • -
  • - "cwd" command (change working directory) defined for SciTE director interface. -
  • -
  • - SciTE "Export As HTML" produces better, more compliant, and shorter files. -
  • -
  • - SciTE on Windows allows several options for determining default file name - for exported files. -
  • -
  • - Automatic indentation of Python in SciTE fixed. -
  • -
  • - Exported HTML can support folding. -
  • -
  • - Bug fixed in SCI_GETTEXT macro command of director interface. -
  • -
  • - Cursor leak fixed on GTK+. -
  • -
  • - During SciTE shutdown, "identity" messages are no longer sent over the director interface. -
  • -
-

- Release 1.39 -

-
    -
  • - Released on 22 August 2001. -
  • -
  • - Windows version requires msvcrt.dll to be available so will not work - on original Windows 95 version 1. The msvcrt.dll file is installed - by almost everything including Internet Explorer so should be available. -
  • -
  • - Flattened tree control style folding margin. The SciTE fold.plus option is - now fold.symbols and has more values for the new styles. -
  • -
  • - Mouse dwell events are generated when the user holds the mouse steady - over Scintilla. -
  • -
  • - PositionFromPointClose is like PositionFromPoint but returns - INVALID_POSITION when point outside window or after end of line. -
  • -
  • - Input of Hungarian and Russian characters in GTK+ version works by - truncating input to 8 bits if in the range of normal characters. -
  • -
  • - Better choices for font descriptors on GTK+ for most character sets. -
  • -
  • - GTK+ Scintilla is destroyed upon receiving destroy signal rather than - destroy_event signal. -
  • -
  • - Style setting that force upper or lower case text. -
  • -
  • - Case-insensitive autocompletion lists work correctly. -
  • -
  • - Keywords can be prefix based so ^GTK_ will treat all words that start - with GTK_ as keywords. -
  • -
  • - Horizontal scrolling can be jumpy rather than gradual. -
  • -
  • - GetSelText places a '\0' in the buffer if the selection is empty.. -
  • -
  • - EnsureVisible split into two methods EnsureVisible which will not scroll to show - the line and EnsureVisibleEnforcePolicy which may scroll. -
  • -
  • - Python folder has options to fold multi-line comments and triple quoted strings. -
  • -
  • - C++ lexer handles keywords before '.' like "this.x" in Java as keywords. - Compact folding mode option chooses whether blank lines after a structure are - folded with that structure. Second set of keywords with separate style supported. -
  • -
  • - Ruby lexer handles multi-line comments. -
  • -
  • - VB has folder. -
  • -
  • - PHP lexer has an operator style, handles "<?" and "?>" inside strings - and some comments. -
  • -
  • - TCL lexer which is just an alias for the C++ lexer so does not really - understand TCL syntax. -
  • -
  • - Error lines lexer has styles for Lua error messages and .NET stack traces. -
  • -
  • - Makefile lexer has a target style. -
  • -
  • - Lua lexer handles some [[]] string literals. -
  • -
  • - HTML and XML lexer have a SCE_H_SGML state for tags that - start with "<!". -
  • -
  • - Fixed Scintilla bugs with folding. When modifications were performed near - folded regions sometimes no unfolding occurred when it should have. Deleting a - fold causing character sometimes failed to update fold information correctly. -
  • -
  • - Better support for Scintilla on GTK+ for Win32 including separate - PLAT_GTK_WIN32 definition and correct handling of rectangular selection - with clipboard operations. -
  • -
  • - SciTE has a Tools | Switch Pane (Ctrl+F6) command to switch focus between - edit and output panes. -
  • -
  • - SciTE option output.scroll allows automatic scrolling of output pane to - be turned off. -
  • -
  • - Commands can be typed into the SciTE output pane similar to a shell window. -
  • -
  • - SciTE properties magnification and output magnification set initial zoom levels. -
  • -
  • - Option for SciTE comment block command to place comments at start of line. -
  • -
  • - SciTE for Win32 has an option to minimize to the tray rather than the task bar. -
  • -
  • - Close button on SciTE tool bar for Win32. -
  • -
  • - SciTE compiles with GCC 3.0. -
  • -
  • - SciTE's automatic indentation of C++ handles braces without preceding keyword - correctly. -
  • -
  • - Bug fixed with GetLine method writing past the end of where it should. -
  • -
  • - Bug fixed with mouse drag automatic scrolling when some lines were folded. -
  • -
  • - Bug fixed because caret XEven setting was inverted. -
  • -
  • - Bug fixed where caret was initially visible even though window was not focussed. -
  • -
  • - Bug fixed where some file names could end with "\\" which caused slow - downs on Windows 9x. -
  • -
  • - On Win32, SciTE Replace dialog starts with focus on replacement text. -
  • -
  • - SciTE Go to dialog displays correct current line. -
  • -
  • - Fixed bug with SciTE opening multiple files at once. -
  • -
  • - Fixed bug with Unicode key values reported to container truncated. -
  • -
  • - Fixed bug with unnecessary save point notifications. -
  • -
  • - Fixed bugs with indenting and unindenting at start of line. -
  • -
  • - Monospace Font setting behaves more consistently. -
  • -
-

- Release 1.38 -

-
    -
  • - Released on 23 May 2001. -
  • -
  • - Loadable lexer plugins on Windows. -
  • -
  • - Ruby lexer and support. -
  • -
  • - Lisp lexer and support. -
  • -
  • - Eiffel lexer and support. -
  • -
  • - Modes for better handling of Tab and BackSpace keys within - indentation. Mode to avoid autocompletion list cancelling when - there are no viable matches. -
  • -
  • - ReplaceTarget replaced with two calls ReplaceTarget - (which is incompatible with previous ReplaceTarget) and - ReplaceTargetRE. Both of these calls have a count first - parameter which allows using strings containing nulls. - SearchInTarget and SetSearchFlags functions allow - specifying a search in several simple steps which helps - some clients which can not create structs or pointers easily. -
  • -
  • - Asian language input through an Input Method Editor works - on Windows 2000. -
  • -
  • - On Windows, control characters can be entered through use of - the numeric keypad in conjunction with the Alt key. -
  • -
  • - Document memory allocation changed to grow exponentially - which reduced time to load a 30 Megabyte file from - 1000 seconds to 25. Change means more memory may be used. -
  • -
  • - Word part movement keys now handled in Scintilla rather than - SciTE. -
  • -
  • - Regular expression '^' and '$' work more often allowing insertion - of text at start or end of line with a replace command. - Backslash quoted control characters \a, \b, \f, \t, and \v - recognized within sets. -
  • -
  • - Session files for SciTE. -
  • -
  • - Export as PDF command hidden in SciTE as it often failed. - Code still present so can be turned on by those willing to cope. -
  • -
  • - Bug fixed in HTML lexer handling % before > as end ASP - even when no start ASP encountered. - Bug fixed when scripts ended with a quoted string and - end tag was not seen. -
  • -
  • - Bug fixed on Windows where context menu key caused menu to - appear in corner of screen rather than within window. -
  • -
  • - Bug fixed in SciTE's Replace All command not processing - whole file when replace string longer than search string. -
  • -
  • - Bug fixed in SciTE's MRU list repeating entries if Ctrl+Tab - used when all entries filled. -
  • -
  • - ConvertEOLs call documentation fixed. -
  • -
-

- Release 1.37 -

-
    -
  • - Released on 17 April 2001. -
  • -
  • - Bug fixed with scroll bars being invisible on GTK+ 1.2.9. -
  • -
  • - Scintilla and SciTE support find and replace using simple regular - expressions with tagged expressions. SciTE supports C '\' escapes - in the Find and Replace dialogs. - Replace in Selection available in SciTE. -
  • -
  • - Scintilla has a 'target' feature for replacing code rapidly without - causing display updates. -
  • -
  • - Scintilla and SciTE on GTK+ support file dropping from file managers - such as Nautilus and gmc. Files or other URIs dropped on Scintilla - result in a URIDropped notification. -
  • -
  • - Lexers may have separate Lex and Fold functions. -
  • -
  • - Lexer infrastructure improved to allow for plug in lexers and for referring - to lexers by name rather than by ID. -
  • -
  • - Ada lexer and support added. -
  • -
  • - Option in both Scintilla and SciTE to treat both left and right margin - as equally important when repositioning visible area in response to - caret movement. Default is to prefer visible area positioning which - minimizes the horizontal scroll position thus favouring the left margin. -
  • -
  • - Caret line highlighting. -
  • -
  • - Commands to delete from the caret to the end of line and - from the caret to the beginning of line. -
  • -
  • - SciTE has commands for inserting and removing block comments and - for inserting stream comments. -
  • -
  • - SciTE Director interface uses C++ '\' escapes to send control characters. -
  • -
  • - SciTE Director interface adds more commands including support for macros. -
  • -
  • - SciTE has menu options for recording and playing macros which are visible - when used with a companion program that supports these features. -
  • -
  • - SciTE has an Expand Abbreviation command. - Abbreviations are stored in a global abbrev.properties file. -
  • -
  • - SciTE has a Full Screen command to switch between a normal window - size and using the full screen. On Windows, the menu bar can be turned - off when in full screen mode. -
  • -
  • - SciTE has a Use monospaced font command to switch between the normal - set of fonts and one size of a particular fixed width font. -
  • -
  • - SciTE's use of tabs can be controlled for particular file names - as well as globally. -
  • -
  • - The contents of SciTE's status bar can be defined by a property and - include variables. On Windows, several status bar definitions can be active - with a click on the status bar cycling through them. -
  • -
  • - Copy as RTF command in SciTE on Windows to allow pasting - styled text into word processors. -
  • -
  • - SciTE can allow the use of non-alphabetic characters in - Complete Symbol lists and can automatically display this autocompletion - list when a trigger character such as '.' is typed. - Complete word can be set to pop up when the user is typing a word and - there is only one matching word in the document. -
  • -
  • - SciTE lists the imported properties files on a menu to allow rapid - access to them. -
  • -
  • - SciTE on GTK+ improvements to handling accelerator keys and focus - in dialogs. Message boxes respond to key presses without the Alt key as - they have no text entries to accept normal keystrokes. -
  • -
  • - SciTE on GTK+ sets the application icon. -
  • -
  • - SciTE allows setting the colours used to indicate the current - error line. -
  • -
  • - Variables within PHP strings have own style. Keyword list updated. -
  • -
  • - Keyword list for Lua updated for Lua 4.0. -
  • -
  • - Bug fixed in rectangular selection where rectangle still appeared - selected after using cursor keys to move caret. -
  • -
  • - Bug fixed in C++ lexer when deleting a '{' controlling a folded range - led to that range becoming permanently invisible. -
  • -
  • - Bug fixed in Batch lexer where comments were not recognized. -
  • -
  • - Bug fixed with undo actions coalescing into steps incorrectly. -
  • -
  • - Bug fixed with Scintilla on GTK+ positioning scroll bars 1 pixel - over the Scintilla window leading to their sides being chopped off. -
  • -
  • - Bugs fixed in SciTE when doing some actions led to the start - or end of the file being displayed rather than the current location. -
  • -
  • - Appearance of calltips fixed to look like document text including - any zoom factor. Positioned to be outside current line even when - multiple fonts and sizes used. -
  • -
  • - Bug fixed in Scintilla macro support where typing Enter caused both a newline - command and newline character insertion to be recorded. -
  • -
  • - Bug fixed in SciTE on GTK+ where focus was moving - between widgets incorrectly. -
  • -
  • - Bug fixed with fold symbols sometimes not updating when - the text changed. -
  • -
  • - Bugs fixed in SciTE's handling of folding commands. -
  • -
  • - Deprecated undo collection enumeration removed from API. -
  • -
-

- Release 1.36 -

-
    -
  • - Released on 1 March 2001. -
  • -
  • - Scintilla supports GTK+ on Win32. -
  • -
  • - Some untested work on making Scintilla and SciTE 64 bit compatible. - For users on GTK+ this requires including Scintilla.h before - ScintillaWidget.h. -
  • -
  • - HTML lexer allows folding HTML. -
  • -
  • - New lexer for Avenue files which are used in the ESRI ArcView GIS. -
  • -
  • - DOS Batch file lexer has states for '@', external commands, variables and - operators. -
  • -
  • - C++ lexer can fold comments of /* .. */ form. -
  • -
  • - Better disabling of pop up menu items in Scintilla when in read-only mode. -
  • -
  • - Starting to move to Doxygen compatible commenting. -
  • -
  • - Director interface on Windows enables another application to control SciTE. -
  • -
  • - Opening SciTE on Windows 9x sped up greatly for some cases. -
  • -
  • - The command.build.directory property allows SciTE to run the build - command in a different directory to the source files. -
  • -
  • - SciTE on Windows allows setting foreground and background colours - for printed headers and footers. -
  • -
  • - Bug fixed in finding calltips in SciTE which led to no calltips for some identifiers. -
  • -
  • - Documentation added for lexers and for the extension and director interfaces. -
  • -
  • - SciTE menus rearranged with new View menu taking over some of the items that - were under the Options menu. Clear All Bookmarks command added. -
  • -
  • - Clear Output command in SciTE. -
  • -
  • - SciTE on Windows gains an Always On Top command. -
  • -
  • - Bug fixed in SciTE with attempts to define properties recursively. -
  • -
  • - Bug fixed in SciTE properties where only one level of substitution was done. -
  • -
  • - Bug fixed in SciTE properties where extensions were not being - matched in a case insensitive manner. -
  • -
  • - Bug fixed in SciTE on Windows where the Go to dialog displays the correct - line number. -
  • -
  • - In SciTE, if fold.on.open set then switching buffers also performs fold. -
  • -
  • - Bug fixed in Scintilla where ensuring a line was visible in the presence of folding - operated on the document line instead of the visible line. -
  • -
  • - SciTE command line processing modified to operate on arguments in order and in - two phases. First any arguments before the first file name are processed, then the - UI is opened, then the remaining arguments are processed. Actions defined for the - Director interface (currently only "open") may also be used on the command line. - For example, "SciTE -open:x.txt" will start SciTE and open x.txt. -
  • -
  • - Numbered menu items SciTE's Buffers menu and the Most Recently Used portion - of the File menu go from 1..0 rather than 0..9. -
  • -
  • - The tab bar in SciTE for Windows has numbers. - The tab.hide.one option hides the tab bar until there is more than one buffer open. -
  • -
-

- Release 1.35 -

-
    -
  • - Released on 29 January 2001. -
  • -
  • - Rewritten and simplified widget code for the GTK+ version to enhance - solidity and make more fully compliant with platform norms. This includes more - normal handling of keystrokes so they are forwarded to containers correctly. -
  • -
  • - User defined lists can be shown. -
  • -
  • - Many fixes to the Perl lexer. -
  • -
  • - Pascal lexer handles comments more correctly. -
  • -
  • - C/C++/Java/JavaScipt lexer has a state for line doc comments. -
  • -
  • - Error output lexer understands Sun CC messages. -
  • -
  • - Make file lexer has variable, preprocessor, and operator states. -
  • -
  • - Wider area given to an italics character that is at the end of a line to prevent it - being cut off. -
  • -
  • - Call to move the caret inside the currently visible area. -
  • -
  • - Paste Rectangular will space fill on the left hand side of the pasted text as - needed to ensure it is kept rectangular. -
  • -
  • - Cut and Paste Rectangular does nothing in read-only mode. -
  • -
  • - Undo batching changed so that a paste followed by typing creates two undo actions.. -
  • -
  • - A "visibility policy" setting for Scintilla determines which range of lines are displayed - when a particular line is moved to. Also exposed as a property in SciTE. -
  • -
  • - SciTE command line allows property settings. -
  • -
  • - SciTE has a View Output command to hide or show the output pane. -
  • -
  • - SciTE's Edit menu has been split in two with searching commands moved to a - new Search menu. Find Previous and Previous Bookmark are in the Search menu. -
  • -
  • - SciTE on Windows has options for setting print margins, headers and footers. -
  • -
  • - SciTE on Windows has tooltips for toolbar. -
  • -
  • - SciTE on GTK+ has properties for setting size of file selector. -
  • -
  • - Visual and audio cues in SciTE on Windows enhanced. -
  • -
  • - Fixed performance problem in SciTE for GTK+ by dropping the extra 3D - effect on the content windows. -
  • -
  • - Fixed problem in SciTE where choosing a specific lexer then meant - that no lexer was chosen when files opened. -
  • -
  • - Default selection colour changed to be visible on low colour displays. -
  • -
  • - Fixed problems with automatically reloading changed documents in SciTE on - Windows. -
  • -
  • - Fixed problem with uppercase file extensions in SciTE. -
  • -
  • - Fixed some problems when using characters >= 128, some of which were being - incorrectly treated as spaces. -
  • -
  • - Fixed handling multiple line tags, non-inline scripts, and XML end tags /> in HTML/XML lexer. -
  • -
  • - Bookmarks in SciTE no longer disappear when switching between buffers. -
  • -
-

- Release 1.34 -

-
    -
  • - Released on 28 November 2000. -
  • -
  • - Pascal lexer. -
  • -
  • - Export as PDF in SciTE. -
  • -
  • - Support for the OpenVMS operating system in SciTE. -
  • -
  • - SciTE for GTK+ can check for another instance of SciTE - editing a file and switch to it rather than open a second instance - on one file. -
  • -
  • - Fixes to quoting and here documents in the Perl lexer. -
  • -
  • - SciTE on Windows can give extra visual and audio cues when a - warning is shown or find restarts from beginning of file. -
  • -
  • - Open Selected Filename command in SciTE. Also understands some - warning message formats. -
  • -
  • - Wider area for line numbers when printing. -
  • -
  • - Better scrolling performance on GTK+. -
  • -
  • - Fixed problem where rectangles with negative coordinates were - invalidated leading to trouble with platforms that use - unsigned coordinates. -
  • -
  • - GTK+ Scintilla uses more compliant signalling code so that keyboard - events should propagate to containers. -
  • -
  • - Bug fixed with opening full or partial paths. -
  • -
  • - Improved handling of paths in error messages in SciTE. -
  • -
  • - Better handling of F6 in SciTE. -
  • -
-

- Release 1.33 -

-
    -
  • - Released on 6 November 2000. -
  • -
  • - XIM support for the GTK+ version of Scintilla ensures that more non-English - characters can be typed. -
  • -
  • - Caret may be 1, 2, or 3 pixels wide. -
  • -
  • - Cursor may be switched to wait image during lengthy processing. -
  • -
  • - Scintilla's internal focus flag is exposed for clients where focus is handled in - complex ways. -
  • -
  • - Error status defined for Scintilla to hold indication that an operation failed and the reason - for that failure. No detection yet implemented but clients may start using the interface - so as to be ready for when it does. -
  • -
  • - Context sensitive help in SciTE. -
  • -
  • - CurrentWord property available in SciTE holding the value of the word the - caret is within or near. -
  • -
  • - Apache CONF file lexer. -
  • -
  • - Changes to Python lexer to allow 'as' as a context sensitive keyword and the - string forms starting with u, r, and ur to be recognized. -
  • -
  • - SCN_POSCHANGED notification now working and SCN_PAINTED notification added. -
  • -
  • - Word part movement commands for cursoring between the parts of reallyLongCamelIdentifiers and - other_ways_of_making_words. -
  • -
  • - When text on only one line is selected, Shift+Tab moves to the previous tab stop. -
  • -
  • - Tab control available for Windows version of SciTE listing all the buffers - and making it easy to switch between them. -
  • -
  • - SciTE can be set to automatically determine the line ending type from the contents of a - file when it is opened. -
  • -
  • - Dialogs in GTK+ version of SciTE made more modal and have accelerator keys. -
  • -
  • - Find in Files command in GTK+ version of SciTE allows choice of directory. -
  • -
  • - On Windows, multiple files can be opened at once. -
  • -
  • - SciTE source broken up into more files. -
  • -
  • - Scintilla headers made safe for C language, not just C++. -
  • -
  • - New printing modes - force background to white and force default background to white. -
  • -
  • - Automatic unfolding not occurring when Enter pressed at end of line bug fixed. -
  • -
  • - Bugs fixed in line selection. -
  • -
  • - Bug fixed with escapes in PHP strings in the HTML lexer. -
  • -
  • - Bug fixed in SciTE for GTK+ opening files when given full paths. -
  • -
  • - Bug fixed in autocompletion where user backspaces into existing text. -
  • -
  • - Bugs fixed in opening files and ensuring they are saved before running. - A case bug also fixed here. -
  • -
-

- Release 1.32 -

-
    -
  • - Released on 8 September 2000. -
  • -
  • - Fixes bugs in complete word and related code. Protection against a bug when - receiving a bad argument. -
  • -
-

- Release 1.31 -

-
    -
  • - Released on 6 September 2000. -
  • -
  • - Scintilla is available as a COM control from the scintillactrl module in CVS. -
  • -
  • - Style setting to underline text. Exposed in SciTE as "underlined". -
  • -
  • - Style setting to make text invisible. -
  • -
  • - SciTE has an extensibility interface that can be used to implement features such as - a scripting language or remote control. An example use of this is the extlua module - available from CVS which allows SciTE to be scripted in Lua. -
  • -
  • - Many minor fixes to all of the lexers. -
  • -
  • - New lexer for diff and patch files. -
  • -
  • - Error message lexer understands Perl error messages. -
  • -
  • - C/C++/Java lexer now supports C#, specifically verbatim strings and - @ quoting of identifiers that are the same as keywords. SciTE has - a set of keywords for C# and a build command set up for C#. -
  • -
  • - Scintilla property to see whether in overtype or insert state. -
  • -
  • - PosChanged notification fired when caret moved. -
  • -
  • - Comboboxes in dialogs in SciTE on Windows can be horizontally scrolled. -
  • -
  • - Autocompletion and calltips can treat the document as case sensitive or - case insensitive. -
  • -
  • - Autocompletion can be set to automatically choose the only - element in a single element list. -
  • -
  • - Set of characters that automatically complete an autocompletion list - can be set. -
  • -
  • - SciTE command to display calltip - useful when dropped because of - editing. -
  • -
  • - SciTE has a Revert command to go back to the last saved version. -
  • -
  • - SciTE has an Export as RTF command. Save as HTML is renamed - to Export as HTML and is located on the Export sub menu. -
  • -
  • - SciTE command "Complete Word" searches document for any - words starting with characters before caret. -
  • -
  • - SciTE options for changing aspects of the formatting of files exported - as HTML or RTF. -
  • -
  • - SciTE "character.set" option for choosing the character - set for all fonts. -
  • -
  • - SciTE has a "Toggle all folds" command. -
  • -
  • - The makefiles have changed. The makefile_vc and - makefile_bor files in scintilla/win32 and scite/win32 have been - merged into scintilla/win32/scintilla.mak and scite/win32/scite.mak. - DEBUG may be defined for all make files and this will turn on - assertions and for some make files will choose other debugging - options. -
  • -
  • - To make debugging easier and allow good use of BoundsChecker - there is a Visual C++ project file in scite/boundscheck that builds - all of Scintilla and SciTE into one executable. -
  • -
  • - The size of the SciTE output window can be set with the - output.horizontal.size and output.vertical.size settings. -
  • -
  • - SciTE status bar indicator for insert or overwrite mode. -
  • -
  • - Performance improvements to autocompletion and calltips. -
  • -
  • - A caret redraw problem when undoing is fixed. -
  • -
  • - Crash with long lines fixed. -
  • -
  • - Bug fixed with merging markers when lines merged. -
  • -
-

- Release 1.30 -

-
    -
  • - Released on 26 July 2000. -
  • -
  • - Much better support for PHP which is now an integral part of the HTML support. -
  • -
  • - Start replacement of Windows-specific APIs with cross platform APIs. - In 1.30, the new APIs are introduced but the old APIs are still available. - For the GTK+ version, may have to include "WinDefs.h" explicitly to - use the old APIs. -
  • -
  • - "if" and "import" statements in SciTE properties files allows modularization into - language-specific properties files and choices based upon platform. - This means that SciTE is delivered with 9 language-specific properties files - as well as the standard SciTEGlobal.properties file. -
  • -
  • - Much lower resource usage on Windows 9x. -
  • -
  • - "/p" option in SciTE on Windows for printing a file and then exiting. -
  • -
  • - Options for printing with inverted brightness (when the screen is set to use - a dark background) and to force black on white printing. -
  • -
  • - Option for printing magnified or miniaturized from screen settings. -
  • -
  • - In SciTE, Ctrl+F3 and Ctrl+Shift+F3 find the selection in the forwards and backwards - directions respectively. -
  • -
  • - Auto-completion lists may be set to cancel when the cursor goes before - its start position or before the start of string being completed. -
  • -
  • - Auto-completion lists automatically size more sensibly. -
  • -
  • - SCI_CLEARDOCUMENTSTYLE zeroes all style bytes, ensures all - lines are shown and deletes all folding information. -
  • -
  • - On Windows, auto-completion lists are visually outdented rather than indented. -
  • -
  • - Close all command in SciTE. -
  • -
  • - On Windows multiple files can be dragged into SciTE. -
  • -
  • - When saving a file, the SciTE option save.deletes.first deletes it before doing the save. - This allows saving with a different capitalization on Windows. -
  • -
  • - When use tabs option is off pressing the tab key inserts spaces. -
  • -
  • - Bug in indicators leading to extra line drawn fixed. -
  • -
-

- Release 1.28 -

-
    -
  • - Released on 27 June 2000. -
  • -
  • - Fixes crash in indentation guides when indent size set to 0. -
  • -
  • - Fixes to installation on GTK+/Linux. User properties file on GTK+ has a dot at front of name: - .SciTEUser.properties. Global properties file location configurable at compile time - defaulting to $prefix/share/scite. $prefix determined from Gnome if present else its - /usr/local and can be overridden by installer. Gnome menu integration performed in - make install if Gnome present. -
  • -
-

- Release 1.27 -

-
    -
  • - Released on 23 June 2000. -
  • -
  • - Indentation guides. View whitespace mode may be set to not display whitespace - in indentation. -
  • -
  • - Set methods have corresponding gets for UndoCollection, BufferedDraw, - CodePage, UsePalette, ReadOnly, CaretFore, and ModEventMask. -
  • -
  • - Caret is continuously on rather than blinking while typing or holding down - delete or backspace. And is now always shown if non blinking when focused on GTK+. -
  • -
  • - Bug fixed in SciTE with file extension comparison now done in case insensitive way. -
  • -
  • - Bugs fixed in SciTE's file path handling on Windows. -
  • -
  • - Bug fixed with preprocessor '#' last visible character causing hang. -
  • -
-

- Release 1.26 -

-
    -
  • - Released on 13 June 2000. -
  • -
  • - Support for the Lua language in both Scintilla and SciTE. -
  • -
  • - Multiple buffers may be open in SciTE. -
  • -
  • - Each style may have a character set configured. This may determine - the characters that are displayed by the style. -
  • -
  • - In the C++ lexer, lexing of preprocessor source may either treat it all as being in - the preprocessor class or only the initial # and preprocessor command word as - being in the preprocessor class. -
  • -
  • - Scintilla provides SCI_CREATEDOCUMENT, SCI_ADDREFDOCUMENT, and - SCI_RELEASEDOCUMENT to make it easier for a container to deal with multiple - documents. -
  • -
  • - GTK+ specific definitions in Scintilla.h were removed to ScintillaWidget.h. All GTK+ clients will need to - #include "ScintillaWidget.h". -
  • -
  • - For GTK+, tools can be executed in the background by setting subsystem to 2. -
  • -
  • - Keys in the properties files are now case sensitive. This leads to a performance increase. -
  • -
  • - Menu to choose which lexer to use on a file. -
  • -
  • - Tab size dialog on Windows. -
  • -
  • - File dialogs enlarged on GTK+. -
  • -
  • - Match Brace command bound to Ctrl+E on both platforms with Ctrl+] a synonym on Windows. - Ctrl+Shift+E is select to matching brace. Brace matching tries to match to either the inside or the - outside, depending on whether the cursor is inside or outside the braces initially. - View End of Line bound to Ctrl+Shift+O. -
  • -
  • - The Home key may be bound to move the caret to either the start of the line or the start of the - text on the line. -
  • -
  • - Visual C++ project file for SciTE. -
  • -
  • - Bug fixed with current x location after Tab key. -
  • -
  • - Bug fixed with hiding fold margin by setting fold.margin.width to 0. -
  • -
  • - Bugs fixed with file name confusion on Windows when long and short names used, or different capitalizations, - or relative paths. -
  • -
-

- Release 1.25 -

-
    -
  • - Released on 9 May 2000. -
  • -
  • - Some Unicode support on Windows. Treats buffer and API as UTF-8 and displays - through UCS-2 of Windows. -
  • -
  • - Automatic indentation. Indentation size can be different to tab size. -
  • -
  • - Tool bar. -
  • -
  • - Status bar now on Windows as well as GTK+. -
  • -
  • - Input fields in Find and Replace dialogs now have history on both Windows and - GTK+. -
  • -
  • - Auto completion list items may be separated by a chosen character to allow spaces - in items. The selected item may be changed through the API. -
  • -
  • - Horizontal scrollbar can be turned off. -
  • -
  • - Property to remove trailing spaces when saving file. -
  • -
  • - On Windows, changed font size calculation to be more compatible with - other applications. -
  • -
  • - On GTK+, SciTE's global properties files are looked for in the directory specified in the - SCITE_HOME environment variable if it is set. This allows hiding in a dot directory. -
  • -
  • - Keyword lists in SciTE updated for JavaScript to include those destined to be used in - the future. IDL includes XPIDL keywords as well as MSIDL keywords. -
  • -
  • - Zoom level can be set and queried through API. -
  • -
  • - New notification sent before insertions and deletions. -
  • -
  • - LaTeX lexer. -
  • -
  • - Fixes to folding including when deletions and additions are performed. -
  • -
  • - Fix for crash with very long lines. -
  • -
  • - Fix to affect all of rectangular selections with deletion and case changing. -
  • -
  • - Removed non-working messages that had been included only for Richedit compatibility. -
  • -
-

- Release 1.24 -

-
    -
  • - Released on 29 March 2000. -
  • -
  • - Added lexing of IDL based on C++ lexer with extra UUID lexical class. -
  • -
  • - Functions and associated keys for Line Delete, Line Cut, Line Transpose, - Selection Lower Case and Selection Upper Case. -
  • -
  • - Property setting for SciTE, eol.mode, chooses initial state of line end characters. -
  • -
  • - Fixed bugs in undo history with small almost-contiguous changes being incorrectly coalesced. -
  • -
  • - Fixed bugs with incorrect expansion of ContractionState data structures causing crash. -
  • -
  • - Fixed bugs relating to null fonts. -
  • -
  • - Fixed bugs where recolourization was not done sometimes when required. -
  • -
  • - Fixed compilation problems with SVector.h. -
  • -
  • - Fixed bad setting of fold points in Python. -
  • -
-

- Release 1.23 -

-
    -
  • - Released on 21 March 2000. -
  • -
  • - Directory structure to separate on basis of product (Scintilla, SciTE, DMApp) - and environment (Cross-platform, Win32, GTK+). -
  • -
  • - Download packaging to allow download of the source or platform dependent executables. -
  • -
  • - Source code now available from CVS at SourceForge. -
  • -
  • - Very simple Windows-only demonstration application DMApp is available from cvs as dmapp. -
  • -
  • - Lexing functionality may optionally be included in Scintilla rather than be provided by - the container. -
  • -
  • - Set of lexers included is determined at link time by defining which of the Lex* object files - are linked in. -
  • -
  • - On Windows, the SciLexer.DLL extends Scintilla.DLL with the standard lexers. -
  • -
  • - Enhanced HTML lexer styles embedded VBScript and Python. - ASP segments are styled and ASP scripts in JavaScript, VBScript and Python are styled. -
  • -
  • - PLSQL and PHP supported. -
  • -
  • - Maximum number of lexical states extended to 128. -
  • -
  • - Lexers may store per line parse state for multiple line features such as ASP script language choice. -
  • -
  • - Lexing API simplified. -
  • -
  • - Project file for Visual C++. -
  • -
  • - Can now cycle through all recent files with Ctrl+Tab in SciTE. -
  • -
  • - Bookmarks in SciTE. -
  • -
  • - Drag and drop copy works when dragging to the edge of the selection. -
  • -
  • - Fixed bug with value sizes in properties file. -
  • -
  • - Fixed bug with last line in properties file not being used. -
  • -
  • - Bug with multiple views of one document fixed. -
  • -
  • - Keypad now works on GTK+. -
  • -
-

- Release 1.22 -

-
    -
  • - Released on 27 February 2000. -
  • -
  • - wxWindows platform defined. - Implementation for wxWindows will be available separately - from main Scintilla distribution. -
  • -
  • - Line folding in Scintilla. -
  • -
  • - SciTE performs syntax directed folding for C/C++/Java/JavaScript and for Python. -
  • -
  • - Optional macro recording support. -
  • -
  • - User properties file (SciTEUser.properties) allows for customization by the user - that is not overwritten with each installation of SciTE. -
  • -
  • - Python lexer detects and highlights inconsistent indentation. -
  • -
  • - Margin API made more orthogonal. SCI_SETMARGINWIDTH and SCI_SETLINENUMBERWIDTH - are deprecated in favour of this new API. -
  • -
  • - Margins may be made sensitive to forward mouse click events to container. -
  • -
  • - SQL lexer and styles included. -
  • -
  • - Perl lexer handles regular expressions better. -
  • -
  • - Caret policy determines how closely caret is tracked by visible area. -
  • -
  • - New marker shapes: arrow pointing down, plus and minus. -
  • -
  • - Optionally display full path in title rather than just file name. -
  • -
  • - Container is notified when Scintilla gains or loses focus. -
  • -
  • - SciTE handles focus in a more standard way and applies the main - edit commands to the focused pane. -
  • -
  • - Container is notified when Scintilla determines that a line needs to be made visible. -
  • -
  • - Document watchers receive notification when document about to be deleted. -
  • -
  • - Document interface allows access to list of watchers. -
  • -
  • - Line end determined correctly for lines ending with only a '\n'. -
  • -
  • - Search variant that searches form current selection and sets selection. -
  • -
  • - SciTE understands format of diagnostic messages from WScript. -
  • -
  • - SciTE remembers top line of window for each file in MRU list so switching to a recent file - is more likely to show the same text as when the file was previously visible. -
  • -
  • - Document reference count now initialized correctly. -
  • -
  • - Setting a null document pointer creates an empty document. -
  • -
  • - WM_GETTEXT can no longer overrun buffer. -
  • -
  • - Polygon drawing bug fixed on GTK+. -
  • -
  • - Java and JavaScript lexers merged into C++ lexer. -
  • -
  • - C++ lexer indicates unterminated strings by colouring the end of the line - rather than changing the rest of the file to string style. This is less - obtrusive and helps the folding. -
  • -
-

- Release 1.21 -

-
    -
  • - Released on 2 February 2000. -
  • -
  • - Blank margins on left and right side of text. -
  • -
  • - SCN_CHECKBRACE renamed SCN_UPDATEUI and made more efficient. -
  • -
  • - SciTE source code refactored into platform independent and platform specific classes. -
  • -
  • - XML and Perl subset lexers in SciTE. -
  • -
  • - Large improvement to lexing speed. -
  • -
  • - A new subsystem, 2, allows use of ShellExec on Windows. -
  • -
  • - Borland compatible makefile. -
  • -
  • - Status bar showing caret position in GTK+ version of SciTE. -
  • -
  • - Bug fixes to selection drawing when part of selection outside window, mouse release over - scroll bars, and scroll positioning after deletion. -
  • -
-

- Release 1.2 -

-
    -
  • - Released on 21 January 2000. -
  • -
  • - Multiple views of one document. -
  • -
  • - Rectangular selection, cut, copy, paste, drag and drop. -
  • -
  • - Long line indication. -
  • -
  • - Reverse searching -
  • -
  • - Line end conversion. -
  • -
  • - Generic autocompletion and calltips in SciTE. -
  • -
  • - Call tip background colour can be set. -
  • -
  • - SCI_MARKERPREV for moving to a previous marker. -
  • -
  • - Caret kept more within window where possible. -
  • -
-

- Release 1.15 -

-
    -
  • - Released on 15 December 1999. -
  • -
  • - Brace highlighting and badlighting (for mismatched braces). -
  • -
  • - Visible line ends. -
  • -
  • - Multiple line call tips. -
  • -
  • - Printing now works from SciTE on Windows. -
  • -
  • - SciTE has a global "*" lexer style that is used as the basis for all the lexers' styles. -
  • -
  • - Fixes some warnings on GTK+ 1.2.6. -
  • -
  • - Better handling of modal dialogs on GTK+. -
  • -
  • - Resize handle drawn on pane splitter in SciTE on GTK+ so it looks more like a regular GTK+ - *paned widget. -
  • -
  • - SciTE does not place window origin offscreen if no properties file found on GTK+. -
  • -
  • - File open filter remembered in SciTE on Windows. -
  • -
  • - New mechanism using style numbers 32 to 36 standardizes the setting of styles for brace - highlighting, brace badlighting, line numbers, control characters and the default style. -
  • -
  • - Old messages SCI_SETFORE .. SCI_SETFONT have been replaced by the default style 32. The old - messages are deprecated and will disappear in a future version. -
  • -
-

- Release 1.14 -

-
    -
  • - Released on 20 November 1999. -
  • -
  • - Fixes a scrolling bug reported on GTK+. -
  • -
-

- Release 1.13 -

-
    -
  • - Released on 18 November 1999. -
  • -
  • - Fixes compilation problems with the mingw32 GCC 2.95.2 on Windows. -
  • -
  • - Control characters are now visible. -
  • -
  • - Performance has improved, particularly for scrolling. -
  • -
  • - Windows RichEdit emulation is more accurate. This may break client code that uses these - messages: EM_GETLINE, EM_GETLINECOUNT, EM_EXGETSEL, EM_EXSETSEL, EM_EXLINEFROMCHAR, - EM_LINELENGTH, EM_LINEINDEX, EM_CHARFROMPOS, EM_POSFROMCHAR, and EM_GETTEXTRANGE. -
  • -
  • - Menus rearranged and accelerator keys set for all static items. -
  • -
  • - Placement of space indicators in view whitespace mode is more accurate with some fonts. -
  • -
-

- Release 1.12 -

-
    -
  • - Released on 9 November 1999. -
  • -
  • - Packaging error in 1.11 meant that the compilation error was not fixed in that release. - Linux/GTK+ should compile with GCC 2.95 this time. -
  • -
-

- Release 1.11 -

-
    -
  • - Released on 7 November 1999. -
  • -
  • - Fixed a compilation bug in ScintillaGTK.cxx. -
  • -
  • - Added a README file to explain how to build. -
  • -
  • - GTK+/Linux downloads now include documentation. -
  • -
  • - Binary only Sc1.EXE one file download for Windows. -
  • -
-

- Release 1.1 -

-
    -
  • - Released on 6 November 1999. -
  • -
  • - Major restructuring for better modularity and platform independence. -
  • -
  • - Inter-application drag and drop. -
  • -
  • - Printing support in Scintilla on Windows. -
  • -
  • - Styles can select colouring to end of line. This can be used when a file contains more than - one language to differentiate between the areas in each language. An example is the HTML + - JavaScript styling in SciTE. -
  • -
  • - Actions can be grouped in the undo stack, so they will be undone together. This grouping is - hierarchical so higher level actions such as replace all can be undone in one go. Call to - discover whether there are any actions to redo. -
  • -
  • - The set of characters that define words can be changed. -
  • -
  • - Markers now have identifiers and can be found and deleted by their identifier. The empty - marker type can be used to make a marker that is invisible and which is only used to trace - where a particular line moves to. -
  • -
  • - Double click notification. -
  • -
  • - HTML styling in SciTE also styles embedded JavaScript. -
  • -
  • - Additional tool commands can be added to SciTE. -
  • -
  • - SciTE option to allow reloading if changed upon application activation and saving on - application deactivation. Not yet working on GTK+ version. -
  • -
  • - Entry fields in search dialogs remember last 10 user entries. Not working in all cases in - Windows version. -
  • -
  • - SciTE can save a styled copy of the current file in HTML format. As SciTE does not yet - support printing, this can be used to print a file by then using a browser to print the - HTML file. -
  • -
-

- Release 1.02 -

-
    -
  • - Released on 1 October 1999. -
  • -
  • - GTK+ version compiles with GCC 2.95. -
  • -
  • - Properly deleting objects when window destroyed under GTK+. -
  • -
  • - If the selection is not empty backspace deletes the selection. -
  • -
  • - Some X style middle mouse button handling for copying the primary selection to and from - Scintilla. Does not work in all cases. -
  • -
  • - HTML styling in SciTE. -
  • -
  • - Stopped dirty flag being set in SciTE when results pane modified. -
  • -
-

- Release 1.01 -

-
    -
  • - Released on 28 September 1999. -
  • -
  • - Better DBCS support on Windows including IME. -
  • -
  • - Wheel mouse support for scrolling and zooming on Windows. Zooming with Ctrl+KeypadPlus and - Ctrl+KeypadMinus. -
  • -
  • - Performance improvements especially on GTK+. -
  • -
  • - Caret blinking and settable colour on both GTK+ and Windows. -
  • -
  • - Drag and drop within a Scintilla window. On Windows, files can be dragged into SciTE. -
  • -
-

- Release 1.0 -

-
    -
  • - Released on 17 May 1999. -
  • -
  • - Changed name of "Tide" to "SciTE" to avoid clash with a TCL based IDE. "SciTE" is a - SCIntilla based Text Editor and is Latin meaning something like "understanding in a neat - way" and is also an Old English version of the word "shit". -
  • -
  • - There is a SCI_AUTOCSTOPS message for defining a string of characters that will stop - autocompletion mode. Autocompletion mode is cancelled when any cursor movement occurs apart - from backspace. -
  • -
  • - GTK+ version now splits horizontally as well as vertically and all dialogs cancel when the - escape key is pressed. -
  • -
-

- Beta release 0.93 -

-
    -
  • - Released on 12 May 1999. -
  • -
  • - A bit more robust than 0.92 and supports SCI_MARKERNEXT message. -
  • -
-

- Beta release 0.92 -

-
    -
  • - Released on 11 May 1999. -
  • -
  • - GTK+ version now contains all features of Windows version with some very small differences. - Executing programs works much better now. -
  • -
  • - New palette code to allow more colours to be displayed in 256 colour screen modes. A line - number column can be displayed to the left of the selection margin. -
  • -
  • - The code that maps from line numbers to text positions and back has been completely - rewritten to be faster, and to allow markers to move with the text. -
  • -
-

- Beta release 0.91 -

-
    -
  • - Released on 30 April 1999, containing fixes to text measuring to make Scintilla work better - with bitmap fonts. Also some small fixes to make compiling work with Visual C++. -
  • -
-

- Beta release 0.90 -

-
    -
  • - Released on 29 April 1999, containing working GTK+/Linux version. -
  • -
  • - The Java, C++ and Python lexers recognize operators as distinct from default allowing them - to be highlighted. -
  • -
-

- Beta release 0.82 -

-
    -
  • - Released on 1 April 1999, to fix a problem with handling the Enter key in PythonWin. Also - fixes some problems with cmd key mapping. -
  • -
-

- Beta release 0.81 -

-
    -
  • - Released on 30th March 1999, containing bug fixes and a few more features. -
  • -
  • - Static linking supported and Tidy.EXE, a statically linked version of Tide.EXE. Changes to - compiler flags in the makefiles to optimize for size. -
  • -
  • - Scintilla supports a 'savepoint' in the undo stack which can be set by the container when - the document is saved. Notifications are sent to the container when the savepoint is - entered or left, allowing the container to to display a dirty indicator and change its - menus. -
  • -
  • - When Scintilla is set to read-only mode, a notification is sent to the container should the - user try to edit the document. This can be used to check the document out of a version - control system. -
  • -
  • - There is an API for setting the appearance of indicators. -
  • -
  • - The keyboard mapping can be redefined or removed so it can be implemented completely by the - container. All of the keyboard commands are now commands which can be sent by the - container. -
  • -
  • - A home command like Visual C++ with one hit going to the start of the text on the line and - the next going to the left margin is available. I do not personally like this but my - fingers have become trained to it by much repetition. -
  • -
  • - SCI_MARKERDELETEALL has an argument in wParam which is the number of the type marker to - delete with -1 performing the old action of removing all marker types. -
  • -
  • - Tide now understands both the file name and line numbers in error messages in most cases. -
  • -
  • - Tide remembers the current lines of files in the recently used list. -
  • -
  • - Tide has a Find in Files command. -
  • -
-

- Beta release 0.80 -

-
    -
  • - This was the first public release on 14th March 1999, containing a mostly working Win32 - Scintilla DLL and Tide EXE. -
  • -
-

- Beta releases of SciTE were called Tide -

- - diff --git a/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaLogo.png b/3rdparty/unioncode-scintilla515/lexilla/doc/LexillaLogo.png deleted file mode 100644 index fe78f498839a4ec3e83e85a5fca9b15d49b7e4b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34509 zcmY(qbyO6O7d}j*NJvOG(zSqeDjkA=NW;?7(p@6GfJ-9_sFZ|s$I?qLN-y0VOE3NM z{k`R9&YYR~Yv!Cgx1Q&@H|CwDG65bn9vT`NfvSpv4jLNv<0D$y6O6|zVOX^x8d_wE zs>18{zL0|;9|)xGxWT(Z-^b&yExqQg056&R$3pBk&wy`2zdny8O?vm{=@)Xw3Ayd3 zSWgOl0Bu&`VRi8>Rq+9m>D>R_l);v57wFvGG7S>y2?K~uM~rmsnX7xZxu zs4mUux)MzZbtF4Hl4whMZWoNf<+kGXr!!KW-=<)x)%U7%AzFeMh(-2=o;v< z?sz|C<3DD?cQDS@SficsUM7dSfaP3lER4y+!WJ7A*+ zpYQkMVxhnntlu|YgvSVSsh#zUu97^zbFar#lY`mMvX*1^!2&VW&1!s)H;0;%ySHb% zvtC8&Wys`^T8}C)6DMx%hitnMR3({S6CN#=h6HQ-X}Sb|E6Aeuo^Y8-O7ZwXXnjF?GM4b16ScVXFOaglTJ$pI{kc2 z6&$H*1;G#2Z*`M4C|;!aXl{__pWr1oUF}l@fkhH88C#1nF)ZJQ(XMW^_Y)9&58XMc z6SjzE@p&UPg0|Z4y``JKY4IUEMq%mwidWCG!+F*&DZ*mWqBoHJ9cggkVM|ztV?5+p zo`CHe1=({wLM0{hdN5Znevjz&AzFV?y^HU&OF?$K5PbIjnAUad*=+7;CiVaSk70Ge z@e}a@$bM1V&>t~7F;7W4n5r(~M;OCNeKnW26ZFaYM3FdOz(``oK(fApmmMOTr5@z@ zt(rrx`FB@e<3B9X`B}olRLiUiUJ@3SmApB?9jYc`_-$d$>8(( zHIJo0&QuNNOa;C^&IZ}BDm&NX^LdMftBG5Ay`xUk5BxTux9zttX(HrZGhmc0F<#;9 zU3r-W71mh-d}Z8Mb#+0IGxkf9UdpWFdkNS~4(P<3-)Q3u^oQ$s zO&sVla|t-h?+N8(<#Np=6lQrN@ zGOV5-i3z4yI`wFg(IPwIruYPy_|pP0-5|IXW&0u!uAb)-l z_K#@9kmA?}doWihe(Aiqlv#_N#J!EpMr2iKK*3gO*j7%vrbmd#CAXEAY^=c2y{vM- zi{yE}w$P@~yVv%)GYxBZ{2?8JPc_m8ETHxEL|OrdAu~J%%|uJ{@iun4e)mEmRo_B3 z85Bga*wZ4!m;(Yi=U#5N9$)D4x846rAJNy-`)yR`@c0oouY%m%;u>m6m!G~pvY7VH zomm4BM0==Z>XTpYtyL{1H(MSUwgjU$DI(t{_GWVMDI9mPNZTafDSqIh02mPIiaC)(Me494KVb>&pE(zg67P?jP9ONKBvaZRUGYZ%&paL=$(i&zw&g75`f>%wOX zKN`OcJe)@iSnEubRcma1$kdE7!y2MD9yLrYX6j_$xSDzNZxP$!j3$q*Z8;pC-Tv-A-x_;REB_+ySw{3;@AwQ zmgPx@`ei9;@uUeGeks;1KcAJ^kotq>E}c{tuvnyr{BJP zTdy`i)mk@^rG;-XZCGXY=5>1M-CduLN7U7AAB>EQycpTB899IZ_HDef7ktl9N2*e{ znJ0>q%D(uWVX>+UZ%Ug#7U@jh~!ruxW!aggn$;6Ajr^pI*aE5eLfv$WM zAze@hlaP79kE*KUFoXNb`CIM150t6JcCC}I_?cry0(MVg@gJ}oJnvC4(C2eG0mUaT z+E<~Nm>F2hEnb*sK|$kjlgoEgd)$S@?R7Z&bNxF2hUFN*to$sF5;Hz_e#94q6fEW^ zAn}MueZ3_CTC=x+6q)CXqxrM#)LFr(a|Jyu8T%IMsRv{{@j!F!c%B~|c*i}14))$l z8JeNr_xw-#km{GfrlyKT>!OE-iEd5wuUzYE1adIeTW9sE%URt#7}7q;TU>4gSEvbq z#Jk@B8Z4?fGH_`yKm_80`YUL2+Gn9D&uWCQ<}!YJ*z?G=Uw%*W{1&rkQM0G1*jbXJ z*aOiVRyP*SzF7JGIvgpp&1&0SFP;uD`vhBWMdeKL+$elBLk*64Z>pN2T0bs^TyLt9O_tHw9} zZe$|=Z)@^DL(bS+l%w0q{OGG}q`A+ZkEw1{QZ+|t-To(BzfzwdJn^(KWjfz zoyQ_uo|JP+<=QQM7t09DMvU3Kz+O+lg+c;GVT(@%tgX3-?C683&d}wF%j%R#+5iVv zYWJ#~J#3~s1W~{5A^a4dKkSHv;bc5{(eFOZ3@izq zsl31Dw-|ln!UBUGhDXtP^^ROAD!O-Ns_r;KGvmVZoH_lgl4)3NK)e~?hnqDhCdw0| zMz~W)IX@LHgLOW-<-cZ@kfu!HWn|)&B?GZTpUq5M898jP3BPb(0 zmXz2bI7i%{lL`1`&_x1MmsyEz%|I3?fAi2zl!RniLv&zQ4HmwS1I^KIG*{?UM6E@u zCkh6T>_Nhe|1~`7HDlp}*8VN->{UpsGvhsYeuc=6py?`|#$c1|-5r^3Av>^O{GAPQ zJ)AcRh&B4Nzpsj`z(*>ai6L;137%A^E#qTwS!LA+TRZlC`ul2^N~@21c=No!-@+iY z?~3g3Iis*3*QPZZDdG(Y{;6>5Ru`|?@tgb!U)E{Y>>A{b&V8mU*=m=;%274{&~h-Z zd6i@9z=!qt2I1Oy)S{1)8yb2Lg+z9;-~%*Hr#I-lzBs^VF(2_oHpChbfUGK2I$H=Oy2WZn1)Mye zuv==#QQK3eKBtn!SGu=9!d$FzVP_wmhsl2R3csFV3uLBAyc~(rMw|1OgiQoxlZA&e zq3K&pAfGwYur~aE-T0%+Bg5r}sf?b*QSL}Pe~M%!=QnG$>LYafQP7XWICPN$iAnN) zZfL13(ckknYjo6lRv;g~FR(S@d;XDIc64<8Rqi*z-9m9c5$9zqr%rTUtB{Icpk#t! zIRl9;mh5jrp;2~3c@jV+8sVjPCK*IHpQ1Bgb-WLxAmdB{InUMe=GI5tH2Oae^~MtL zk-J+)!yXjJP-8Q+!)$V1jSoqG-I6f#@IEa&&o=W_U9eKEO1WkEqzz~UCDJr)==HbZ zW6>RQbnp#Q?~l*>a5ok{SV&x@?at6 z5Q_O(+Fw$z(weqW%LdL)lmg%l8PYH`&#{cC=$q(FW_QQ_o`k!ZiI>Bc#2p}x>E2?( zRb~fB@n7y6m2I;f$I09GRmA?1;OX1z4#BcWL%MMe%ME|ZCs5WFj4X8Rz|SK!7Tp?; z23G=f4wx&Pm-AV)r~>-Muk+`rY!Y2ci$)+S`~7H+KBGC3WdSxeHaz4)u}2$8l}%}$ zB{O&IArrlSJ=*J~N_1xCzcIjr4|;cWf4R&^;%jBU294)`%LuPQZ@x=x(NU-BJ z>(1&C=x&gC3DpQrUf?3yU#Eq@Y`Pf0F<8o~8T%s%iweMyKcb^Pj44h*At#eYbYQsQVO zgI=tW5zs$F;>*TvH>s$*DBlQ>^xUXa)`)QeId0U@wTNw*P%`y7&?Fob&oHJtanO0_ z^wS*ad>ZN~%2tcQ`v{XTNW6Q5w)+f~>9mq(3d(W^vBKC+j%=i{4UbLTlGCt=& z;#tBh%PkGO%?;o;PIq0$YQoY)_luGa@qGJwz}lFB@a~RmquC0Kzr`FkG#1c)b2*u4 zX17L;q6VsOC4Q7~{1|so?5kCD?rt?iJhkd?SI`E%KIWHc>4r6>w-3o(Q@7gJ9`S{3 zkq&Sb+L75^+6*{`gfmca`brC4baInkQEm39c2374VViYI{X0KL5A#V2sq!Vet=g!A zd?Eo_$AYH#xlm?cAzBX3K5svjvpHCzR+~^aJ=wT1+#~gP5sQP?e#>kZ<4czmf%o&{ z%zsk`1D2FvN4>W-58n6iA2Bi9`28aR4R#M<-06UwBrU6WhGf3vb#p(0${Z}5-6@^o z327oTY1b7V5Pc}QTyy1jx4EW}a%9sNj_Xhl<#p}2P#Ld$GOeJjB#ojm4{00bs zO5!MKnBPQYUR4+gGHL=a(qNo%x}$%c>BoiS;wxK4u8Dmp&1p`vd#AhNtpu+7zMd!b z570|hqz74kIk6lYcoE!ori?a6Oh+Kj@?S7AfnO;U3*4uAj(V*V8L%tAdJLhd2riTN zv->U-RVDZ?GWheW04HfJsu(Xmr*iXw#IafB__FKo&m zi>K{m^B9oFLJZ-0BN$^bi9p23bnO0GX^}pjkmtFXwCeZl8_@EIsWwBqbEvJ5x8XEz;>(sgAa;xZlNVtRLz46zsF}>W?ot?#57nSfLen~PQ0IdU2|jo zxofaQXpV}p&FdjM2wgXRq%{9gcifJoFbpM7BN>GnjIfq$_Jk`_W=paY9O4jxs+sG( zTQP#@gnXOOn;-|*x(0Hf#jol>8p6~4T2Y!PlwWobu=LN?c|j;K`bQtQ=0EtkiwHyD zF2r%`VZJjA3mZyIw&i*2FNCV63&*k3y~TW_bVWvt>ncH5Wq$R=t zdJVR(n#3if75jv!wlVw6m>LrpOO#}>c^(@Z5rGyYE2+0ahR(t-rJa&NWh*w%#F+8| z7%#^Fd><-cwHhcw|M^B=Uq9q{>!u|o?R3A~jJ$Lo^ZNClXNN%-)msckRfcb$DOZVF z#eF`Ts;g;V>aWH8+N;>tDueKjtqu*`t=^umT?@b7?E`a@?89&OW`gis0t+P{2E{4* zKI}DAJgZF;2&cekudg2+p2jnW7GZ5Z2NJowmiXpz`h}ff<_rL0%5^oyn8C;-V+v~=2-5y37!tLd7igC`Z=F;48x_nDpHEKYu7h&^bH6kbVSMl+17 zN!OM4^#G2D=gly9|EcH6fRGL^s?tynf=@L+Hn;MX#+G^59Sh%8x&4oEYh*N0JY9fO zj;P~M8gGU9iS7n3Q805=AhW0Z!IW2=UF%teu|WXG9~^^#jg5`T$;s8)tNJ{=oZNvZ z?t|+g9$M$F>Zv!YSq2UIN*^XRw$N@BR?K%i=H4bg9FC0}Tom-Qp3Qz37-n^!!W4qB zU7Bn-w)qNx_ux`@9KPf1S z_iD1QA)K7PZ5kav%!Wu6_PF-kCKd|f-FtXHFPs1MCGX{yMu zSqvmro&JC~_SL(J&v#VyC5bc+f$8OfC7UTE_~B-SO%pL(;?X5YB$ zO&oXyO*s<#)z~Ze#u>3j%c(t@6*3R#BPaMA1_ZaHQm9qQ8$#3wh_N2XI} z)vo{z2bMVKu>YDZ#z5{X8m8SRY$`?p8R1|X(2K%xe*MV}Yp(0{8m*0qFn3QbS&m8X z)nA|E=iG_f@?Af1z(p>k$e7)LO7yow5bOMB9uNN;{1CgTs)?IDu1P6QTNN&o&Va zLi4z;t}4%}r18u;Ll=ez(1L#p{Cwes@(cb8ZLRY18O#r{*;du2bBOMk`@!#WQR`Ca#{ivioWRYAD5h2rmy}s{G8;kd9F+ zcugtj^2-$}tX57>bBN^!Rd|2e`4RVJ(P~UxJ;~`;=g3gy&-x;%d@RUc-fBW3JLr@7 zRWr)a(p(StDs)=pKRJ^fU$_GvGA_UXO1`?#SE6bkG-wZgWC!=gg@!i9#BwbDR9vrL zk)m|ea-yI6xSkN1h2gP}eqtErQMpsFSB7uA5W#%;M&@La63q_l85N>B=mIZj*-t3Ar-{58>_=%A4e1-3@NZeKjtI4Fd<1FTJb~iVKdK)N z72vW~N9IKjZ50@_vHB};F}iQQd;tsnEfCB9g*fpr$O1-NSv{yQ&MzBtByLH%mj1#6 ziAgxCsREbD%MqCJ{!*PF38zeVkTh>zaF##(G`ucED2uYb;tUy5GI=Ons(@=y(8aB^ z%If!~Zbam6Yzg*I`yp`lg(+($!rluqJ_#lwnj;Y?n}uFCb4l^*bi+q@4TQ`vofR;e zuMTbhUedmF&F~_sahT&du*8SmcTSNoV&6VFBKD7~V3~`QOs8pLL0?rc#J~^CE~m3| z8|&GB*_oB(=9?iCv_L@ld7Yq}E0Q}uSz;vP-=033K>)>IWBu-jDKmG57%t%N=17)) zwq92agI*hM!-lHZqxF8TrrXi@mb@-6T=Vk0VGvQLeLhk{nypDUMM$0e8Tm#j~6LE5)eF z7v9_^H@H)pn$S=whlKA>1DSleBNhk8hTq0_xy9{hl-@N_A{m|%(msdtql>29K1Td* z3hu^DeFn5t(k)AWgd|?f8T9hJ?qPz`d?)s$f$bZaW##jCt2}f?hvvr!sPjj5+jcsU znF;R3qx4{9jp-w3CKi-9u+@dPu5J=6WqP2Ejsq1Tm@lo)l@b<@NlV68P4a=F^ifL_ zOd(EN-%tb#ftVa#J}ARQv%&KI!HSn%9RKMp5AroWX zJNPKY(RfQh6bYE*^SP!a(uBt~=`baZTkUj`arv+Ye%v52wJM!Ztb zu+Tt0&7rQL?cBt=JjRX_t{t1*K!wF8Vt-`JRg8241 zeP;Rs8MiS3uzmXVl=)_kzHaEG(-X;eWOGI7(uT9Tql~ay&QYOx=3xx#?7pCtlZ_R| z$Od~TBDj%KVnr8spmp@(^5~X$8OVR#&jDxV$zy+x5_>K~vi8D==EK-Qaa@Jti=D<8 z5P~QW{yzPc}oa3 zDyMMX58gf{%3k3Yup@eZ{dC5gBu3$<@`H?c6JCJS9XFxn^7CRRzA|@>@UcvRdMo9F zUVTW0W)aJwiV{`)W-NFbB|N;0zDjv|${JS`vqbgvkm&TN4hmK429S#=c05LUiC~XU zGn(kJ<(v-@`esCvmjsLLT35}%hPkhn8$4p(gP8>P-u7_DhwY(exZo@#!Kw+`{s`>c$=k>L}n{%NG za(7yVtHA9Rvh_#{J4#a+HNQ`u{#{T(50icG$z$058%|Z!`6UH#*WINF{Yz){EGIsc zgVh)xVeSir%K z6!q%ML0I*l%xz{Hng1ysE4X19$L-eEl$ckt{w+}&DHkW$ac0|7>O0+gBfiW9Z)amB zH6*lBmoVoq&KhGh)QC^lKRNOqr&lE0ppHb+zW#mExIhJ}I!CuX-d%#~EXTi=T5w+7 zIfn54@ANI2rK_56JxNL`uQK?{ex#vRG)}R2OsHNozGKams==Oo?lnmu>2T_9sJ@l} zYd#nvAHBK0vx_94`CvBnqp4s(p9XEq*UPWCmJZXt;}-`GW*{$jKW|Beza#wdtx2xU zXSB`kPpzEV=MhaiC!Er-`6L^Q?FL&RGS*={g$H$ABog%R* za#J+eO78)`ZX+W=ReP%oG&%zkY5u>;SY>4&)-fGP)RW?y@{E%NY%$#VtKAYTW}2ql zMH!cdl7Fpwy)eTsYv1h>bZvQ}Q|x(N(vT*?t}9}Zy@?h5yv%iu@V8xboIr}doZ2bBwF2SseI<^2)YR0Er831# z`eq@pkHOf;sL1A71UE_%~9GB4&QWgA!yv8@2tTTK^z)hqD%GJ6nHA5SK^3H;uI+dJ?S-(gaGhx2l*w33)s%eG z#;SAL0Cmi*)aWqxvm(2%3M2KXVQ!)p&zDrV=KC(X?gYuOFM!3Vs`a{;uvT$EPR zy)FC)MuMdQsxIaJN>yM1no@L^Cq8p&8JFBsVBytNh*d1oF@*=^2JST4B zMOI;lr9$lh;p~tZ!8B92bN`pDMeWa}(8T8Rh{D3c*OPWH1n$#niF8Z| z3@a1=QAMxuM)y8c9E9;c&bUcHZT|zAh%l-uL+)09n4#MXWb}kG7bqXIz=VO~#QoYB zfgZlYF{iirDnV!348hqD|A*)7QRqy}8Vu`i#N=Jzm2VA9aDj~ERsjjWWW95DyW!@! znnjA=^w*z;?SIXI>*3YcNZ7G=Di~?N@lGZT$5Z8VZ)A=-6`PEyt)QQ~&F3;=dap0( zK8V{^xLIA4Y`ch^rrE)ahNz3)19nK>AFtdi()gX{xn#ciwFyHIOlk$*O$H3RprP;m z3Ot->S+ZzvzfQtrtK8pscZ7gjpJeVd&$=3}t(8$%hRCd~1n9G+xtcV%WUr7MalYV5 zrWzN5VEnGT6RY8r4$^tJzdJoSVJ^`GV?=LaWWi20h8kR#_{?Niir;Lknz)Fchz|@J zW2)_x-4aIpbvbUqWy~A1yE@qr4XIMlC$v-5n(*i=+m&t^;RZFJ`8fw+YzK@)|D|+i?@a!0`9T-P9JaWPqG6b?*6xm(;$-E1ZTjM!`_q&AyK?OT^hB_*(bxYcpy(wO;<@6WMx&@_vds-l-J4 zw1Lz*a)xgSs5H_Na~>Xvi`Do&ks>fUz&JoK6C&wzxNm;W&=S}5Qmfo`eOY|0KBZ18 zJ0C(rCL$Gl+vqtv%9d^WL05O&5!r5475KL+wSqrt-~1;sXNaRZz4-kJMZ0)oWo4!F zBBgp@G7!|}Kk(E~+>LF)n)}gPC3Dk9`$<3k_S4kn$-esTTf6)^)cA=xcr&uuhvBNb zE8|jgq{a?xI#dRKtkTC}qMFG6J!tJ5@K&n5e8Ih=-qE;1SQ<|wx!c{8%#Z;YhFHa;DT}P zHgEJmp@G%MLlH~W&8tMbN2hSpY;tJsAU8yp)GFNP0AMkeK+p0`U1EU$9on+z*_(~& zsf(ubVNGMv9x&I*3E4V7G+q!N!Q@$aixSWzF9GzZD#(LKvYSi zfbU|7O&-5QFIDCzoG)k{;2)0~3uZeM!&r&F_As;MTUJ)DQEiD)35=|Xus|hi%TI@w zS6%kuQ*YU*2(PhDgO@rFJ@?N1dAF#U6^ONhI?cm*@8G-C2CJQa>Z|DAo5@=m3cCiN z5?9UpwbN7@hb&5oW*E(=lx2Hz-#Gwo^J{)+V&4rM-y237IsH82o1qR#j+A+At>Zx1 zB3=BeB+Ixyu1cy=h>Hc1HVYK(jY%fvTC-6svIUuN=mq9 zJQcn5r&5tmq}6$Y251~IE z=R9khLW|};-Od!y+d(0v@~_+&aX@3sE03bpYS+!tg?eY2TV{Gdi632^uZ|^e~5Nqhl6ttIw*Vnz^lmLQa0(s!(kSe*2ihU^#5kABG~g zlB~`G%g)9L6%2a3lS zkwQeEyY3*Qf9Tr@mGL1rr0!f{x9-IPpHs^5-shD6sQQm^ey$xQ@bzD0n zo+n9*$hF_lqcvPP9d>KEB|hTMt>wg6XQt~^e|2+lFxTW^2OmJip78tpM-E58sx+m~x;_a4K-^Ofx8PcJ|NulW#aqy2G_J(L}}X z9pDi0E}4~UEn}uO45kJBrNHZDt7!`ZuX?eDvm}#?zr^Rq27CGiJcj&aqEKGu#8mw) zm|e403zWTPKT4BTGQvIBckB9wkXj(e#$0{TpS{UDIE?w5NfvJfr8D(bx3P)L_uHh^?jyBz-X@l3C|+vW55qp2{L){C-UN-Ui|Z1?=My?X zXy4>+zkmO}9mj8*KW^XVoq$^te?;Cbrdm$8{m=JmzI=VkCfotzlZzosY+3)ohXwP?`{+e_GFjC zZY#ek<~x@A=HEC9sc#U@Fs`n&+q&L{BWf;xD}oTkriP!G;tpC7-(YFE_XpyznLG;G z0N4V5^*-y@Qs&+`N@jbuY3S~i-J)_i$yRr~*BZ=77dCTQng)4gBWvrXWFGPw=i_vR z`6KJH-RgaLUp%%_%MkB>yXJ>qro6GN^z)_m z`LIJ;DBEig3A#DBT~h7AS1RYWb>s(VdI%H1Ka~;-W>JRc9%+{D4o^=`W*;wH%)j3g z;b{NF)bdj3;0yE9eUTi_7oe&e3TMda;#oj&kOUADFBevU*ZQGnkNUkCmU%8 zB3&u=8;Q2=P{DnOLLb%(O_m6*{DhFoX9fDNj&!JZquI1nIbqGu*7^AeBHaGf5Rk-h}e zZ&@_EySoaJ$#yTQ1;ve+a+3&G7s}f|E(a{NcvdN=5NjkGjnxia;d z;PLjozAy@O=#|r0M;N9+iTXG?za8rHNCOCc4BgolB=fmvrnwAWZTzPYko4sWj z)EulN%5bB&q&Xx(A(W0OAt~0KOY33F?#re{n^cyP$Yoc=9VN@n9>)FI)$s1FHg2@) ztutw7y<_LWT3=%OL8M(Qp1J|-qoR?SO#8RfivB0L6dja%b$;i_m2T%@ny6(_i)Yye z+EGHMaTnxE=jxT2JM>P3&{InDSH2tZ53TnX?c+PIkmHe8Pw#c#cIU&$+35HdVE&tU z;q~O4EqvcweVN-iI`iiyqRiZlR8^mL7py_zLlq=yj*7V<+LBb$1gT6>&Dh)&!c+Cx-Rr zn`S))=Kw@x`iPi#-{=cl{Qt}}y^m&kV8MN(jILc!c~O=|S=v;l-^|Dc_n4{()9YGP zi%qiA41J|7Mb97<{DucXGW?S5Vwq<4X>>)00w63iGBQ%%`=w+NK1KK7a?=yW+-}MB z4IgUZ>fB^iV|6dD^YpiFkEpEBC~jVi=X@YNjUp&B7Zb4d%ybeHm(ZlieZw(C%Ir*l zo@%7_G!46PhngsEQz40WKjp9EZi#LvU2K?D06bv-+}8Gl?oPq7f~?kz-OwF4^yi0s zUeEg2&e_yy%epte?U>==U~!j*q_wd%OZ;?$yY%V&^v{BtQL!yRw)EoofORNMJ*!GD zco`9p!rS>VFfMHCWv?+&C0T~|x|z0~p75uMXMx^VZTJNudM39+%ABl-)oeP&Tf5D& z+&cdjp+%565AeMdtUULRr@>MFFy^~s?sTj!TN3;mRyMtVNk~@IkIN2r3O8(m24;w|LOM8 zkZg`e+ky|?@I?JRbP#JMR1ww)uq92f49KV$b^&OoEe@nQ^R=3o4NKZ|9x?R`*r*$|o*ap#zS*;ocF%j=K>cr;n}UEk5mZQ5T*u7*UJvu%dE z)xbr#)ts6|i8y)&r=nHn$F{1%xa8)bbkrkV1!ATQi?Ov>?+sBbSxEOQxZ8IuO7(V{ z{2jv2RyObZ9=$@X*B3Hl53lwH(%W}EkSRzXk=HrWi_*!w>pTW zmbl3^C$hQD!+u7RmXoH%m8beI6fV7N_CDBM$NNKLwU7F1m3!lzz*BMX-i|F*uv)`N za?gWphfCp}bkAM7^i3oY*c&4-=<2rpY-ipS$wCo4>OaEg&1cu6n}qSO~A=@Z&1U~PSZ4(W!V+z)SP*4Jr^ zEs8$MiDp#mvj0uR5kix~?q{BKal~JH6m*fByI4wrk>eThY;x$TQ~Hy>Ej z;vA{|tBez2I1qfAkv+cFw~8ZN3OQDcs&*0W^N=`IVmp8{YZPzK-~oG$of>Ic%m`-yxdPuAI{EbrfCD7C#U4)W|zM2i_vx1P=Y>}wc0rC zBj~BITaT4BZSg*U#nYtLSf_eM1!7e}lE1j>@ETu@e7EDrEEEx>+UJa;;9sn=iVBVq zD4h7v#w{#4Fm7``))|hQo|ZOSW;5|i`xynF#=S?pTO%n%t4T_azsrvKuSAWMNL6!V zqX8!xIg&sXirgx=3+Sm~8`Jq@>1|b2`?mYiB=Dn$M~w^%tT)i76}{ykXolf_xUJh; zsSV$ygISz2o$nb^`W=}!PLw(r3|tfhc7)o51gO1oucOg2rzj|@Z>jcb?c9~ImJFp7 z3O246W+RDV&_6uh)brV-ZKtSdRb)oJGE< zMP&Et3=Xq+Cvvkc47ZGv1la+Mdb9h8X+uYD_1lK`I2SF$(-)u2aV!aU&4|D*+aN=6 z#@W7dS~$!zO-SZi3c3o;&m%msZ~g_9D2B)tdLTCRhaiergB&sQzczp+$11b2g|<1( zvB4KV7IXK9eSbqM*i^wbu3Ht(gM=1DMF!YIn(_ z^j=6WH1>K{JUGlq()^sO|;N6?I6+Qaz>XHPW=*;aL$X0?`LPK zUS3|qhb(w#r2v`KD(iuyM_#k>rz z)stL=>sOqU)2>*fZ{s22Kh)KAhX-h*6Xtd06SEcz&#heh5m2F32?FhoM@t3NSh>=bJMlOW_EpVN8>@|FBE^~Whd0GJGwGQg$@IUwt(nF`_r>APcSTe`jY}Pl+;3Lg$_$7!uhvA7S6wdk?fO< zqsMI$ftLmC_x&p52$%g&5A}56#yT*};JIq({}gj%PInpg-z_^qSVG%Y$x*2YnmZE< zZGS(h-19#*$!w8!1@fw|7rVFUCW|?=4l&n9K=!oQLk$y4qE@WK0HubXL8qG|rTP^( zho5Y9pzk$fkXX^d9%aAYmt`DV_u4sA0gL=CfXtuQ`i=wwF3KJkMz*eIgJH#xMX7!e)6+1 zBk^Eua&1$jb4A$g##whxR*RVh=0H7M7U{M9=f`6<`H-elQJhAhFT-M_iHI@wRvfBP z^xNVy47H}XGoJDx&ko+nJ|)V zOs71SJL-l2SyJ=cCe%$+6pK+dGl%pPVlEvpViu(ig|6VNud)f0N2lk1Lhood$wxEB z)da}*Y$h|>@qn+9bDs~0%U*rQ-uyE?7D!d|w`XtM(H^4=`*7zy8Dm^J>fo2eQdKCt zjfVipR#rnyIp}LM`*C#yrjNycAB63u`6XpSpW|O0BA7!i8-otXa1p|?+NG_ld%EDW zw9wOh{7zcy2gl|3?uG|kUU>s+w&{5>$ z$0d71+E>*LD9FZU*@N04c`M$U_pK5!K;X^Y-)65p5vLj8P&X1E6v$p;LOdw`K4C1? z@u6!qQ04X6{UfoG@^?dvekq(Cx*nMD>*J(WZQ75Qrr6D8W=1+X%v?rSpsTAZpHb71 z+EN=sC0Cek#8rHm##lZi6KnCe*vj;@Ou*9QjwdxksOPuN8BFircg{qtRB*wp&{n2s zUB7rcg&I)PAk`W)=%(DHX{=u^HNn{yX0@Sw#C&`u4!qPq)??nkza?g zGVQvWG0WN_2r#L5Q9b(AY3%yc6S&z z3~!W3N_b4Ho19_|+oB~F{HD?oMR-OsWj{cvCw5Lm6t;y;4R&$K!a($i=%WeeO9lui z{adNwp_H`x$XL=DiS79Q=#<|D2e0%29+pGbgV^~JRzK|Q~vf4 z9mzof>%O!{i!+NqeKLgZd4D!h8q{~h)WBVr@>5Aa{mr^ZkNDQfPMw$W{p?un7lB7w zSg1yTe4KK-+TY&AMYU! zd{^(?J2dW2(eE=74(ZY}#nX?=@jkWHAXthIDacUpig8anPw8<65q)oa&jxm%E$J0< zbl2b+Oa}XM(wp@R)gcdL$Cl@z21+USB$80D0xpkNa>rDMX!R>cOtC=vq zuPOkTgwJ8C%@8@N6)l4MZXOFd`m4y+$yD?(*KSt>M`6mjJZ#A{J0Do>yD4x>BWZOZ zx(ud>l0Ymo&=sX2v*?F)G6)!Ls{WqoeD=VeQ-2Zq(d?E{R#Nd3-nNaCCNZSuOYx8h zovp)K9-55B`7G8`4?mQB=+CcCUj%j>XHYJ_^iI-G|3PB^XCrMi9z^++1eNg|&@=T5 z==*3^{be&>%Ss-QC^1^Za5h zzwi75v)0`AT-Q1K?EN|Nc`uLWF*>t;Dl93;spI~{#NGGxosbRZt?CscUW>;iee@Cr zWG}K&v(2j*JW*L4u**<>O-)T!7DXZ1c!W;4DvV~s{&&jP%KiEJ1Goh!Q~9gO`fxl~ z_}0qUZIm^wemPYbJ5+W^QO_fLQ0!8i@%&G`U%$}|OAh!Pffw&3&y0Uex4yU6ac6qMi1Fgb$KLIkGF{i@R((4)?lm2)OR-3J1omQQyu(EcYS`go z@8HmEr>IFEyVbW|?I}i{D7Xy~ek)jR$yFW<^4bdLa=RMRDX9H=Bn_T&xw25l-I(ZA zlRklnM+h^Wx>zWtqahBkrs39 zuM$#`H6uVOR-u)C;!?wTpN5S9^!ca6dww3N#Js8%VbkC@wTOqy0sUylNj5N$J5f8B z>m}BJ1urAd7bJ}qR*&dfJHXbeS6`37Nss6n67s6+ch{vk+mDVwvOtE+-V54Jf{2t| zZMucFsEr#EP<^Kz#&~hMqTC@>D<(XSqP`Xoq7kV@MJr-ff59qc*hy+Vkmnv8(8XTv1LOJHL&)C~XR6!{x^YAVDe~A`P#Z3_L>| zC&qV_=lvsX-C{#gK3VSP{%iLYyoj%e}7`$4>d4CfW>9L zolUx`Hy5lWa+euOSfkdg2Aa~Q8+wh33P=%m8L_i=*qEz|O7#eQ*qUv7>xfYc4R`+% z`#JeLm611-F0kEy4qT*HOi9X~?`!+!g1;3=(UiCPE$hD?AM8Z_5z|p3*Ig@o9s}BPThcPdp9J8B}Qp3ldE$zT{($loz^%lNH*ZtJa!2uDczHVN;y) zL7Io5g?qlZ+PsBfFzqh>RBU#|1M4N-C9mCjQlw`jCG!O_GE4NMmX!n2<&R(1+tqYL z^rE>=2<{V#599HSAIo@518HjMEy1tNZZSA?UjEcE4)6YLq`wWz*1k$Pq5U#^qP6FV zpgTa{E{)#R5opr!$3&d6lNTP5n+f><5efHbu3F1*QG%^KoBK!Al&d$HLApmoMhK8d zUaxlD*0p&fY{vK=p$&M?9VVqBO48BNAN?Jys^AMLa#otlB?PCe+V*?=Ce*zD*B4%O zAv=l?i+Z=7cte01-g4;I>9}rUS~#S;n9LrzFHaCx9C$751UNDL5IJQlP3vWsey-E_H4eEmhC_D5|LNSMlJb}j$LEYmY`Aci$Ol_7tuz(53`TsXw$ z3D7(_%%y&=^=319o1Ni4EZ_e@%)<9z{>(wr@_t~>t}N;6*;I`q%|X#PR_*@5>oHV| zxS6M#uQj@cSIp4bqgRf15gJ>4=uNl!O|_{HeOZM~c#rJ?v!wcIF$y|-E|rYFX`$7v zfh*sNwl;AH;vx5XO(EL5AGz_i;gv#atoz1SkY3ylI%Ak-iXt|J&r@lKkQU(%g_WRs z`K#DcVj4?r(mfgF^&u4NLUrsHT8LEbvhYZ%$CtA8wYEXD{XjXMKw^ zG{h8eLgY%`#pMnbgZshZ#v^ji?D3TchIY?mIb-nX*+^%K{~r2FETK~Wj!d=FSQAF7BW|xm< zSleJJW}^TdX|e}pD@pplQcMovHa73`i+dyT`HPbk-CA;whSU~BHIt+o?fn(Q%|h1a z)%5Tz0?t<1yatz(^CQoKD)V+3ueFhvJ^)&evZI{1jUxA!(WpnSBlA(E4fSG6-ej=iF$&)>RDK7B^ zKLD0q1L7nB_B7-SXRj5?ORj7}oA0eu5p>MOnwpxpxVVNyA2}_n!-DU;uyeUd$W_~` zcU3*E^Jw#~)+@}b4HxD=%y}*L;kh2oNfrXhcz&+naI5R;B%dn06=Kn7+z5Z24?*B2 zT;&<5qhbtdG2KAi=Ri2OCk1*m(JbqU1P6dC%b`+p?)|I*G*RAgwcup$vWfs)Qj zg<30A3mG0q49q#v4#V+ZqBtDt7N+!AzkHqP>x+ydjJXD)|C(k%#)) z+8)#LctZ_7=dGb4q)_r(4wB_FBK*+wSO}&C7owG8)!Y*;F;e#kE4+}S5l7P@@ zJ%CeOvYYIn-Q^Ch$g8TToDNMl)dW@zhR1F4*$m*se3wX9mAXx5>r2Vhbng-xM>W

+BQoUUWV$B=ZJGS8V>n~ zB_W(G_@wx6GLGCL^KL+t!Gm?JCFchSPJt0qO@$tP8V?(3EA3Y?l@2S^5SX66zW!JF z6VD(uZ)fs#+%I=kXw(YI9sbXQ=-k!HMW#tYxsj6A*P*hP!Ko}mlyj{k0(DIcA=G;j)VTO z)=S3yU@K7l^$!>8d|ERMllXTwV(^fNCUW z>pO;qNR)~|&+B~5g1U^?sIIO&w*|~}2CLZb&5-DCf8zc$lt}W88_j%hR#hF2yMac_ zCi@v64@gC07Z_=C1(UFqO5zMQOn`PjR;sApX;+X|*7OXTX;Hwtsrw{owjOpXQgSwNvGe4&%9Cha)Ju)N zV@l;rw>YH}!p`#P3=j>w+HFB( zO-UeQ8q6L%YJM30r#acvV1PAt_8wEV=(TV7J9XU{;J)H8xE1_`uv0XMBLr3YrS6xH zsacSwd}{#x{;9srL@2NWcxfnhli{+|Y%b(X`EqOg^hl`Q@{o$92Vshbe)Nbc3(4HB z<=;d(msY{7)O(wFH&>u3x^CYwc^Qi?80Ed8zyf9GfRZA!U{$HH`zE&WIL)7Fl9j2W zYf`L;mj62VfR(8{E@sKFg!5<=gY&qPhSTPM<$g}GN(xaNpnbJ5t-j9tj&imBbiV!c zaxEHY;l6E?KX}SWe}`Q5|YAN0MtU}UuWU}!!(z3<>DLMTS8<% z*q)7GlWA6Cj(f1x=PPC|=HuP@W$Ox&?6{B1Y0lUD-&Sj`^shH&oi5QR2YiyHJwfZd z-0F9=KjS`A`-sWfPcgh@s3O-|?cy&xD$q_9!G?KEj!%7N!I`AAxlR1I4S-q{ z8SqH%^%64wX4T|wdOOPmo?T}UA|avSY_!Wv)B>84SJdXxnXgaE~Pz ztE4&{;m`ED6R|r+9YUPQd)nDAx~E|L`h~HzZJ|*3Bi5YosSx%^_~V}EWGHGsR;>Bw z;*(7wJz|rxkQL|Cbp%;6OvKAjO-&MAd%QVdd{3JlQtuiu_Jvy<1}b3#POpTQ*!xS^ z8a)Iw(XUWV&LWN2yCBcH0!zX^mHMZ9raOG(T}0+YkV`|dkQZ84z*NceyVwqVoK@Md zF9FZ9wDG3dGvzZ_jlro`++;mqS4`YuL?p4a2+f}YYN+@V9n1t6Nz7@4f)&IQnFcDq zWGf|;Pyk-Tw0oqP`;&!QrHD@vSLM6uggg{tzSAX1gt%D}pO_svzHG6PTJ9?lJ;f9* zp8OrpqO=j3X}g&z*UbnV1Tse&wTFa|Kc))f!aXjqm0XKVVd@ZfM>L%qHvL9xfi!$;hZVxAkIaB$x;di&MdrDTS@9&X!X_P2B>`^+?h*KCW=2|OpU-`b^0 zRV6SDg~CaHO0cl+XA9~)&{{u*fQ!jGat$e}KtmmW3dO$touDVZXc0Zb;9n45dfws6 zHQi1wzg1Pm+1v~H@mxtnm%ybeFxY#LutIE8V%WNRDDyQqA8bCN*L1YsUwiPwZM5aVA%{rkHK;SNlkK}!WwehG5zSsQv zUrRT}%0}}U$laPNaV02mt?H`wgKjziIBy{Zkf*eec4L@rMI)#`r4h^ zS8Lg(hxBhPqTA;V?LQw5s~wHCCx?~S#^F|}MyIb*DY%cqxkeRvfRQV_4nTLq-<8GB zZYPAX<`AGM-yB@lTak7yyFd#<>>JN}jykz!*yD1)m6p0a{g4esj6;3NS*3dQK=hYj z8{GAluY*wuu@`)b^2q!hmMtwl;|zKI7{WZ2jwr?p<*) zm{%3Gbl@v1X(h$gIKS#@dCrEtw`GF5`e?LEtELqArXBS_IH+NFxmLrVBPdV;0?{$( z`@Ya)A$`i)+O-;eG9&4AViK>S(N4l(k6f0+pq&crNC9jLm?+t@*no8$3K^C0pU$ zzEjAgqg$}JZsQq#=;cgLZmzD!#^iAo0RkIP9NC7mCb8mmZO>|Ww-Smr)`J(M1lRJe z-QVse9_eM^4%YOyYx+lJq%DFySB9WFLBqsNjqO4K?@LB$ej_~{8{{CV0HH=n$~oTG z6!Q1xYV^9sgziZj1Dg|IL zNbFb+AD#mtS}j%1`a!v(pHh+)@0y zQ*>@I@ur}{F_{&&mX1dddS+pH`i|IUftZHKfbbAMmu9(y^);rLX1DW{hPI{uQ%$QW zZ5@yg{6dpP8^mV_MW$LudRruY#jtf4m-ou-bKT>`h;+h%fYKfhRQ+OWN+3^P5z{ff zrd`M)Ju7T63J_s`BsKGsCv8h@-zC2d8V8Lp5Y zPRT7qz)3bN(akh3W7GyRaBU8#eXzv_ACf(ETgayOj+4xzk-dgESdu;^aA zyr0M8qxr}%0G{o)Q#b0iusd4Iccn%f1;DgFI|5tSn@s)ABhGNcNPt;EPu=(M(Kzbl z!Og`ckE;zmc)@{=N8|LSeqnMe_-O8fRNp5c(o&XDGDS|mcx~Kvn)c^D)MEbnj;hM5 za6jR<<(6?dUoR1}_p_Gs&aP&g(L}DdtvXA{ZdfsBX zO%3`w_0P@UMP9sjN6|^8n_vShlN4UtN%wLJhbaD>2Is!%G%ESe1fc_$?#SCUSf!cX zIs6SXj*0WZqwA<+O6I9s+wp|#9Km9?#u7OI+Ozs8jdwe%VXRU!fRAY-X3lYyhUcQ~nq~F8u^UcE<>jK>7!$_GeqMXZjJs1JR zvf2FlG#Ne^zQPR`4MNc8bNvUmJ`p|2Zf|ypgr~^P#U^ngYKaeuMbo82ZiyADGX41Q z%>>jLAlJMV@bamYuiyt-G>~tOBIf~lnV_3Sw6MpHQLjP$EC(f?i&wwZ@_s1cHH+E1 z(DDDdWo3TNA}C@6?Ixbe#Yrl9DoOguFb;n*jD97YXn3J;Q4LpeB-wpz+)uGb7O@n8 z&zhl{tX4)SY>dq8mf8vNnU<01?Tu9c>ta)1_lP`4XW(U&>C1ISX?ipXlR1YL6~o{Z zV0hH-Gtt0cx-w?iU`2e+@thSQK6&+22ZQXpF2LR<3Axj^oj$_EKFsZLjkiKV^DdP_ zv%M7KA!)(5`J!&Z#vT_E)@wisk1K z;Fa&Y)9qh3R6ds&FU{8)YVJ&{b+$>`#JP5a03OFBfT2wwAI>TjNk50w{l>(FYkOxE zl{=LO(!%qEE&QkD&L+{Es^cg3Op?m(|b*b7-hW1H&i!v z>6rQajJKT_$vtLcNhplo-^{0wAs8 z(Fb;3*i-^nSS47WqlFu>I@rP z;D=t#2bOcqp`>5;NfqlT)3XFqY89o)G3gJdpLz-gWg~E@53vtn(_zuSQL|aqMtw3* zxl9Tao*h;qdc^mi3`h0+k>8iPeoClxHslHY&m#L7ufupWNOUsO z91+Rgc(%!_`)hPO7Hk>rpJZ2S6Vf-aOK{dfTs>6RwHn)H+q@`Bas)yXBAw9K6Wq+{M%J3-rh3JesFKAX-$IL6eIUnlOU(* z0hNVQ%X?;!pC7j@QN*AaN{xex#dpU!;V-WOaBwq3$^YivdNhMqP0t}5x*$X@->ho0)ltukZi8{6j|6AmDHm!%Mz~TE zq(9E5afF3)>=kneK)AVh?)jw^*Yx)`7Gakz=R5E~A^fzUJb+|gHm97G?*7b!b_!o# zBuHN^@8p`1P%5}b!KC9&LvbhKNd~Jt;K5eZ5-goC5So%^#RL2F&{VxH=}v}X6Wc2xZ5a2UPqcy7hw2xsmP`dl~fC(qhhFHPY3 zEMB_nAID@vUKKC~ZY=pvKTGPOf$l+4{evZh8&^9Q(PvklI2v)V@pr+5WJ(^ceOPsS zrtMlB@vu!p&AaCQMw_V!I6pEcw7I@I(i6z(7IZH>>qBHK^QL6$Vkgb9WXs zy@7GKNCtH$Zc?~&hX?Gni9G7t&G;UKS~$sP18^R0{Ct^nB)-}s;FH(liC4_;kt%7? zkA-cIUW>*t761N`Ens6-^?89={`sxknuM7^D2By7azJ-VcQQCVdfkf>Ox4a{X$4=X zK!xfl(@Y;h4idDM+NPjW?=433j4Sug~E{Meny z-NZ-}ThHeZ<1mch-vh=OY-iQ8ituZ8*w%)hw;~eBRo?^?$ zJSE{EzUzZnG&zInC%s(L4$ti^ zY|@LCQEX%zB51``!)Nx1^G6?;-OsfwJocS&Iz+%5bD=oc67c}aZ)XNh7sfDw;ST*& zAa5aVzE+@^X`$$n+_TZAAJ3Z!TW7wr6&(^=tnf*ZXN;WeD3*Y9n~6DO0AsQa!H{Au zxR;iv`2+8Y4lKJ#*$^&X4O{yKZ(yoRioPTiXE{mq#E~Q7XY$)0TAqxWGdm;Kx4Q%M zqDlw4$-W+iCXbsqwV06A8ZzW}2j4;I*e|Tf>$0p z85@w})^vMs-)5@8J1<=}ipUj|2@Plbg%}1c^Zz@hD>}LLS$|&2+Rg zUa8@IC52k=-SiwG01AzB?&YKMkKQhbd&|EZB- zw)On;-IucpS(c~rTx)mgbt-ky7rLDxxj;G%%zEP;R%%cd)3qDn9Xg#2i6rD_aQKF- z0s|aU(b{NrO|5}@yTun5O8iZmJp!9tOH0dQL+~H; z^+jS??}d$2KoM%yd!%mBTh>$@!XWpd-js2xz00`b=eyBZ4L;f)_2MaMsngqqlXm7z zHTJ&vbHM?j)9-Wb=#p(tUDNP`2y=a?shr^i4yDA;@Kle^T-xopE?5R)t`ZK(rjsdFwbm^Zg^m|x%2t$^#}!SJs)mzx)Pd=?Cu z4PJ(Dn?Hcd@baN~fn7-8V12~$;z+$fLtFW}cra&sBy+=!UKjW{@JNAH!7DJyoe|nuL_&2h^sz_=d=`5Z)4!2s2`RFqX<@bb=2b}-5k#g+cD)*U z#Q!=XD=F%O!^#tjFKYhDGOzy6rP#0&?zI+Lv?!7)H`G%nD`HXnTnZNquvNiccjpOO z=NtkhLKI!vx4c)bWG1aJR^N))^bp^mRkk0;dxsbo|CjlCU$S!@aXT-__opl8JBb`# zb0Y>mmNbcpWBiNlj_1MJHI zfYqYByt@;;mBynUQoc2SiL8Oi*KI>Ujx)wFMTy`^51O^{{X*HJzYfd!0 zkwlo&`GkTE0}hR`lJ|7jY=BFy7NGZ6sRpxvRqITzPu$PW;)zhtlJn=tK+%nFgYh_& zh~Glf5svYY=NK}cu5gNSv|PTOFljFL1LnLD4}bC1jt|JGe90~xa?#F340#Swb zVWGw-MiEjOtV9kiJDA)`-OS6;lpmSB`|%(fV$ER7*DWNtUF$r_``V0B;aGwU`f(o7 zC1(hGL14|BW#9os|5~*`9x4ADl5#MmkjXZ z0`A^{4m;{2$HAB9)0A3r&n0Vhh>Zx1<-2e)($AWLzEPGFSd=tX`*$9q0*IYDa`fem6<#ue(p z2gPH#XZ7(+TL+~ZUlWcrAq6Nk9%xC)1hyCKnS{&SASC9Y5@95jii0b6Q;ew@(_(=Q?-0?(|vp@33_azfi-Dl*)p zy0BWWg;A=OBg;n*nb%Pn%OBDe_K2NX>G!+3A2#tjG|zq&B1bmn_z-7&KV+%aA~o-u zAU6D%fS@SjQAP;cfYVCTRfJXo&(`)nVP3y3IOE70rkUmuW+OeFE~`y> zb=Bs=ak_7=a=_~!KRgSh6&++y1|4=kv>OcRs!R<>s zk(fT9PZR&nW1W3#KWH9G;`^yZjxKAsnM>*pyv@(`AvFgl1ur6Sv)Ork$?zLqV&QpA z`_on3Czp0Qjvc~Fb{(cXw*8^hg6~F585ZRW`-RN|zNieuSRpIF*@~^MjBXMj5mU5H z_OK!^Asee_Z&e^x7n83zYjVE1^Sk?QiWAjmar*?&zf3&KFGZ()xiAD- zO{&r|tdz~=p4nME?FPZVS)BQ9%~dNzI7?7|ofk7bKdIO<)>{9F%#`Nv?NA>=;7{I` z$N{&BQf?QI&UQ62oRK}Oo<^KglJJirq&kKY7q2?LIiDH2WDT@4=$B)><(|X@#PDp6+iG;gBUP{?z-+ zPWNG=2?e5Ww%6Lu;CEUt8IeLEnsiip;(yot%R}riq=Ha5}7gkAuG4(T=zJb|gj0Djs=Ho$U;8-5;Pivkm=! zQC6o9usw7;)y$n)2Zy7_9ULz%#uNPspE<{9LAUh#ptheU_oi_tKeY*?weMnF-6rdIAs1dMHpw7WP7*jINvr{JO~#f^AW4ZT z__-o5LVa}+6YR|L-9su(>$4%>J}^kO*waCLgo@BF{4SDh@#?*3G6v*x0fRVpE2Bmec5^)-{pHk%7a3r_`2C8+v2*) zzQrqNpvQe(cP3cvf_Aqx3aZCkMpfk?x?W@`BcA2FZCgZ1459v?Y+eou-|dT&NY(c^ z9M;6uX!tYwJ2&_0jhYV_16)I_Cf%N^fAJ9~V^(rX7kLxPF*6=G@~% z)MQyJJ5Olk-cbU}K+61cgJfZh z2I#$nm(>Tj`6RPX`*tTREUbR%o=hLffyjE!#r4_l{upw|iiNo(j{)X_e>0px0RC3) z9KJZ>Db?z4&0(2;BFWeA%YZf(HWk2F3eR~t+1c^xg?TC=e!<{6q2qqq?z`*$+_s)i z_By0mTfbO*PN(RonStJ3g3&;#Yr)s*1`Zyw*xNp$405(avsbS|<%f`P8#NX=y2^7W z<&c2NSgCvc2!%!mT)j7Qt8NC882fB2QUScr0|Bo!*w%UZ2^ z5C(kE??QGRH0Sg(<@^r0qQ^rhI_WyOX~ah7BLGg~+EI_cNOTjOKn~eLCX(3$(3= zCGb2`LBZ``r7v;jql-;b&6njPJa(~Lwv)w}FGF|Zzg0#D5jw{csKrT^FZCW9CCM|m z5$O1dD@bUAp z?r>2wyZw3JIOOo>pXMDME^{p*lQ##cD(~CmK1w|b4f_k&N?o*Ojw}qxvv}_QMVv*p zbW(yQ*WP^e&==b*dq-SZbBr~biXJN`Dek}Dm_~aGAx)Z1s2+s#3Xh_toA>t;$?uPK z0Q#>s3~EORPK&Q*5`)iR)Cw+qfN1;Iv??toPlMvp<}iSnL=}`ZOQg{-c-mi1$Y0!D z1@pvG_E_3;uxToOHXIp@E8`?w#Y z3PC3khWY1XuPr%8Cp)sQ6Y)q!BLIHhiH7+zDWZF0qgJz90I`6zEKxaY*5WSh9t(Vq-{bU~LM4Eb>|V=%LXA`vZX#4h@SwcN$(n zPAYo;Z?6{@Ex1*pCpm*%&eI^~;^dRddp}XwR9g4WApm7Un1bD47Vc(n+fZmzFp%=j zu&r|D2^l~~WEHG)H3^zD7gn8=` zJJr+%rl>tn5J0Ajn>R zbG(mlyS29QR#!AmrrnGjuAF4=wEMYQE(sM<+e<5af8s(Ewje_mi9X+$<3_V*Jg9$J z^}BFD$xy5zt-_yRxw1yCVk#J1qo!ZqpWBXi5%q-%)a-B|B}bZFbS}hIAS*EFakX>P z1~Po}t=#)TLX%@I@!N?)NDNUDS%l>u4R|dW&jF2$7CS@{G3N>*O)a=RfA&EX%54F& zRt4{?Je@0Ro=<0?Agk(GLOF*92QwQ_-id>=%P@1?QNKILZ5-Zt3^QLH2c1V1N(ZMX zvuW$=ai;@O36@gHUV|X=@2G5r6543Nx*Um0e(4F<;F%Mfba~ zIdXDyOWAkGwu9#NmOeI=`Y!-QJaTBYmj--`*#q%;qCioY37*N zSPt}S18}Jr3ybY>>m4TvZCk&|O66i_^VOcam?MKK6MRZiclyTkrE{&$h0C-Txl2f#6`Yd$+XvKa}s### z8tiZ8oHsrv?WpPiNA3st)Tv3Yq7#VQQ!28Ez+D9`tkEhzk|F zc(KF6;-;BX2F;g-F)11nj~0%)cyxG-n~7-ZRh>633$e)b+_-E_`!KNXW8XjoiC1IA z;nm-)jxhI}UWSMoQ9%B6)kvNomf0#t8ORYh~v6)-BYpSp!IB>F| zvi<8xSAK@4N8|ZD-mnx671|2R!k_fo_zFj8rD7h;d1DB;KYEt9yhYOP$Z0~9=o7W$ zY1qN{*+9w@*4+Ug)5Sd23M`qwWqAa#NKjquD9)`2fB~z$ubxjhRyrh4waX@dGrf0@ znoc7`$cfti4n&njA4ibLfwubMSkAuEAm6YAAdS1`M4hRCZGPr=#x;s^KXx4H|Xohs+( zW`^SzR!k|z$XDO23z!bW}KI~b-p#Mm_9XE%6{MnJvOP;hc^T@Id#tZm5%OhxF$B_ zTzfj~Cr2^Rm*?noSIH|owJ70g3+jghmcvDQ&V|D()ez#-D=pV$!1-GDBsL`T$sooe zGXfcFlI{BPYGXEFNM5AO@r6G7;FeI3QL+%pZ21dr7$ofi6_ftwbHuQqt&_|AH2D5j z8l!a*m2CZ|&CKfNKBNF+N;n}Lb$ZPTLwQs*-A~{QN-P6| zcIO;*HRGI8j~pUUnvYfb;4;r~FQZ7D*WjBujAX6nAThq8BkE)iiixs0=|leaZIL#r zvkvL85E_ca*ytB*cmuy&h9eFqg1b#VSTAJ_wFsx_ej@cUUwWtkN)TzoK7%^FeyZT- zD3%(=3JB~`Zv~i1eZ1VsSsP}T$0$pdB~%u8{`^UgZ;xM%IbnGw0gHr+!m(42d6}nJ zO0GGv|LUQ`dn3l)hhJ_4nHE$c+9BAYH&(bEY>e+rs_S_-FL$crUn153LptMC-JGa_L_}{2M<>$7I5)U zDeV}5Ud9RKw77Oqh?8S~*TNF>#-XNgFISo>Qw40Mru3F1E${hGkyIe|>C5xgS0n3P zbShTLS2hn?{J!vmk>~7QlD74Z%HxRU_fz9Ui`wCWW?d{PVyZ5J$fauW!dN8Kr#tQg zd((%;=S=Ix;Epp<+Q1Y!2-q*SqF@F5QpdIuL=JMM+`-Ro5*(MV4cLOT_HfTNo5`!_ zC&BBB(0mg!n5}kgoOvhIR6J#&x!{o_UAH4Px8alP{quqDu@%61$VcPbYoKK3`1;7) ztveE)+@#M~!pNXmK_`cR%v-aiv*0?Bv_vBp2?6!jPI=$tv3Pm0$H|_N=fILUr!Bjf z)skV>*kAbKh?L~JM#vr*`_9f)ijBayN=>{03^~-RI7O>WBLBWT@Kw?ooyglAw#&JB zc`MV?Z&-}4*grNsDi{6Sy!WL|G7r&cBHB~jnw6v6JkYz-vn((gbdORCuRX^}Xra_N zur{bCj;r~mRbO9^{rV$@p5k)Q=A0yt=;P*O7{kHmPJ`bHQfg_+JEiO!sSIj<^p{jM zK&A8xz&-n>NdtVyvE2*HsQzQ5fQTr`3vqCCgsb2&0Uu-{v`RRGZyy9ckS@-LU~J9L z0a~`U6Iu5p;Hcup{++$wW{9I_f-{st6PL0N+;SR5~CQk1Pb%I;NMvSGXk=ArwU5{hCxF4wutO( zH<59_Q%y7a9ngG;5Uoi>7PJA**Pv?+=#&3O`QwaQ=-g*hgr#{kq@X$d2T1G4SXp-v z?)=`Wu;2sH$>1Q0rU7=Um_VtH4*tqci0lE_`4xOmE^~Kwo)z`FHO^x!Fv<uMZD3AOZjvw*rPT{{H{vB#oORG? zS0&0(nJEr1TaJG4+@CHTo@>J@Yu7F6{Jsu+P~#*yklO#dm$=e<$Y!@N(H}!Ucqh4L zaUXr=-X^?a8x%N&MF|KJd`Yo|d);4oU@7&IiJ$CN?5Hgd6###YWvqUX@>=xXY!opH z;fXoN3~5b38r+6_;MguVz28E2m2li3L^ui9vJTD;7#P27x+El#L%$pGe(FOBr0<=$ z8Dg77^7$ayXxX1|)n;+Eq7z?6#ZrsT`JKV(oy+oP#hjqtjOcUg38Ztta7}Pus(}&e z5Zc(@?!x>pVYP#qGH8UCW6loIK%$DPZ_D*Ltw68a`Vgr23+hJ9VNYaZwJQi1K__C z>xDyl#Tyv&j_k`jKJT|&VhW2URDODiDJUER1OILVqt4ky`F_8l-Td*Ary+US=SPY1 z&I&)u5AvPp4M8;U{PCCVNz>)=cy@Mn8m0_W(pX)xD}DatyAE4DPC&(JOH;MWQa8CH zNx))bKE;pMsFYaXy1^uMwUd0cCkA0*P9Z1C-diD zIx>JKmQ9JT+I~>nL2v_2K|c8ETat5=(S?DPYA=~#lf&Q$X!+&*0Pl|@nEyd)+uHqi zwMXJ6VsXXFRpIeAlDb(6&w-N; z&7J6C>;|OT9rxe5@(AB75q8`3tA@InY#0sfnd$Qe;angztd7pvha#|9bN*j18Kmj? zL|Dk8+tOqWbEgC@efyI9TZ)5~4R*qn}gXq1{x znEnvE@NG+>Ff7%YUmkKUpTrlm*3z!pF=%)z|2zWqaQE=w`;%b71;*X;Y}RePzH)81 z!2Z2sCen**+m4t?q_y1bu2M zXST7T1aw1qf5yl$@RevUgMIxze@;93)r$}$X6FG<)iZk^JWno)3gJ43$-(Z)EaBiG zxJ&LHD!k=avy)Njt!Q04wU>N>248B@WI5grpR!dE@mdPS?PrKJ+MciG4oWp}TLDsd zdeO={1poSORe{RZ^IS*#Ru@P#w_G-B1B27LgOmf=zIUxPNp*-Q*&z8sUbH%U5WiyC zy))oh_T}YBup%B00U@qZBKso9$r|K<+=1m5*XG;yzrka^4C>BwFtm9-M{`E9Dj)hQ zeDIx_H$ogiYb(JviU2hY+1bA#C^&Dz1{-1ZWe*;CXS79pM{TLWGuGBEs$c`8LX!Kj zMzTqCJ7(TRAHr#K1gD@Kz(3g>&5@e)O`|F+15^Y{hf$i1VCAm6@2D8IBk_JiL&K|o%PlLY z>)t6=S{yIPOEborT4JRK)W+lSC;$1us@2OkS8YhAn{T}JQpVW$apS(hO#~}5*s67c z16bbfz4~=%XnCrss=2v&?L)72opMMjl^XcM@xpc9HDAY>}$0;q_HxIA<}@9}hV8>^SaLSx1D!>JL{#h z{owX5zW721=zS{ii!VNX`{nU(|D*l#M-1}kFTQx<4?Oj2aAx(~Xnbc>NX_PgoaV^b z&B5K;6T4xK-<+lwVSwC}sGzjg_|e$?dQ*C#)k zZu_&S789|d>)@oWq4)E{;3V=gLy?OV>1IYPhry-k%hA$_XB!lh>!LT17YQw(SfXxz z>(Of!meVXBEV2w;w>EHR+{Vh~V^i;9amWnX)YG`QjpFrvW2Vr7 zF-EA9oe^0`sX4=49UoZic5|+(21Mb{Bm!K@Dq2q_cxxUL z%MRep4+ExN4m@&mvHDV5oB!v>A9uqS@`?Bst4hsnw(OsCFRo)C<@2Xsl4gcU$OJO@PQ&8uEl;O5hk_xJ4vj`#Xwe@Z6 zAR3*CDBMnJ{h2d3XgPh1g*^iHO>Dt=%^{!QoZvD`u<#`qoz1#mVuv#VA|o7t{3jV? z+(V`gdYHuYwFCjHe!hUltuK$paM~BfP2JiukeZdLuGO*SFpr9-7+g^3s3~~- zbphJ_>PU>Ke{IJ-+$MrECPfb*xh|$rE2V{BQMw}6jyA(Oqlw$yJU!8`cgj{$>AE)1YP61aH1CBl&>&pVunvD;s=w)$=E^seP*C%}QUkhM~xi{wk z7W+u5%9@voOWT+!zo1|HKd{T;?*!h6eeHWt-{n`%KNYFyB?7~j8AZ@@&C%(xC2C#{ zm>8uuFnpLwN9iuBrr-bv)!-d4(67dcKjPOrSXSua2*DQ8h-~U5ySd=l*Rd$`!(HW9 z(h7V9;tz1|wb31Tfb?-K{F^<1=D{3NF!H$YO>-j+jtY>`7&A05989p39Ib@w7A*@2 zw)h6l8;3$M#fS_0T#+Z z{W~8p+s!}^Cwihb99k5=$j03l6oJh2CZ&>YqNBV&9Ufm41WVjh-?~if*f-LVdIQ(B zxgtQ9MQ0b|p8feJ+CgLI$hE|#l=h`Mrp*~CqTDv3>kW>vAGg*)x89aJ89{!)Z&Z>D8){O5 zMhoIrH{bMcg5gPABJ06%4@*}2j$?yscgqs&CNpKs#8SgT5-qwrSP|XFV86{xTVkxJ zO;}O>bkxmiLEmUI$o&*Eb$8CIHbn>{%7<@$Xb?TW9Lz|Tz1Mv zW%WMp-u5035*zjxP|!}Rxy(d+rx#N{JXD{#xHDoinv_Y!(NV}7CJfF5pN|OYy;M`1 zBT7k(To+RHc^d-%f1;?g08W_4Y6;F3pn4n(UE6rrxn>IwC||mT-C!bLnmyT%_rmY})gX%P~LxGgx>j;XnNZiQb8|wN(|Ga zz^T1@$no8UnKyBxFflUzm1XbKw8=*vtmKCY>XoQ}y}9Ehv8>veOzyCR2^y1v<8&iQ z5F_ksp4d-kAsv;MvRf=^8$Y5QKu4LE2=wCEXdM!*c0~=4MC2pFt+|A7a(}k?C?pY+ zl@UTZl%ve%`MBKm%2>Xg+hc1Fa)Vv+%Jy?}3N6W=Q~+H>L8X570eQZfuP~JWC}{`N z_|g|!{#QXwcnKQ}fs?4RcHC-$=8;~{062-pV@UmG@(bg?S4 z2oO)LW1C%|t_f~EQ4LFU1h}z$IgLhSQtB^v;n^&!#bjNNwW~nia%+fTfJ-4cJKH2` zy)d_}@Ozj*WDDO!vZ5$B3{OxzG%JjU2b|nfHQFj%ios|iE_n;|KcaTWul@m7ez>!= zyxe2M3J)bA_)2Q!=s7hFFN2^MzY@5JOR)Zsg1qQ+8{oBFCStwuSNDZ&AYe$m>>MCl zQl#I7doK95&;6$cw-EVNe#m3>MrDTC9r+gaoFSp?&N0KZWWp3?#`_I7ihZ9Y0jVoO z?G;TgNP5O%@B1{YE#Q1ffO#inky39kj$id-k{i_awx4Zdh52rCKtCT(b+HKYcg;0qtVvT=_$@PCk#Q!7-Wc>2byU?>SIA zI_}nFQrQ!KBXZK=nf+x==%rOPl<$?qX-fa+wLN-yBp!Q#g{h99Km=xBD#Q~Vnk0BE zg{955#(N*6vn~NkBvK3Tl^GN+B;`yCFv)GbQ%u=(S6Q*ho0O4`TSqQXf17y4zkfbu zYpega4#!%TBUNGFyFGIc5)VFQ(o$=1DRZq}8gCTsW7R8P6Y!PaIKO^lU^4wA7Hb54 zYr5Zu-;qwl*-%~st32YWabK%M!|sl__`FN5auc@Wxjn5-fC+WS0a41v%1&VJTEEDJ z5xVAD9UD^e~5%eUU6YJDZkwN5y0dx{T_P#&5T35F~UV*(V41g^_S zU-L26Of?}do6}5CHdicXz9Dn&8X7oB3Rc28)OtTj5fRE6+sW9~FFvOQlL<_?8`tGo zkioI?8OVl{NL8b;nwccqmqfgGp{`}Vp((@l23Z?&$(Ohp275|pLROELokxWK(#L?D z*#9uvO=$;ct!ISF4o62vAi5V97X}=qkI^&UD|)?!`G|voiU*;ExLFlHhBNW-;d0}r z@wfs1c>VN?nWUODKaD(Ve+>?OJfinfafg~bmc)UiDxc4kM_Ge6*Hxg}^q<6o!j_CX zI6$;}G{^F+z9oL@sY^@Lr=}c5N>kStCTvDsTH2QsNRkV`qilT08gY^P9$zNEjN8MT z?VjZHr!2pT$%PlN|tow2|GQOIG=XzlrxAo5|`!Qhht>b1{Ky8E+T>KTGM| zqL~h-<-eW6F$ucWp8SpBOTDvEPrDgc`t&^e{nM$?nEL2-e1Fe^^i0NbKO^GsF|gbd z5pX5W>Zr%zMKD5VL8+P0FefKtGa|uQIDruZu#B?sZ*EoA{!Y+Tj=MX0lntV;7cJus z?)Q&Q#D$6wu}&<%2$E!lqVD&h?`vd~-TNFY6z&xGO;2zBP#DS7mdvI9?RFwr_%pE3 zMP?HfgV?=y2BDn|jMVqmidyW8@ae z*eFS6(gFO9I-F^w$h;P zRRh$c9+oOqQ@EM%X}B`>Q8%wvU+c_q6Ko0h8vgm1a!Sse~`}|&Be;ed> z3J|5|AdT**w09N{CZ(|swVs`n4NNXdb9x8ZPhaRd5u=G!LQ+|7RSK+T=J5*JR(g!r zci0TOa=={`bi3=2S{Bcs7t_rr;Aim66v6>x6`$9)vjl#*a5}{p?%|p6!w8Y3lIkZC ziP0WF7g&8wKGc=2Z;Gkb^$eD7`C#xzzNlgV=m{8_EUUT}?W5UMzrL53o84n8?HX;2 z!xq~N^4xDNB0(3%w-}ZViD8PfzQY(&TA#P9@zq}1hQ0Vf8)R`OK9)KsIsg-2DY@bK z+V`1g^Wsi^>XiSS1EkgJDdcFdltGJc4GsWEnaQ|NPBFh5*P&b2C0Qii%;nz~BF!Yb zUiKLoy8wcvP7CxAv#HAY&|5L4stt27Ic;e^_%dhtg&FTL!q_yLG18!h2Dy>+jjbCH zYdy6y;b0O*erEzBCJY;H8Yr5+XFtw!YMvwlnBO#1aiJs}-VR#2Xekk>U$*tYIxD%) z%8a)B@V^G~kF?Mg_)|=Ghquyf{pv!BZ`X7K#stD|0}23)q^fd^j>NZ_9A8s6VhV8& zA_{WLr}|18YiME59h}~osYgrzn5g)m*}HSUU=IF(bxV>*sNJ4A%LcS>E?J>zv@W{V zkACXX)L8kTShDxv^VtDa^V$l%c;>E==`7n9kM{ns_vbVrBbd>=mPw#Yo_%#C%^*o~ zc-Yb@u+>MlJDik9P?DnPp`4~EkH7lUJKvO(om=8+?83^Uz8t+4NZm+F<}^VdS!SsZ zqYZoAte<1$#>=@loM-JKXL)xFD(#u<9%8!Ffj8pcoDR#jZEnx_g)<(_I9C_D-@s$@ z-T0*ObJVROH-ePGTufdiU1n9u9iQ*eMf}2fU2sUCMF*_s^~gY5qz&uvi3UGFfYI6v zTby4!T8Se-a9Y_VwI-J98`4TbAPk%NXnie1BH|9Zupc)qEV9)L#0!L3huqQ%dT~lw z@6(g@H3vRmqh!mtDx+R|fUaZf>J$^8jN>B`FK6oDdmIOSF=2ROv?JH~kcY=qMZRZ3 zv!i+AL9a3FF!7=KTp2uS7e4>9nzmB(mqGMvbLk=KpxM5gF$>#vz)jbu@0AExy$aY4 zqp&WASHtB$l;8EQZ5>H>AUC_}zKbJ_*!_z6{)#-0v4y$Vh*b%e#ST$6CO6oysU2c> z>7-V}h#pZ62FqExcv|JqpWmrPy@ulF74!$jHbz{%peQ$~t81W}Q-}-H+z&Tn9+G&^ z!;u?#E}*38pxXd-Mz7Fi+7yk-e4Xf<&^p)iF{19C9>tifLMlwj{oxLe{n{75x=1&C za;I^}e(MKA31mK2a=2;o^2In_H(h2n{dRK=8$~+*B*5H6MNK%|ltLXg^;khF^0~3t zoHgeVEgF7G=`DkxYqMfUL<2ISbXV)|*z%Nk8L?^RTZ?z8OFf`!v+0>vxrB28vM4Y9 zY#y&DgIYo{Rn9Dw0@DpSBCNgwil||iA9Lg{|2=s*&|n)FxRza1zZ^j9Zj2$B(y-wGNRt z^nxe^y}G(ORQW*?J2;wDhVf556mAD$rJCozi<9jOyXKJ9U*3PH)-BSW)%^S5oN%b) zL;sR5dKv!yuvW|oC|i1Yhwjs{h|)ucf`8#$H{M?sY09N z^AH1VYP;*g1BVs>S!+T43hg4(?w`z8_a2V|I(lA8!?Wk#QSg7g%325{PWb5_&;dg?au z-%~1FsxwM;yOL?a^xI}C_`-(>OvZ%d$_4H!=C~qvp*xh3?1qoKqi+dEsjax=leiiN zk`=_=YYox8bL_yNB-<1d85G#mUk7FTyO(^H z70KVdKRR9(&+l`NAd^4+2ms4{^EP0Hj9VLQBVNdaKkpq%1g_1U+WOP~>b}3EHLbu@ zJj)>RB|l9G1d~dIe(_Vdz@DOip`;!wOXHv z&?wkxwn$PX{D;9<=unW-Vv;q>-4}QwX83fte}Bnl?hZ$&@Qu%%n_*t8aEa z8+QG#J~aKV@_5xSxlbYLD#z)mP_wIGzLSOc;}d(=Wnet;pojY9LFM_3!tc>Gv$8tj zr7M~T_a1~LlEiC;I68CT;c{`CWjFvzo^A7_0JD|9uG{xZy~CpI`~znz(qEv0AF-=v zx{i}H--Z*59a zzD_MH`Euv~s%cSV+0OTb$wA4Hp~L_}MniUtIw$tE&no+{#-|F#VoL*T;JkY#2AjnS zftT>UEye=$fI3HuIZsJ=*GR&8G_J$E_gv-T#-6`_{}*l`XBvrarl)3VFj+ScncZ)T z+Rl*>fCG9oaaatgX6%fEz?iGLJ6+F?2cKsbRuQzCeGf+@T^V_tz+RXfM7?Y?{##93 z$|4~PakPAokkPd09S(FmlRB#L?&YCTel8z*ebnfC{0rTf-b=dqa{Zj;X`WA&bNbAa zMYSx8F!H!l!j0EI4j#Vwuz89<6_`UpxEysvj<~Zv5$s8=Af-vc#L!cH3vuRHCJFb< zXnK>s>*3nt*=G7#j+R=tAwfy7=aT_OCV1YkWH^SY3k$k=ull`66b;-__;aKH>utp9 z1SQ+eMUBJHGMsSH0)(lS)Acd{k3sHSgJynSTpXc-A6RoJFaYHi0)RKIWaK606l!mz zt+Ek`!moB;sVyN6djwV;uwNK3WqK6mWx0pcu$Nv}Ohs&f0f4J~C`P?+Oo|V8hhP_K zFoey<1PC)enB*2R+YK{3In!;6QNJ8;0LO1+Lo7XrqS3=6dQFj;hu(aKq>*fX;GYHg z5nWPirQ=2;1ge!6LDSRIrPr1<%wynkFd%`KG?L_mG5eukA{a?(J;I&4aC-PJ;DO_u zuOO)3`+}BB`_2XU?dTow;r0u|zHYAAZJUkO4DCr51dO2-{YJeFjod1UsF3)ue7#4K%fcoF@Q z@91|3!>iv6duMCLcb#jUJqtLDTzZO*US9<8z2<5OYt!$hKA34%Yj4?n=^XhqUI3wv z@;B4%X$Kpk8c{!I5OMq0r}8ea0)*rJ%VOElqwk)+_vKmF-a~F@9+wiro|Dx7=K6Nb zc!@b5F*O&PD>8Nsyp;$o(+J3LKkc1+Yp%tpROk-8Im@ljR&(nSD4w51?le_rClL+@ zDjy4>QC#9gW|fxcco5ezGj(j6dQwY;1D4X!!#V@j8;^t6T{kceF%f-wUJ3Vut*~|9 zNTO{qhNJGZ-u&uAim!r{)V8|6X1JdH1vX)%ytl3>LTxGhbgyHKJ>YCC)8%s}Y zsNC@`qS_H%-n+hQb$&K)$Te~JIFQ(tdB+)W&4v~)J4^c5Lc5Z@y~gH3f4L^2zu`Zd z69xn2OV0zMj^atVzhsG?VC5sXcvu3gp3zLI{Q)fg!!Y+%TcEOU{%{3lYT}L6oAsB_ z`!(6T?Z+yYcR70G#7>;Ydrf`Z&vi zn3DA(z-hw=n7hh;ir(ch_t)}*zUBZnxK7YCrATxHIzP#Ml2P+D=9|bA7-Xa-<0*+k z|Cr_BbdCeDq4{xkD|CtHa{H11Et-Fd!>0qKZL?8{OT3cUIY(L@kx!X#y%<{m11+%^ zw&~d%o#Q$oTp>D!xikAKG)2qPh5d|d)B$(ynm9%IdL0-kGg4|Te z_-*ZtfetiyE$Gc#_^h(54SJT45!z(5Hds+LdtfB%XR$C^*`Y+SA}t}li%ps_YRU?H<&lyA97b2 z1Ld9Xd(p}C+$r!gWBaaKTC}q!!e_GvEQ zYQI|!pR`v&Rv9?byvc^&rFa$nSmUpWCDE@Akf4+zsJFg69CY@De#vhpJzY3zsv%l#1QOnh@i ztj(Clj)k1Z!*bIKM^-Xkx0!RPD6G+}H2#d>=sj98N`9#I?~o?IDZZWqcePYYfdnc} zzsUj%vzf8bnq0!Dk0j7}eQRZud{*B(bzD<0)HejI+C#%eahGwWDU&*QBd-)2o62$e zkVfl56D#EI*`bINfBa8h7fr1EGV;-CnG})o`#>@Iy-V%5|2lIq0I>=%VXU=^LmeHa z+3b(X`UfL+Com{U@9Ea=c!jkyKCwoty!Y!G2T~BF5EBXrGJvNmZh=CIe^6;#JJwESF|aSzE*k2wAr*%xtp+Hcs_*y zxjo`BL^Q`afczi}NEdF2zs9Pk-k{4V?uJ(O<C{w4gIX%OI~DjJ99NXu_BLJIb;qjm{z15qWU;r zRyd?f6naka4&1&5wZn_Jt-6eq9AGzW9a)WQwTb4tpUBPzSr}_Xo7vK1`%5f}$7j?h zEIyDb97>F10(Oy{AV*Fz5Z4!p`E9sph>@}|Zzx|v+OzpGc4ns&%np}`V}vq@Q<;Iv ziNhGD<_~39N_`BcH92yG+&OxubZTRlRTX7?#demTn|on|P(ztfDyG^tGfI+O`0r^w zA1mn>mz`cMjH*1mISi_B$X(WOVn2*4qRt~*=v|N+auSPmwu~a5Y1X^9adf&RAm{2k zM~jzpAFK40br5NC3y9}Jt#sK34OI|t$UBrhj#>H8x$RXn!5Hr#TV*Bg`z|f{6GG+n z*a9XnkhJPULGcVXpv(Zii#DYe(igHPq4(<$3QzuSyB3!+0tlRTII)2wIi$hMLJ0J7 zc>nzam^z5)o;+$nWu+q6@w0O>Ax^a*^+HiVY(hry=YU#brQ@B(J)4r%wv-}W4{Z~C ze)FLb&?Bn#Tp$V8zw>vDb==;51U{D17j(8=i)71VRv&5g12=0CfgEdMko#J6@J{f3 zVMYcP`nG4mALDfR2*mJB`TBQ(aZ4rvFPGFS z^amNc@Y$h?*e8{Y%78W3eS@=sZsa@kHKJB}#s2*G5=+z#+*ED@-qpFFO4n`VIPY2$ zO{0@HUa16LflVizB;5I0*VxxPfrDMkE6c@t<}tzz4H_=VV95SI-TGU1t+P|srv9&M zOMkOR_Ga6zoYik?7ES;i#R#azo1YHo+$wHV54RLY4Pr*NY4L}aq>?3VQ(6fj7IJW; z(n1n3)gIc8h_zrL(BrkZRcqzMyMdRy%7oehWO>?s`aBT?iD*X-Teh6L2O@J zv26(Pxxk?%F*K9yB!e<(M_4-z6$OiK`0PoooWfEa#FHOK@>3oVrnC>2y?u~T?`wY- zs=6DD{7XbN{w#Tqp=xEtpR~hXFOnl?okYiT#Yh!-Gh$*N|MHK0~*<_8DjwQf-AEMvQ~d;Z0@Esy3$PQ;=b(a_^jsIEs91^KeAg;o0;3 zK(=xs6`ccp-;af_85|y|xgpPF9x!8dK8QVQ?O`ci{Xo2Mscm=3)kFtJCnyw%N1Vz!ZP5ZzXNAJyzKqq0C&1+%F=mP;SN8G95#$!bqL+ z$Hn2i#ir8F5#)J3O4Rh?cqo&~$$!vSe4uEYEy21W^8VW97b;`Gbq~J}-0W`YHJXZ}WmxKS9_u==Yp5@W$g} z1Edy;%dl#B|%vo~}2s$)S^JYY1ObGxAh^4F@(t{h(2U1}d6PKO;N@QzY zHs*Nl-Kffu%X+lulSwmIZy`r%q@rsR?|YgJQ5#t=Krgz@nI|~_?8XN))KD`tD#+bG z-BpJ9DrqG6{lgvmbT)@3bm;bUr678t7QEMF{j#uPxp*b@L5k>hSYjZ%%!so*ksV;d za_{Vpx|r!^8{iP*0Z#J@m)~7*p-MDO2O%OnZhNEDWw~UkWR(zZ`xWfyr!E>cupX^4ob=T54mjnQ<>sC~Za}39w z=RX%7!NA=u_D5c6VK2lQvFM9P>}zxDm#()6_7jgrtvQRs`{?~_soe} z8v3l3-CgiH`L31uB&iffR*6if;f-Acq^r0uMypYg4jnv*Zo4)e2+UQpM`whC61a16 zS}Q$(;xh5!SZB^g^>XnmjlRjW9{uc0c2jU-5GpE$K%5YLnb&Kp+sIFx6aXd67hoPK zIKT+v62vZ3%dRpVK6Uvj&;ISCt{LvQ$~=TrL4r)CRhPnpCCQ#^JwFVBg4j;BlY{-Q z@x$$HZXS^UXKLj6J_))GRZPlV)p)3F6MjYQdeUb!NueNv8dqWgtXAGE*ii+k&K zVeBL@H@dSOX~Ko~As&epFZ~j|L-`{(gyP2BF1nv565KZ&aHw82mb0V zj?j0K+R}Yi`v6nd+=%JJEz4r(14HKhq^z zLviL#%;i97Lm<$lYcdfc(|l(wZnl?%;j&Tex%i8+K<;p8X{>ozv?qb=!fnQ@&sD=k zy|yhMG*=1dzKe$Xb;tD|bgQ#z(8he!2xv}b?}mI}Q__q}oA;Jbhaqki~#1q(@KM4W@Wyqy*)pe-0rK0JmOkUr|L)z1i|+;p`d$ zuct5{C|g>mBCouoIRu;)cam_BsOpXg%>dLcf>Rkj>i$8pU7#-};9tC=wZ^g0ZMbK)!?&B z^`*x>9CNDkB261iX>uR}0*`QK3S*jXUmD*8Zen9wkhjm`uPjq2$oaWLf z6rx_N+JSL^6fIF;UB7Yu{kP~$cHzWcfYw%Kj$s{~UhopNavh1F4@<)}2a@`WN0s)Q z;I+t_j9XgNUvnh zDQ3J2=#uz1`daoUoXte3JG*Jrgzh32Y>G-RIt>@6Ts*M=@uvT$p=#mGi`6|ro^N)4 zPN|61UkcagN(JLfSFUC-h=I=?X}OGcND)1j;?t7R)&6-<==64n7jxR<%q9DcE&3XA zH|TEwt=r-~#z_^ETkcp0j9{QUdPNL2f`;wNTg!>aYu-wc_eOO)P z@ju%@x?s=SZLL@Mr*7)U{^S+s`6i_5fLv?C)OC|>&M?&gan6sOI%A7$iv|0s!(GaR z9X8n5K0b8R?VUEbAnl4^Jx<(|#x1>mqGoEvSpw(3Bzzr4aQbOtP&nKiWjU=wh3IDp z{e37fxfV_iw-0}UljN=N&NbS*#-G-|{>F!|l61f5nTQBmY`Q!NB7t)KNWE0(x8>sz znjT!Z7!&F8eAbUkAt-~JoFtDc+!7c>mb@Kt`C@JG+PD4!K&&iKM!D6iI+fPIH<|I6T%+ysKTB`RX%f5onv)I1_sFc3^t`BA)GvaD`2cPZfcjccpTU?d`c@` zDO1sTd3h#`NnwmH=iegS!-ro2Z`{~|&fB`x1R`ob%PI3eWKv*Y3|xHhH0~51hUHT@0tKQ25SW<>>}B zfgI4+%K10YOjoit)}1p9BtEzjhQvatP0~yiC46nFbVW-C7FR&jK+;LEj!z z+)PX^u>-~C8&F{>?C5W1&I{~+Pb02 z?c(Ns1~%131GlUTOz`h$I!nF>KgvtmAc|~Ygrim*8*%i&NdfbRp;&A1lTB;jjV-z+ zo#ta==MY`IIm~5H7EYvCus(Wg3J4TRwAxHiP4Q^tZ^O-4g^LYYTaUbW9`JjA^}(;qNx7p&cvE&;hD;rh%ufoFD9c)z^Wa zDeT%}?2>UNL(=CK?=a{Qn|&GpKm0ijEV14{a{d6`?|NHGTmUy*^@c7FH=V}sH6s@a zgeM&3Y_q!0o7*U(NQWeyeo%+(=k-v!$C@5qvzh@>EzAhudhqhOxzhq4?$d9 zd0~6e&XX=JNm;O$dWwJgDgmZ$vX>>MqtMZd+IMtI5B5cHbOh?bt$7E;?;HOC<}c}b zJL7VH`6z93Q_SCOaM+2wn!FnDtPLA_f z3CNp&A~6OZ`{35n)N@l+U+J|Ehhdb$YbLl|KAaV?n+bT$aF}-`Yi(T|t92tArS3mY zGs;C4pB55c2oC%cM|YpRNwlbeYh!f$1&`C)@if8docYDD64NOA_!gXP?CYhCydppWSc<%k-R1o&LHb~Nh%XONn zks8~&R1>smpJngz#@}oQsns>bbI!@2`T1%IY*YRx+Ir*p#D&WonfQb1@3Fur;!H)2 z1N1k}b@OFl_q?21TK9}q*16mxA3doto{PBep{59bl$Uy(3) z30L3EN!+T4dMa9&uNt2ejMht^j`5mcouWqk>eZ6j@XlaG7HZf5Ky2(#7%RUT7ZfE3 z?E%=S#1NVU8%Glwx6Q1Ze3m>=lCqA$ zIX+DbIB!0Eb5K@dXJ>~?1~ZduuQ2BRDY_ONb7uT(g0=tkYlBCSVGkYBTjXxv09O~J zv8G7y$PYl>B*?MNy@l!_ZUWgvN>?F(J9KlaamJrMjY|4Pr)ghf4ydo5O?ZZ@-`982vHuHglzDNSE+ZG>_KG&#f${qA zYnt|yYuALi8bJ(4nZf5UCgGO`!!!Di zg<`Kq-RNn3eQ)ITOhuNf)6$qi8`aLY+^~4HSN*Qk5!NKWED!Yln-XPv&zw`dJ5dH@ zWiAOfPujxPXLh6vFE3m!s4WhZt0f=xs5V`vIX4asCu$5d?;G(g3CvGA^x)c+%|CGKj>%=$ zhLBXMZ`r_U2Nhp-Td2M&>8nIb`fCK_5PVMW18fM1($*TokGW;Uk##@^r0R_QY_U36 z3u6M*VOs5{y_j!1Y`NElRZ>85Vm(IFL!9F7tei89ahJCDJ|#48`wo`-5H`MRb$?B@ zkUS<#HPnoaPdyc`Yc)vcmf5rrwrb|8e{;4{<|!lpwf61jICN5zE$_DHzDP$+B$U7WPa{oYd}^3Ztt#7Wo7Sa&B{-XCiyqEjs#m{LMP)QIU_ubczH4kYx&E;S8+2_@8w%P>TvlM006wL_dPz={-i8{=4 zd;gBTly$;>bgheUr!$%PdwKEY*ALjGZFkU&04ex%Y&>v7+rA6w z)!n(%JG|o>9``Ec9f-5L@P`<@j)NXIjur0UMe*%PYx4V8w7in$IhwWds1Ef&y9hQ} zZ9X2~s+{Hd@)dui029cs)2(9RId4ABH^nR;ppA%ETDUim`6uov!)1@{T>9u-Je5r8TxTx3@W1Lox$;zO5EYRM#~}(b!{50qqd?T+cPhbb7=1%YNtu71i2^ zEx~YyTLVO4F87(GJp_+n>f_Y3H^j<-6tfZO^`@V~@!M z=Fv1F?i-NIHG+^}(?e~*trx_Q*|vdf5qL_9P(&~^m9dS*GoY&_R$7<2G6XN;j)STz z5^wP$t)#>e9AH#f3lDzlX~=b!w- zN#{j1_OB6wlXjKa=nS<0!KWL3_gZ{Z;v6{<9tE4)4$NmLO??*nmsW26k$v&RmMVEY zyVo`+N>_i?4yf9gcLfS4kRWR6+qXpj6V?7VpwLm_Mhd)ztvEC%FK=5TmHT!`30>ad zj1O_ZLxzZ70*Q^L;Klo4XzR^arqb4}BA1vz`8Q=c#K8vF)f33x!S_9TbE6#M`~3|v zNaQTRAGpo+Sp#%v^2bEO08G>cU*=+%HbeHo7^W(dy%v=e1*gH7X{}#)epUaF4uYN7 z(YrSq!hHYVSx@FI`AGYoIt#`>LGqSTv zvezR8y?T@F;mwbi{W(KgVEW@eVPt%7&i)vmdW`+7X83E(=qNp5cEPlCRZ@Sb zY~7R7=&>0SHPA!#$t%Z)b3h`uw5b}HPk3uw!H2jgM>>y3651az@qNesJ4aF2{NHU% zABgotd&vUN!Y5~=ZyP##b6_;+wH2(Es-V#KwOiKF$91~7*6s1giISA!r9tfa6J%%f zMv-Msc}48^8kF1_Ou!LIF&1DcpG=@{r_U+Ur{cAYy;07-NNSIN*Dd-7u%&%Y4@tb_ z}Gj{5aO;Qh|Fi^vlGCfJ$M*qU%Y_j>~%=3cot$ zXwdXC_2)!6Lse!M`}#h5c;90Ee!EJ=ZmmE!Fi^fvy9hBUT;$nAAD_Mt2ACkPjB06J zUf$3MX?t?Y@qzK<@g-x258Gq3JyGR|Ew)>4@VEwPl1H?&_FG3Do&GmA#%y}G#-ky^0l*$fj-h%|+X9#)dn4LBwkibJU_a5a>an*&A6 zxe&*DytrKcOZp;ZB=nZaXdcejUDobqVsP!>U(se~tJ?<`op$cp<)htt!IrmWExY35 zdeXcO$Ag_)NCN`xKFSUMFGeqyN0~^e;+&bel4PA^HyL$DR*M6jXQnJOKh?4RFkv6w zN^bU-fIibam#jmy7KCs_13ABO%G{5|Qz}V*CEF}dd&IO{y3@hN8X-9<;ftyH?_{kS z4L7%JsXis=QKC8fk#A)@tXdAV<=WBS;X|fk@Fm;j!|%f5fBO zczR7&{?>g@Yi?_rD?1zhX3@B7V}8oiOE2%mMCX2Bf_2U_g9n4afa(_tINg0F5{E;^J0FX4J1fl$!oNQ*^_{-rE%>P+Kk>k zNI}2}`k*@=iPwe=t-0DQBgs`T>;!vgxbNem@OY-$BSh{mfS!RK`n33accd>T&aUsz zx`#2es_H+HrnBT$(L#~4qVzsEME0~SRtJ(}g8m#2^ZL&BZ`EoN?zlC_IINg3yN%j-s_lAZev9fbWH<`)Bz}4dPx{Z~xh3 z4i0(UfOh{&HH%XFx6UL;ReCI#y@!(ArHBLCI4irQ#$%STGNmcxdOuP%%G)5xN7S-f z#*3&E_HN|#u(v&x%I0xlz}h_%D|J(vs9S%kj5pt6ZdJ4-^@#rDGyY@H-)}MrY%{7P zi_CvmI~56L1@px&lSw+5!Gkk$>p2Ld#+xuWa(=WwrLl`j}tFmNvrpM;X}^2IaI9`12v9C zZI)5q>$X^lrap{}Ae0{U5(IKfmJhvJBI<8m{O$<%e$)n-?^2SH8zMrtwO-~rL;JR> zSD%nRrEy)KRiMFLzHh>`p`)Xfq%JO9ut4;qwHaH(AY*A_DuH(w9Ds5nXhXl2;qCgw zfK0YJJJ#EcMye$QeAaQa3~}(ht$*iRJU>h>%ue}`^D|Ty>w*$Q))zf?$GC!UXGS_7 z9l2*+?cW52&Iy;VO|<$PymP!nB7Pc8GM!A9^lo|cmM}ki7V93Q4O&LDxo!5buad(q zi~QWp?OT6`!?T?KYLdQ4sWG30V(30aKGLNiqbDhp|Iv!wIzlLQZ=p(Z6B#d zKSk%XE~TJlBOTEkQ10rBjLH>6`SYP;gQn{X0bMDE+hU5PD@s$B*O!9ffFIe%FOcAq zBDznwZET>%du<&^&l|Q3I^VK#5a{rr^&^PlMH}dMH--&q(sD;@r)9$D*p)4?QS0e7 zDuaSF5eGf$;N3lzJ9N$qxH{pLa}@mHX18>F5-*VXOf_K3JXnO*>cjz!9DQy6**EgG zOMLOM1(z`kDHvGQ-fL-EfLU2-Hk~_vRGiXIuS&}p*jsyLqcsK*z!}I@S^+&hJr7Q| zQ8vT1bS^bQBk*z#^$R$Y=7nmB4^dtQ(dT?-`mLC!)F)Xf13UHsoj=|$2UfXev92`n zW*66U?t@5@;I1Z4jyO(IRGhsJANq8~d7KnMrVyqi?dD2%e{OD7lul5OZDaj9(>OhT z@s2zl>;-FI+5KP!BawMHWhAmmPn1139}GNQMCECMqEC2{ZsTd4WaUJ3(-}(26vlCp z4X{<_M?Q^KSJ7TV%$sUcB!=3ZKR6OhMaSee!hVW+uYtVD|8M;yO6N+5b^vy z_Gx1IKz!m4F3BL^j$NaTXWSODwtmXlEm4`Z7n%s={599U^-MD3>gWdy2}6Mp)dZ8?7jf=<+msQ zmOkal+YOI2pT>BIhu!zI$lCFuuVW~%PE7NV{aOlWct2w|7MzMTAgyT&1KB3avO8Y1)OP9+$h&vnQ|dqOB7Tx^Spj~?+ZWNaNXy19>?)Lk^}{Z zW7txIcRZC2CwEtq(^=<nod_U5^3FV1O>@X62~gRl~I2pk~L_(kfet3 zu#)pYq)~AodaydjD*n~&xivAWaqgYFOuze}Ft$r-)n6Q5yv=c4#|&Tz_@Y51$HV@* z@VqK?O-a5!ZsijgVzglW^Fn{7#r~g-X!e{~kaC2P^rrb(FpB#lgzYHO2EK4!ty2KJ zp{qnSxvrLP-45V8&nlH3yDr$;g zG^!#-R+~re%qQm2oTie+zCrjo+RQk)V?cv>_Cb8tyUgc>fVI`Ymz6cpRxsBuJw=6U z!(tJ{gybS0(|bB-nHalCQ7Ab>=W`I{^nT5ObgGr_e!)VsrD&Cu&d4fjj@i`k*1@cDc4jjKEl` zj4>pd@B3HoWlQX78qo%Fl@l|b#keMt)5ctpXi~QeC4|u9@`I?EQ-RRFDwz-l)1Pf5 zs_uG~`%Sqe9(Mx6$y*HQE3w49#BrumSm#!L3b*S!(-ki@+)|~eYhtN}uq$XeUlk8K zIm;7ZV~44-)wxZ^LLwxq7=71%2{*RSpTckY*TaBPb@>K-0aWp1Dpu7*NSo6}%hpG& z@sYr=u#im0_>!3iO3=gm@M%~PUcOJEY&}8Jwa2^m-fe>RWB8EPB%(AOQASdWe&ki2 zMJk5Q;a2{I45yfZR0Gb&?A~wGP)KYBv|a4Of{e@ zW+S5i77@k4A&jscuvpwZo^Huv4NZSN>g@%gWYpKKqsIq;cT`6pf-aNyAm+`Perx34 zDMBC;6$(2tQtZX$b+aD!mH*oV%Ay)kB`IRTuZs%DSRFZJRQ&?G#m)C@N|E8r)QZf4 zTcYdSm4J{0iG5FWE*vrE_M4MyiWV<7?m+|*X#O)T&D5dp&-u4l7Ev+9Uu7CF*fJa? z_2BCg?-cCFQJId%?eT`Ey92V;!z%_XbttP}qbkz4HD;$z%3#=yv16iY7w{6IY-Xx2 z_ip+@rldd8>+sd_R0(ah5Rih_ht$$^XRBwxHR~0l$hH)2Nn%t%@2w>RbB%?&D+fJt z6W4Q=TAP^JD$s_Q3jCU~NWN8m6+x&94;xb`y1@=>gJ2ir&ao=?K-7t;om{+p^SuK) zus+)+LRV34JC>MB@*voBIX&P}-xu%$@@!`tEoDRU9N@u(JCE{q;}9<$J1( zxYhW{p^M25lm5g)t$1FM-9{i{rl``OJ=%q4Q`*`}#;%l4_`74EUSrKzhtH86h(HVf zn6%rjqwM)ETed$vj^6MD#*!8j!ZKsi1~RHrYxtALxoyQ!W9;UH+c4wK=IFA%L%rl+ z;gCmT(4i6eluDzQ9jR;mRmmgc4bTwP+u&;7eMBq|uUcrxBH`4OH&iYueQ~cmvW$nP zjBJst-khC~jfSqrabllKGsM~!A5JrSlk%kZ=g;?`elB^7KlHygT+)3_ov955Lhp3N zxN&;^IAEIql=!rUlz8#JW;ieHns;xEYY`zcApARV>wGN_Jct$iz1Cvv+g0EspT&>M zl~77n%kyf-nPH>wj^o2A?U52?b%1O;By1ZqpaKLe&@}a4JfBvCnm}}hbBqJh)Nl)Q znGDNH3oO|Ys~-Bm(VuYRsQBernd_>&G(AS=hWB|E5+0&;qOA|TToS>+q`by);dQHh zp%8M~>sb7@)zSfoodr^cXJcWUeer2GRCmoMsTX@53Fqr^p>Zd#CqJoY|F^vdbSWT{ zKl6CX1xi&;6B^esw|j2ok5QHT-N%*#1pADq`t>qTpYejSGnexVF_+C0ef<2Vjw$t| zp^|k=rQ&~JA!ds|eJuuUHYc#rpS@{bc%p(ywqEGhWE(hNy?ANn08L~%Tc;SSo4m=v zu2w!byyftxiR!UA1HgH)H&teUDD|pQG$|89#IQY#R5@m<0m!+3o^5yKZNN(Qh4yW1 zGdYzP+ksvD&LN@TrvK;W5MUlRO0T2f^hM(_;ld3KKqh*Di$@eCJilUlpdVQ&KAu21 ziQe2{E|@wAlNE$;?Eya+?5w*Q)H)x@Z~uHGVIbg3K;v`t+h7Alan`I`Mb!5QU+$6D z)&al+1t2Ec6{(yOF1Co$5XUPra@Nrv$)DP|P*Ix~wza}2Ex4SA$o`sZHt;RvAq3Be zHkW<^tN(oxwg+~Z2H||Oesiv;ekXfj0sk(dDA5cCu3{NB@ibitzaRkXooYnk+KTJ# zmgi{h*a=1m7If0`Dr@d5t+-t8h-7zdCqH1Bw;ThZd1?lELFsK>pRE`P&ES^-oEdUU z*zh9u#1UYNq!0i)G)>&<#%)M*@Nz1~2EbgOdi;*G{1y1>JQ#^=Hf9(jnwg30|7A+( z7G4pzG?NCx^i4ytd8AjbepMntV-9|O<7{blv_sga9o2DDS`18+tqH;LLr@VK`yK&z zdxPIn`jH}(LeooIV(|3~kLk=o&~5>kqy`r^jZciH&G=N+|`s6CHH)Ks^~)8O)j zW>=1GhUWeeykWX+>AJ8mO2neyv1xG1qBbuM?KID=EPj5a)>9V0)dH|##yy)0umIJB z78PO&F`m1WR%tQQMlz7RFXKJ*&hjoD}L6yw|A)^Ri~_qGyH&{yyYCAp#30( zk6|QqykBi_#av3V%@*<`xbR&2v9oo07K?wLpKHsAn;Z4?>VS@U^iHRcaL06I2c1I` zhOHn1+_-qo9lI=CI9pH8pQHj>gH`vK0Ipc$${sObHP_J zE-tBwDX>O^2k}wN2ct%~q6%5UJnVCan#=0@8G#Yv+BKJy{TDyNZ|Y^@NTfZR3>qqb zcgV~2?&h;E14vsP`tOjEctx)YEZP7G)2($fQ)^^S<~I}R6?LXo^=Ga?e-_aR4!Sbi z21ex{XM3CLytgSI^tjVx_m|FUFW{<<7x`~EQn3}5wWDz~4-UGP80gi}_hQ1*Yo!?N zoGTn{Uz4FbfmLDag%k2LU3h7#7ke1Pl8d@ddP;3>b4m#&pa z5z_+AO0a?=I8Ji6REa7huGSvtzr$yW!=j=i*||+kSj#Iey^B?$3`|LwvsFEG^MlZ0hxFxq<&qg&MT&=_Mbbk_#nW9qg`()brTQEUIgZ57bl? z6$-U9PFMmEacP5A=hsr&Uj6(G4y9?;5k;bY>A1 zHjrk1DsBkc&k%tWqf=o~56t`BpEPPjB6}tnKAvhI&40k(bI03{U#Rr zzobV#U{_v#i}l)&!aSd%xRiC`gdnGWp=Sb>zjv0t)s{#u%n0nGQ{F!=flH#vqhaw&YWU2Ih&FKEdPw?kuIE9oiVu-)y6vBlZSM6 z7`q`VQ@dkyBY(y~uqg!;8YCNJ@JPogZMeK*P+`(_EGzk;K7DzMgL#w}9p~`fXlFOF zzr8_!Y^3GW%q|U+>@Ui>kZs~lU`#%#o7aRe*T>99ozLK%O>M15JjBZeiTMqBV;<@P zKn^nit$esCnnbAo?gi3=9To)i!_{0 z2JF6MMARHV|Bh;!qb|@*fsg~JDMDenI*p4suhZtw$$?=ahSUgM)s=yUu~onvmq4Zh z%$|QHN1v*i(|Lz~vs&BhFbNWh9jhF0ziF)M2_9Ac!#Uh@(cHH|0r4{99i zRIf|=y0zjIXb54sE!ZyM+qsa^sIG+V5*vSxB2*#1(&^x}`c(7ZkMG(Iim?|7tB8h= zCWPnH#*_KWA&NO$onx~v*nHq+GpDsoRXt?8&|zTGbm5QpSKi#N@Gg(S+<75VTeMGY zF&ZVekps^&i>;&cNh%4GiF0(WbYAIKIbQCeKp;cBm>BMtWK5uMg{y6-K#{bp#PKB6Sybsqjc_B+B4vys?VK$&Qt zXsDBz0Q14j=EtH;D&heNBA~)JA!xu4qxV`A7I**pqNv-OvP-CVNhU)%vLTrH?Agv< z{PI13WRS&7>OTijAHZ8RarG*!0m|xMfYdo(s0}ezHMz9Z8Z)jgS=MfOlgG@HizXG3hXDoy=R;hQur1X2$!J zP~$qEnEyfh4Sr9WLQBqM7)228;y&tN`|9wK9-97~I~1>8x=`li?5)4vx*_WaQSms^fsV8NzuJEuxFGM{D}g0BUR4 z2t0vr#CL>HUx6YDHJK||gQa!WFH1PRNLzwDXo^}PMmIuK0&(O+cUl>I2NnKnzHNSyKK$8WTl!4OTiI~dTU!Jjo0MS zDc5~K-1Yz|)XCl2rYgUh$D;rkVT_kd&X-M(5GuVKea+E8^h{HqmtUosq|jkOmJ^nSmbw%q+>63oR`#cjjCIR*{I`{$j4r zy2yx9@X}pNfVU={M2GVNP;0ARfxFJLf(F``+XzM6hbS(O?r|eqRpmU%8!$4{-fRTiX`5! zu9T%|NMPO7+pWUj)!{Wa*tZk{EZRwCz-q;8vwha^NffUf-*j1>>~*6x{p@?hHBdz(smUm$FV*=zX zi0%;ov`bL)Waol+$*<8Pi^(Gxc5dR@_VK@;ri58A-!3ecgBH8+X&d=jE=M+B8#QI2 zXD1E}ogQW5F!!=Sp-RRgD;@(7YD2Jpa75YOq6>2=uVT@V)b_`-BE2S^JCYv~8XEdr zB^#ccI-N~5$j!57qkzwr?ka|D@7)x$6hYR4lA5+~2JU=|VR{XzM)w?}_;L@|o0~7E zb`A)_(+^d=5A@~j8<>jWPd)v&$7MG)u7~f}!qTncov0xICsby}T_pml?XNrv^O#3BJ=Jcs=|SHnfs_kd{v^+-l)#~~A1~N2 zb=LwXfDuS99jo!y*)ye)1lN`q$`_?p=U|NZSG_OHS}Jn45d7*H&y7`JNwrZteS% zG1xIp$QDfIeCmNw;unyJE6@8g=!R;bTU{XXjfssrMbYv`(OWReLl78NWd-pMp|;@K zib%Q1y;;K4p++Hbg|cKI%N%1yLumFi`a5uhLqTAi69qn^9ij3{xj$EL0m5sik9vso zlnDV>OU@({v4b1VuB)Hj1eYsfQCcR%OR@W}E0Md2MGx$O3s*YCyWDe+Ba0i(@LaJB zq$ZS-b}?0IdxEHr5Q;pYWt~4(nmFRt(j)#Gt22ISv@=wH_ML@VquRr!@1AF5xfhyL zphq)DDP5$t`t_FDr22MB7#6V}5GJ1ypu!MY`64J+WbnlB;RHA6)gT=7s2RC>c`Ek&!d!BrWvc0w_}JF_I#%A4YnV6B%qRM4W&FX-0k204tl+qy!MK3d2!JR?RTsDhrU5||6 zsnlU`I{u64cyCu7(j{md?Z-$uDX?|r;#WfVc_Z%{!pm3Wj|;wPXxw@DAG`4aE$_2D z+vswfp7JmoTSqE*ii=bwr*wGHeN1f?&3aWm`cH2g4UZg|-jI6ZBSSF(Lk$U2W^W3z z(lKc~lSer?Lb|fCFKvXNU!2ly+*Tv$C|exipCbI?H=dzW+qoQMJI@o1zWx4WN8jt) zy9^owYvkn>ct@{Ze@htcmoHw8gUR{pVmU#B?-*~}@Ul{-w%2u);}Gc*h=fW!S>>WX ze96Ahp3CE32&MDPG=(Rb6R|--#{Y9Uxut|d9rL)}oFWn@Js?dy1N`PhUpsi@GUjd%b{Vnn=H5@67F zN2=%S1i z{P)}jAC&fv=@h^j3`3WE8;8CL42ENB!^OY6>-$%pA(i5SGW2nuwl?SkPWR_}mgZ?= zUCrn{m&oR~AK#Od`i@%K6XRWqW!>dZKu?qxs6!Q4oOPM6?$szyu9N~TFM`>BAuJP7 z)@+5TwC0>|bYJs^jio2DC)<~N+Ur7;0H=mEjI!Iz{#Fh--!WG3my z8g{mS3s@&_#i-i&iEsz|m`!tLK29vZHyZqpn#YLA7p`joC3*29K7MEo1RdR8d7tU$ zqC6Vkc8ODdQ1I->r7Hz72%~bFbDewN=+|f{i~Gx=1r!NGHTZ%Woaz2py81vbi}M|X zJv2~TQ$JF~aEt^zXN24k)WE2tkHb=d(U7=-4aTF!lKidn#DhIK2RBuR@r=!itfs6M zG(!(Yr4UCq7FflN3V!h)W4M;FkWss~arF~cDa~2fX@Wj(ePO6Et6=7B{wC^0^E}e~ z=`Jk@d%ABFvr)f^%_2poD;t0;Y;g*Mj&td{y$b*ae-_jA_dJU3Vn(Tk%l)c1n(jzp z*xJwVRmCob@$3VMBOON?*V=2Y?sZBqT!EH-hO$@y>a3mJtIOS~?bYrw_J~5St;7oK z6?^TtF~PFx$iM?m>;c-QT}KjwaU}E6qyN&9$c?EPsgeb=H%!&2KNLun zxBUTHTd9tY%U@3Pz&l;(GkkiWQ7`D-~-3;l6}S2CZnE*omj8gj#3GxX3` zr20G~E@$QpsFV@-Z5`0PF%W0J=yQWKmPfkzux4ku*>Di&W*Gdt!6H<|!}OiKB=pog zF#{|Lz%x_=9fZz}8K{Hts(jmd8`9YM6}Mv)O;i@e%M+OQ6?N;q*9p~ybiHoK0W zri-Z}J>7eReER0wHqrD7kK2HaLo4@3A$y7{P+Aj>)NbNk`l#@ENAI?#lz$w$4t$B0 z^py(fSC@uEAqP!|V}}=gn7^O7HL%udMAV;s1nhZ=(e1?$zR6Vaf>qD`Y4JRNq(h9t z(tbkQ&}KGtA()bu&=VbLYdyp{gto&33PQ9`>+^Keh+!{BL z=PQ*d`J#tZv5PE&!nWsvAW3;Xjis$>7Pu3g4e#DJFO5~LFzmg;Y})!#6R`c$Ot&7* z!ln&r!|T!zRzmgk;zwd2BgKT|E>@`@6WyOS_Lfk;X3Pt&8V_porpJT0IX_SZ(dh&4 zo!wGp{^pOZP#@o1F#w#qDV4cggNZJEJ713mWYW~G(3dWpra#gk(6vvq_}aF)coEb) z!sU%i-mz@?*t)KNwg1`7rw?tl+B`VXGr;lk#xR=-!3bldPkWy?p12nWZ9dJkW_r?kByUXZj{GVqxET^HWQ3GSa%cIdw#Dfjw+K~k-fr=kQ)WiaX~ zfW7=wDR4=hcL*H>W1 z+W5q4>eKgQED7O}DuRdBQt4mRnAqDZ7_oLd1ix3Tlby&POoMdB@sA-c00UmoAv|rC zrWSXfK&bPd(&M?GBRt0fPA0e3#SX0j341T`y=YNsEQ3*5RR83Xi z_{0gO&51$KRpj%7U-aSD`8zXy(}fv0uimE<#QcJ;A?VIc)H@ppd3`(+6X%__OT2V) z*zQ%q#^t^O&)Avk=q4r60PV8MVG&I$xKVin#Hir%VkkBubfuPNV2b_t-Io(hubEX& zEvkYg&xhi{%YOy{`W`whYVC3#NLy6yUFM#%{LW}2bS#x7q6^u_9s6z1rP!cgK(r-& z(Q>ID&6q~W7S*fHI&21^Oh4zHSQBC-xdY89I7m^>>KNb~et2j7LS{gU z?of;X@{kVB2!dj)@q@f*DU(;g3=^D*J^bmYwu6!{0_OwGR=?E|Lv&i5i__RspcTOGKvU zFI0HwC#jx^Fmd}|k_Eg5?CgMz`OAwN3){ADHxMH{~|q`{xN{8^m=Aa8jNCjWXS_8ka&{ujQGgq2IDj^bX5Hbl=VIHW73eo zaCQ;8UP@w_W878AE4hse-r4{Xw_NytnQlV|9^ctEDS=FvV5ZnXN-ldVA z)2qzWtJ2;_O7Nqi4Cg2<_eRvz3t$;ji6O-MbUduq3`1G<*i1Z`6>F569jtU{*0^R^Pw+UzN+z=KEzVE&V%e&j}>>_>iZm-I&n%g|K=Ab~zM z%4?+#Sj03HnMe0VR_3Mm|7ref!%17%#hZA_MkU%aqi!%<$vNe_Q1HXyqpXi?y5Bd~Y+f74a%x zv?*l2=Pri#nk@_ZMm;z)45T-}rUG4GDX(x`{`V|?V}{+XNVuKK{ALW6uDdWk?vaW@ zwrtMMvL91cH?*QJV%b?aQ5u!#JRrqqPs<$GYwGLZ4eYY3iu_6g;mF6k5m%CnumLq$1t!P?94u85gQ$8fjRAihQ*|KbUrHW+l)z~QOR`n%hebvNvd-sQxo;#_HfJNaPcKo0E2o@0U zZwpAuExL;TU8hg|(ZwkzE#OUsH*_!jx3TA1vL3e5wvxsfe5wckd#-U|vC}E#8EJEM zV+(Lz{L#~!+`w;Z&iv8VsMo4(^Wehq@4KqZ;QiI@NGn`LQCw^jsaLIO2bsv607I(c z0t{!7r^OWf3fo&myx%Tl?)rE!T79 zSAjQBQQTaU)_WXb(*&_}7Un&txyzVQ;xmt7q+;(UZ91i`b^;I6o`x)o2h7Fo1=Wc8 z8__8B-dOVWnRa%XavdoBYSs(0794UXy#MGB&0i_PYbyp=KDHGDfEi&ql@(dmYPX1L zOmfCq5WJqhHu+uFtRS4rbU)`V5j-f%F_-bh}%8^?%6_|rAfKZ*GGD9yLce1GW5 zfiRwiStq{)la_f9Ii_iOHq(zA9Sf>hP038MJIAYg3XtuP@yQNhsmYmOn3>}4p%J?` zps%Yg>22fk{7+3k8l{qtCWNoA%JBKjn1`(f;MSNv7DK z$8@$Fw&|t1OE@~`_Im?0jzNkdT%VrK9_eY2o|}*&an_F;WCcclE0<%n@QH%^Ks0xS z5`?CREP$ACn((7Mr!esmwql!bW;)sz+bfhldXs$$h7qQ_+9!xN9BKq*%gTi3XHUU& zJZXtVYi@$$jHzsAmq4eqhZj;k`z*{}yLA-Ya9Wp+igT7<6i5n>vigf-(~v9L0CM!L zW2Cy~nD2N!sOB{K?Z-MiL)xcByE~1(VJ8g{GgNVqDt~f*E2;esDLxQYQ&DhSQro~d z$38nQ+xf-n4;Yu}$8OyvZ#tDMehV>AU+9m18V&bEH~(--ho|*mtn^0}oQ6axv^$*^ zExx1zkNV-(9zKprG+7zybZZsQJDmC*$K18>FnmTwq4?85kIHo5!!&(IjKLEv5*Oae zKb;wQ6{(7ZwS;Q;W>K#G`iiYX$%C;JUdm{Qg4O>~)bKJIm$I6$V*W;gU2eqt32+ZC ztZH{u4ZWUb`io^&Q~jEax6>c^Ku^Y2&2`l+A*P$d0lLfd-g1#81KB_R2n(_lc(dww zgAQn`1q2};DBIBxlza&R*>(o|G!B(Mc@)O`!7Q!T#X1m~rR85~eRa9IK_;HKb{US$ z`m~aCQsGVrGwd3Ie+@6C79h`NDkK?q)7eRtib7S3%)MmM29mxZVvTm1<{F^DpCilm?zX$NB{{`PdiV5o34GZYd<84eHe9o{LbQu-^Uu28dDl*Mh=tdK8^H z&-rHi!tukLN@r81FUPr@?Fa8DG`FaAOL$fuo_y-6-RR6%NsQ{c1;ajJ!7*0#S0sez zc%_<@6*Ka_Z^&upGNj5@4p|*Lu$jI5p~Liu#|i7jq3+^O7k!tE&#zEr`;W-e`-~07 zq-zZBja{cmk=sA@8O;yF$>t; zh>B=H6vAacl`tC(|4qdogNM9?@;&}(T$6kEl9lS6@LHWz^5jItk9N=oTUQ3 zaRvO^izyQaad$&*i2UATvUkY-C{V*IP`{yzef(HvIS~UVoE$9+mJHY7H*Ro!|H}r} z_#dq3v56ij@SC3wrB%=;?(w!dWMXF*07X>T88&yKrHj1SjZT&Kjnb$}y7eLW|xBjA-t~_P(4|_INPL!t!VfZnT)rO4s^v0oV)0Xwg!01#9Jb zbo@B>?deCE!So+0YPCbtvBkb`gX`v~01*nCbzga2BVFfAt(OewXW5?+$A}Lx<7&Md zS~?pT)VRmj+KEsa1;KvVqa_z*OFiV=O6yxghhb+kjqqVIav->qe~6j>&cetlB_CQz zJ-${wt%?Oi%Xr{5TsSy=*#haL@BtRY`vN7&-+#>rHjn=%=FtE_aJH}eJ^r)3+DODj z4mxX$2fhj%1G|j~&EamV`@h*`bFkY3MFDd0>3zKfO3b!#PP68*Sz-Dir)qab^XQED zQpI?lPTJc_(TPk)#fKC4w1mk!@^Z$q1K}z9%RLde6`uLfe7xIn{?Vq{>{P#Cq|rU) zbuHoJw4pMoOPI78m2(O1E#zB#WPLuGe7%Yk!XA4c?;T+@wPF=}@|PuK&9xde(YGQ?*<>u%FL8X#iylplT|MLCd2N%X39VDUNccsEs-Z?!nj=P2T5&u#=P8>`T0w6WFTS*fDf*B;kuUqY?8KalD6{cL6_Cl z?Hg6NHz9f5iu3vOnK;iHnxP-A9z}`6ewf79wk9|`EIs;@LL(<^CJxK+VEOdF?~n5}Z9cv9xPXNJAS6G4Q8|k1vsv65mQN47*xj4uqdu+A&;_=N;>RmIc(l14J%yL0#N8^8RHE;!UC-Ue}N60P`NCM$TMbG08Bjo@&NgpnEFyMltU zvBo;M4et{&0NS0iU_C&)2c`*TT5QyhVhC} ziBp9ZQrTyp8NV7M5poAJ?(Tc!*b07P#%A-}N6dzcOrG2-{K?I$yZ+!cL zr{h)A-vISa8(&9eBzCu1cM*a^8WLM@fxFr?C|=E$cY$K zfk#aPBrvWipWrs*MyywQWgyx}7S7rnFn+RkQuo5BgP_06xn+j87RdroIMny&uPy_d zBm;o5FnKQ{-N9DpJus|+W+oCt3yk_(f6J|jWjV~5)V!+cEPDcMW&Z#!lb`-q%35@_ z#th7F>FxR30%&`9lJK}|sPe4f^EpURi5=+WM&`(H?l&-!=jw2Hr*z-JQ<0Lj?zi}o z^&&Ldv~X^A#-;MEjs!83bJH(AJ8^kTErs!FuhtGmU-hAqZ6Y_9B*h`Qx5Io>peY1c zG2~Lx*3Wi3$&p6?4(ln>=l$`Ko+V{{TA2h@G|?sJkEnhiIp=|Mu*a|;^mwwS(Yzy! zo=n@qZ;n)wlfbcRi4m;Ct_)qnahUnWRw`fF9b0AH5raHgBYJCXN5 zVrmg)qlkMs*Z5I|;;lzZDZ8HF`bz%V*wSyr_+ILRRw-L!DUMX+^`X6C+diH8v1j9;d{Y zJWXN$`8AHtK%rzTZUeM1F_W)DRv_NxFe;GxA)CB-RQ!vs(31%-V=Ai%b~7xvv~-iV z>}R_;RQ3eGbI!;e0TO;U^_vmIz65S4Y!R;!(q*B@itBLcOC-DJpv;pkR>0c*csGP*2~*^fNLfo8Gd2_of>Z< z&?du|W;35>MF0G}BH2reU20V{+H7pRCgrQStuAh+wc5hh52nlRvA#72^oT=(_4j^1r4gT%9&Q{mK`G~a_CD3 zxh+UiiU%tuC6p}EYN?-0yNs89Cmm?#djE5OKFnexnE^j2xZ@)Xi(0xTdF1UT8w-NbCY3Y58?_QMxH1W}_v?%s-bg*Di8^ zNR`><`d)188L03!sM%cT9WzJZTd{VTtc|rT5a#L4rS{q&i6`$I2!?;rYqG3m4xL^q zd)nHg^(i4=x%^=hd!Mv}iFHYd%;H;yx_AActI+4}6996pWtokDYSFl7&mKr%TXLO! zga27C|5#3xvPY+{cAvxHfXKGToq=R%-MDq3KX(r^pFCBhuE@5+0r2$5EBOLrnqKA0K;MXt z=N^aX9qi+*|=)%4C?#$SP#HqCIiV`<>fhVRW)tVHt zr=2y`62AyU4-fon6p6J)##xF^kd4;*4^{XzOYwFcUxg!T^rE}jcRJ9JPmlI*bWIw% zthOJXah*dnw&w3(M@j1rd+N>x$0fWZ9FAGyiVHD+k#gal`H4w)rnV8M`+wyyEJ1Dm z^+k}N+9wfjk!Vu=$dCUFv5EZvknf(!LgRECfG^A_t~Om(P|`Q)#bZn5lzbE=R`a4fN|Jfd$6|l;6BPaY$P4hs33U zeqQ~?8OVc;wF$sr)nz4{et~8G{d2tFtp55;kkbhGs-%r@I%pXSE2|H=xzKL{pI6hl zS6+uNRqn<}Viz z-9G`8TzUkr`Y$wg{Z~l;%Q+!W`lZuM08+a`1gdc4aWooQv4dB4{Z)CH%c_dp0dRH$0b=}t z4C2uZL?!P6%3m;b*M-~k*|@AVUN{uRC|+b+kbH&2L7G}cU!}hxqYvwRHIVRpkB59o zQ()E>t1S7A=LeLnMTV4lwX%^Wa z>Pc^B()>ATWQUZ_9bZViHe|r4nfT$4?XEzeJ>fUE?%1^P-H_4DLcj&z|N2i}%3Pet zX)MvAx%19c50zROci}m``?>bg{x5d*-44bg7bv$18LsP-wCuz@$FVR^E7b>%(bkVD zSZ<;W%3$_KzkOK!#gnwTJTL=U9f0?7R2nVF# z_csdTV6sy2fo>s4kFAUSFO&MF{xF)mh0|!jP{FsM$o%7lmuAbJq6T7I zH5Bqrr}cVLR{9)BG`R?JiY50o+kQ_LXfH;rt_~|dPrxUD0kvD*UKFRxO+5%ZMZ&to zqWL#6{;Lbwco++;qI=tcOe8pKL@eenkG%Q@vPxD*=TXADGOPK84*5|J-;hs3aqXk} zT5AK7qs|NK%_9_sBTpJIRF4}S!#tKe5KkM$OC99I%qTH{@Q#!$m?BQMwWS)iXaMki)%pt1w@$e z2Tr|pgQuafG62aDn7pzNeG8VI9W{P#wncXBmrl$&Tq3r!P%iW#i=@wOaD8JBAbVzXMp^D*9%{ zsU4Z%))w)8fDQ}f&F(kY1u-7}Lg@3IGUq++mQpMWJd&lQf&iO)v9E_M@OwkA7bZ+= zSSjNahRoYlF6KdvQF-=62JWM9Hrgf{0Jf_Jg-pPl#7f^keCG#@_OSUZUMG|`8CbH0 zfXOdAr~Yl!#f@yyh_KH*2RD-|OmhKL4ugUth04!XCf+Y>d!!k#uW5<^M%4jr6(|xo z=&h!gzPnS@t8ehybJ3#Z`$D2N$LXipv-3?ZPr#=KHU^5=*<>_j9xU%V7$|czZ3kar59IH>T%da?4DAK>ZEEt zm&D_1SJv<0o8kfhQOLdL_}vPp3-pk4&m6A|bb=cx0S!Wsez;B5DoNV=0xYk7o@wvO z`S|uhBhE>qL>ZVyK2s9otmM>9x31i;z>hCAYT5mztVedU%3ED;kjlAw5L1LoeaFa- zgR1fDvFfo`ttzQ1OvVEq!}IL^&y@KtvzvQmm=+s zB8v9pmLtt<{)06WpaaJ{)d4?SNkPKE(iD8n*Q*L1qiQKGVx<@789go_?~|VtpFSzz z1}CcyL3COot3R%ymZ18gjb}x6mW*(aFThrxoG`t&NtrtkHa$VXlmP7e6lJQyh5@&s zvLBw1xLThC&fr^*du-iooopt9_FLYc{GzT_eq>&vHwg=y=Mf1oi~1#~c%-_hMANCA z)ar&{#&ZYDv|!2$(LlLVaSh?KdnosT^sDs#o#{b|y3@T2zR^|wjLPgPW?Xk7 z1P&!~!Es9+{BUoAK3skBwfeKZ_nD7dEE`)F0>432pWi0>+hNeP^#d<2gw;87{FWOR zdUf@JyOZOG-?!+0NxI?Xs;+wm{uMD7zgY0JArHta&JYaW@Akvu0`0~Ok{*i41B(rR z=tO$&kImZC^|V2V3)A(@hq!d5f=pq9w=vi+6&&|iLoW94C6EZX!kWh#!X$%_@Y}#E znvmAXR(#Wlp0lGe2XDhz1kM0M*$Ye9%c#ua2uo4SwwEg z%L76mEDgwJ>g186J}0#-t=x~A_=VA&u^`^|Hq7rI#@>>hkeMW%4YpAR?)mjasHxya zvr&Ogv%<0jcTCI|A}3}xyg4G<(9$0!*S@AuDl`ij<=SUA2O~qZ7D_mUEn&*=&)OpmtUTw2E zP0eA$S<84#8R^-pUrYNQ?)Fd8XRQ8}1}WF7ufe^Mhok9D#z}RIg9|5N8#K01oGS_d z?1$wkFFPQumvB-6cSXhT(f&!nIEGgGc-0K(MgZND3 zE=BbKjO4btVgk_Wo=?*Hb#t?8$RB6$bxjqyPM6*lSpBf6{n;n}7IVqX3BWt_*hw1@ z*tkE#a#99!e9*7{z5*Y4YDy@NSR$Um-x;f>9XmMp&la`E0GT`7T6IBH7%fcOp4t-Y z4R>pueM^klq^p;XWPdRh+{VeyMjNcJAm`n9hmlU(J3SvKijJ}itWHM;4-KwLySmjk zb_$i%=hd2VG{+OYy%fw!kPAMNfTdL)-cp;>{o?MWsSUG`R-cW>{OsTvkDz9kRHZ*V zhjLX$ZwK!IF6nmV9|$97PI>P_wGH#Hn)egw!dOl?!b|$65!jcLl)hU0dOCNW%nap( zI$o%2=SovojW?IRNCA!&o57?HtjElqq<8S0m*pSJ?KNyfVGffE4;Zjm_^ zR;;ij!49O%^cwFU{9<)MEDYCm7ah-+S7%Sc(r3SgkWc>wyRyKja*XDWmFF3iqaL-1gn|lM*_g*PU|W74Vk(Gp>rZN?Y)}L^pq-}jS&|0qHv2f zdW?rDsy9I(pao9*#<`&*UZtA1hXNX>Eg7=ENC?aATxwYh$j(tT-q{?PRP9$n;U!>- zPx=0z7pv2_%u|sJ=#^=kJ*N0F+*F6WTxj{bL+NCnKbvpwE z?t7F`RVTUJe(_)3^F3pgg;kwd-x4XtNet+GziPF?CNI#k-=YB1HP50KoK;cFiMAx zc+3Ue;yx^ zX?X`iO(@5o;Evo*^OZ8<6!9)mj8H{6J*M82S!g&_XXanW zIZp5p#CZ)7DlE|;5pLJQn*=AKF;Z*LG)>(E@U#weDoz?nJmq540v{GI9A}*}6E7td zo)hHl1c+dupnXJQW8o#g?PE6XoGKcVo4&=|*1s1(n9qEAjPN1i&xE?F31u>NW!xY= zd%i>ohiK-^?77L063PrV@^}$G45{ypLkX{fUk7Qns71S6_tqx}UW(nzE|%(=_`vtK zZGAnU<5efbL`EaB75zBXe^&aVEjR~~c9K;=+y$wQL5&b7_=21#qWn;v!F&g?p4V`VU8pH`lZ8l{- zFJAJ^(rH&a{gXopbXDvbBTb?L$I(P-GGZQ8^;N^0$WiS@eRo?xf(|%t6+y4d7ao|K zzspMti+LZJFN)+rWOr4f=P&K^#gC_HqFF>ktKv=P^$UW5uu(6`jNSp5I13z z(*kVEQO;!5Dogq!0Kq$R$)1OEfvLA<$E7cms;t=me!JdfVtQJ40hv(QwHe0s)cg1= zawKD5NvFr^VGrw(xf9)iRr@ZJAiw<0aDIRB%^-8fSOy7@{+d83TlQvgMr?wxDh#%Xy^6Nq${Y(09tFoyF2Txxbd>;=?e+h$bO{JXa{o7G3| zk|PrNBHhn^Cfg0Z$o;W7fu*0qjED0(r#VN4J3720&D4jds(u^$EHcRig{BCzA3`HU@Jz4T*QfnE^-Id%x!b4aq zKi4Nmg*kt=FHsWLkNyzbHQrHa%3XGAWhOjJe5jTP5{UMtiX&!^f<<$zG8%!JN5s&MtrR`q`}A_nPE zR-P{>;$kQf`oIc|bK}+wFvb6<_%vMC{B9IJ)FZipNO0LyAI{08CMvJ`z$o)&`8&^) zWSIvI*2!Y6J=v_Wr~Fw&qO|^h90Cw#WYstGVKK~dUll#?2tefYIzr5JY=VPgXhrk> zc?@k7u~svx)0Z1t=G&CsDY}`c3hys-Cqy|&3kiuH36bg>jM&=5kuwcxo^DpVHl8{X zR5?hPA7_;qRiNkejzvFomay>B{qY|!5^5YL05VIaJp?n8nrS>1E4! zH18s7Qu%CMxO?t=0c*-3&*F}I@Zq+Qg6_8k>k_`nI0** zT5{Mm>C;_L!n{y#r4~Qp9uu2&tg_DF04@;7gkJhHk6DkWS)Cy4^Rh(#QXCt zC-H>U`N`xcJyqWZ3B798_ALuq@wGFGp0a~0PkSqQlU~c(veG_7h)U9gf|*f&_DODo zph`45`swFw$%}uHYKNkL^vtL1td;ultDrt$h!ZbE6(n<{(B?p7 ze#DyDH8fmNQ5Ic)DSo4ElCo1fdAt{>0tJ{-!LGpwpBtMh#y(QjoJ9f+8^EV$i-ldO z1y7Q;8Zhs(hHSmo(mcVE`l@wA(z&wY`*X^C9fQiHq^-~LE3*-%(9?@w6yS!btU?jlk_IGWTR zMJ8Mg%j%6M+|+IF4v1GbGA<>=iwo?da^@Q_#YbdgZ5p5F2I!DH=UzZTIL>leUJYko z(QA5`6W?gEoa%m4DGZNMF=v|ahWIIjF_66gO>_e-xcyZzMreWrSNxA|7MQr+XWxnq zaYj^4XWzu!V0~!EIs#N%BLx$}Aey{cy!n6Z0W!pw-wAEv+$ZfF+Se9eQx9yfh-*(s z=)-yj$ZH3`x?S%6wYzweIF}|Z!9uD78eHw+8-HA2E?GV~+2z4Jw3C>D$K=Bsd4gZI*VYlH!R3`>M?t{`yN$qNX@13`J#q1?x9?g zd)-WN!`D+3!u(?lvlQP6eUwjEWPNJM?ZIMu6){cn(fpmrE6Z|25Xl0y(Dki0yZwPQox;y6Z4C6J?*u3B4$N~ zmt4E3t>i_XfeK2Vh!cmuAy@Y`X+fiuY38qBmou<^sSnTxsDn9nk@Z^@g#`Ft6oOuFEl^rWw>4xHj)4l8VxCYdf@ zTS9T8=StgS#sW_r2tcDLq>z%uqp-sL{Dgp#9op7{gi0nndPeDH=du^*PT4cy1*xt;<`Ql)`qWxdK2d%QD(xiV%k2X%8Dk z{L9P?b)dP`vCEMQDk=nzoA8BY8MzbYpBX!yfW-=cK{O53T_KKux+H(&d`C zW|b-UEvl6iWbB@K6wlobqbn@Exp_zEfLUz@hv=@3D_kdJW&vC-n=6PUCNyIbyv73? z$AW~|nRFhh2A*SAA%QE12W6ogonfdjlf64bFWar5!N1X!#9z4=@HNb{~JWfyrDsRcJpBj{t`~C!M*f zwsGSx5{Is+e+c*u?FlpWrSvZ}gvsKD+`KBCxfjzDibxTP^Cqx*sVjeO+!)pZ_l6*e z9gv0v=sE76it`oEwN8pn=-hcRC%Fs{VH)4hKHOX4;K3ax)*%1}PS$MOSCe7+8HXH? zT2}H0F)$z@@$^agV`tL}*r$>n?*m25wRR-Ix;N+`QmZJbnXZ2UPiEvq{O>+&kr~}B zwcIt;`irF(u0Fpw^Mu!Zyfp>8_VBDWl1keaACg`_+STOb-e6kda1R+Wai$ePCwD=YXoN%? zp&|0x--wF-lJ7wvRv*#Ihr3w41!i|i!6PtZB|(H-bCHGB5dDLJb!1K~Z+0KwxgA@< zz%r+XzidcUb>!xEbg(J_F6B$Uus*7iw9gln5i8}JfoO@C$7}gKE_;WEO_97WhJ-LM z8@9W+s!!OtmM2t3L2$)UbmT{yAJ5_@yR(elmL+Pafox{|;VZxd++>g4hY&SttbF7Y zfoBW7Y&IYDp~|07GWV88@D;o_MG7>Igw?P6?C(2yfwA8+Qb|b=6;Hv6$j5;KLl=U4 z{a7!X8aL@1*W;AtiP=ajj$T@r0a<6MqD)ZC*@dz zFJmEfYHBoV0kMwUXw1_6!F-!lt{ChS@9dMSzfX$XIWl!7;))Alb+u=Pz*JsDVrzUV z2fgZTO$SA}LPD&#P7Oiva1@dt9!S3PjUBzXNmfQMyQL7Pk+UPPb8%L^?cQ~P3()(c z{GGfD5!PE=61ylMcS=Y2?Y8vnM1$*q7R623VG3a^ckJ4v9tcalJ8F_^tOY=8{e&dp z0zsPa8eNodvV_qUA16Q4_ z#v~n*Z8OKGc|kH9adMQ(mFuj9z$l`bD!ga81K#$IER) z9h9V;yiJ(Dy~WLLR_;_eXVRMZfl1ihnk;^q6;H^F za(GYw>etD8h|&@eirt8s5mmOcNtsDI4yb&%X?MYXMfKQ7+C?_&w(uM1?{(eYPsp&e zT}~LRpY79EGULeC3qneNur)oM#>^JOQ>P*kNxtM--?V>HsI^@F#%8HR1MKs9aU>E- zvyPB^B&IfDOt9HfhApCfQ=$yc8e*o4ekk8y02xrGT+{ zw=ZrisAo7?%^iE2^&&Et;C?o`UmeNM?c+sfm5wZ<`t!Lz>@#0_Tz?98PP`R3xQ3bmK5^FqD1Q0n z7O~ZCa@frg+*}_a>DpZC!c1CV?>M;AvN%v(dI0Y%Ela&8L-z`0(rx2rPUMl5o=W1c zNIn(0_u*xOrd}jgWGowWp7xRjd}rTur<{!$m7R8aUQB)Yp$k$}9g1-Uysl9Dyd`UCFzAqx!c+lDL(h!cHBNFBKfYh;i zRx~beF_rO^PYz}TZ|re$hr<`k*P7r*I*#@E<-X`v>0(~)VhJ%mR@!Ve9anRV9F}h(^wSX?~^vO zJ2;t~Z_RpeFb^#;(+*&Y{>iZqs1V*LnLvpfSJvVgl}cqdF?O=Yv(6S4wews;v{yn+ zc{Qu=Kc*ZTGk}F(uJf3zH3I{*p-r6ZL!9UsFk*s5O2}b#%dw*a-$Sx!wgnYu@ch3? zoAy~#(>vRqGV^Dy^blh^!T)lmcb8j%WzsV{#rZ#>5x)bgU9H@uDZ~L{!yfCPnWQp* z`Gs(D%8j%jslJzb*FrDg2omgZywK?o-K5S;d&iy}gTcSY8DRJ8H*xg3o{h9FBx*)y zi3rfgiF3w{2ZIiI(!TP$QtkiXj_xUUYgysS^X1U^@8(OV?-_68?}wKx?IJuqA2<}0 zTp5rsw~27%h6-+4oMYhlruy@%^?KQ{t3#CW0O;l9OFXQk5Qc+&WR@$8-ua;(1{n&d z0a!De7*!p`gAgmEW2yuedrs(weyD~U%XnxFf#h3R`qFlUl^4UyJUmHrl5FVIui)s9 zTo%m+1=ecw?c&HJAka$wSZ>SBNfDzp^XP%;ht2BISpj-b@LXWi<$%ZN+?`rKQjZg3 zCe|k(L29rigHW%y4?iMATbx#|0m`C)Zm8QRWdejMH1OD#VL7T*Z1}6#VGI_xv}xvz zl^8NpEl{Wt=7DCgeVg~kSHI6q&OMY_b9G;|aizbzQ5R5mGx+V4t;y@7SNLyLl$g(6 zf}4p$DOybWIZ2OXyh-_1O24lp;g2XMexm3*NAyT)^alfndQ*04g9?blJv~RQlDh&8 zS&r%G@YIo*Pj6~sE&LuLVIbDrtiShg=ETF%CmY0>|A@OfR{UvZ&reK(=P>?vuJQhU zzv$f1tfIH|CwiSs6Sn5;kXsNIV* zI|yNnv3vq(*==BAR=R>uCUeVZ&138*1~NDWL|Po#X55rMOb@Tmx3_$_5p~Oiza`FP5{jV>{aoTs^KDX-Zf6zW_*GJwzF#{=2apN{^|d|9GzNLxaKVzTQSp z){q}#DUE$l9^JVoA_TGcZx~?2R+93a9fG-cjx{Of;Uw4B4@8{p-DNR5bi-AALDw%tF^YV2q4@7F1C4b6W`-w-8%kwgV zH7M?>OZ;Pmw7?sqF9|aS&sMtA^sIcjSfVBx#<5%39aqCw#?!tNp)H1`A(r=gFn{UO z8=jd@gV_PWSBOm~t-jKibWat{W+GtxuQkbgKis=DJ@{GGy3$lmUtUalc&^VSKHS4z zy(S1r?4U9r0_zY030v-w5v%+X!IyZK7UV=g=MImy^pWVL0WfdPut)1T{|K7Z^a*x~ z*0147<7+@+pe>#LBTEa-f8O9j+3F3%Fuj`8HjeFSSMq|i#>%J9o!wnC;>WQV9=&lI zDgBrjdV>AdV&@5{E-%PgZfoX)vT%IbP2Y})Su9sxeUR`4DWw8w)N0B<8ikUVcTPP~ zT^ho+;Szv6of+1j-a?Y*8ewTXh9q)punW0V(PF)=XDo=$Y`vv0+v=Ov3WS{b*@pYnuR2W*Z&ENUEp*Y{iJ5zO^N*)e;XM^YuBhfgut=}WYo>jln z_1Di&{?J&x&rpCB?;yyTpVNVIgKu$*TlU9MB7j;iY%?_bZ5b5T%~P;xPkcz9`yDe* z&;k;rlO3xlUp<2C7x{j;lKiH8O>GcFqE&w5d0@)7R0^eKQE#-%tw)*75eRM z&ohUYWKGm~-@Vi|IX#^--=1s_=V~y4rZP-kk$FY(uy3i$n4A3puZGL=5gPbgfJrQQ zsZU_fNRbp$Ml`7scG2D0`SGuROeZ+m!njZ1O|C6~C=bkBLu!cb^{*F8MPc`;2BlX~ zoaH=kLrp&%bf?@JD?V#F@odSVy>;fZrJUthfBzrH*lMrH=^3%d2x8cqDxGeilawG1 zg*fKXP}@%I@lKQH%s-DQgB3LN{M8c1C{$nY`w`L7>T@iwslEB&jgqsU)9k?;eO%E7 zfN^7 zbh@Tl7*jQ5>ZQy-Cq9Z2r75gFAG_b9ax-ql@%K~&%ER{}ELU4B=HeNXWxB_gPP_K{ z&nQRtm(SE=n1c=~=+kaRiP)bMkZ>|!YqH=;f_c)ZH#QT633bYeUPsnF>Yaa7&`8iD zX$k1KG|XK;luzsXxiJ;BI;Fyl#HLR7s&E~XoSB_!D(VHFu-L@Cj}SOQ@$I`|_Z=>! zkWP-B0r4bVf51YpJwi8hRxfVD)w^jr$BeHpe6}?5e(6Ae?|zZ$e55rL4eO!oH@v@coh6wNf>$3140UT!zjGI#%Kd6hUP?AF^^vb`SLc$p zxR3mbgo_Y7Cpq@g?UpM(b6fFT< zdHxecsJDvh!ru`uJ^urFYK7C-NnjfdtIvxLnIL@l#pfBpXNwxNH6e!8)A>eg1K^1> zX?l(&ZCcIRnqn7>)mvg9dsgbkC#FpWWQ7d*eQdrCMsSsWZp+Jq{gB5>Gh2dP*6oh^ z-k{^WUcjj^YLk5fvkL14lJ0bdp)yMFTh#@=Kgb4;cr||<<|zvKTO*r_(>q@v-$ZZB*x!B4X@}Hk!Zv3NH2~J%^~0T6tr6P zjYxIcOfJ;~qmv@a&hTkAtlq4vsrQ?%k>tP2_x$SItpjGIbx3K;h@-|CGy(6WJ@ys#rA05!o=x;bP zWr}E|m2p9Wck&HD)kt7A%}FyF4UwWKy(1#VUdQfl^`jwn+Z$2CM##CbK7utGeo!W~ zHy>D-YMSHl4J9W_MLVu*$ngEj{%8ZQ3n z#kuz_EFvn%1UbyuXV}+L_(1pK9{lvH?(#@OS!Z7ki3aJ*H(c>^~ z?$hHiICun5y7s=@b&h5*8z->Zr32+DpURRGl9(&t@Gq+&X6Kt<#uxU>=_lBm(C`Nt zJCEQ-p95eKib--GS^;VIU<4bqA_{@H>$aWc76rixWoITbk0wo}ISepYb4ezwsEmPr z@YT~1Y6i(((c;6^MEJVy-OD$UO?ejapp!2Q(g)ZdvdN-@tvDtnrFySO_aMlZpcE4MJ-TvqH@Lgi5yCsHeFO!w3>`NRKC@ z0N#4!IPBzY`&oPpWtRo^d*b_6&mZy@)F5CRRGpG1XD7QYw%9BUkQ*UBM0D6tUi?(2 zBKh=0l5e#cLPNv4kdKvK#a?<_e$|toV}TL%;FBj{$5Q4VH{du&MH3^VA2(1g&O1#S z_1G+#6;#o>g}alZvLdd`NhSw(T8Zx>N?XrZS(Pge|NmW?D{Tv(GS>WczrWKCmHg*l c;HRm78Pw%gpx -// This file is in the public domain. -// If the public domain is not possible in your location then it can also be used under the same -// license as Scintilla. https://www.scintilla.org/License.txt - -/* Build and run - - Win32 -gcc CheckLexilla.c -I ../../include -o CheckLexilla -CheckLexilla -CheckLexilla ../SimpleLexer/SimpleLexer.dll - - Win32 Visual C++ -cl CheckLexilla.c -I ../../include -Fe: CheckLexilla -CheckLexilla -CheckLexilla ../SimpleLexer/SimpleLexer.dll - - macOS -clang CheckLexilla.c -I ../../include -o CheckLexilla -./CheckLexilla -./CheckLexilla ../SimpleLexer/SimpleLexer.dylib - - Linux -gcc CheckLexilla.c -I ../../include -ldl -o CheckLexilla -./CheckLexilla -./CheckLexilla ../SimpleLexer/SimpleLexer.so - -While principally meant for compilation as C to act as an example of using Lexilla -from C it can also be built as C++. - -Warnings are intentionally shown for the deprecated typedef LexerNameFromIDFn when compiled with -GCC or Clang or as C++. - -*/ - -#include - -#if _WIN32 -#include -#else -#include -#endif - -#ifdef __cplusplus -#include "ILexer.h" -#endif - -#include "Lexilla.h" - -#ifdef __cplusplus -using namespace Lexilla; -#endif - -#if _WIN32 -typedef FARPROC Function; -typedef HMODULE Module; -#else -typedef void *Function; -typedef void *Module; -#endif - -static Function FindSymbol(Module m, const char *symbol) { -#if _WIN32 - return GetProcAddress(m, symbol); -#else - return dlsym(m, symbol); -#endif -} - -int main(int argc, char *argv[]) { - char szLexillaPath[] = "../../bin/" LEXILLA_LIB LEXILLA_EXTENSION; - const char *libPath = szLexillaPath; - if (argc > 1) { - libPath = argv[1]; - } -#if _WIN32 - Module lexillaLibrary = LoadLibraryA(libPath); -#else - Module lexillaLibrary = dlopen(libPath, RTLD_LAZY); -#endif - - printf("Opened %s -> %p.\n", libPath, lexillaLibrary); - if (lexillaLibrary) { - GetLexerCountFn lexerCount = (GetLexerCountFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERCOUNT); - if (lexerCount) { - int nLexers = lexerCount(); - printf("There are %d lexers.\n", nLexers); - GetLexerNameFn lexerName = (GetLexerNameFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERNAME); - for (int i = 0; i < nLexers; i++) { - char name[100] = ""; - lexerName(i, name, sizeof(name)); - printf("%s ", name); - } - printf("\n"); - - GetLexerFactoryFn lexerFactory = (GetLexerFactoryFn)FindSymbol(lexillaLibrary, LEXILLA_GETLEXERFACTORY); - LexerFactoryFunction lexerFactory4 = lexerFactory(4); // 4th entry is "as" which is an object lexer so works - printf("Lexer factory 4 -> %p.\n", lexerFactory4); - - CreateLexerFn lexerCreate = (CreateLexerFn)FindSymbol(lexillaLibrary, LEXILLA_CREATELEXER); - ILexer5 *lexerCpp = lexerCreate("cpp"); - printf("Created cpp lexer -> %p.\n", lexerCpp); - - LexerNameFromIDFn lexerNameFromID = (LexerNameFromIDFn)FindSymbol(lexillaLibrary, LEXILLA_LEXERNAMEFROMID); - if (lexerNameFromID) { - const char *lexerNameCpp = lexerNameFromID(3); // SCLEX_CPP=3 - if (lexerNameCpp) { - printf("Lexer name 3 -> %s.\n", lexerNameCpp); - } else { - printf("Lexer name 3 not available.\n"); - } - } else { - printf("Lexer name from ID not supported.\n"); - } - - GetLibraryPropertyNamesFn libraryProperties = (GetLibraryPropertyNamesFn)FindSymbol(lexillaLibrary, LEXILLA_GETLIBRARYPROPERTYNAMES); - if (libraryProperties) { - const char *names = libraryProperties(); - printf("Property names '%s'.\n", names); - } else { - printf("Property names not supported.\n"); - } - - SetLibraryPropertyFn librarySetProperty = (SetLibraryPropertyFn)FindSymbol(lexillaLibrary, LEXILLA_SETLIBRARYPROPERTY); - if (librarySetProperty) { - librarySetProperty("key", "value"); - } else { - printf("Set property not supported.\n"); - } - - GetNameSpaceFn libraryNameSpace = (GetLibraryPropertyNamesFn)FindSymbol(lexillaLibrary, LEXILLA_GETNAMESPACE); - if (libraryNameSpace) { - const char *nameSpace = libraryNameSpace(); - printf("Name space '%s'.\n", nameSpace); - } else { - printf("Name space not supported.\n"); - } - } - } -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/examples/CheckLexilla/makefile b/3rdparty/unioncode-scintilla515/lexilla/examples/CheckLexilla/makefile deleted file mode 100644 index 5dac8883b..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/examples/CheckLexilla/makefile +++ /dev/null @@ -1,22 +0,0 @@ -.PHONY: all check clean - -INCLUDES = -I ../../include -EXE = $(if $(windir),CheckLexilla.exe,CheckLexilla) - -ifdef windir - RM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q) - CC = gcc -else - LIBS += -ldl -endif - -all: $(EXE) - -check: $(EXE) - ./$(EXE) - -clean: - $(RM) $(EXE) - -$(EXE): *.c - $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $^ $(LIBS) $(LDLIBS) -o $@ diff --git a/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/SimpleLexer.cxx b/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/SimpleLexer.cxx deleted file mode 100644 index 3427a9d76..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/SimpleLexer.cxx +++ /dev/null @@ -1,123 +0,0 @@ -// A simple lexer -/** @file SimpleLexer.cxx - ** A lexer that follows the Lexilla protocol to allow it to be used from Lexilla clients like SciTE. - ** The lexer applies alternating styles (0,1) to bytes of the text. - **/ -// Copyright 2021 by Neil Hodgson -// This file is in the public domain. -// If the public domain is not possible in your location then it can also be used under the same -// license as Scintilla. https://www.scintilla.org/License.txt - -// Windows/MSVC -// cl -std:c++17 -EHsc -LD -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx - -// macOS/clang -// clang++ -dynamiclib --std=c++17 -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx -o SimpleLexer.dylib - -// Linux/g++ -// g++ -fPIC -shared --std=c++17 -I ../../../scintilla/include -I ../../include -I ../../lexlib SimpleLexer.cxx ../../lexlib/*.cxx -o SimpleLexer.so - -/* It can be demonstrated in SciTE like this, substituting the actual shared library location as lexilla.path: -lexilla.path=.;C:\u\hg\lexilla\examples\SimpleLexer\SimpleLexer.dll -lexer.*.xx=simple -style.simple.1=fore:#FF0000 -*/ - -#include -#include -#include - -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" -// Lexilla.h should not be included here as it declares statically linked functions without the __declspec( dllexport ) - -#include "WordList.h" -#include "PropSetSimple.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" -#include "LexerBase.h" - -using namespace Scintilla; -using namespace Lexilla; - -class LexerSimple : public LexerBase { -public: - LexerSimple() { - } - void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override { - try { - Accessor astyler(pAccess, &props); - if (length > 0) { - astyler.StartAt(startPos); - astyler.StartSegment(startPos); - for (unsigned int k=0; kSetErrorStatus(SC_STATUS_FAILURE); - } - } - void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) override { - } - - static ILexer5 *LexerFactorySimple() { - try { - return new LexerSimple(); - } catch (...) { - // Should not throw into caller as may be compiled with different compiler or options - return nullptr; - } - } -}; - -#if _WIN32 -#define EXPORT_FUNCTION __declspec(dllexport) -#define CALLING_CONVENTION __stdcall -#else -#define EXPORT_FUNCTION __attribute__((visibility("default"))) -#define CALLING_CONVENTION -#endif - -static const char *lexerName = "simple"; - -extern "C" { - -EXPORT_FUNCTION int CALLING_CONVENTION GetLexerCount() { - return 1; -} - -EXPORT_FUNCTION void CALLING_CONVENTION GetLexerName(unsigned int index, char *name, int buflength) { - *name = 0; - if ((index == 0) && (buflength > static_cast(strlen(lexerName)))) { - strcpy(name, lexerName); - } -} - -EXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) { - if (index == 0) - return LexerSimple::LexerFactorySimple; - else - return 0; -} - -EXPORT_FUNCTION Scintilla::ILexer5* CALLING_CONVENTION CreateLexer(const char *name) { - if (0 == strcmp(name, lexerName)) { - return LexerSimple::LexerFactorySimple(); - } - return nullptr; -} - -EXPORT_FUNCTION const char * CALLING_CONVENTION GetNameSpace() { - return "example"; -} - -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/makefile b/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/makefile deleted file mode 100644 index 06ab6e1a2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/examples/SimpleLexer/makefile +++ /dev/null @@ -1,38 +0,0 @@ -.PHONY: all check clean - -INCLUDES = -I ../../../scintilla/include -I ../../include -I ../../lexlib - -BASE_FLAGS += --std=c++17 -shared - -ifdef windir - SHAREDEXTENSION = dll -else - ifeq ($(shell uname),Darwin) - SHAREDEXTENSION = dylib - BASE_FLAGS += -dynamiclib -arch arm64 -arch x86_64 - else - BASE_FLAGS += -fPIC - SHAREDEXTENSION = so - endif - BASE_FLAGS += -fvisibility=hidden -endif - -ifdef windir - RM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q) - CXX = g++ -endif - -LIBRARY = SimpleLexer.$(SHAREDEXTENSION) -LEXLIB = ../../lexlib/*.cxx - -all: $(LIBRARY) - -# make check requires CheckLexilla to have already been built -check: $(LIBRARY) - ../CheckLexilla/CheckLexilla ./$(LIBRARY) - -clean: - $(RM) *.o *obj *.lib *.exp $(LIBRARY) - -$(LIBRARY): *.cxx - $(CXX) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $^ $(LEXLIB) $(LIBS) $(LDLIBS) -o $@ diff --git a/3rdparty/unioncode-scintilla515/lexilla/include/LexicalStyles.iface b/3rdparty/unioncode-scintilla515/lexilla/include/LexicalStyles.iface deleted file mode 100644 index 7913bc91d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/include/LexicalStyles.iface +++ /dev/null @@ -1,2330 +0,0 @@ -## This file defines the interface to Lexilla - -## Copyright 2000-2020 by Neil Hodgson -## The License.txt file describes the conditions under which this software may be distributed. - -## Similar file structure as Scintilla.iface but only contains constants. - -cat Default - -################################################ -# For SciLexer.h -enu Lexer=SCLEX_ -val SCLEX_CONTAINER=0 -val SCLEX_NULL=1 -val SCLEX_PYTHON=2 -val SCLEX_CPP=3 -val SCLEX_HTML=4 -val SCLEX_XML=5 -val SCLEX_PERL=6 -val SCLEX_SQL=7 -val SCLEX_VB=8 -val SCLEX_PROPERTIES=9 -val SCLEX_ERRORLIST=10 -val SCLEX_MAKEFILE=11 -val SCLEX_BATCH=12 -val SCLEX_XCODE=13 -val SCLEX_LATEX=14 -val SCLEX_LUA=15 -val SCLEX_DIFF=16 -val SCLEX_CONF=17 -val SCLEX_PASCAL=18 -val SCLEX_AVE=19 -val SCLEX_ADA=20 -val SCLEX_LISP=21 -val SCLEX_RUBY=22 -val SCLEX_EIFFEL=23 -val SCLEX_EIFFELKW=24 -val SCLEX_TCL=25 -val SCLEX_NNCRONTAB=26 -val SCLEX_BULLANT=27 -val SCLEX_VBSCRIPT=28 -val SCLEX_BAAN=31 -val SCLEX_MATLAB=32 -val SCLEX_SCRIPTOL=33 -val SCLEX_ASM=34 -val SCLEX_CPPNOCASE=35 -val SCLEX_FORTRAN=36 -val SCLEX_F77=37 -val SCLEX_CSS=38 -val SCLEX_POV=39 -val SCLEX_LOUT=40 -val SCLEX_ESCRIPT=41 -val SCLEX_PS=42 -val SCLEX_NSIS=43 -val SCLEX_MMIXAL=44 -val SCLEX_CLW=45 -val SCLEX_CLWNOCASE=46 -val SCLEX_LOT=47 -val SCLEX_YAML=48 -val SCLEX_TEX=49 -val SCLEX_METAPOST=50 -val SCLEX_POWERBASIC=51 -val SCLEX_FORTH=52 -val SCLEX_ERLANG=53 -val SCLEX_OCTAVE=54 -val SCLEX_MSSQL=55 -val SCLEX_VERILOG=56 -val SCLEX_KIX=57 -val SCLEX_GUI4CLI=58 -val SCLEX_SPECMAN=59 -val SCLEX_AU3=60 -val SCLEX_APDL=61 -val SCLEX_BASH=62 -val SCLEX_ASN1=63 -val SCLEX_VHDL=64 -val SCLEX_CAML=65 -val SCLEX_BLITZBASIC=66 -val SCLEX_PUREBASIC=67 -val SCLEX_HASKELL=68 -val SCLEX_PHPSCRIPT=69 -val SCLEX_TADS3=70 -val SCLEX_REBOL=71 -val SCLEX_SMALLTALK=72 -val SCLEX_FLAGSHIP=73 -val SCLEX_CSOUND=74 -val SCLEX_FREEBASIC=75 -val SCLEX_INNOSETUP=76 -val SCLEX_OPAL=77 -val SCLEX_SPICE=78 -val SCLEX_D=79 -val SCLEX_CMAKE=80 -val SCLEX_GAP=81 -val SCLEX_PLM=82 -val SCLEX_PROGRESS=83 -val SCLEX_ABAQUS=84 -val SCLEX_ASYMPTOTE=85 -val SCLEX_R=86 -val SCLEX_MAGIK=87 -val SCLEX_POWERSHELL=88 -val SCLEX_MYSQL=89 -val SCLEX_PO=90 -val SCLEX_TAL=91 -val SCLEX_COBOL=92 -val SCLEX_TACL=93 -val SCLEX_SORCUS=94 -val SCLEX_POWERPRO=95 -val SCLEX_NIMROD=96 -val SCLEX_SML=97 -val SCLEX_MARKDOWN=98 -val SCLEX_TXT2TAGS=99 -val SCLEX_A68K=100 -val SCLEX_MODULA=101 -val SCLEX_COFFEESCRIPT=102 -val SCLEX_TCMD=103 -val SCLEX_AVS=104 -val SCLEX_ECL=105 -val SCLEX_OSCRIPT=106 -val SCLEX_VISUALPROLOG=107 -val SCLEX_LITERATEHASKELL=108 -val SCLEX_STTXT=109 -val SCLEX_KVIRC=110 -val SCLEX_RUST=111 -val SCLEX_DMAP=112 -val SCLEX_AS=113 -val SCLEX_DMIS=114 -val SCLEX_REGISTRY=115 -val SCLEX_BIBTEX=116 -val SCLEX_SREC=117 -val SCLEX_IHEX=118 -val SCLEX_TEHEX=119 -val SCLEX_JSON=120 -val SCLEX_EDIFACT=121 -val SCLEX_INDENT=122 -val SCLEX_MAXIMA=123 -val SCLEX_STATA=124 -val SCLEX_SAS=125 -val SCLEX_NIM=126 -val SCLEX_CIL=127 -val SCLEX_X12=128 -val SCLEX_DATAFLEX=129 -val SCLEX_HOLLYWOOD=130 -val SCLEX_RAKU=131 -val SCLEX_FSHARP=132 -val SCLEX_JULIA=133 -val SCLEX_ASCIIDOC=134 -val SCLEX_GDSCRIPT=135 -val SCLEX_JAVA 136 -val SCLEX_JAVANOCASE 137 - -# When a lexer specifies its language as SCLEX_AUTOMATIC it receives a -# value assigned in sequence from SCLEX_AUTOMATIC+1. -val SCLEX_AUTOMATIC=1000 -# Lexical states for SCLEX_PYTHON -lex Python=SCLEX_PYTHON SCE_P_ -lex Nimrod=SCLEX_NIMROD SCE_P_ -val SCE_P_DEFAULT=0 -val SCE_P_COMMENTLINE=1 -val SCE_P_NUMBER=2 -val SCE_P_STRING=3 -val SCE_P_CHARACTER=4 -val SCE_P_WORD=5 -val SCE_P_TRIPLE=6 -val SCE_P_TRIPLEDOUBLE=7 -val SCE_P_CLASSNAME=8 -val SCE_P_DEFNAME=9 -val SCE_P_OPERATOR=10 -val SCE_P_IDENTIFIER=11 -val SCE_P_COMMENTBLOCK=12 -val SCE_P_STRINGEOL=13 -val SCE_P_WORD2=14 -val SCE_P_DECORATOR=15 -val SCE_P_FSTRING=16 -val SCE_P_FCHARACTER=17 -val SCE_P_FTRIPLE=18 -val SCE_P_FTRIPLEDOUBLE=19 -# Lexical states for SCLEX_CPP -# Lexical states for SCLEX_BULLANT -# Lexical states for SCLEX_COBOL -# Lexical states for SCLEX_TACL -# Lexical states for SCLEX_TAL -lex Cpp=SCLEX_CPP SCE_C_ -lex Java=SCLEX_JAVA SCE_JAVA_ -lex BullAnt=SCLEX_BULLANT SCE_C_ -lex COBOL=SCLEX_COBOL SCE_C_ -lex TACL=SCLEX_TACL SCE_C_ -lex TAL=SCLEX_TAL SCE_C_ -val SCE_C_DEFAULT=0 -val SCE_C_COMMENT=1 -val SCE_C_COMMENTLINE=2 -val SCE_C_COMMENTDOC=3 -val SCE_C_NUMBER=4 -val SCE_C_WORD=5 -val SCE_C_STRING=6 -val SCE_C_CHARACTER=7 -val SCE_C_UUID=8 -val SCE_C_PREPROCESSOR=9 -val SCE_C_OPERATOR=10 -val SCE_C_IDENTIFIER=11 -val SCE_C_STRINGEOL=12 -val SCE_C_VERBATIM=13 -val SCE_C_REGEX=14 -val SCE_C_COMMENTLINEDOC=15 -val SCE_C_WORD2=16 -val SCE_C_COMMENTDOCKEYWORD=17 -val SCE_C_COMMENTDOCKEYWORDERROR=18 -val SCE_C_GLOBALCLASS=19 -val SCE_C_STRINGRAW=20 -val SCE_C_TRIPLEVERBATIM=21 -val SCE_C_HASHQUOTEDSTRING=22 -val SCE_C_PREPROCESSORCOMMENT=23 -val SCE_C_PREPROCESSORCOMMENTDOC=24 -val SCE_C_USERLITERAL=25 -val SCE_C_TASKMARKER=26 -val SCE_C_ESCAPESEQUENCE=27 -# Lexical states from SCLEX_JAVA -val SCE_JAVA_DEFAULT 0 -val SCE_JAVA_COMMENT 1 -val SCE_JAVA_COMMENTLINE 2 -val SCE_JAVA_COMMENTDOC 3 -val SCE_JAVA_NUMBER 4 -val SCE_JAVA_WORD 5 -val SCE_JAVA_STRING 6 -val SCE_JAVA_CHARACTER 7 -val SCE_JAVA_UUID 8 -val SCE_JAVA_PREPROCESSOR 9 -val SCE_JAVA_OPERATOR 10 -val SCE_JAVA_IDENTIFIER 11 -val SCE_JAVA_STRINGEOL 12 -val SCE_JAVA_VERBATIM 13 -val SCE_JAVA_REGEX 14 -val SCE_JAVA_COMMENTLINEDOC 15 -val SCE_JAVA_WORD2 16 -val SCE_JAVA_COMMENTDOCKEYWORD 17 -val SCE_JAVA_COMMENTDOCKEYWORDERROR 18 -val SCE_JAVA_GLOBALCLASS 19 -val SCE_JAVA_STRINGRAW 20 -val SCE_JAVA_TRIPLEVERBATIM 21 -val SCE_JAVA_HASHQUOTEDSTRING 22 -val SCE_JAVA_PREPROCESSORCOMMENT 23 -val SCE_JAVA_PREPROCESSORCOMMENTDOC 24 -val SCE_JAVA_USERLITERAL 25 -val SCE_JAVA_TASKMARKER 26 -val SCE_JAVA_ESCAPESEQUENCE 27 -# Lexical states for SCLEX_D -lex D=SCLEX_D SCE_D_ -val SCE_D_DEFAULT=0 -val SCE_D_COMMENT=1 -val SCE_D_COMMENTLINE=2 -val SCE_D_COMMENTDOC=3 -val SCE_D_COMMENTNESTED=4 -val SCE_D_NUMBER=5 -val SCE_D_WORD=6 -val SCE_D_WORD2=7 -val SCE_D_WORD3=8 -val SCE_D_TYPEDEF=9 -val SCE_D_STRING=10 -val SCE_D_STRINGEOL=11 -val SCE_D_CHARACTER=12 -val SCE_D_OPERATOR=13 -val SCE_D_IDENTIFIER=14 -val SCE_D_COMMENTLINEDOC=15 -val SCE_D_COMMENTDOCKEYWORD=16 -val SCE_D_COMMENTDOCKEYWORDERROR=17 -val SCE_D_STRINGB=18 -val SCE_D_STRINGR=19 -val SCE_D_WORD5=20 -val SCE_D_WORD6=21 -val SCE_D_WORD7=22 -# Lexical states for SCLEX_TCL -lex TCL=SCLEX_TCL SCE_TCL_ -val SCE_TCL_DEFAULT=0 -val SCE_TCL_COMMENT=1 -val SCE_TCL_COMMENTLINE=2 -val SCE_TCL_NUMBER=3 -val SCE_TCL_WORD_IN_QUOTE=4 -val SCE_TCL_IN_QUOTE=5 -val SCE_TCL_OPERATOR=6 -val SCE_TCL_IDENTIFIER=7 -val SCE_TCL_SUBSTITUTION=8 -val SCE_TCL_SUB_BRACE=9 -val SCE_TCL_MODIFIER=10 -val SCE_TCL_EXPAND=11 -val SCE_TCL_WORD=12 -val SCE_TCL_WORD2=13 -val SCE_TCL_WORD3=14 -val SCE_TCL_WORD4=15 -val SCE_TCL_WORD5=16 -val SCE_TCL_WORD6=17 -val SCE_TCL_WORD7=18 -val SCE_TCL_WORD8=19 -val SCE_TCL_COMMENT_BOX=20 -val SCE_TCL_BLOCK_COMMENT=21 -# Lexical states for SCLEX_HTML, SCLEX_XML -lex HTML=SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ -lex XML=SCLEX_XML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_ -val SCE_H_DEFAULT=0 -val SCE_H_TAG=1 -val SCE_H_TAGUNKNOWN=2 -val SCE_H_ATTRIBUTE=3 -val SCE_H_ATTRIBUTEUNKNOWN=4 -val SCE_H_NUMBER=5 -val SCE_H_DOUBLESTRING=6 -val SCE_H_SINGLESTRING=7 -val SCE_H_OTHER=8 -val SCE_H_COMMENT=9 -val SCE_H_ENTITY=10 -# XML and ASP -val SCE_H_TAGEND=11 -val SCE_H_XMLSTART=12 -val SCE_H_XMLEND=13 -val SCE_H_SCRIPT=14 -val SCE_H_ASP=15 -val SCE_H_ASPAT=16 -val SCE_H_CDATA=17 -val SCE_H_QUESTION=18 -# More HTML -val SCE_H_VALUE=19 -# X-Code -val SCE_H_XCCOMMENT=20 -# SGML -val SCE_H_SGML_DEFAULT=21 -val SCE_H_SGML_COMMAND=22 -val SCE_H_SGML_1ST_PARAM=23 -val SCE_H_SGML_DOUBLESTRING=24 -val SCE_H_SGML_SIMPLESTRING=25 -val SCE_H_SGML_ERROR=26 -val SCE_H_SGML_SPECIAL=27 -val SCE_H_SGML_ENTITY=28 -val SCE_H_SGML_COMMENT=29 -val SCE_H_SGML_1ST_PARAM_COMMENT=30 -val SCE_H_SGML_BLOCK_DEFAULT=31 -# Embedded Javascript -val SCE_HJ_START=40 -val SCE_HJ_DEFAULT=41 -val SCE_HJ_COMMENT=42 -val SCE_HJ_COMMENTLINE=43 -val SCE_HJ_COMMENTDOC=44 -val SCE_HJ_NUMBER=45 -val SCE_HJ_WORD=46 -val SCE_HJ_KEYWORD=47 -val SCE_HJ_DOUBLESTRING=48 -val SCE_HJ_SINGLESTRING=49 -val SCE_HJ_SYMBOLS=50 -val SCE_HJ_STRINGEOL=51 -val SCE_HJ_REGEX=52 -# ASP Javascript -val SCE_HJA_START=55 -val SCE_HJA_DEFAULT=56 -val SCE_HJA_COMMENT=57 -val SCE_HJA_COMMENTLINE=58 -val SCE_HJA_COMMENTDOC=59 -val SCE_HJA_NUMBER=60 -val SCE_HJA_WORD=61 -val SCE_HJA_KEYWORD=62 -val SCE_HJA_DOUBLESTRING=63 -val SCE_HJA_SINGLESTRING=64 -val SCE_HJA_SYMBOLS=65 -val SCE_HJA_STRINGEOL=66 -val SCE_HJA_REGEX=67 -# Embedded VBScript -val SCE_HB_START=70 -val SCE_HB_DEFAULT=71 -val SCE_HB_COMMENTLINE=72 -val SCE_HB_NUMBER=73 -val SCE_HB_WORD=74 -val SCE_HB_STRING=75 -val SCE_HB_IDENTIFIER=76 -val SCE_HB_STRINGEOL=77 -# ASP VBScript -val SCE_HBA_START=80 -val SCE_HBA_DEFAULT=81 -val SCE_HBA_COMMENTLINE=82 -val SCE_HBA_NUMBER=83 -val SCE_HBA_WORD=84 -val SCE_HBA_STRING=85 -val SCE_HBA_IDENTIFIER=86 -val SCE_HBA_STRINGEOL=87 -# Embedded Python -val SCE_HP_START=90 -val SCE_HP_DEFAULT=91 -val SCE_HP_COMMENTLINE=92 -val SCE_HP_NUMBER=93 -val SCE_HP_STRING=94 -val SCE_HP_CHARACTER=95 -val SCE_HP_WORD=96 -val SCE_HP_TRIPLE=97 -val SCE_HP_TRIPLEDOUBLE=98 -val SCE_HP_CLASSNAME=99 -val SCE_HP_DEFNAME=100 -val SCE_HP_OPERATOR=101 -val SCE_HP_IDENTIFIER=102 -# PHP -val SCE_HPHP_COMPLEX_VARIABLE=104 -# ASP Python -val SCE_HPA_START=105 -val SCE_HPA_DEFAULT=106 -val SCE_HPA_COMMENTLINE=107 -val SCE_HPA_NUMBER=108 -val SCE_HPA_STRING=109 -val SCE_HPA_CHARACTER=110 -val SCE_HPA_WORD=111 -val SCE_HPA_TRIPLE=112 -val SCE_HPA_TRIPLEDOUBLE=113 -val SCE_HPA_CLASSNAME=114 -val SCE_HPA_DEFNAME=115 -val SCE_HPA_OPERATOR=116 -val SCE_HPA_IDENTIFIER=117 -# PHP -val SCE_HPHP_DEFAULT=118 -val SCE_HPHP_HSTRING=119 -val SCE_HPHP_SIMPLESTRING=120 -val SCE_HPHP_WORD=121 -val SCE_HPHP_NUMBER=122 -val SCE_HPHP_VARIABLE=123 -val SCE_HPHP_COMMENT=124 -val SCE_HPHP_COMMENTLINE=125 -val SCE_HPHP_HSTRING_VARIABLE=126 -val SCE_HPHP_OPERATOR=127 -# Lexical states for SCLEX_PERL -lex Perl=SCLEX_PERL SCE_PL_ -val SCE_PL_DEFAULT=0 -val SCE_PL_ERROR=1 -val SCE_PL_COMMENTLINE=2 -val SCE_PL_POD=3 -val SCE_PL_NUMBER=4 -val SCE_PL_WORD=5 -val SCE_PL_STRING=6 -val SCE_PL_CHARACTER=7 -val SCE_PL_PUNCTUATION=8 -val SCE_PL_PREPROCESSOR=9 -val SCE_PL_OPERATOR=10 -val SCE_PL_IDENTIFIER=11 -val SCE_PL_SCALAR=12 -val SCE_PL_ARRAY=13 -val SCE_PL_HASH=14 -val SCE_PL_SYMBOLTABLE=15 -val SCE_PL_VARIABLE_INDEXER=16 -val SCE_PL_REGEX=17 -val SCE_PL_REGSUBST=18 -val SCE_PL_LONGQUOTE=19 -val SCE_PL_BACKTICKS=20 -val SCE_PL_DATASECTION=21 -val SCE_PL_HERE_DELIM=22 -val SCE_PL_HERE_Q=23 -val SCE_PL_HERE_QQ=24 -val SCE_PL_HERE_QX=25 -val SCE_PL_STRING_Q=26 -val SCE_PL_STRING_QQ=27 -val SCE_PL_STRING_QX=28 -val SCE_PL_STRING_QR=29 -val SCE_PL_STRING_QW=30 -val SCE_PL_POD_VERB=31 -val SCE_PL_SUB_PROTOTYPE=40 -val SCE_PL_FORMAT_IDENT=41 -val SCE_PL_FORMAT=42 -val SCE_PL_STRING_VAR=43 -val SCE_PL_XLAT=44 -val SCE_PL_REGEX_VAR=54 -val SCE_PL_REGSUBST_VAR=55 -val SCE_PL_BACKTICKS_VAR=57 -val SCE_PL_HERE_QQ_VAR=61 -val SCE_PL_HERE_QX_VAR=62 -val SCE_PL_STRING_QQ_VAR=64 -val SCE_PL_STRING_QX_VAR=65 -val SCE_PL_STRING_QR_VAR=66 -# Lexical states for SCLEX_RUBY -lex Ruby=SCLEX_RUBY SCE_RB_ -val SCE_RB_DEFAULT=0 -val SCE_RB_ERROR=1 -val SCE_RB_COMMENTLINE=2 -val SCE_RB_POD=3 -val SCE_RB_NUMBER=4 -val SCE_RB_WORD=5 -val SCE_RB_STRING=6 -val SCE_RB_CHARACTER=7 -val SCE_RB_CLASSNAME=8 -val SCE_RB_DEFNAME=9 -val SCE_RB_OPERATOR=10 -val SCE_RB_IDENTIFIER=11 -val SCE_RB_REGEX=12 -val SCE_RB_GLOBAL=13 -val SCE_RB_SYMBOL=14 -val SCE_RB_MODULE_NAME=15 -val SCE_RB_INSTANCE_VAR=16 -val SCE_RB_CLASS_VAR=17 -val SCE_RB_BACKTICKS=18 -val SCE_RB_DATASECTION=19 -val SCE_RB_HERE_DELIM=20 -val SCE_RB_HERE_Q=21 -val SCE_RB_HERE_QQ=22 -val SCE_RB_HERE_QX=23 -val SCE_RB_STRING_Q=24 -val SCE_RB_STRING_QQ=25 -val SCE_RB_STRING_QX=26 -val SCE_RB_STRING_QR=27 -val SCE_RB_STRING_QW=28 -val SCE_RB_WORD_DEMOTED=29 -val SCE_RB_STDIN=30 -val SCE_RB_STDOUT=31 -val SCE_RB_STDERR=40 -val SCE_RB_UPPER_BOUND=41 -# Lexical states for SCLEX_VB, SCLEX_VBSCRIPT, SCLEX_POWERBASIC, SCLEX_BLITZBASIC, SCLEX_PUREBASIC, SCLEX_FREEBASIC -lex VB=SCLEX_VB SCE_B_ -lex VBScript=SCLEX_VBSCRIPT SCE_B_ -lex PowerBasic=SCLEX_POWERBASIC SCE_B_ -lex BlitzBasic=SCLEX_BLITZBASIC SCE_B_ -lex PureBasic=SCLEX_PUREBASIC SCE_B_ -lex FreeBasic=SCLEX_FREEBASIC SCE_B_ -val SCE_B_DEFAULT=0 -val SCE_B_COMMENT=1 -val SCE_B_NUMBER=2 -val SCE_B_KEYWORD=3 -val SCE_B_STRING=4 -val SCE_B_PREPROCESSOR=5 -val SCE_B_OPERATOR=6 -val SCE_B_IDENTIFIER=7 -val SCE_B_DATE=8 -val SCE_B_STRINGEOL=9 -val SCE_B_KEYWORD2=10 -val SCE_B_KEYWORD3=11 -val SCE_B_KEYWORD4=12 -val SCE_B_CONSTANT=13 -val SCE_B_ASM=14 -val SCE_B_LABEL=15 -val SCE_B_ERROR=16 -val SCE_B_HEXNUMBER=17 -val SCE_B_BINNUMBER=18 -val SCE_B_COMMENTBLOCK=19 -val SCE_B_DOCLINE=20 -val SCE_B_DOCBLOCK=21 -val SCE_B_DOCKEYWORD=22 -# Lexical states for SCLEX_PROPERTIES -lex Properties=SCLEX_PROPERTIES SCE_PROPS_ -val SCE_PROPS_DEFAULT=0 -val SCE_PROPS_COMMENT=1 -val SCE_PROPS_SECTION=2 -val SCE_PROPS_ASSIGNMENT=3 -val SCE_PROPS_DEFVAL=4 -val SCE_PROPS_KEY=5 -# Lexical states for SCLEX_LATEX -lex LaTeX=SCLEX_LATEX SCE_L_ -val SCE_L_DEFAULT=0 -val SCE_L_COMMAND=1 -val SCE_L_TAG=2 -val SCE_L_MATH=3 -val SCE_L_COMMENT=4 -val SCE_L_TAG2=5 -val SCE_L_MATH2=6 -val SCE_L_COMMENT2=7 -val SCE_L_VERBATIM=8 -val SCE_L_SHORTCMD=9 -val SCE_L_SPECIAL=10 -val SCE_L_CMDOPT=11 -val SCE_L_ERROR=12 -# Lexical states for SCLEX_LUA -lex Lua=SCLEX_LUA SCE_LUA_ -val SCE_LUA_DEFAULT=0 -val SCE_LUA_COMMENT=1 -val SCE_LUA_COMMENTLINE=2 -val SCE_LUA_COMMENTDOC=3 -val SCE_LUA_NUMBER=4 -val SCE_LUA_WORD=5 -val SCE_LUA_STRING=6 -val SCE_LUA_CHARACTER=7 -val SCE_LUA_LITERALSTRING=8 -val SCE_LUA_PREPROCESSOR=9 -val SCE_LUA_OPERATOR=10 -val SCE_LUA_IDENTIFIER=11 -val SCE_LUA_STRINGEOL=12 -val SCE_LUA_WORD2=13 -val SCE_LUA_WORD3=14 -val SCE_LUA_WORD4=15 -val SCE_LUA_WORD5=16 -val SCE_LUA_WORD6=17 -val SCE_LUA_WORD7=18 -val SCE_LUA_WORD8=19 -val SCE_LUA_LABEL=20 -# Lexical states for SCLEX_ERRORLIST -lex ErrorList=SCLEX_ERRORLIST SCE_ERR_ -val SCE_ERR_DEFAULT=0 -val SCE_ERR_PYTHON=1 -val SCE_ERR_GCC=2 -val SCE_ERR_MS=3 -val SCE_ERR_CMD=4 -val SCE_ERR_BORLAND=5 -val SCE_ERR_PERL=6 -val SCE_ERR_NET=7 -val SCE_ERR_LUA=8 -val SCE_ERR_CTAG=9 -val SCE_ERR_DIFF_CHANGED=10 -val SCE_ERR_DIFF_ADDITION=11 -val SCE_ERR_DIFF_DELETION=12 -val SCE_ERR_DIFF_MESSAGE=13 -val SCE_ERR_PHP=14 -val SCE_ERR_ELF=15 -val SCE_ERR_IFC=16 -val SCE_ERR_IFORT=17 -val SCE_ERR_ABSF=18 -val SCE_ERR_TIDY=19 -val SCE_ERR_JAVA_STACK=20 -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 -val SCE_ERR_ES_BROWN=43 -val SCE_ERR_ES_BLUE=44 -val SCE_ERR_ES_MAGENTA=45 -val SCE_ERR_ES_CYAN=46 -val SCE_ERR_ES_GRAY=47 -val SCE_ERR_ES_DARK_GRAY=48 -val SCE_ERR_ES_BRIGHT_RED=49 -val SCE_ERR_ES_BRIGHT_GREEN=50 -val SCE_ERR_ES_YELLOW=51 -val SCE_ERR_ES_BRIGHT_BLUE=52 -val SCE_ERR_ES_BRIGHT_MAGENTA=53 -val SCE_ERR_ES_BRIGHT_CYAN=54 -val SCE_ERR_ES_WHITE=55 -# Lexical states for SCLEX_BATCH -lex Batch=SCLEX_BATCH SCE_BAT_ -val SCE_BAT_DEFAULT=0 -val SCE_BAT_COMMENT=1 -val SCE_BAT_WORD=2 -val SCE_BAT_LABEL=3 -val SCE_BAT_HIDE=4 -val SCE_BAT_COMMAND=5 -val SCE_BAT_IDENTIFIER=6 -val SCE_BAT_OPERATOR=7 -# Lexical states for SCLEX_TCMD -lex TCMD=SCLEX_TCMD SCE_TCMD_ -val SCE_TCMD_DEFAULT=0 -val SCE_TCMD_COMMENT=1 -val SCE_TCMD_WORD=2 -val SCE_TCMD_LABEL=3 -val SCE_TCMD_HIDE=4 -val SCE_TCMD_COMMAND=5 -val SCE_TCMD_IDENTIFIER=6 -val SCE_TCMD_OPERATOR=7 -val SCE_TCMD_ENVIRONMENT=8 -val SCE_TCMD_EXPANSION=9 -val SCE_TCMD_CLABEL=10 -# Lexical states for SCLEX_MAKEFILE -lex MakeFile=SCLEX_MAKEFILE SCE_MAKE_ -val SCE_MAKE_DEFAULT=0 -val SCE_MAKE_COMMENT=1 -val SCE_MAKE_PREPROCESSOR=2 -val SCE_MAKE_IDENTIFIER=3 -val SCE_MAKE_OPERATOR=4 -val SCE_MAKE_TARGET=5 -val SCE_MAKE_IDEOL=9 -# Lexical states for SCLEX_DIFF -lex Diff=SCLEX_DIFF SCE_DIFF_ -val SCE_DIFF_DEFAULT=0 -val SCE_DIFF_COMMENT=1 -val SCE_DIFF_COMMAND=2 -val SCE_DIFF_HEADER=3 -val SCE_DIFF_POSITION=4 -val SCE_DIFF_DELETED=5 -val SCE_DIFF_ADDED=6 -val SCE_DIFF_CHANGED=7 -val SCE_DIFF_PATCH_ADD=8 -val SCE_DIFF_PATCH_DELETE=9 -val SCE_DIFF_REMOVED_PATCH_ADD=10 -val SCE_DIFF_REMOVED_PATCH_DELETE=11 -# Lexical states for SCLEX_CONF (Apache Configuration Files Lexer) -lex Conf=SCLEX_CONF SCE_CONF_ -val SCE_CONF_DEFAULT=0 -val SCE_CONF_COMMENT=1 -val SCE_CONF_NUMBER=2 -val SCE_CONF_IDENTIFIER=3 -val SCE_CONF_EXTENSION=4 -val SCE_CONF_PARAMETER=5 -val SCE_CONF_STRING=6 -val SCE_CONF_OPERATOR=7 -val SCE_CONF_IP=8 -val SCE_CONF_DIRECTIVE=9 -# Lexical states for SCLEX_AVE, Avenue -lex Avenue=SCLEX_AVE SCE_AVE_ -val SCE_AVE_DEFAULT=0 -val SCE_AVE_COMMENT=1 -val SCE_AVE_NUMBER=2 -val SCE_AVE_WORD=3 -val SCE_AVE_STRING=6 -val SCE_AVE_ENUM=7 -val SCE_AVE_STRINGEOL=8 -val SCE_AVE_IDENTIFIER=9 -val SCE_AVE_OPERATOR=10 -val SCE_AVE_WORD1=11 -val SCE_AVE_WORD2=12 -val SCE_AVE_WORD3=13 -val SCE_AVE_WORD4=14 -val SCE_AVE_WORD5=15 -val SCE_AVE_WORD6=16 -# Lexical states for SCLEX_ADA -lex Ada=SCLEX_ADA SCE_ADA_ -val SCE_ADA_DEFAULT=0 -val SCE_ADA_WORD=1 -val SCE_ADA_IDENTIFIER=2 -val SCE_ADA_NUMBER=3 -val SCE_ADA_DELIMITER=4 -val SCE_ADA_CHARACTER=5 -val SCE_ADA_CHARACTEREOL=6 -val SCE_ADA_STRING=7 -val SCE_ADA_STRINGEOL=8 -val SCE_ADA_LABEL=9 -val SCE_ADA_COMMENTLINE=10 -val SCE_ADA_ILLEGAL=11 -# Lexical states for SCLEX_BAAN -lex Baan=SCLEX_BAAN SCE_BAAN_ -val SCE_BAAN_DEFAULT=0 -val SCE_BAAN_COMMENT=1 -val SCE_BAAN_COMMENTDOC=2 -val SCE_BAAN_NUMBER=3 -val SCE_BAAN_WORD=4 -val SCE_BAAN_STRING=5 -val SCE_BAAN_PREPROCESSOR=6 -val SCE_BAAN_OPERATOR=7 -val SCE_BAAN_IDENTIFIER=8 -val SCE_BAAN_STRINGEOL=9 -val SCE_BAAN_WORD2=10 -val SCE_BAAN_WORD3=11 -val SCE_BAAN_WORD4=12 -val SCE_BAAN_WORD5=13 -val SCE_BAAN_WORD6=14 -val SCE_BAAN_WORD7=15 -val SCE_BAAN_WORD8=16 -val SCE_BAAN_WORD9=17 -val SCE_BAAN_TABLEDEF=18 -val SCE_BAAN_TABLESQL=19 -val SCE_BAAN_FUNCTION=20 -val SCE_BAAN_DOMDEF=21 -val SCE_BAAN_FUNCDEF=22 -val SCE_BAAN_OBJECTDEF=23 -val SCE_BAAN_DEFINEDEF=24 -# Lexical states for SCLEX_LISP -lex Lisp=SCLEX_LISP SCE_LISP_ -val SCE_LISP_DEFAULT=0 -val SCE_LISP_COMMENT=1 -val SCE_LISP_NUMBER=2 -val SCE_LISP_KEYWORD=3 -val SCE_LISP_KEYWORD_KW=4 -val SCE_LISP_SYMBOL=5 -val SCE_LISP_STRING=6 -val SCE_LISP_STRINGEOL=8 -val SCE_LISP_IDENTIFIER=9 -val SCE_LISP_OPERATOR=10 -val SCE_LISP_SPECIAL=11 -val SCE_LISP_MULTI_COMMENT=12 -# Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW -lex Eiffel=SCLEX_EIFFEL SCE_EIFFEL_ -lex EiffelKW=SCLEX_EIFFELKW SCE_EIFFEL_ -val SCE_EIFFEL_DEFAULT=0 -val SCE_EIFFEL_COMMENTLINE=1 -val SCE_EIFFEL_NUMBER=2 -val SCE_EIFFEL_WORD=3 -val SCE_EIFFEL_STRING=4 -val SCE_EIFFEL_CHARACTER=5 -val SCE_EIFFEL_OPERATOR=6 -val SCE_EIFFEL_IDENTIFIER=7 -val SCE_EIFFEL_STRINGEOL=8 -# Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer) -lex NNCronTab=SCLEX_NNCRONTAB SCE_NNCRONTAB_ -val SCE_NNCRONTAB_DEFAULT=0 -val SCE_NNCRONTAB_COMMENT=1 -val SCE_NNCRONTAB_TASK=2 -val SCE_NNCRONTAB_SECTION=3 -val SCE_NNCRONTAB_KEYWORD=4 -val SCE_NNCRONTAB_MODIFIER=5 -val SCE_NNCRONTAB_ASTERISK=6 -val SCE_NNCRONTAB_NUMBER=7 -val SCE_NNCRONTAB_STRING=8 -val SCE_NNCRONTAB_ENVIRONMENT=9 -val SCE_NNCRONTAB_IDENTIFIER=10 -# Lexical states for SCLEX_FORTH (Forth Lexer) -lex Forth=SCLEX_FORTH SCE_FORTH_ -val SCE_FORTH_DEFAULT=0 -val SCE_FORTH_COMMENT=1 -val SCE_FORTH_COMMENT_ML=2 -val SCE_FORTH_IDENTIFIER=3 -val SCE_FORTH_CONTROL=4 -val SCE_FORTH_KEYWORD=5 -val SCE_FORTH_DEFWORD=6 -val SCE_FORTH_PREWORD1=7 -val SCE_FORTH_PREWORD2=8 -val SCE_FORTH_NUMBER=9 -val SCE_FORTH_STRING=10 -val SCE_FORTH_LOCALE=11 -# Lexical states for SCLEX_MATLAB -lex MatLab=SCLEX_MATLAB SCE_MATLAB_ -val SCE_MATLAB_DEFAULT=0 -val SCE_MATLAB_COMMENT=1 -val SCE_MATLAB_COMMAND=2 -val SCE_MATLAB_NUMBER=3 -val SCE_MATLAB_KEYWORD=4 -# single quoted string -val SCE_MATLAB_STRING=5 -val SCE_MATLAB_OPERATOR=6 -val SCE_MATLAB_IDENTIFIER=7 -val SCE_MATLAB_DOUBLEQUOTESTRING=8 -# Lexical states for SCLEX_MAXIMA -lex Maxima=SCLEX_MAXIMA SCE_MAXIMA_ -val SCE_MAXIMA_OPERATOR=0 -val SCE_MAXIMA_COMMANDENDING=1 -val SCE_MAXIMA_COMMENT=2 -val SCE_MAXIMA_NUMBER=3 -val SCE_MAXIMA_STRING=4 -val SCE_MAXIMA_COMMAND=5 -val SCE_MAXIMA_VARIABLE=6 -val SCE_MAXIMA_UNKNOWN=7 -# Lexical states for SCLEX_SCRIPTOL -lex Sol=SCLEX_SCRIPTOL SCE_SCRIPTOL_ -val SCE_SCRIPTOL_DEFAULT=0 -val SCE_SCRIPTOL_WHITE=1 -val SCE_SCRIPTOL_COMMENTLINE=2 -val SCE_SCRIPTOL_PERSISTENT=3 -val SCE_SCRIPTOL_CSTYLE=4 -val SCE_SCRIPTOL_COMMENTBLOCK=5 -val SCE_SCRIPTOL_NUMBER=6 -val SCE_SCRIPTOL_STRING=7 -val SCE_SCRIPTOL_CHARACTER=8 -val SCE_SCRIPTOL_STRINGEOL=9 -val SCE_SCRIPTOL_KEYWORD=10 -val SCE_SCRIPTOL_OPERATOR=11 -val SCE_SCRIPTOL_IDENTIFIER=12 -val SCE_SCRIPTOL_TRIPLE=13 -val SCE_SCRIPTOL_CLASSNAME=14 -val SCE_SCRIPTOL_PREPROCESSOR=15 -# Lexical states for SCLEX_ASM, SCLEX_AS -lex Asm=SCLEX_ASM SCE_ASM_ -lex As=SCLEX_AS SCE_ASM_ -val SCE_ASM_DEFAULT=0 -val SCE_ASM_COMMENT=1 -val SCE_ASM_NUMBER=2 -val SCE_ASM_STRING=3 -val SCE_ASM_OPERATOR=4 -val SCE_ASM_IDENTIFIER=5 -val SCE_ASM_CPUINSTRUCTION=6 -val SCE_ASM_MATHINSTRUCTION=7 -val SCE_ASM_REGISTER=8 -val SCE_ASM_DIRECTIVE=9 -val SCE_ASM_DIRECTIVEOPERAND=10 -val SCE_ASM_COMMENTBLOCK=11 -val SCE_ASM_CHARACTER=12 -val SCE_ASM_STRINGEOL=13 -val SCE_ASM_EXTINSTRUCTION=14 -val SCE_ASM_COMMENTDIRECTIVE=15 -# Lexical states for SCLEX_FORTRAN -lex Fortran=SCLEX_FORTRAN SCE_F_ -lex F77=SCLEX_F77 SCE_F_ -val SCE_F_DEFAULT=0 -val SCE_F_COMMENT=1 -val SCE_F_NUMBER=2 -val SCE_F_STRING1=3 -val SCE_F_STRING2=4 -val SCE_F_STRINGEOL=5 -val SCE_F_OPERATOR=6 -val SCE_F_IDENTIFIER=7 -val SCE_F_WORD=8 -val SCE_F_WORD2=9 -val SCE_F_WORD3=10 -val SCE_F_PREPROCESSOR=11 -val SCE_F_OPERATOR2=12 -val SCE_F_LABEL=13 -val SCE_F_CONTINUATION=14 -# Lexical states for SCLEX_CSS -lex CSS=SCLEX_CSS SCE_CSS_ -val SCE_CSS_DEFAULT=0 -val SCE_CSS_TAG=1 -val SCE_CSS_CLASS=2 -val SCE_CSS_PSEUDOCLASS=3 -val SCE_CSS_UNKNOWN_PSEUDOCLASS=4 -val SCE_CSS_OPERATOR=5 -val SCE_CSS_IDENTIFIER=6 -val SCE_CSS_UNKNOWN_IDENTIFIER=7 -val SCE_CSS_VALUE=8 -val SCE_CSS_COMMENT=9 -val SCE_CSS_ID=10 -val SCE_CSS_IMPORTANT=11 -val SCE_CSS_DIRECTIVE=12 -val SCE_CSS_DOUBLESTRING=13 -val SCE_CSS_SINGLESTRING=14 -val SCE_CSS_IDENTIFIER2=15 -val SCE_CSS_ATTRIBUTE=16 -val SCE_CSS_IDENTIFIER3=17 -val SCE_CSS_PSEUDOELEMENT=18 -val SCE_CSS_EXTENDED_IDENTIFIER=19 -val SCE_CSS_EXTENDED_PSEUDOCLASS=20 -val SCE_CSS_EXTENDED_PSEUDOELEMENT=21 -val SCE_CSS_GROUP_RULE=22 -val SCE_CSS_VARIABLE=23 -# Lexical states for SCLEX_POV -lex POV=SCLEX_POV SCE_POV_ -val SCE_POV_DEFAULT=0 -val SCE_POV_COMMENT=1 -val SCE_POV_COMMENTLINE=2 -val SCE_POV_NUMBER=3 -val SCE_POV_OPERATOR=4 -val SCE_POV_IDENTIFIER=5 -val SCE_POV_STRING=6 -val SCE_POV_STRINGEOL=7 -val SCE_POV_DIRECTIVE=8 -val SCE_POV_BADDIRECTIVE=9 -val SCE_POV_WORD2=10 -val SCE_POV_WORD3=11 -val SCE_POV_WORD4=12 -val SCE_POV_WORD5=13 -val SCE_POV_WORD6=14 -val SCE_POV_WORD7=15 -val SCE_POV_WORD8=16 -# Lexical states for SCLEX_LOUT -lex LOUT=SCLEX_LOUT SCE_LOUT_ -val SCE_LOUT_DEFAULT=0 -val SCE_LOUT_COMMENT=1 -val SCE_LOUT_NUMBER=2 -val SCE_LOUT_WORD=3 -val SCE_LOUT_WORD2=4 -val SCE_LOUT_WORD3=5 -val SCE_LOUT_WORD4=6 -val SCE_LOUT_STRING=7 -val SCE_LOUT_OPERATOR=8 -val SCE_LOUT_IDENTIFIER=9 -val SCE_LOUT_STRINGEOL=10 -# Lexical states for SCLEX_ESCRIPT -lex ESCRIPT=SCLEX_ESCRIPT SCE_ESCRIPT_ -val SCE_ESCRIPT_DEFAULT=0 -val SCE_ESCRIPT_COMMENT=1 -val SCE_ESCRIPT_COMMENTLINE=2 -val SCE_ESCRIPT_COMMENTDOC=3 -val SCE_ESCRIPT_NUMBER=4 -val SCE_ESCRIPT_WORD=5 -val SCE_ESCRIPT_STRING=6 -val SCE_ESCRIPT_OPERATOR=7 -val SCE_ESCRIPT_IDENTIFIER=8 -val SCE_ESCRIPT_BRACE=9 -val SCE_ESCRIPT_WORD2=10 -val SCE_ESCRIPT_WORD3=11 -# Lexical states for SCLEX_PS -lex PS=SCLEX_PS SCE_PS_ -val SCE_PS_DEFAULT=0 -val SCE_PS_COMMENT=1 -val SCE_PS_DSC_COMMENT=2 -val SCE_PS_DSC_VALUE=3 -val SCE_PS_NUMBER=4 -val SCE_PS_NAME=5 -val SCE_PS_KEYWORD=6 -val SCE_PS_LITERAL=7 -val SCE_PS_IMMEVAL=8 -val SCE_PS_PAREN_ARRAY=9 -val SCE_PS_PAREN_DICT=10 -val SCE_PS_PAREN_PROC=11 -val SCE_PS_TEXT=12 -val SCE_PS_HEXSTRING=13 -val SCE_PS_BASE85STRING=14 -val SCE_PS_BADSTRINGCHAR=15 -# Lexical states for SCLEX_NSIS -lex NSIS=SCLEX_NSIS SCE_NSIS_ -val SCE_NSIS_DEFAULT=0 -val SCE_NSIS_COMMENT=1 -val SCE_NSIS_STRINGDQ=2 -val SCE_NSIS_STRINGLQ=3 -val SCE_NSIS_STRINGRQ=4 -val SCE_NSIS_FUNCTION=5 -val SCE_NSIS_VARIABLE=6 -val SCE_NSIS_LABEL=7 -val SCE_NSIS_USERDEFINED=8 -val SCE_NSIS_SECTIONDEF=9 -val SCE_NSIS_SUBSECTIONDEF=10 -val SCE_NSIS_IFDEFINEDEF=11 -val SCE_NSIS_MACRODEF=12 -val SCE_NSIS_STRINGVAR=13 -val SCE_NSIS_NUMBER=14 -val SCE_NSIS_SECTIONGROUP=15 -val SCE_NSIS_PAGEEX=16 -val SCE_NSIS_FUNCTIONDEF=17 -val SCE_NSIS_COMMENTBOX=18 -# Lexical states for SCLEX_MMIXAL -lex MMIXAL=SCLEX_MMIXAL SCE_MMIXAL_ -val SCE_MMIXAL_LEADWS=0 -val SCE_MMIXAL_COMMENT=1 -val SCE_MMIXAL_LABEL=2 -val SCE_MMIXAL_OPCODE=3 -val SCE_MMIXAL_OPCODE_PRE=4 -val SCE_MMIXAL_OPCODE_VALID=5 -val SCE_MMIXAL_OPCODE_UNKNOWN=6 -val SCE_MMIXAL_OPCODE_POST=7 -val SCE_MMIXAL_OPERANDS=8 -val SCE_MMIXAL_NUMBER=9 -val SCE_MMIXAL_REF=10 -val SCE_MMIXAL_CHAR=11 -val SCE_MMIXAL_STRING=12 -val SCE_MMIXAL_REGISTER=13 -val SCE_MMIXAL_HEX=14 -val SCE_MMIXAL_OPERATOR=15 -val SCE_MMIXAL_SYMBOL=16 -val SCE_MMIXAL_INCLUDE=17 -# Lexical states for SCLEX_CLW -lex Clarion=SCLEX_CLW SCE_CLW_ -val SCE_CLW_DEFAULT=0 -val SCE_CLW_LABEL=1 -val SCE_CLW_COMMENT=2 -val SCE_CLW_STRING=3 -val SCE_CLW_USER_IDENTIFIER=4 -val SCE_CLW_INTEGER_CONSTANT=5 -val SCE_CLW_REAL_CONSTANT=6 -val SCE_CLW_PICTURE_STRING=7 -val SCE_CLW_KEYWORD=8 -val SCE_CLW_COMPILER_DIRECTIVE=9 -val SCE_CLW_RUNTIME_EXPRESSIONS=10 -val SCE_CLW_BUILTIN_PROCEDURES_FUNCTION=11 -val SCE_CLW_STRUCTURE_DATA_TYPE=12 -val SCE_CLW_ATTRIBUTE=13 -val SCE_CLW_STANDARD_EQUATE=14 -val SCE_CLW_ERROR=15 -val SCE_CLW_DEPRECATED=16 -# Lexical states for SCLEX_LOT -lex LOT=SCLEX_LOT SCE_LOT_ -val SCE_LOT_DEFAULT=0 -val SCE_LOT_HEADER=1 -val SCE_LOT_BREAK=2 -val SCE_LOT_SET=3 -val SCE_LOT_PASS=4 -val SCE_LOT_FAIL=5 -val SCE_LOT_ABORT=6 -# Lexical states for SCLEX_YAML -lex YAML=SCLEX_YAML SCE_YAML_ -val SCE_YAML_DEFAULT=0 -val SCE_YAML_COMMENT=1 -val SCE_YAML_IDENTIFIER=2 -val SCE_YAML_KEYWORD=3 -val SCE_YAML_NUMBER=4 -val SCE_YAML_REFERENCE=5 -val SCE_YAML_DOCUMENT=6 -val SCE_YAML_TEXT=7 -val SCE_YAML_ERROR=8 -val SCE_YAML_OPERATOR=9 -# Lexical states for SCLEX_TEX -lex TeX=SCLEX_TEX SCE_TEX_ -val SCE_TEX_DEFAULT=0 -val SCE_TEX_SPECIAL=1 -val SCE_TEX_GROUP=2 -val SCE_TEX_SYMBOL=3 -val SCE_TEX_COMMAND=4 -val SCE_TEX_TEXT=5 -lex Metapost=SCLEX_METAPOST SCE_METAPOST_ -val SCE_METAPOST_DEFAULT=0 -val SCE_METAPOST_SPECIAL=1 -val SCE_METAPOST_GROUP=2 -val SCE_METAPOST_SYMBOL=3 -val SCE_METAPOST_COMMAND=4 -val SCE_METAPOST_TEXT=5 -val SCE_METAPOST_EXTRA=6 -# Lexical states for SCLEX_ERLANG -lex Erlang=SCLEX_ERLANG SCE_ERLANG_ -val SCE_ERLANG_DEFAULT=0 -val SCE_ERLANG_COMMENT=1 -val SCE_ERLANG_VARIABLE=2 -val SCE_ERLANG_NUMBER=3 -val SCE_ERLANG_KEYWORD=4 -val SCE_ERLANG_STRING=5 -val SCE_ERLANG_OPERATOR=6 -val SCE_ERLANG_ATOM=7 -val SCE_ERLANG_FUNCTION_NAME=8 -val SCE_ERLANG_CHARACTER=9 -val SCE_ERLANG_MACRO=10 -val SCE_ERLANG_RECORD=11 -val SCE_ERLANG_PREPROC=12 -val SCE_ERLANG_NODE_NAME=13 -val SCE_ERLANG_COMMENT_FUNCTION=14 -val SCE_ERLANG_COMMENT_MODULE=15 -val SCE_ERLANG_COMMENT_DOC=16 -val SCE_ERLANG_COMMENT_DOC_MACRO=17 -val SCE_ERLANG_ATOM_QUOTED=18 -val SCE_ERLANG_MACRO_QUOTED=19 -val SCE_ERLANG_RECORD_QUOTED=20 -val SCE_ERLANG_NODE_NAME_QUOTED=21 -val SCE_ERLANG_BIFS=22 -val SCE_ERLANG_MODULES=23 -val SCE_ERLANG_MODULES_ATT=24 -val SCE_ERLANG_UNKNOWN=31 -# Lexical states for SCLEX_OCTAVE are identical to MatLab -lex Octave=SCLEX_OCTAVE SCE_MATLAB_ -# Lexical states for SCLEX_JULIA -lex Julia=SCLEX_JULIA SCE_JULIA_ -val SCE_JULIA_DEFAULT=0 -val SCE_JULIA_COMMENT=1 -val SCE_JULIA_NUMBER=2 -val SCE_JULIA_KEYWORD1=3 -val SCE_JULIA_KEYWORD2=4 -val SCE_JULIA_KEYWORD3=5 -val SCE_JULIA_CHAR=6 -val SCE_JULIA_OPERATOR=7 -val SCE_JULIA_BRACKET=8 -val SCE_JULIA_IDENTIFIER=9 -val SCE_JULIA_STRING=10 -val SCE_JULIA_SYMBOL=11 -val SCE_JULIA_MACRO=12 -val SCE_JULIA_STRINGINTERP=13 -val SCE_JULIA_DOCSTRING=14 -val SCE_JULIA_STRINGLITERAL=15 -val SCE_JULIA_COMMAND=16 -val SCE_JULIA_COMMANDLITERAL=17 -val SCE_JULIA_TYPEANNOT=18 -val SCE_JULIA_LEXERROR=19 -val SCE_JULIA_KEYWORD4=20 -val SCE_JULIA_TYPEOPERATOR=21 -# Lexical states for SCLEX_MSSQL -lex MSSQL=SCLEX_MSSQL SCE_MSSQL_ -val SCE_MSSQL_DEFAULT=0 -val SCE_MSSQL_COMMENT=1 -val SCE_MSSQL_LINE_COMMENT=2 -val SCE_MSSQL_NUMBER=3 -val SCE_MSSQL_STRING=4 -val SCE_MSSQL_OPERATOR=5 -val SCE_MSSQL_IDENTIFIER=6 -val SCE_MSSQL_VARIABLE=7 -val SCE_MSSQL_COLUMN_NAME=8 -val SCE_MSSQL_STATEMENT=9 -val SCE_MSSQL_DATATYPE=10 -val SCE_MSSQL_SYSTABLE=11 -val SCE_MSSQL_GLOBAL_VARIABLE=12 -val SCE_MSSQL_FUNCTION=13 -val SCE_MSSQL_STORED_PROCEDURE=14 -val SCE_MSSQL_DEFAULT_PREF_DATATYPE=15 -val SCE_MSSQL_COLUMN_NAME_2=16 -# Lexical states for SCLEX_VERILOG -lex Verilog=SCLEX_VERILOG SCE_V_ -val SCE_V_DEFAULT=0 -val SCE_V_COMMENT=1 -val SCE_V_COMMENTLINE=2 -val SCE_V_COMMENTLINEBANG=3 -val SCE_V_NUMBER=4 -val SCE_V_WORD=5 -val SCE_V_STRING=6 -val SCE_V_WORD2=7 -val SCE_V_WORD3=8 -val SCE_V_PREPROCESSOR=9 -val SCE_V_OPERATOR=10 -val SCE_V_IDENTIFIER=11 -val SCE_V_STRINGEOL=12 -val SCE_V_USER=19 -val SCE_V_COMMENT_WORD=20 -val SCE_V_INPUT=21 -val SCE_V_OUTPUT=22 -val SCE_V_INOUT=23 -val SCE_V_PORT_CONNECT=24 -# Lexical states for SCLEX_KIX -lex Kix=SCLEX_KIX SCE_KIX_ -val SCE_KIX_DEFAULT=0 -val SCE_KIX_COMMENT=1 -val SCE_KIX_STRING1=2 -val SCE_KIX_STRING2=3 -val SCE_KIX_NUMBER=4 -val SCE_KIX_VAR=5 -val SCE_KIX_MACRO=6 -val SCE_KIX_KEYWORD=7 -val SCE_KIX_FUNCTIONS=8 -val SCE_KIX_OPERATOR=9 -val SCE_KIX_COMMENTSTREAM=10 -val SCE_KIX_IDENTIFIER=31 -# Lexical states for SCLEX_GUI4CLI -lex Gui4Cli=SCLEX_GUI4CLI SCE_GC_ -val SCE_GC_DEFAULT=0 -val SCE_GC_COMMENTLINE=1 -val SCE_GC_COMMENTBLOCK=2 -val SCE_GC_GLOBAL=3 -val SCE_GC_EVENT=4 -val SCE_GC_ATTRIBUTE=5 -val SCE_GC_CONTROL=6 -val SCE_GC_COMMAND=7 -val SCE_GC_STRING=8 -val SCE_GC_OPERATOR=9 -# Lexical states for SCLEX_SPECMAN -lex Specman=SCLEX_SPECMAN SCE_SN_ -val SCE_SN_DEFAULT=0 -val SCE_SN_CODE=1 -val SCE_SN_COMMENTLINE=2 -val SCE_SN_COMMENTLINEBANG=3 -val SCE_SN_NUMBER=4 -val SCE_SN_WORD=5 -val SCE_SN_STRING=6 -val SCE_SN_WORD2=7 -val SCE_SN_WORD3=8 -val SCE_SN_PREPROCESSOR=9 -val SCE_SN_OPERATOR=10 -val SCE_SN_IDENTIFIER=11 -val SCE_SN_STRINGEOL=12 -val SCE_SN_REGEXTAG=13 -val SCE_SN_SIGNAL=14 -val SCE_SN_USER=19 -# Lexical states for SCLEX_AU3 -lex Au3=SCLEX_AU3 SCE_AU3_ -val SCE_AU3_DEFAULT=0 -val SCE_AU3_COMMENT=1 -val SCE_AU3_COMMENTBLOCK=2 -val SCE_AU3_NUMBER=3 -val SCE_AU3_FUNCTION=4 -val SCE_AU3_KEYWORD=5 -val SCE_AU3_MACRO=6 -val SCE_AU3_STRING=7 -val SCE_AU3_OPERATOR=8 -val SCE_AU3_VARIABLE=9 -val SCE_AU3_SENT=10 -val SCE_AU3_PREPROCESSOR=11 -val SCE_AU3_SPECIAL=12 -val SCE_AU3_EXPAND=13 -val SCE_AU3_COMOBJ=14 -val SCE_AU3_UDF=15 -# Lexical states for SCLEX_APDL -lex APDL=SCLEX_APDL SCE_APDL_ -val SCE_APDL_DEFAULT=0 -val SCE_APDL_COMMENT=1 -val SCE_APDL_COMMENTBLOCK=2 -val SCE_APDL_NUMBER=3 -val SCE_APDL_STRING=4 -val SCE_APDL_OPERATOR=5 -val SCE_APDL_WORD=6 -val SCE_APDL_PROCESSOR=7 -val SCE_APDL_COMMAND=8 -val SCE_APDL_SLASHCOMMAND=9 -val SCE_APDL_STARCOMMAND=10 -val SCE_APDL_ARGUMENT=11 -val SCE_APDL_FUNCTION=12 -# Lexical states for SCLEX_BASH -lex Bash=SCLEX_BASH SCE_SH_ -val SCE_SH_DEFAULT=0 -val SCE_SH_ERROR=1 -val SCE_SH_COMMENTLINE=2 -val SCE_SH_NUMBER=3 -val SCE_SH_WORD=4 -val SCE_SH_STRING=5 -val SCE_SH_CHARACTER=6 -val SCE_SH_OPERATOR=7 -val SCE_SH_IDENTIFIER=8 -val SCE_SH_SCALAR=9 -val SCE_SH_PARAM=10 -val SCE_SH_BACKTICKS=11 -val SCE_SH_HERE_DELIM=12 -val SCE_SH_HERE_Q=13 -# Lexical states for SCLEX_ASN1 -lex Asn1=SCLEX_ASN1 SCE_ASN1_ -val SCE_ASN1_DEFAULT=0 -val SCE_ASN1_COMMENT=1 -val SCE_ASN1_IDENTIFIER=2 -val SCE_ASN1_STRING=3 -val SCE_ASN1_OID=4 -val SCE_ASN1_SCALAR=5 -val SCE_ASN1_KEYWORD=6 -val SCE_ASN1_ATTRIBUTE=7 -val SCE_ASN1_DESCRIPTOR=8 -val SCE_ASN1_TYPE=9 -val SCE_ASN1_OPERATOR=10 -# Lexical states for SCLEX_VHDL -lex VHDL=SCLEX_VHDL SCE_VHDL_ -val SCE_VHDL_DEFAULT=0 -val SCE_VHDL_COMMENT=1 -val SCE_VHDL_COMMENTLINEBANG=2 -val SCE_VHDL_NUMBER=3 -val SCE_VHDL_STRING=4 -val SCE_VHDL_OPERATOR=5 -val SCE_VHDL_IDENTIFIER=6 -val SCE_VHDL_STRINGEOL=7 -val SCE_VHDL_KEYWORD=8 -val SCE_VHDL_STDOPERATOR=9 -val SCE_VHDL_ATTRIBUTE=10 -val SCE_VHDL_STDFUNCTION=11 -val SCE_VHDL_STDPACKAGE=12 -val SCE_VHDL_STDTYPE=13 -val SCE_VHDL_USERWORD=14 -val SCE_VHDL_BLOCK_COMMENT=15 -# Lexical states for SCLEX_CAML -lex Caml=SCLEX_CAML SCE_CAML_ -val SCE_CAML_DEFAULT=0 -val SCE_CAML_IDENTIFIER=1 -val SCE_CAML_TAGNAME=2 -val SCE_CAML_KEYWORD=3 -val SCE_CAML_KEYWORD2=4 -val SCE_CAML_KEYWORD3=5 -val SCE_CAML_LINENUM=6 -val SCE_CAML_OPERATOR=7 -val SCE_CAML_NUMBER=8 -val SCE_CAML_CHAR=9 -val SCE_CAML_WHITE=10 -val SCE_CAML_STRING=11 -val SCE_CAML_COMMENT=12 -val SCE_CAML_COMMENT1=13 -val SCE_CAML_COMMENT2=14 -val SCE_CAML_COMMENT3=15 -# Lexical states for SCLEX_HASKELL -lex Haskell=SCLEX_HASKELL SCE_HA_ -val SCE_HA_DEFAULT=0 -val SCE_HA_IDENTIFIER=1 -val SCE_HA_KEYWORD=2 -val SCE_HA_NUMBER=3 -val SCE_HA_STRING=4 -val SCE_HA_CHARACTER=5 -val SCE_HA_CLASS=6 -val SCE_HA_MODULE=7 -val SCE_HA_CAPITAL=8 -val SCE_HA_DATA=9 -val SCE_HA_IMPORT=10 -val SCE_HA_OPERATOR=11 -val SCE_HA_INSTANCE=12 -val SCE_HA_COMMENTLINE=13 -val SCE_HA_COMMENTBLOCK=14 -val SCE_HA_COMMENTBLOCK2=15 -val SCE_HA_COMMENTBLOCK3=16 -val SCE_HA_PRAGMA=17 -val SCE_HA_PREPROCESSOR=18 -val SCE_HA_STRINGEOL=19 -val SCE_HA_RESERVED_OPERATOR=20 -val SCE_HA_LITERATE_COMMENT=21 -val SCE_HA_LITERATE_CODEDELIM=22 -# Lexical states of SCLEX_TADS3 -lex TADS3=SCLEX_TADS3 SCE_T3_ -val SCE_T3_DEFAULT=0 -val SCE_T3_X_DEFAULT=1 -val SCE_T3_PREPROCESSOR=2 -val SCE_T3_BLOCK_COMMENT=3 -val SCE_T3_LINE_COMMENT=4 -val SCE_T3_OPERATOR=5 -val SCE_T3_KEYWORD=6 -val SCE_T3_NUMBER=7 -val SCE_T3_IDENTIFIER=8 -val SCE_T3_S_STRING=9 -val SCE_T3_D_STRING=10 -val SCE_T3_X_STRING=11 -val SCE_T3_LIB_DIRECTIVE=12 -val SCE_T3_MSG_PARAM=13 -val SCE_T3_HTML_TAG=14 -val SCE_T3_HTML_DEFAULT=15 -val SCE_T3_HTML_STRING=16 -val SCE_T3_USER1=17 -val SCE_T3_USER2=18 -val SCE_T3_USER3=19 -val SCE_T3_BRACE=20 -# Lexical states for SCLEX_REBOL -lex Rebol=SCLEX_REBOL SCE_REBOL_ -val SCE_REBOL_DEFAULT=0 -val SCE_REBOL_COMMENTLINE=1 -val SCE_REBOL_COMMENTBLOCK=2 -val SCE_REBOL_PREFACE=3 -val SCE_REBOL_OPERATOR=4 -val SCE_REBOL_CHARACTER=5 -val SCE_REBOL_QUOTEDSTRING=6 -val SCE_REBOL_BRACEDSTRING=7 -val SCE_REBOL_NUMBER=8 -val SCE_REBOL_PAIR=9 -val SCE_REBOL_TUPLE=10 -val SCE_REBOL_BINARY=11 -val SCE_REBOL_MONEY=12 -val SCE_REBOL_ISSUE=13 -val SCE_REBOL_TAG=14 -val SCE_REBOL_FILE=15 -val SCE_REBOL_EMAIL=16 -val SCE_REBOL_URL=17 -val SCE_REBOL_DATE=18 -val SCE_REBOL_TIME=19 -val SCE_REBOL_IDENTIFIER=20 -val SCE_REBOL_WORD=21 -val SCE_REBOL_WORD2=22 -val SCE_REBOL_WORD3=23 -val SCE_REBOL_WORD4=24 -val SCE_REBOL_WORD5=25 -val SCE_REBOL_WORD6=26 -val SCE_REBOL_WORD7=27 -val SCE_REBOL_WORD8=28 -# Lexical states for SCLEX_SQL -lex SQL=SCLEX_SQL SCE_SQL_ -val SCE_SQL_DEFAULT=0 -val SCE_SQL_COMMENT=1 -val SCE_SQL_COMMENTLINE=2 -val SCE_SQL_COMMENTDOC=3 -val SCE_SQL_NUMBER=4 -val SCE_SQL_WORD=5 -val SCE_SQL_STRING=6 -val SCE_SQL_CHARACTER=7 -val SCE_SQL_SQLPLUS=8 -val SCE_SQL_SQLPLUS_PROMPT=9 -val SCE_SQL_OPERATOR=10 -val SCE_SQL_IDENTIFIER=11 -val SCE_SQL_SQLPLUS_COMMENT=13 -val SCE_SQL_COMMENTLINEDOC=15 -val SCE_SQL_WORD2=16 -val SCE_SQL_COMMENTDOCKEYWORD=17 -val SCE_SQL_COMMENTDOCKEYWORDERROR=18 -val SCE_SQL_USER1=19 -val SCE_SQL_USER2=20 -val SCE_SQL_USER3=21 -val SCE_SQL_USER4=22 -val SCE_SQL_QUOTEDIDENTIFIER=23 -val SCE_SQL_QOPERATOR=24 -# Lexical states for SCLEX_SMALLTALK -lex Smalltalk=SCLEX_SMALLTALK SCE_ST_ -val SCE_ST_DEFAULT=0 -val SCE_ST_STRING=1 -val SCE_ST_NUMBER=2 -val SCE_ST_COMMENT=3 -val SCE_ST_SYMBOL=4 -val SCE_ST_BINARY=5 -val SCE_ST_BOOL=6 -val SCE_ST_SELF=7 -val SCE_ST_SUPER=8 -val SCE_ST_NIL=9 -val SCE_ST_GLOBAL=10 -val SCE_ST_RETURN=11 -val SCE_ST_SPECIAL=12 -val SCE_ST_KWSEND=13 -val SCE_ST_ASSIGN=14 -val SCE_ST_CHARACTER=15 -val SCE_ST_SPEC_SEL=16 -# Lexical states for SCLEX_FLAGSHIP (clipper) -lex FlagShip=SCLEX_FLAGSHIP SCE_FS_ -val SCE_FS_DEFAULT=0 -val SCE_FS_COMMENT=1 -val SCE_FS_COMMENTLINE=2 -val SCE_FS_COMMENTDOC=3 -val SCE_FS_COMMENTLINEDOC=4 -val SCE_FS_COMMENTDOCKEYWORD=5 -val SCE_FS_COMMENTDOCKEYWORDERROR=6 -val SCE_FS_KEYWORD=7 -val SCE_FS_KEYWORD2=8 -val SCE_FS_KEYWORD3=9 -val SCE_FS_KEYWORD4=10 -val SCE_FS_NUMBER=11 -val SCE_FS_STRING=12 -val SCE_FS_PREPROCESSOR=13 -val SCE_FS_OPERATOR=14 -val SCE_FS_IDENTIFIER=15 -val SCE_FS_DATE=16 -val SCE_FS_STRINGEOL=17 -val SCE_FS_CONSTANT=18 -val SCE_FS_WORDOPERATOR=19 -val SCE_FS_DISABLEDCODE=20 -val SCE_FS_DEFAULT_C=21 -val SCE_FS_COMMENTDOC_C=22 -val SCE_FS_COMMENTLINEDOC_C=23 -val SCE_FS_KEYWORD_C=24 -val SCE_FS_KEYWORD2_C=25 -val SCE_FS_NUMBER_C=26 -val SCE_FS_STRING_C=27 -val SCE_FS_PREPROCESSOR_C=28 -val SCE_FS_OPERATOR_C=29 -val SCE_FS_IDENTIFIER_C=30 -val SCE_FS_STRINGEOL_C=31 -# Lexical states for SCLEX_CSOUND -lex Csound=SCLEX_CSOUND SCE_CSOUND_ -val SCE_CSOUND_DEFAULT=0 -val SCE_CSOUND_COMMENT=1 -val SCE_CSOUND_NUMBER=2 -val SCE_CSOUND_OPERATOR=3 -val SCE_CSOUND_INSTR=4 -val SCE_CSOUND_IDENTIFIER=5 -val SCE_CSOUND_OPCODE=6 -val SCE_CSOUND_HEADERSTMT=7 -val SCE_CSOUND_USERKEYWORD=8 -val SCE_CSOUND_COMMENTBLOCK=9 -val SCE_CSOUND_PARAM=10 -val SCE_CSOUND_ARATE_VAR=11 -val SCE_CSOUND_KRATE_VAR=12 -val SCE_CSOUND_IRATE_VAR=13 -val SCE_CSOUND_GLOBAL_VAR=14 -val SCE_CSOUND_STRINGEOL=15 -# Lexical states for SCLEX_INNOSETUP -lex Inno=SCLEX_INNOSETUP SCE_INNO_ -val SCE_INNO_DEFAULT=0 -val SCE_INNO_COMMENT=1 -val SCE_INNO_KEYWORD=2 -val SCE_INNO_PARAMETER=3 -val SCE_INNO_SECTION=4 -val SCE_INNO_PREPROC=5 -val SCE_INNO_INLINE_EXPANSION=6 -val SCE_INNO_COMMENT_PASCAL=7 -val SCE_INNO_KEYWORD_PASCAL=8 -val SCE_INNO_KEYWORD_USER=9 -val SCE_INNO_STRING_DOUBLE=10 -val SCE_INNO_STRING_SINGLE=11 -val SCE_INNO_IDENTIFIER=12 -# Lexical states for SCLEX_OPAL -lex Opal=SCLEX_OPAL SCE_OPAL_ -val SCE_OPAL_SPACE=0 -val SCE_OPAL_COMMENT_BLOCK=1 -val SCE_OPAL_COMMENT_LINE=2 -val SCE_OPAL_INTEGER=3 -val SCE_OPAL_KEYWORD=4 -val SCE_OPAL_SORT=5 -val SCE_OPAL_STRING=6 -val SCE_OPAL_PAR=7 -val SCE_OPAL_BOOL_CONST=8 -val SCE_OPAL_DEFAULT=32 -# Lexical states for SCLEX_SPICE -lex Spice=SCLEX_SPICE SCE_SPICE_ -val SCE_SPICE_DEFAULT=0 -val SCE_SPICE_IDENTIFIER=1 -val SCE_SPICE_KEYWORD=2 -val SCE_SPICE_KEYWORD2=3 -val SCE_SPICE_KEYWORD3=4 -val SCE_SPICE_NUMBER=5 -val SCE_SPICE_DELIMITER=6 -val SCE_SPICE_VALUE=7 -val SCE_SPICE_COMMENTLINE=8 -# Lexical states for SCLEX_CMAKE -lex CMAKE=SCLEX_CMAKE SCE_CMAKE_ -val SCE_CMAKE_DEFAULT=0 -val SCE_CMAKE_COMMENT=1 -val SCE_CMAKE_STRINGDQ=2 -val SCE_CMAKE_STRINGLQ=3 -val SCE_CMAKE_STRINGRQ=4 -val SCE_CMAKE_COMMANDS=5 -val SCE_CMAKE_PARAMETERS=6 -val SCE_CMAKE_VARIABLE=7 -val SCE_CMAKE_USERDEFINED=8 -val SCE_CMAKE_WHILEDEF=9 -val SCE_CMAKE_FOREACHDEF=10 -val SCE_CMAKE_IFDEFINEDEF=11 -val SCE_CMAKE_MACRODEF=12 -val SCE_CMAKE_STRINGVAR=13 -val SCE_CMAKE_NUMBER=14 -# Lexical states for SCLEX_GAP -lex Gap=SCLEX_GAP SCE_GAP_ -val SCE_GAP_DEFAULT=0 -val SCE_GAP_IDENTIFIER=1 -val SCE_GAP_KEYWORD=2 -val SCE_GAP_KEYWORD2=3 -val SCE_GAP_KEYWORD3=4 -val SCE_GAP_KEYWORD4=5 -val SCE_GAP_STRING=6 -val SCE_GAP_CHAR=7 -val SCE_GAP_OPERATOR=8 -val SCE_GAP_COMMENT=9 -val SCE_GAP_NUMBER=10 -val SCE_GAP_STRINGEOL=11 -# Lexical state for SCLEX_PLM -lex PLM=SCLEX_PLM SCE_PLM_ -val SCE_PLM_DEFAULT=0 -val SCE_PLM_COMMENT=1 -val SCE_PLM_STRING=2 -val SCE_PLM_NUMBER=3 -val SCE_PLM_IDENTIFIER=4 -val SCE_PLM_OPERATOR=5 -val SCE_PLM_CONTROL=6 -val SCE_PLM_KEYWORD=7 -# Lexical state for SCLEX_PROGRESS -lex Progress=SCLEX_PROGRESS SCE_ABL_ -val SCE_ABL_DEFAULT=0 -val SCE_ABL_NUMBER=1 -val SCE_ABL_WORD=2 -val SCE_ABL_STRING=3 -val SCE_ABL_CHARACTER=4 -val SCE_ABL_PREPROCESSOR=5 -val SCE_ABL_OPERATOR=6 -val SCE_ABL_IDENTIFIER=7 -val SCE_ABL_BLOCK=8 -val SCE_ABL_END=9 -val SCE_ABL_COMMENT=10 -val SCE_ABL_TASKMARKER=11 -val SCE_ABL_LINECOMMENT=12 -# Lexical states for SCLEX_ABAQUS -lex ABAQUS=SCLEX_ABAQUS SCE_ABAQUS_ -val SCE_ABAQUS_DEFAULT=0 -val SCE_ABAQUS_COMMENT=1 -val SCE_ABAQUS_COMMENTBLOCK=2 -val SCE_ABAQUS_NUMBER=3 -val SCE_ABAQUS_STRING=4 -val SCE_ABAQUS_OPERATOR=5 -val SCE_ABAQUS_WORD=6 -val SCE_ABAQUS_PROCESSOR=7 -val SCE_ABAQUS_COMMAND=8 -val SCE_ABAQUS_SLASHCOMMAND=9 -val SCE_ABAQUS_STARCOMMAND=10 -val SCE_ABAQUS_ARGUMENT=11 -val SCE_ABAQUS_FUNCTION=12 -# Lexical states for SCLEX_ASYMPTOTE -lex Asymptote=SCLEX_ASYMPTOTE SCE_ASY_ -val SCE_ASY_DEFAULT=0 -val SCE_ASY_COMMENT=1 -val SCE_ASY_COMMENTLINE=2 -val SCE_ASY_NUMBER=3 -val SCE_ASY_WORD=4 -val SCE_ASY_STRING=5 -val SCE_ASY_CHARACTER=6 -val SCE_ASY_OPERATOR=7 -val SCE_ASY_IDENTIFIER=8 -val SCE_ASY_STRINGEOL=9 -val SCE_ASY_COMMENTLINEDOC=10 -val SCE_ASY_WORD2=11 -# Lexical states for SCLEX_R -lex R=SCLEX_R SCE_R_ -val SCE_R_DEFAULT=0 -val SCE_R_COMMENT=1 -val SCE_R_KWORD=2 -val SCE_R_BASEKWORD=3 -val SCE_R_OTHERKWORD=4 -val SCE_R_NUMBER=5 -val SCE_R_STRING=6 -val SCE_R_STRING2=7 -val SCE_R_OPERATOR=8 -val SCE_R_IDENTIFIER=9 -val SCE_R_INFIX=10 -val SCE_R_INFIXEOL=11 -# Lexical state for SCLEX_MAGIK -lex MagikSF=SCLEX_MAGIK SCE_MAGIK_ -val SCE_MAGIK_DEFAULT=0 -val SCE_MAGIK_COMMENT=1 -val SCE_MAGIK_HYPER_COMMENT=16 -val SCE_MAGIK_STRING=2 -val SCE_MAGIK_CHARACTER=3 -val SCE_MAGIK_NUMBER=4 -val SCE_MAGIK_IDENTIFIER=5 -val SCE_MAGIK_OPERATOR=6 -val SCE_MAGIK_FLOW=7 -val SCE_MAGIK_CONTAINER=8 -val SCE_MAGIK_BRACKET_BLOCK=9 -val SCE_MAGIK_BRACE_BLOCK=10 -val SCE_MAGIK_SQBRACKET_BLOCK=11 -val SCE_MAGIK_UNKNOWN_KEYWORD=12 -val SCE_MAGIK_KEYWORD=13 -val SCE_MAGIK_PRAGMA=14 -val SCE_MAGIK_SYMBOL=15 -# Lexical state for SCLEX_POWERSHELL -lex PowerShell=SCLEX_POWERSHELL SCE_POWERSHELL_ -val SCE_POWERSHELL_DEFAULT=0 -val SCE_POWERSHELL_COMMENT=1 -val SCE_POWERSHELL_STRING=2 -val SCE_POWERSHELL_CHARACTER=3 -val SCE_POWERSHELL_NUMBER=4 -val SCE_POWERSHELL_VARIABLE=5 -val SCE_POWERSHELL_OPERATOR=6 -val SCE_POWERSHELL_IDENTIFIER=7 -val SCE_POWERSHELL_KEYWORD=8 -val SCE_POWERSHELL_CMDLET=9 -val SCE_POWERSHELL_ALIAS=10 -val SCE_POWERSHELL_FUNCTION=11 -val SCE_POWERSHELL_USER1=12 -val SCE_POWERSHELL_COMMENTSTREAM=13 -val SCE_POWERSHELL_HERE_STRING=14 -val SCE_POWERSHELL_HERE_CHARACTER=15 -val SCE_POWERSHELL_COMMENTDOCKEYWORD=16 -# Lexical state for SCLEX_MYSQL -lex MySQL=SCLEX_MYSQL SCE_MYSQL_ -val SCE_MYSQL_DEFAULT=0 -val SCE_MYSQL_COMMENT=1 -val SCE_MYSQL_COMMENTLINE=2 -val SCE_MYSQL_VARIABLE=3 -val SCE_MYSQL_SYSTEMVARIABLE=4 -val SCE_MYSQL_KNOWNSYSTEMVARIABLE=5 -val SCE_MYSQL_NUMBER=6 -val SCE_MYSQL_MAJORKEYWORD=7 -val SCE_MYSQL_KEYWORD=8 -val SCE_MYSQL_DATABASEOBJECT=9 -val SCE_MYSQL_PROCEDUREKEYWORD=10 -val SCE_MYSQL_STRING=11 -val SCE_MYSQL_SQSTRING=12 -val SCE_MYSQL_DQSTRING=13 -val SCE_MYSQL_OPERATOR=14 -val SCE_MYSQL_FUNCTION=15 -val SCE_MYSQL_IDENTIFIER=16 -val SCE_MYSQL_QUOTEDIDENTIFIER=17 -val SCE_MYSQL_USER1=18 -val SCE_MYSQL_USER2=19 -val SCE_MYSQL_USER3=20 -val SCE_MYSQL_HIDDENCOMMAND=21 -val SCE_MYSQL_PLACEHOLDER=22 -# Lexical state for SCLEX_PO -lex Po=SCLEX_PO SCE_PO_ -val SCE_PO_DEFAULT=0 -val SCE_PO_COMMENT=1 -val SCE_PO_MSGID=2 -val SCE_PO_MSGID_TEXT=3 -val SCE_PO_MSGSTR=4 -val SCE_PO_MSGSTR_TEXT=5 -val SCE_PO_MSGCTXT=6 -val SCE_PO_MSGCTXT_TEXT=7 -val SCE_PO_FUZZY=8 -val SCE_PO_PROGRAMMER_COMMENT=9 -val SCE_PO_REFERENCE=10 -val SCE_PO_FLAGS=11 -val SCE_PO_MSGID_TEXT_EOL=12 -val SCE_PO_MSGSTR_TEXT_EOL=13 -val SCE_PO_MSGCTXT_TEXT_EOL=14 -val SCE_PO_ERROR=15 -# Lexical states for SCLEX_PASCAL -lex Pascal=SCLEX_PASCAL SCE_PAS_ -val SCE_PAS_DEFAULT=0 -val SCE_PAS_IDENTIFIER=1 -val SCE_PAS_COMMENT=2 -val SCE_PAS_COMMENT2=3 -val SCE_PAS_COMMENTLINE=4 -val SCE_PAS_PREPROCESSOR=5 -val SCE_PAS_PREPROCESSOR2=6 -val SCE_PAS_NUMBER=7 -val SCE_PAS_HEXNUMBER=8 -val SCE_PAS_WORD=9 -val SCE_PAS_STRING=10 -val SCE_PAS_STRINGEOL=11 -val SCE_PAS_CHARACTER=12 -val SCE_PAS_OPERATOR=13 -val SCE_PAS_ASM=14 -# Lexical state for SCLEX_SORCUS -lex SORCUS=SCLEX_SORCUS SCE_SORCUS_ -val SCE_SORCUS_DEFAULT=0 -val SCE_SORCUS_COMMAND=1 -val SCE_SORCUS_PARAMETER=2 -val SCE_SORCUS_COMMENTLINE=3 -val SCE_SORCUS_STRING=4 -val SCE_SORCUS_STRINGEOL=5 -val SCE_SORCUS_IDENTIFIER=6 -val SCE_SORCUS_OPERATOR=7 -val SCE_SORCUS_NUMBER=8 -val SCE_SORCUS_CONSTANT=9 -# Lexical state for SCLEX_POWERPRO -lex PowerPro=SCLEX_POWERPRO SCE_POWERPRO_ -val SCE_POWERPRO_DEFAULT=0 -val SCE_POWERPRO_COMMENTBLOCK=1 -val SCE_POWERPRO_COMMENTLINE=2 -val SCE_POWERPRO_NUMBER=3 -val SCE_POWERPRO_WORD=4 -val SCE_POWERPRO_WORD2=5 -val SCE_POWERPRO_WORD3=6 -val SCE_POWERPRO_WORD4=7 -val SCE_POWERPRO_DOUBLEQUOTEDSTRING=8 -val SCE_POWERPRO_SINGLEQUOTEDSTRING=9 -val SCE_POWERPRO_LINECONTINUE=10 -val SCE_POWERPRO_OPERATOR=11 -val SCE_POWERPRO_IDENTIFIER=12 -val SCE_POWERPRO_STRINGEOL=13 -val SCE_POWERPRO_VERBATIM=14 -val SCE_POWERPRO_ALTQUOTE=15 -val SCE_POWERPRO_FUNCTION=16 -# Lexical states for SCLEX_SML -lex SML=SCLEX_SML SCE_SML_ -val SCE_SML_DEFAULT=0 -val SCE_SML_IDENTIFIER=1 -val SCE_SML_TAGNAME=2 -val SCE_SML_KEYWORD=3 -val SCE_SML_KEYWORD2=4 -val SCE_SML_KEYWORD3=5 -val SCE_SML_LINENUM=6 -val SCE_SML_OPERATOR=7 -val SCE_SML_NUMBER=8 -val SCE_SML_CHAR=9 -val SCE_SML_STRING=11 -val SCE_SML_COMMENT=12 -val SCE_SML_COMMENT1=13 -val SCE_SML_COMMENT2=14 -val SCE_SML_COMMENT3=15 -# Lexical state for SCLEX_MARKDOWN -lex Markdown=SCLEX_MARKDOWN SCE_MARKDOWN_ -val SCE_MARKDOWN_DEFAULT=0 -val SCE_MARKDOWN_LINE_BEGIN=1 -val SCE_MARKDOWN_STRONG1=2 -val SCE_MARKDOWN_STRONG2=3 -val SCE_MARKDOWN_EM1=4 -val SCE_MARKDOWN_EM2=5 -val SCE_MARKDOWN_HEADER1=6 -val SCE_MARKDOWN_HEADER2=7 -val SCE_MARKDOWN_HEADER3=8 -val SCE_MARKDOWN_HEADER4=9 -val SCE_MARKDOWN_HEADER5=10 -val SCE_MARKDOWN_HEADER6=11 -val SCE_MARKDOWN_PRECHAR=12 -val SCE_MARKDOWN_ULIST_ITEM=13 -val SCE_MARKDOWN_OLIST_ITEM=14 -val SCE_MARKDOWN_BLOCKQUOTE=15 -val SCE_MARKDOWN_STRIKEOUT=16 -val SCE_MARKDOWN_HRULE=17 -val SCE_MARKDOWN_LINK=18 -val SCE_MARKDOWN_CODE=19 -val SCE_MARKDOWN_CODE2=20 -val SCE_MARKDOWN_CODEBK=21 -# Lexical state for SCLEX_TXT2TAGS -lex Txt2tags=SCLEX_TXT2TAGS SCE_TXT2TAGS_ -val SCE_TXT2TAGS_DEFAULT=0 -val SCE_TXT2TAGS_LINE_BEGIN=1 -val SCE_TXT2TAGS_STRONG1=2 -val SCE_TXT2TAGS_STRONG2=3 -val SCE_TXT2TAGS_EM1=4 -val SCE_TXT2TAGS_EM2=5 -val SCE_TXT2TAGS_HEADER1=6 -val SCE_TXT2TAGS_HEADER2=7 -val SCE_TXT2TAGS_HEADER3=8 -val SCE_TXT2TAGS_HEADER4=9 -val SCE_TXT2TAGS_HEADER5=10 -val SCE_TXT2TAGS_HEADER6=11 -val SCE_TXT2TAGS_PRECHAR=12 -val SCE_TXT2TAGS_ULIST_ITEM=13 -val SCE_TXT2TAGS_OLIST_ITEM=14 -val SCE_TXT2TAGS_BLOCKQUOTE=15 -val SCE_TXT2TAGS_STRIKEOUT=16 -val SCE_TXT2TAGS_HRULE=17 -val SCE_TXT2TAGS_LINK=18 -val SCE_TXT2TAGS_CODE=19 -val SCE_TXT2TAGS_CODE2=20 -val SCE_TXT2TAGS_CODEBK=21 -val SCE_TXT2TAGS_COMMENT=22 -val SCE_TXT2TAGS_OPTION=23 -val SCE_TXT2TAGS_PREPROC=24 -val SCE_TXT2TAGS_POSTPROC=25 -# Lexical states for SCLEX_A68K -lex A68k=SCLEX_A68K SCE_A68K_ -val SCE_A68K_DEFAULT=0 -val SCE_A68K_COMMENT=1 -val SCE_A68K_NUMBER_DEC=2 -val SCE_A68K_NUMBER_BIN=3 -val SCE_A68K_NUMBER_HEX=4 -val SCE_A68K_STRING1=5 -val SCE_A68K_OPERATOR=6 -val SCE_A68K_CPUINSTRUCTION=7 -val SCE_A68K_EXTINSTRUCTION=8 -val SCE_A68K_REGISTER=9 -val SCE_A68K_DIRECTIVE=10 -val SCE_A68K_MACRO_ARG=11 -val SCE_A68K_LABEL=12 -val SCE_A68K_STRING2=13 -val SCE_A68K_IDENTIFIER=14 -val SCE_A68K_MACRO_DECLARATION=15 -val SCE_A68K_COMMENT_WORD=16 -val SCE_A68K_COMMENT_SPECIAL=17 -val SCE_A68K_COMMENT_DOXYGEN=18 -# Lexical states for SCLEX_MODULA -lex Modula=SCLEX_MODULA SCE_MODULA_ -val SCE_MODULA_DEFAULT=0 -val SCE_MODULA_COMMENT=1 -val SCE_MODULA_DOXYCOMM=2 -val SCE_MODULA_DOXYKEY=3 -val SCE_MODULA_KEYWORD=4 -val SCE_MODULA_RESERVED=5 -val SCE_MODULA_NUMBER=6 -val SCE_MODULA_BASENUM=7 -val SCE_MODULA_FLOAT=8 -val SCE_MODULA_STRING=9 -val SCE_MODULA_STRSPEC=10 -val SCE_MODULA_CHAR=11 -val SCE_MODULA_CHARSPEC=12 -val SCE_MODULA_PROC=13 -val SCE_MODULA_PRAGMA=14 -val SCE_MODULA_PRGKEY=15 -val SCE_MODULA_OPERATOR=16 -val SCE_MODULA_BADSTR=17 -# Lexical states for SCLEX_COFFEESCRIPT -lex CoffeeScript=SCLEX_COFFEESCRIPT SCE_COFFEESCRIPT_ -val SCE_COFFEESCRIPT_DEFAULT=0 -val SCE_COFFEESCRIPT_COMMENT=1 -val SCE_COFFEESCRIPT_COMMENTLINE=2 -val SCE_COFFEESCRIPT_COMMENTDOC=3 -val SCE_COFFEESCRIPT_NUMBER=4 -val SCE_COFFEESCRIPT_WORD=5 -val SCE_COFFEESCRIPT_STRING=6 -val SCE_COFFEESCRIPT_CHARACTER=7 -val SCE_COFFEESCRIPT_UUID=8 -val SCE_COFFEESCRIPT_PREPROCESSOR=9 -val SCE_COFFEESCRIPT_OPERATOR=10 -val SCE_COFFEESCRIPT_IDENTIFIER=11 -val SCE_COFFEESCRIPT_STRINGEOL=12 -val SCE_COFFEESCRIPT_VERBATIM=13 -val SCE_COFFEESCRIPT_REGEX=14 -val SCE_COFFEESCRIPT_COMMENTLINEDOC=15 -val SCE_COFFEESCRIPT_WORD2=16 -val SCE_COFFEESCRIPT_COMMENTDOCKEYWORD=17 -val SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR=18 -val SCE_COFFEESCRIPT_GLOBALCLASS=19 -val SCE_COFFEESCRIPT_STRINGRAW=20 -val SCE_COFFEESCRIPT_TRIPLEVERBATIM=21 -val SCE_COFFEESCRIPT_COMMENTBLOCK=22 -val SCE_COFFEESCRIPT_VERBOSE_REGEX=23 -val SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT=24 -val SCE_COFFEESCRIPT_INSTANCEPROPERTY=25 -# Lexical states for SCLEX_AVS -lex AVS=SCLEX_AVS SCE_AVS_ -val SCE_AVS_DEFAULT=0 -val SCE_AVS_COMMENTBLOCK=1 -val SCE_AVS_COMMENTBLOCKN=2 -val SCE_AVS_COMMENTLINE=3 -val SCE_AVS_NUMBER=4 -val SCE_AVS_OPERATOR=5 -val SCE_AVS_IDENTIFIER=6 -val SCE_AVS_STRING=7 -val SCE_AVS_TRIPLESTRING=8 -val SCE_AVS_KEYWORD=9 -val SCE_AVS_FILTER=10 -val SCE_AVS_PLUGIN=11 -val SCE_AVS_FUNCTION=12 -val SCE_AVS_CLIPPROP=13 -val SCE_AVS_USERDFN=14 -# Lexical states for SCLEX_ECL -lex ECL=SCLEX_ECL SCE_ECL_ -val SCE_ECL_DEFAULT=0 -val SCE_ECL_COMMENT=1 -val SCE_ECL_COMMENTLINE=2 -val SCE_ECL_NUMBER=3 -val SCE_ECL_STRING=4 -val SCE_ECL_WORD0=5 -val SCE_ECL_OPERATOR=6 -val SCE_ECL_CHARACTER=7 -val SCE_ECL_UUID=8 -val SCE_ECL_PREPROCESSOR=9 -val SCE_ECL_UNKNOWN=10 -val SCE_ECL_IDENTIFIER=11 -val SCE_ECL_STRINGEOL=12 -val SCE_ECL_VERBATIM=13 -val SCE_ECL_REGEX=14 -val SCE_ECL_COMMENTLINEDOC=15 -val SCE_ECL_WORD1=16 -val SCE_ECL_COMMENTDOCKEYWORD=17 -val SCE_ECL_COMMENTDOCKEYWORDERROR=18 -val SCE_ECL_WORD2=19 -val SCE_ECL_WORD3=20 -val SCE_ECL_WORD4=21 -val SCE_ECL_WORD5=22 -val SCE_ECL_COMMENTDOC=23 -val SCE_ECL_ADDED=24 -val SCE_ECL_DELETED=25 -val SCE_ECL_CHANGED=26 -val SCE_ECL_MOVED=27 -# Lexical states for SCLEX_OSCRIPT -lex OScript=SCLEX_OSCRIPT SCE_OSCRIPT_ -val SCE_OSCRIPT_DEFAULT=0 -val SCE_OSCRIPT_LINE_COMMENT=1 -val SCE_OSCRIPT_BLOCK_COMMENT=2 -val SCE_OSCRIPT_DOC_COMMENT=3 -val SCE_OSCRIPT_PREPROCESSOR=4 -val SCE_OSCRIPT_NUMBER=5 -val SCE_OSCRIPT_SINGLEQUOTE_STRING=6 -val SCE_OSCRIPT_DOUBLEQUOTE_STRING=7 -val SCE_OSCRIPT_CONSTANT=8 -val SCE_OSCRIPT_IDENTIFIER=9 -val SCE_OSCRIPT_GLOBAL=10 -val SCE_OSCRIPT_KEYWORD=11 -val SCE_OSCRIPT_OPERATOR=12 -val SCE_OSCRIPT_LABEL=13 -val SCE_OSCRIPT_TYPE=14 -val SCE_OSCRIPT_FUNCTION=15 -val SCE_OSCRIPT_OBJECT=16 -val SCE_OSCRIPT_PROPERTY=17 -val SCE_OSCRIPT_METHOD=18 -# Lexical states for SCLEX_VISUALPROLOG -lex VisualProlog=SCLEX_VISUALPROLOG SCE_VISUALPROLOG_ -val SCE_VISUALPROLOG_DEFAULT=0 -val SCE_VISUALPROLOG_KEY_MAJOR=1 -val SCE_VISUALPROLOG_KEY_MINOR=2 -val SCE_VISUALPROLOG_KEY_DIRECTIVE=3 -val SCE_VISUALPROLOG_COMMENT_BLOCK=4 -val SCE_VISUALPROLOG_COMMENT_LINE=5 -val SCE_VISUALPROLOG_COMMENT_KEY=6 -val SCE_VISUALPROLOG_COMMENT_KEY_ERROR=7 -val SCE_VISUALPROLOG_IDENTIFIER=8 -val SCE_VISUALPROLOG_VARIABLE=9 -val SCE_VISUALPROLOG_ANONYMOUS=10 -val SCE_VISUALPROLOG_NUMBER=11 -val SCE_VISUALPROLOG_OPERATOR=12 -val SCE_VISUALPROLOG_CHARACTER=13 -val SCE_VISUALPROLOG_CHARACTER_TOO_MANY=14 -val SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR=15 -val SCE_VISUALPROLOG_STRING=16 -val SCE_VISUALPROLOG_STRING_ESCAPE=17 -val SCE_VISUALPROLOG_STRING_ESCAPE_ERROR=18 -val SCE_VISUALPROLOG_STRING_EOL_OPEN=19 -val SCE_VISUALPROLOG_STRING_VERBATIM=20 -val SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL=21 -val SCE_VISUALPROLOG_STRING_VERBATIM_EOL=22 -# Lexical states for SCLEX_STTXT -lex StructuredText=SCLEX_STTXT SCE_STTXT_ -val SCE_STTXT_DEFAULT=0 -val SCE_STTXT_COMMENT=1 -val SCE_STTXT_COMMENTLINE=2 -val SCE_STTXT_KEYWORD=3 -val SCE_STTXT_TYPE=4 -val SCE_STTXT_FUNCTION=5 -val SCE_STTXT_FB=6 -val SCE_STTXT_NUMBER=7 -val SCE_STTXT_HEXNUMBER=8 -val SCE_STTXT_PRAGMA=9 -val SCE_STTXT_OPERATOR=10 -val SCE_STTXT_CHARACTER=11 -val SCE_STTXT_STRING1=12 -val SCE_STTXT_STRING2=13 -val SCE_STTXT_STRINGEOL=14 -val SCE_STTXT_IDENTIFIER=15 -val SCE_STTXT_DATETIME=16 -val SCE_STTXT_VARS=17 -val SCE_STTXT_PRAGMAS=18 -# Lexical states for SCLEX_KVIRC -lex KVIrc=SCLEX_KVIRC SCE_KVIRC_ -val SCE_KVIRC_DEFAULT=0 -val SCE_KVIRC_COMMENT=1 -val SCE_KVIRC_COMMENTBLOCK=2 -val SCE_KVIRC_STRING=3 -val SCE_KVIRC_WORD=4 -val SCE_KVIRC_KEYWORD=5 -val SCE_KVIRC_FUNCTION_KEYWORD=6 -val SCE_KVIRC_FUNCTION=7 -val SCE_KVIRC_VARIABLE=8 -val SCE_KVIRC_NUMBER=9 -val SCE_KVIRC_OPERATOR=10 -val SCE_KVIRC_STRING_FUNCTION=11 -val SCE_KVIRC_STRING_VARIABLE=12 -# Lexical states for SCLEX_RUST -lex Rust=SCLEX_RUST SCE_RUST_ -val SCE_RUST_DEFAULT=0 -val SCE_RUST_COMMENTBLOCK=1 -val SCE_RUST_COMMENTLINE=2 -val SCE_RUST_COMMENTBLOCKDOC=3 -val SCE_RUST_COMMENTLINEDOC=4 -val SCE_RUST_NUMBER=5 -val SCE_RUST_WORD=6 -val SCE_RUST_WORD2=7 -val SCE_RUST_WORD3=8 -val SCE_RUST_WORD4=9 -val SCE_RUST_WORD5=10 -val SCE_RUST_WORD6=11 -val SCE_RUST_WORD7=12 -val SCE_RUST_STRING=13 -val SCE_RUST_STRINGR=14 -val SCE_RUST_CHARACTER=15 -val SCE_RUST_OPERATOR=16 -val SCE_RUST_IDENTIFIER=17 -val SCE_RUST_LIFETIME=18 -val SCE_RUST_MACRO=19 -val SCE_RUST_LEXERROR=20 -val SCE_RUST_BYTESTRING=21 -val SCE_RUST_BYTESTRINGR=22 -val SCE_RUST_BYTECHARACTER=23 -# Lexical states for SCLEX_DMAP -lex DMAP=SCLEX_DMAP SCE_DMAP_ -val SCE_DMAP_DEFAULT=0 -val SCE_DMAP_COMMENT=1 -val SCE_DMAP_NUMBER=2 -val SCE_DMAP_STRING1=3 -val SCE_DMAP_STRING2=4 -val SCE_DMAP_STRINGEOL=5 -val SCE_DMAP_OPERATOR=6 -val SCE_DMAP_IDENTIFIER=7 -val SCE_DMAP_WORD=8 -val SCE_DMAP_WORD2=9 -val SCE_DMAP_WORD3=10 -# Lexical states for SCLEX_DMIS -lex DMIS=SCLEX_DMIS SCE_DMIS_ -val SCE_DMIS_DEFAULT=0 -val SCE_DMIS_COMMENT=1 -val SCE_DMIS_STRING=2 -val SCE_DMIS_NUMBER=3 -val SCE_DMIS_KEYWORD=4 -val SCE_DMIS_MAJORWORD=5 -val SCE_DMIS_MINORWORD=6 -val SCE_DMIS_UNSUPPORTED_MAJOR=7 -val SCE_DMIS_UNSUPPORTED_MINOR=8 -val SCE_DMIS_LABEL=9 -# Lexical states for SCLEX_REGISTRY -lex REG=SCLEX_REGISTRY SCE_REG_ -val SCE_REG_DEFAULT=0 -val SCE_REG_COMMENT=1 -val SCE_REG_VALUENAME=2 -val SCE_REG_STRING=3 -val SCE_REG_HEXDIGIT=4 -val SCE_REG_VALUETYPE=5 -val SCE_REG_ADDEDKEY=6 -val SCE_REG_DELETEDKEY=7 -val SCE_REG_ESCAPED=8 -val SCE_REG_KEYPATH_GUID=9 -val SCE_REG_STRING_GUID=10 -val SCE_REG_PARAMETER=11 -val SCE_REG_OPERATOR=12 -# Lexical state for SCLEX_BIBTEX -lex BibTeX=SCLEX_BIBTEX SCE_BIBTEX_ -val SCE_BIBTEX_DEFAULT=0 -val SCE_BIBTEX_ENTRY=1 -val SCE_BIBTEX_UNKNOWN_ENTRY=2 -val SCE_BIBTEX_KEY=3 -val SCE_BIBTEX_PARAMETER=4 -val SCE_BIBTEX_VALUE=5 -val SCE_BIBTEX_COMMENT=6 -# Lexical state for SCLEX_SREC -lex Srec=SCLEX_SREC SCE_HEX_ -val SCE_HEX_DEFAULT=0 -val SCE_HEX_RECSTART=1 -val SCE_HEX_RECTYPE=2 -val SCE_HEX_RECTYPE_UNKNOWN=3 -val SCE_HEX_BYTECOUNT=4 -val SCE_HEX_BYTECOUNT_WRONG=5 -val SCE_HEX_NOADDRESS=6 -val SCE_HEX_DATAADDRESS=7 -val SCE_HEX_RECCOUNT=8 -val SCE_HEX_STARTADDRESS=9 -val SCE_HEX_ADDRESSFIELD_UNKNOWN=10 -val SCE_HEX_EXTENDEDADDRESS=11 -val SCE_HEX_DATA_ODD=12 -val SCE_HEX_DATA_EVEN=13 -val SCE_HEX_DATA_UNKNOWN=14 -val SCE_HEX_DATA_EMPTY=15 -val SCE_HEX_CHECKSUM=16 -val SCE_HEX_CHECKSUM_WRONG=17 -val SCE_HEX_GARBAGE=18 -# Lexical state for SCLEX_IHEX (shared with Srec) -lex IHex=SCLEX_IHEX SCE_HEX_ -# Lexical state for SCLEX_TEHEX (shared with Srec) -lex TEHex=SCLEX_TEHEX SCE_HEX_ -# Lexical states for SCLEX_JSON -lex JSON=SCLEX_JSON SCE_JSON_ -val SCE_JSON_DEFAULT=0 -val SCE_JSON_NUMBER=1 -val SCE_JSON_STRING=2 -val SCE_JSON_STRINGEOL=3 -val SCE_JSON_PROPERTYNAME=4 -val SCE_JSON_ESCAPESEQUENCE=5 -val SCE_JSON_LINECOMMENT=6 -val SCE_JSON_BLOCKCOMMENT=7 -val SCE_JSON_OPERATOR=8 -val SCE_JSON_URI=9 -val SCE_JSON_COMPACTIRI=10 -val SCE_JSON_KEYWORD=11 -val SCE_JSON_LDKEYWORD=12 -val SCE_JSON_ERROR=13 -lex EDIFACT=SCLEX_EDIFACT SCE_EDI_ -val SCE_EDI_DEFAULT=0 -val SCE_EDI_SEGMENTSTART=1 -val SCE_EDI_SEGMENTEND=2 -val SCE_EDI_SEP_ELEMENT=3 -val SCE_EDI_SEP_COMPOSITE=4 -val SCE_EDI_SEP_RELEASE=5 -val SCE_EDI_UNA=6 -val SCE_EDI_UNH=7 -val SCE_EDI_BADSEGMENT=8 -# Lexical states for SCLEX_STATA -lex STATA=SCLEX_STATA SCE_STATA_ -val SCE_STATA_DEFAULT=0 -val SCE_STATA_COMMENT=1 -val SCE_STATA_COMMENTLINE=2 -val SCE_STATA_COMMENTBLOCK=3 -val SCE_STATA_NUMBER=4 -val SCE_STATA_OPERATOR=5 -val SCE_STATA_IDENTIFIER=6 -val SCE_STATA_STRING=7 -val SCE_STATA_TYPE=8 -val SCE_STATA_WORD=9 -val SCE_STATA_GLOBAL_MACRO=10 -val SCE_STATA_MACRO=11 -# Lexical states for SCLEX_SAS -lex SAS=SCLEX_SAS SCE_SAS_ -val SCE_SAS_DEFAULT=0 -val SCE_SAS_COMMENT=1 -val SCE_SAS_COMMENTLINE=2 -val SCE_SAS_COMMENTBLOCK=3 -val SCE_SAS_NUMBER=4 -val SCE_SAS_OPERATOR=5 -val SCE_SAS_IDENTIFIER=6 -val SCE_SAS_STRING=7 -val SCE_SAS_TYPE=8 -val SCE_SAS_WORD=9 -val SCE_SAS_GLOBAL_MACRO=10 -val SCE_SAS_MACRO=11 -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 -lex Nim=SCLEX_NIM SCE_NIM_ -val SCE_NIM_DEFAULT=0 -val SCE_NIM_COMMENT=1 -val SCE_NIM_COMMENTDOC=2 -val SCE_NIM_COMMENTLINE=3 -val SCE_NIM_COMMENTLINEDOC=4 -val SCE_NIM_NUMBER=5 -val SCE_NIM_STRING=6 -val SCE_NIM_CHARACTER=7 -val SCE_NIM_WORD=8 -val SCE_NIM_TRIPLE=9 -val SCE_NIM_TRIPLEDOUBLE=10 -val SCE_NIM_BACKTICKS=11 -val SCE_NIM_FUNCNAME=12 -val SCE_NIM_STRINGEOL=13 -val SCE_NIM_NUMERROR=14 -val SCE_NIM_OPERATOR=15 -val SCE_NIM_IDENTIFIER=16 -# Lexical states for SCLEX_CIL -lex CIL=SCLEX_CIL SCE_CIL_ -val SCE_CIL_DEFAULT=0 -val SCE_CIL_COMMENT=1 -val SCE_CIL_COMMENTLINE=2 -val SCE_CIL_WORD=3 -val SCE_CIL_WORD2=4 -val SCE_CIL_WORD3=5 -val SCE_CIL_STRING=6 -val SCE_CIL_LABEL=7 -val SCE_CIL_OPERATOR=8 -val SCE_CIL_IDENTIFIER=9 -val SCE_CIL_STRINGEOL=10 -# Lexical states for SCLEX_X12 -lex X12=SCLEX_X12 SCE_X12_ -val SCE_X12_DEFAULT=0 -val SCE_X12_BAD=1 -val SCE_X12_ENVELOPE=2 -val SCE_X12_FUNCTIONGROUP=3 -val SCE_X12_TRANSACTIONSET=4 -val SCE_X12_SEGMENTHEADER=5 -val SCE_X12_SEGMENTEND=6 -val SCE_X12_SEP_ELEMENT=7 -val SCE_X12_SEP_SUBELEMENT=8 -# Lexical states for SCLEX_DATAFLEX -lex Dataflex=SCLEX_DATAFLEX SCE_DF_ -val SCE_DF_DEFAULT=0 -val SCE_DF_IDENTIFIER=1 -val SCE_DF_METATAG=2 -val SCE_DF_IMAGE=3 -val SCE_DF_COMMENTLINE=4 -val SCE_DF_PREPROCESSOR=5 -val SCE_DF_PREPROCESSOR2=6 -val SCE_DF_NUMBER=7 -val SCE_DF_HEXNUMBER=8 -val SCE_DF_WORD=9 -val SCE_DF_STRING=10 -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 -# Lexical states for SCLEX_FSHARP -lex FSharp=SCLEX_FSHARP SCE_FSHARP_ -val SCE_FSHARP_DEFAULT=0 -val SCE_FSHARP_KEYWORD=1 -val SCE_FSHARP_KEYWORD2=2 -val SCE_FSHARP_KEYWORD3=3 -val SCE_FSHARP_KEYWORD4=4 -val SCE_FSHARP_KEYWORD5=5 -val SCE_FSHARP_IDENTIFIER=6 -val SCE_FSHARP_QUOT_IDENTIFIER=7 -val SCE_FSHARP_COMMENT=8 -val SCE_FSHARP_COMMENTLINE=9 -val SCE_FSHARP_PREPROCESSOR=10 -val SCE_FSHARP_LINENUM=11 -val SCE_FSHARP_OPERATOR=12 -val SCE_FSHARP_NUMBER=13 -val SCE_FSHARP_CHARACTER=14 -val SCE_FSHARP_STRING=15 -val SCE_FSHARP_VERBATIM=16 -val SCE_FSHARP_QUOTATION=17 -val SCE_FSHARP_ATTRIBUTE=18 -val SCE_FSHARP_FORMAT_SPEC=19 -# Lexical states for SCLEX_ASCIIDOC -lex Asciidoc=SCLEX_ASCIIDOC SCE_ASCIIDOC_ -val SCE_ASCIIDOC_DEFAULT=0 -val SCE_ASCIIDOC_STRONG1=1 -val SCE_ASCIIDOC_STRONG2=2 -val SCE_ASCIIDOC_EM1=3 -val SCE_ASCIIDOC_EM2=4 -val SCE_ASCIIDOC_HEADER1=5 -val SCE_ASCIIDOC_HEADER2=6 -val SCE_ASCIIDOC_HEADER3=7 -val SCE_ASCIIDOC_HEADER4=8 -val SCE_ASCIIDOC_HEADER5=9 -val SCE_ASCIIDOC_HEADER6=10 -val SCE_ASCIIDOC_ULIST_ITEM=11 -val SCE_ASCIIDOC_OLIST_ITEM=12 -val SCE_ASCIIDOC_BLOCKQUOTE=13 -val SCE_ASCIIDOC_LINK=14 -val SCE_ASCIIDOC_CODEBK=15 -val SCE_ASCIIDOC_PASSBK=16 -val SCE_ASCIIDOC_COMMENT=17 -val SCE_ASCIIDOC_COMMENTBK=18 -val SCE_ASCIIDOC_LITERAL=19 -val SCE_ASCIIDOC_LITERALBK=20 -val SCE_ASCIIDOC_ATTRIB=21 -val SCE_ASCIIDOC_ATTRIBVAL=22 -val SCE_ASCIIDOC_MACRO=23 -# Lexical states for SCLEX_GDSCRIPT -lex GDScript=SCLEX_GDSCRIPT SCE_GD_ -val SCE_GD_DEFAULT=0 -val SCE_GD_COMMENTLINE=1 -val SCE_GD_NUMBER=2 -val SCE_GD_STRING=3 -val SCE_GD_CHARACTER=4 -val SCE_GD_WORD=5 -val SCE_GD_TRIPLE=6 -val SCE_GD_TRIPLEDOUBLE=7 -val SCE_GD_CLASSNAME=8 -val SCE_GD_FUNCNAME=9 -val SCE_GD_OPERATOR=10 -val SCE_GD_IDENTIFIER=11 -val SCE_GD_COMMENTBLOCK=12 -val SCE_GD_STRINGEOL=13 -val SCE_GD_WORD2=14 -val SCE_GD_ANNOTATION=15 diff --git a/3rdparty/unioncode-scintilla515/lexilla/include/Lexilla.h b/3rdparty/unioncode-scintilla515/lexilla/include/Lexilla.h deleted file mode 100644 index 107ab0249..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/include/Lexilla.h +++ /dev/null @@ -1,108 +0,0 @@ -// Lexilla lexer library -/** @file Lexilla.h - ** Lexilla definitions for dynamic and static linking. - ** For C++, more features and type safety are available with the LexillaAccess module. - **/ -// Copyright 2020 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef LEXILLA_H -#define LEXILLA_H - -// Define the default Lexilla shared library name for each platform -#if _WIN32 -#define LEXILLA_LIB "unioncode-lexilla" -#define LEXILLA_EXTENSION ".dll" -#else -#define LEXILLA_LIB "libunioncode-lexilla" -#if defined(__APPLE__) -#define LEXILLA_EXTENSION ".dylib" -#else -#define LEXILLA_EXTENSION ".so" -#endif -#endif - -// On Win32 use the stdcall calling convention otherwise use the standard calling convention -#if _WIN32 -#define LEXILLA_CALL __stdcall -#else -#define LEXILLA_CALL -#endif - -#if defined(__OBJC2__) -// Objective C(++) treats '[' as a message expression. -#define DEPRECATE_DEFINITION -#elif defined(__cplusplus) -#define DEPRECATE_DEFINITION [[deprecated]] -#elif defined(__GNUC__) || defined(__clang__) -#define DEPRECATE_DEFINITION __attribute__((deprecated)) -#else -// MSVC __declspec(deprecated) has different positioning rules to GCC so define to nothing -#define DEPRECATE_DEFINITION -#endif - -#ifdef __cplusplus -// Must have already included ILexer.h to have Scintilla::ILexer5 defined. -using Scintilla::ILexer5; -#else -typedef void ILexer5; -#endif - -typedef ILexer5 *(*LexerFactoryFunction)(); - -#ifdef __cplusplus -namespace Lexilla { -#endif - -typedef int (LEXILLA_CALL *GetLexerCountFn)(); -typedef void (LEXILLA_CALL *GetLexerNameFn)(unsigned int Index, char *name, int buflength); -typedef LexerFactoryFunction(LEXILLA_CALL *GetLexerFactoryFn)(unsigned int Index); -typedef ILexer5*(LEXILLA_CALL *CreateLexerFn)(const char *name); -typedef const char *(LEXILLA_CALL *LexerNameFromIDFn)(int identifier); -typedef const char *(LEXILLA_CALL *GetLibraryPropertyNamesFn)(); -typedef void(LEXILLA_CALL *SetLibraryPropertyFn)(const char *key, const char *value); -typedef const char *(LEXILLA_CALL *GetNameSpaceFn)(); - -#ifdef __cplusplus -} -#endif - -#define LEXILLA_NAMESPACE_SEPARATOR '.' - -#define LEXILLA_GETLEXERCOUNT "GetLexerCount" -#define LEXILLA_GETLEXERNAME "GetLexerName" -#define LEXILLA_GETLEXERFACTORY "GetLexerFactory" -#define LEXILLA_CREATELEXER "CreateLexer" -#define LEXILLA_LEXERNAMEFROMID "LexerNameFromID" -#define LEXILLA_GETLIBRARYPROPERTYNAMES "GetLibraryPropertyNames" -#define LEXILLA_SETLIBRARYPROPERTY "SetLibraryProperty" -#define LEXILLA_GETNAMESPACE "GetNameSpace" - -// Static linking prototypes - -#ifdef __cplusplus -extern "C" { -#endif - -ILexer5 * LEXILLA_CALL CreateLexer(const char *name); -int LEXILLA_CALL GetLexerCount(); -void LEXILLA_CALL GetLexerName(unsigned int index, char *name, int buflength); -LexerFactoryFunction LEXILLA_CALL GetLexerFactory(unsigned int index); -DEPRECATE_DEFINITION const char *LEXILLA_CALL LexerNameFromID(int identifier); -const char * LEXILLA_CALL GetLibraryPropertyNames(); -void LEXILLA_CALL SetLibraryProperty(const char *key, const char *value); -const char *LEXILLA_CALL GetNameSpace(); - -#ifdef __cplusplus -} -#endif - -#ifdef __cplusplus -namespace Lexilla { - class LexerModule; -} -// Add a static lexer (in the same binary) to Lexilla's list -void AddStaticLexerModule(Lexilla::LexerModule *plm); -#endif - -#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsciidoc.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsciidoc.cxx deleted file mode 100644 index f81bfbb15..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexAsciidoc.cxx +++ /dev/null @@ -1,393 +0,0 @@ -/****************************************************************** - * LexAsciidoc.cxx - * - * A simple Asciidoc lexer for scintilla. - * - * Based on the LexMarkdown.cxx by Jon Strait - jstrait@moonloop.net - * - * The License.txt file describes the conditions under which this - * software may be distributed. - * - *****************************************************************/ - -#include -#include -#include -#include -#include - -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" - -using namespace Lexilla; - -namespace { - -typedef struct { - bool start; - int len1; - int len2; - const char *name; -} MacroItem; - -static const MacroItem MacroList[] = { - // Directives - {true, 5, 2, "ifdef::"}, - {true, 6, 2, "ifeval::"}, - {true, 6, 2, "ifndef::"}, - {true, 5, 2, "endif::"}, - // Macros - {true, 5, 2, "audio::"}, - {true, 7, 2, "include::"}, - {true, 5, 2, "image::"}, - {true, 5, 2, "video::"}, - {false, 8, 1, "asciimath:"}, - {false, 3, 1, "btn:"}, - {false, 5, 1, "image:"}, - {false, 3, 1, "kbd:"}, - {false, 9, 1, "latexmath:"}, - {false, 4, 1, "link:"}, - {false, 6, 1, "mailto:"}, - {false, 4, 1, "menu:"}, - {false, 4, 1, "pass:"}, - {false, 4, 1, "stem:"}, - {false, 4, 1, "xref:"}, - // Admonitions - {true, 7, 1, "CAUTION:"}, - {true, 9, 1, "IMPORTANT:"}, - {true, 4, 1, "NOTE:"}, - {true, 3, 1, "TIP:"}, - {true, 7, 1, "WARNING:"}, - {false, 0, 0, NULL} -}; - -constexpr bool IsNewline(const int ch) { - // sc.GetRelative(i) returns '\0' if out of range - return (ch == '\n' || ch == '\r' || ch == '\0'); -} - -} - -static bool AtTermStart(StyleContext &sc) { - return sc.currentPos == 0 || sc.chPrev == 0 || isspacechar(sc.chPrev); -} - -static void ColorizeAsciidocDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, - WordList **, Accessor &styler) { - bool freezeCursor = false; - - StyleContext sc(startPos, static_cast(length), initStyle, styler); - - while (sc.More()) { - // Skip past escaped characters - if (sc.ch == '\\') { - sc.Forward(); - continue; - } - - // Skip newline. - if (IsNewline(sc.ch)) { - // Newline doesn't end blocks - if (sc.state != SCE_ASCIIDOC_CODEBK && \ - sc.state != SCE_ASCIIDOC_PASSBK && \ - sc.state != SCE_ASCIIDOC_COMMENTBK && \ - sc.state != SCE_ASCIIDOC_LITERALBK) { - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - sc.Forward(); - continue; - } - - // Conditional state-based actions - switch (sc.state) { - - // Strong - case SCE_ASCIIDOC_STRONG1: - if (sc.ch == '*' && sc.chPrev != ' ') { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - freezeCursor = true; - } - break; - case SCE_ASCIIDOC_STRONG2: - if (sc.Match("**") && sc.chPrev != ' ') { - sc.Forward(2); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - freezeCursor = true; - } - break; - - // Emphasis - case SCE_ASCIIDOC_EM1: - if (sc.ch == '_' && sc.chPrev != ' ') { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - freezeCursor = true; - } - break; - case SCE_ASCIIDOC_EM2: - if (sc.Match("__") && sc.chPrev != ' ') { - sc.Forward(2); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - freezeCursor = true; - } - break; - - // Link - case SCE_ASCIIDOC_LINK: - if (sc.ch == ']' && sc.chPrev != '\\') { - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Code block - case SCE_ASCIIDOC_CODEBK: - if (sc.atLineStart && sc.Match("----") && IsNewline(sc.GetRelative(4))) { - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Passthrough block - case SCE_ASCIIDOC_PASSBK: - if (sc.atLineStart && sc.Match("++++") && IsNewline(sc.GetRelative(4))) { - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Comment block - case SCE_ASCIIDOC_COMMENTBK: - if (sc.atLineStart && sc.Match("////") && IsNewline(sc.GetRelative(4))) { - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Literal - case SCE_ASCIIDOC_LITERAL: - if (sc.ch == '+' && sc.chPrev != '\\') { - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Literal block - case SCE_ASCIIDOC_LITERALBK: - if (sc.atLineStart && sc.Match("....") && IsNewline(sc.GetRelative(4))) { - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Attribute - case SCE_ASCIIDOC_ATTRIB: - if (sc.ch == ':' && sc.chPrev != ' ' && sc.chNext == ' ') { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_ATTRIBVAL); - } - break; - - // Macro - case SCE_ASCIIDOC_MACRO: - if (sc.ch == ']' && sc.chPrev != '\\') { - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - break; - - // Default - case SCE_ASCIIDOC_DEFAULT: - // Headers - if (sc.atLineStart && sc.Match("====== ")) { - sc.SetState(SCE_ASCIIDOC_HEADER6); - sc.Forward(6); - } - else if (sc.atLineStart && sc.Match("===== ")) { - sc.SetState(SCE_ASCIIDOC_HEADER5); - sc.Forward(5); - } - else if (sc.atLineStart && sc.Match("==== ")) { - sc.SetState(SCE_ASCIIDOC_HEADER4); - sc.Forward(4); - } - else if (sc.atLineStart && sc.Match("=== ")) { - sc.SetState(SCE_ASCIIDOC_HEADER3); - sc.Forward(3); - } - else if (sc.atLineStart && sc.Match("== ")) { - sc.SetState(SCE_ASCIIDOC_HEADER2); - sc.Forward(2); - } - else if (sc.atLineStart && sc.Match("= ")) { - sc.SetState(SCE_ASCIIDOC_HEADER1); - sc.Forward(1); - } - // Unordered list item - else if (sc.atLineStart && sc.Match("****** ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(6); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("***** ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(5); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("**** ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("*** ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(3); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("** ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(2); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("* ")) { - sc.SetState(SCE_ASCIIDOC_ULIST_ITEM); - sc.Forward(1); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - // Ordered list item - else if (sc.atLineStart && sc.Match("...... ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(6); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("..... ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(5); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match(".... ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(4); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match("... ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(3); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match(".. ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(2); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - else if (sc.atLineStart && sc.Match(". ")) { - sc.SetState(SCE_ASCIIDOC_OLIST_ITEM); - sc.Forward(1); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - } - // Blockquote - else if (sc.atLineStart && sc.Match("> ")) { - sc.SetState(SCE_ASCIIDOC_BLOCKQUOTE); - sc.Forward(); - } - // Link - else if (!sc.atLineStart && sc.ch == '[' && sc.chPrev != '\\' && sc.chNext != ' ') { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_LINK); - freezeCursor = true; - } - // Code block - else if (sc.atLineStart && sc.Match("----") && IsNewline(sc.GetRelative(4))) { - sc.SetState(SCE_ASCIIDOC_CODEBK); - sc.Forward(4); - } - // Passthrough block - else if (sc.atLineStart && sc.Match("++++") && IsNewline(sc.GetRelative(4))) { - sc.SetState(SCE_ASCIIDOC_PASSBK); - sc.Forward(4); - } - // Comment block - else if (sc.atLineStart && sc.Match("////") && IsNewline(sc.GetRelative(4))) { - sc.SetState(SCE_ASCIIDOC_COMMENTBK); - sc.Forward(4); - } - // Comment - else if (sc.atLineStart && sc.Match("//")) { - sc.SetState(SCE_ASCIIDOC_COMMENT); - sc.Forward(); - } - // Literal - else if (sc.ch == '+' && sc.chPrev != '\\' && sc.chNext != ' ' && AtTermStart(sc)) { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_LITERAL); - freezeCursor = true; - } - // Literal block - else if (sc.atLineStart && sc.Match("....") && IsNewline(sc.GetRelative(4))) { - sc.SetState(SCE_ASCIIDOC_LITERALBK); - sc.Forward(4); - } - // Attribute - else if (sc.atLineStart && sc.ch == ':' && sc.chNext != ' ') { - sc.SetState(SCE_ASCIIDOC_ATTRIB); - } - // Strong - else if (sc.Match("**") && sc.GetRelative(2) != ' ') { - sc.SetState(SCE_ASCIIDOC_STRONG2); - sc.Forward(); - } - else if (sc.ch == '*' && sc.chNext != ' ' && AtTermStart(sc)) { - sc.SetState(SCE_ASCIIDOC_STRONG1); - } - // Emphasis - else if (sc.Match("__") && sc.GetRelative(2) != ' ') { - sc.SetState(SCE_ASCIIDOC_EM2); - sc.Forward(); - } - else if (sc.ch == '_' && sc.chNext != ' ' && AtTermStart(sc)) { - sc.SetState(SCE_ASCIIDOC_EM1); - } - // Macro - else if (sc.atLineStart && sc.ch == '[' && sc.chNext != ' ') { - sc.Forward(); - sc.SetState(SCE_ASCIIDOC_MACRO); - freezeCursor = true; - } - else { - int i = 0; - bool found = false; - while (!found && MacroList[i].name != NULL) { - if (MacroList[i].start) - found = sc.atLineStart && sc.Match(MacroList[i].name); - else - found = sc.Match(MacroList[i].name); - if (found) { - sc.SetState(SCE_ASCIIDOC_MACRO); - sc.Forward(MacroList[i].len1); - sc.SetState(SCE_ASCIIDOC_DEFAULT); - if (MacroList[i].len2 > 1) - sc.Forward(MacroList[i].len2 - 1); - } - i++; - } - } - break; - } - // Advance if not holding back the cursor for this iteration. - if (!freezeCursor) - sc.Forward(); - freezeCursor = false; - } - sc.Complete(); -} - -LexerModule lmAsciidoc(SCLEX_ASCIIDOC, ColorizeAsciidocDoc, "asciidoc"); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBatch.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBatch.cxx deleted file mode 100644 index bdab686fb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexBatch.cxx +++ /dev/null @@ -1,627 +0,0 @@ -// Scintilla source code edit control -/** @file LexBatch.cxx - ** Lexer for batch files. - **/ -// Copyright 1998-2001 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" - -using namespace Lexilla; - -namespace { - -constexpr bool Is0To9(char ch) noexcept { - return (ch >= '0') && (ch <= '9'); -} - -bool IsAlphabetic(int ch) noexcept { - return IsASCII(ch) && isalpha(ch); -} - -inline bool AtEOL(Accessor &styler, Sci_PositionU i) { - return (styler[i] == '\n') || - ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); -} - -// Tests for BATCH Operators -constexpr bool IsBOperator(char ch) noexcept { - return (ch == '=') || (ch == '+') || (ch == '>') || (ch == '<') || - (ch == '|') || (ch == '?') || (ch == '*')|| - (ch == '&') || (ch == '(') || (ch == ')'); -} - -// Tests for BATCH Separators -constexpr bool IsBSeparator(char ch) noexcept { - return (ch == '\\') || (ch == '.') || (ch == ';') || - (ch == '\"') || (ch == '\'') || (ch == '/'); -} - -// Tests for escape character -bool IsEscaped(const char* wordStr, Sci_PositionU pos) noexcept { - bool isQoted=false; - while (pos>0){ - pos--; - if (wordStr[pos]=='^') - isQoted=!isQoted; - else - break; - } - return isQoted; -} - -// Tests for quote character -bool textQuoted(const 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; - } - pQuote = strchr(pQuote + 1, '"'); - } - return CurrentStatus; -} - -void ColouriseBatchDoc( - Sci_PositionU startPos, - Sci_Position length, - 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] {}; - - styler.StartAt(startPos); - 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) || (i==startPos + length-1)) { - // End of line (or of line buffer) (or End of Last Line) met, colourise it - lineBuffer[linePos] = '\0'; - const Sci_PositionU lengthLine=linePos; - const Sci_PositionU endPos=i; - const WordList &keywords = *keywordlists[0]; // Internal Commands - const 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 - - Sci_PositionU offset = 0; // Line Buffer Offset - // 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 - Sci_PositionU 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); - } - char wordBuffer[81]{}; // Word Buffer - large to catch long paths - // Copy word from Line Buffer into Word Buffer - Sci_PositionU wbl = 0; // Word Buffer Length - for (; offset < lengthLine && wbl < 80 && - !isspacechar(lineBuffer[offset]); wbl++, offset++) { - wordBuffer[wbl] = tolower(lineBuffer[offset]); - } - wordBuffer[wbl] = '\0'; - Sci_PositionU wbo = 0; // Word Buffer Offset - also Special Keyword Buffer Length - - // 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 - bool sKeywordFound = false; // Exit Special Keyword for-loop if found - for (Sci_PositionU keywordLength = 2; keywordLength < wbl && keywordLength < 7 && !sKeywordFound; keywordLength++) { - // 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 - wbo = 0; - // Copy Keyword Length from Word Buffer into Special Keyword Buffer - for (; wbo < keywordLength; wbo++) { - sKeywordBuffer[wbo] = 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 (%%~...) - // Expanded Argument: %~[] - // Expanded Variable: %%~[] - // Path operators are exclusively alphabetic. - // Expanded arguments have a single digit at the end. - // Expanded variables have a single identifier character as variable name. - } 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); - } - const bool isArgument = (wordBuffer[1] == '~'); - if (isArgument) { - Sci_PositionU expansionStopOffset = 2; - bool isValid = false; - for (; expansionStopOffset < wbl; expansionStopOffset++) { - if (Is0To9(wordBuffer[expansionStopOffset])) { - expansionStopOffset++; - isValid = true; - wbo = expansionStopOffset; - // Colorize Expanded Argument - styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER); - break; - } - } - if (!isValid) { - // not a valid expanded argument or variable - styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT); - } - // Expanded Variable - } else { - // start after ~ - wbo = 3; - // Search to end of word for another % (can be a long path) - while ((wbo < wbl) && - (wordBuffer[wbo] != '%') && - (!IsBOperator(wordBuffer[wbo])) && - (!IsBSeparator(wordBuffer[wbo]))) { - wbo++; - } - if (wbo > 3) { - // Colorize Expanded Variable - styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_IDENTIFIER); - } else { - // not a valid expanded argument or variable - styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_BAT_DEFAULT); - } - } - // 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); - // escaped % - } else if ( - (wbl > 1) && - (wordBuffer[1] == '%')) { - - // Reset Offset to re-process remainder of word - styler.ColourTo(startLine + offset - 1 - (wbl - 2), SCE_BAT_DEFAULT); - offset -= (wbl - 2); - } - // 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 && (i2) && 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; - } - } -} - -const char *const batchWordListDesc[] = { - "Internal Commands", - "External Commands", - 0 -}; - -} - -LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCIL.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCIL.cxx deleted file mode 100644 index 5c801a624..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexCIL.cxx +++ /dev/null @@ -1,410 +0,0 @@ -// Scintilla source code edit control -/** @file LexCIL.cxx - ** Lexer for Common Intermediate Language - ** Written by Jad Altahan (github.com/xv) - ** CIL manual: https://www.ecma-international.org/publications/standards/Ecma-335.htm - **/ -// Copyright 1998-2001 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "StringCopy.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { - // Use an unnamed namespace to protect the functions and classes from name conflicts - -bool IsAWordChar(const int ch) { - return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.'); -} - -bool IsOperator(const int ch) { - if ((ch < 0x80) && (isalnum(ch))) - return false; - - if (strchr("!%&*+-/<=>@^|~()[]{}", ch)) { - return true; - } - - return false; -} - -constexpr bool IsStreamCommentStyle(const int style) noexcept { - return style == SCE_CIL_COMMENT; -} - -struct OptionsCIL { - bool fold; - bool foldComment; - bool foldCommentMultiline; - bool foldCompact; - - OptionsCIL() { - fold = true; - foldComment = false; - foldCommentMultiline = true; - foldCompact = true; - } -}; - -static const char *const cilWordListDesc[] = { - "Primary CIL keywords", - "Metadata", - "Opcode instructions", - 0 -}; - -struct OptionSetCIL : public OptionSet { - OptionSetCIL() { - DefineProperty("fold", &OptionsCIL::fold); - DefineProperty("fold.comment", &OptionsCIL::foldComment); - - DefineProperty("fold.cil.comment.multiline", &OptionsCIL::foldCommentMultiline, - "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); - - DefineProperty("fold.compact", &OptionsCIL::foldCompact); - - DefineWordListSets(cilWordListDesc); - } -}; - -LexicalClass lexicalClasses[] = { - // Lexer CIL SCLEX_CIL SCE_CIL_: - 0, "SCE_CIL_DEFAULT", "default", "White space", - 1, "SCE_CIL_COMMENT", "comment", "Multi-line comment", - 2, "SCE_CIL_COMMENTLINE", "comment line", "Line comment", - 3, "SCE_CIL_WORD", "keyword", "Keyword 1", - 4, "SCE_CIL_WORD2", "keyword", "Keyword 2", - 5, "SCE_CIL_WORD3", "keyword", "Keyword 3", - 6, "SCE_CIL_STRING", "literal string", "Double quoted string", - 7, "SCE_CIL_LABEL", "label", "Code label", - 8, "SCE_CIL_OPERATOR", "operator", "Operators", - 9, "SCE_CIL_STRINGEOL", "error literal string", "String is not closed", - 10, "SCE_CIL_IDENTIFIER", "identifier", "Identifiers", -}; - -} - -class LexerCIL : public DefaultLexer { - WordList keywords, keywords2, keywords3; - OptionsCIL options; - OptionSetCIL osCIL; - -public: - LexerCIL() : DefaultLexer("cil", SCLEX_CIL, lexicalClasses, ELEMENTS(lexicalClasses)) { } - - virtual ~LexerCIL() { } - - void SCI_METHOD Release() override { - delete this; - } - - int SCI_METHOD Version() const override { - return lvRelease5; - } - - const char * SCI_METHOD PropertyNames() override { - return osCIL.PropertyNames(); - } - - int SCI_METHOD PropertyType(const char *name) override { - return osCIL.PropertyType(name); - } - - const char * SCI_METHOD DescribeProperty(const char *name) override { - return osCIL.DescribeProperty(name); - } - - 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(); - } - - 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; - } - - int SCI_METHOD LineEndTypesSupported() override { - return SC_LINE_END_TYPE_UNICODE; - } - - int SCI_METHOD PrimaryStyleFromStyle(int style) override { - return style; - } - - static ILexer5 *LexerFactoryCIL() { - return new LexerCIL(); - } -}; - -Sci_Position SCI_METHOD LexerCIL::PropertySet(const char *key, const char *val) { - if (osCIL.PropertySet(&options, key, val)) { - return 0; - } - - return -1; -} - -Sci_Position SCI_METHOD LexerCIL::WordListSet(int n, const char *wl) { - WordList *wordListN = 0; - - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &keywords2; - break; - case 2: - wordListN = &keywords3; - 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 LexerCIL::Lex(Sci_PositionU startPos, Sci_Position length, - int initStyle, IDocument *pAccess) { - if (initStyle == SCE_CIL_STRINGEOL) { - initStyle = SCE_CIL_DEFAULT; - } - - Accessor styler(pAccess, NULL); - StyleContext sc(startPos, length, initStyle, styler); - - bool identAtLineStart = false, // Checks if an identifier is at line start (ignoring spaces) - canStyleLabels = false; // Checks if conditions are met to style SCE_CIL_LABEL - - for (; sc.More(); sc.Forward()) { - if (sc.atLineStart) { - if (sc.state == SCE_CIL_STRING) { - sc.SetState(SCE_CIL_STRING); - } - - identAtLineStart = true; - } - - // Handle string line continuation - if (sc.ch == '\\' && (sc.chNext == '\n' || sc.chNext == '\r') && - (sc.state == SCE_CIL_STRING)) { - sc.Forward(); - - if (sc.ch == '\r' && sc.chNext == '\n') { - sc.Forward(); - } - - continue; - } - - switch (sc.state) { - case SCE_CIL_OPERATOR: - sc.SetState(SCE_CIL_DEFAULT); - break; - case SCE_CIL_IDENTIFIER: - if (!IsAWordChar(sc.ch)) { - if (canStyleLabels && (sc.ch == ':' && sc.chNext != ':')) { - sc.ChangeState(SCE_CIL_LABEL); - sc.ForwardSetState(SCE_CIL_DEFAULT); - } else { - char kwSize[100]; - sc.GetCurrent(kwSize, sizeof(kwSize)); - int style = SCE_CIL_IDENTIFIER; - - if (keywords.InList(kwSize)) { - style = SCE_CIL_WORD; - } else if (keywords2.InList(kwSize)) { - style = SCE_CIL_WORD2; - } else if (keywords3.InList(kwSize)) { - style = SCE_CIL_WORD3; - } - - sc.ChangeState(style); - sc.SetState(SCE_CIL_DEFAULT); - } - } - break; - case SCE_CIL_COMMENT: - if (sc.Match('*', '/')) { - sc.Forward(); - sc.ForwardSetState(SCE_CIL_DEFAULT); - } - break; - case SCE_CIL_COMMENTLINE: - if (sc.atLineStart) { - sc.SetState(SCE_CIL_DEFAULT); - } - break; - case SCE_CIL_STRING: - if (sc.ch == '\\') { - if (sc.chNext == '"' || sc.chNext == '\\') { - sc.Forward(); - } - } else if (sc.ch == '"') { - sc.ForwardSetState(SCE_CIL_DEFAULT); - } else if (sc.atLineEnd) { - sc.ChangeState(SCE_CIL_STRINGEOL); - sc.ForwardSetState(SCE_CIL_DEFAULT); - } - break; - } - - if (sc.state == SCE_CIL_DEFAULT) { - // String - if (sc.ch == '"') { - sc.SetState(SCE_CIL_STRING); - } - // Keyword - else if (IsAWordChar(sc.ch)) { - // Allow setting SCE_CIL_LABEL style only if the label is the - // first token in the line and does not start with a dot or a digit - canStyleLabels = identAtLineStart && !(sc.ch == '.' || IsADigit(sc.ch)); - sc.SetState(SCE_CIL_IDENTIFIER); - } - // Multi-line comment - else if (sc.Match('/', '*')) { - sc.SetState(SCE_CIL_COMMENT); - sc.Forward(); - } - // Line comment - else if (sc.Match('/', '/')) { - sc.SetState(SCE_CIL_COMMENTLINE); - } - // Operators - else if (IsOperator(sc.ch)) { - sc.SetState(SCE_CIL_OPERATOR); - } - } - - if (!IsASpace(sc.ch)) { - identAtLineStart = false; - } - } - - sc.Complete(); -} - -void SCI_METHOD LexerCIL::Fold(Sci_PositionU startPos, Sci_Position length, - int initStyle, IDocument *pAccess) { - if (!options.fold) { - return; - } - - LexAccessor styler(pAccess); - - const Sci_PositionU endPos = startPos + length; - Sci_Position lineCurrent = styler.GetLine(startPos); - - int levelCurrent = SC_FOLDLEVELBASE; - if (lineCurrent > 0) - levelCurrent = styler.LevelAt(lineCurrent - 1) >> 16; - - int style = initStyle; - int styleNext = styler.StyleAt(startPos); - int levelNext = levelCurrent; - int visibleChars = 0; - - char chNext = styler[startPos]; - - for (Sci_PositionU i = startPos; i < endPos; i++) { - const char ch = chNext; - int stylePrev = style; - - chNext = styler.SafeGetCharAt(i + 1); - style = styleNext; - styleNext = styler.StyleAt(i + 1); - - const bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); - - if (options.foldComment && - options.foldCommentMultiline && IsStreamCommentStyle(style)) { - if (!IsStreamCommentStyle(stylePrev)) { - levelNext++; - } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { - levelNext--; - } - } - - if (style == SCE_CIL_OPERATOR) { - if (ch == '{') { - levelNext++; - } else if (ch == '}') { - levelNext--; - } - } - - if (!IsASpace(ch)) { - visibleChars++; - } - - if (atEOL || (i == endPos - 1)) { - int lev = levelCurrent | levelNext << 16; - if (visibleChars == 0 && options.foldCompact) - lev |= SC_FOLDLEVELWHITEFLAG; - if (levelCurrent < levelNext) - lev |= SC_FOLDLEVELHEADERFLAG; - if (lev != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, lev); - } - - lineCurrent++; - levelCurrent = levelNext; - - if (options.foldCompact && - i == static_cast(styler.Length() - 1)) { - styler.SetLevel(lineCurrent, lev | SC_FOLDLEVELWHITEFLAG); - } - - visibleChars = 0; - } - } -} - -LexerModule lmCIL(SCLEX_CIL, LexerCIL::LexerFactoryCIL, "cil", cilWordListDesc); \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDataflex.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDataflex.cxx deleted file mode 100644 index a51b34b4e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexDataflex.cxx +++ /dev/null @@ -1,611 +0,0 @@ -// Scintilla source code edit control -/** @file LexDataflex.cxx - ** Lexer for DataFlex. - ** Based on LexPascal.cxx - ** Written by Wil van Antwerpen, June 2019 - **/ - -/* -// The License.txt file describes the conditions under which this software may be distributed. - -A few words about features of LexDataflex... - -Generally speaking LexDataflex tries to support all available DataFlex features (up -to DataFlex 19.1 at this time). - -~ FOLDING: - -Folding is supported in the following cases: - -- Folding of stream-like comments -- Folding of groups of consecutive line comments -- Folding of preprocessor blocks (the following preprocessor blocks are -supported: #IFDEF, #IFNDEF, #ENDIF and #HEADER / #ENDHEADER -blocks), -- Folding of code blocks on appropriate keywords (the following code blocks are -supported: "begin, struct, type, case / end" blocks, class & object -declarations and interface declarations) - -Remarks: - -- We pass 4 arrays to the lexer: -1. The DataFlex keyword list, these are normal DataFlex keywords -2. The Scope Open list, for example, begin / procedure / while -3. The Scope Close list, for example, end / end_procedure / loop -4. Operator list, for ex. + / - / * / Lt / iand -These lists are all mutually exclusive, scope open words should not be in the keyword list and vice versa - -- Folding of code blocks tries to handle all special cases in which folding -should not occur. - -~ KEYWORDS: - -The list of keywords that can be used in dataflex.properties file (up to DataFlex -19.1): - -- Keywords: .. snipped .. see dataflex.properties file. - -*/ - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" - -using namespace Lexilla; - - -static void GetRangeLowered(Sci_PositionU start, - Sci_PositionU end, - Accessor &styler, - char *s, - Sci_PositionU len) { - Sci_PositionU i = 0; - while ((i < end - start + 1) && (i < len-1)) { - s[i] = static_cast(tolower(styler[start + i])); - i++; - } - s[i] = '\0'; -} - -static void GetForwardRangeLowered(Sci_PositionU start, - CharacterSet &charSet, - Accessor &styler, - char *s, - Sci_PositionU len) { - Sci_PositionU i = 0; - while ((i < len-1) && charSet.Contains(styler.SafeGetCharAt(start + i))) { - s[i] = static_cast(tolower(styler.SafeGetCharAt(start + i))); - i++; - } - s[i] = '\0'; - -} - -enum { - stateInICode = 0x1000, - stateSingleQuoteOpen = 0x2000, - stateDoubleQuoteOpen = 0x4000, - stateFoldInPreprocessor = 0x0100, - stateFoldInCaseStatement = 0x0200, - stateFoldInPreprocessorLevelMask = 0x00FF, - stateFoldMaskAll = 0x0FFF -}; - - -static bool IsFirstDataFlexWord(Sci_Position pos, Accessor &styler) { - Sci_Position line = styler.GetLine(pos); - Sci_Position start_pos = styler.LineStart(line); - for (Sci_Position i = start_pos; i < pos; i++) { - char ch = styler.SafeGetCharAt(i); - if (!(ch == ' ' || ch == '\t')) - return false; - } - return true; -} - - -inline bool IsADataFlexField(int ch) { - return (ch == '.'); -} - - -static void ClassifyDataFlexWord(WordList *keywordlists[], StyleContext &sc, Accessor &styler) { - WordList& keywords = *keywordlists[0]; - WordList& scopeOpen = *keywordlists[1]; - WordList& scopeClosed = *keywordlists[2]; - WordList& operators = *keywordlists[3]; - - char s[100]; - int oldState; - int newState; - size_t tokenlen; - - oldState = sc.state; - newState = oldState; - sc.GetCurrentLowered(s, sizeof(s)); - tokenlen = strnlen(s,sizeof(s)); - if (keywords.InList(s)) { - // keywords in DataFlex can be used as table column names (file.field) and as such they - // should not be characterized as a keyword. So test for that. - // for ex. somebody using date as field name. - if (!IsADataFlexField(sc.GetRelative(-static_cast(tokenlen+1)))) { - newState = SCE_DF_WORD; - } - } - if (oldState == newState) { - if ((scopeOpen.InList(s) || scopeClosed.InList(s)) && (strcmp(s, "for") != 0) && (strcmp(s, "repeat") != 0)) { - // scope words in DataFlex can be used as table column names (file.field) and as such they - // should not be characterized as a scope word. So test for that. - // for ex. somebody using procedure for field name. - if (!IsADataFlexField(sc.GetRelative(-static_cast(tokenlen+1)))) { - newState = SCE_DF_SCOPEWORD; - } - } - // no code folding on the next words, but just want to paint them like keywords (as they are) (??? doesn't the code to the opposite?) - if (strcmp(s, "if") == 0 || - strcmp(s, "ifnot") == 0 || - strcmp(s, "case") == 0 || - strcmp(s, "else") == 0 ) { - newState = SCE_DF_SCOPEWORD; - } - } - if (oldState != newState && newState == SCE_DF_WORD) { - // a for loop must have for at the start of the line, for is also used in "define abc for 123" - if ( (strcmp(s, "for") == 0) && (IsFirstDataFlexWord(sc.currentPos-3, styler)) ) { - newState = SCE_DF_SCOPEWORD; - } - } - if (oldState != newState && newState == SCE_DF_WORD) { - // a repeat loop must have repeat at the start of the line, repeat is also used in 'move (repeat("d",5)) to sFoo' - if ( (strcmp(s, "repeat") == 0) && (IsFirstDataFlexWord(sc.currentPos-6, styler)) ) { - newState = SCE_DF_SCOPEWORD; - } - } - if (oldState == newState) { - if (operators.InList(s)) { - newState = SCE_DF_OPERATOR; - } - } - - if (oldState != newState) { - sc.ChangeState(newState); - } - sc.SetState(SCE_DF_DEFAULT); -} - -static void ColouriseDataFlexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], - Accessor &styler) { -// bool bSmartHighlighting = styler.GetPropertyInt("lexer.dataflex.smart.highlighting", 1) != 0; - - CharacterSet setWordStart(CharacterSet::setAlpha, "_$#@", 0x80, true); - CharacterSet setWord(CharacterSet::setAlphaNum, "_$#@", 0x80, true); - CharacterSet setNumber(CharacterSet::setDigits, ".-+eE"); - CharacterSet setHexNumber(CharacterSet::setDigits, "abcdefABCDEF"); - CharacterSet setOperator(CharacterSet::setNone, "*+-/<=>^"); - - Sci_Position curLine = styler.GetLine(startPos); - int curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : 0; - - StyleContext sc(startPos, length, initStyle, styler); - - for (; sc.More(); sc.Forward()) { - if (sc.atLineEnd) { - // Update the line state, so it can be seen by next line - curLine = styler.GetLine(sc.currentPos); - styler.SetLineState(curLine, curLineState); - } - - // Determine if the current state should terminate. - switch (sc.state) { - case SCE_DF_NUMBER: - if (!setNumber.Contains(sc.ch) || (sc.ch == '.' && sc.chNext == '.')) { - sc.SetState(SCE_DF_DEFAULT); - } else if (sc.ch == '-' || sc.ch == '+') { - if (sc.chPrev != 'E' && sc.chPrev != 'e') { - sc.SetState(SCE_DF_DEFAULT); - } - } - break; - case SCE_DF_IDENTIFIER: - if (!setWord.Contains(sc.ch)) { - ClassifyDataFlexWord(keywordlists, sc, styler); - } - break; - case SCE_DF_HEXNUMBER: - if (!(setHexNumber.Contains(sc.ch) || sc.ch == 'I') ) { // in |CI$22a we also want to color the "I" - sc.SetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_METATAG: - if (sc.atLineStart || sc.chPrev == '}') { - sc.SetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_PREPROCESSOR: - if (sc.atLineStart || IsASpaceOrTab(sc.ch)) { - sc.SetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_IMAGE: - if (sc.atLineStart && sc.Match("/*")) { - sc.Forward(); // these characters are still part of the DF Image - sc.ForwardSetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_PREPROCESSOR2: - // we don't have inline comments or preprocessor2 commands - //if (sc.Match('*', ')')) { - // sc.Forward(); - // sc.ForwardSetState(SCE_DF_DEFAULT); - //} - break; - case SCE_DF_COMMENTLINE: - if (sc.atLineStart) { - sc.SetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_STRING: - if (sc.atLineEnd) { - sc.ChangeState(SCE_DF_STRINGEOL); - } else if (sc.ch == '\'' && sc.chNext == '\'') { - sc.Forward(); - } else if (sc.ch == '\"' && sc.chNext == '\"') { - sc.Forward(); - } else if (sc.ch == '\'' || sc.ch == '\"') { - if (sc.ch == '\'' && (curLineState & stateSingleQuoteOpen) ) { - curLineState &= ~(stateSingleQuoteOpen); - sc.ForwardSetState(SCE_DF_DEFAULT); - } - else if (sc.ch == '\"' && (curLineState & stateDoubleQuoteOpen) ) { - curLineState &= ~(stateDoubleQuoteOpen); - sc.ForwardSetState(SCE_DF_DEFAULT); - } - } - break; - case SCE_DF_STRINGEOL: - if (sc.atLineStart) { - sc.SetState(SCE_DF_DEFAULT); - } - break; - case SCE_DF_SCOPEWORD: - //if (!setHexNumber.Contains(sc.ch) && sc.ch != '$') { - // sc.SetState(SCE_DF_DEFAULT); - //} - break; - case SCE_DF_OPERATOR: -// if (bSmartHighlighting && sc.chPrev == ';') { -// curLineState &= ~(stateInProperty | stateInExport); -// } - sc.SetState(SCE_DF_DEFAULT); - break; - case SCE_DF_ICODE: - if (sc.atLineStart || IsASpace(sc.ch) || isoperator(sc.ch)) { - sc.SetState(SCE_DF_DEFAULT); - } - break; - } - - // Determine if a new state should be entered. - if (sc.state == SCE_DF_DEFAULT) { - if (IsADigit(sc.ch)) { - sc.SetState(SCE_DF_NUMBER); - } else if (sc.Match('/', '/') || sc.Match("#REM")) { - sc.SetState(SCE_DF_COMMENTLINE); - } else if ((sc.ch == '#' && !sc.Match("#REM")) && IsFirstDataFlexWord(sc.currentPos, styler)) { - sc.SetState(SCE_DF_PREPROCESSOR); - // || (sc.ch == '|' && sc.chNext == 'C' && sc.GetRelativeCharacter(2) == 'I' && sc.GetRelativeCharacter(3) == '$') ) { - } else if ((sc.ch == '$' && ((!setWord.Contains(sc.chPrev)) || sc.chPrev == 'I' ) ) || (sc.Match("|CI$")) ) { - sc.SetState(SCE_DF_HEXNUMBER); // start with $ and previous character not in a..zA..Z0..9 excluding "I" OR start with |CI$ - } else if (setWordStart.Contains(sc.ch)) { - sc.SetState(SCE_DF_IDENTIFIER); - } else if (sc.ch == '{') { - sc.SetState(SCE_DF_METATAG); - //} else if (sc.Match("(*$")) { - // sc.SetState(SCE_DF_PREPROCESSOR2); - } else if (sc.ch == '/' && setWord.Contains(sc.chNext) && sc.atLineStart) { - sc.SetState(SCE_DF_IMAGE); - // sc.Forward(); // Eat the * so it isn't used for the end of the comment - } else if (sc.ch == '\'' || sc.ch == '\"') { - if (sc.ch == '\'' && !(curLineState & stateDoubleQuoteOpen)) { - curLineState |= stateSingleQuoteOpen; - } else if (sc.ch == '\"' && !(curLineState & stateSingleQuoteOpen)) { - curLineState |= stateDoubleQuoteOpen; - } - sc.SetState(SCE_DF_STRING); - } else if (setOperator.Contains(sc.ch)) { - sc.SetState(SCE_DF_OPERATOR); -// } else if (curLineState & stateInICode) { - // ICode start ! in a string followed by close string mark is not icode - } else if ((sc.ch == '!') && !(sc.ch == '!' && ((sc.chNext == '\"') || (sc.ch == '\'')) )) { - sc.SetState(SCE_DF_ICODE); - } - } - } - - if (sc.state == SCE_DF_IDENTIFIER && setWord.Contains(sc.chPrev)) { - ClassifyDataFlexWord(keywordlists, sc, styler); - } - - sc.Complete(); -} - -static bool IsStreamCommentStyle(int style) { - return style == SCE_DF_IMAGE; -} - -static bool IsCommentLine(Sci_Position line, Accessor &styler) { - Sci_Position pos = styler.LineStart(line); - Sci_Position eolPos = styler.LineStart(line + 1) - 1; - for (Sci_Position i = pos; i < eolPos; i++) { - char ch = styler[i]; - char chNext = styler.SafeGetCharAt(i + 1); - int style = styler.StyleAt(i); - if (ch == '/' && chNext == '/' && style == SCE_DF_COMMENTLINE) { - return true; - } else if (!IsASpaceOrTab(ch)) { - return false; - } - } - return false; -} - - - -static unsigned int GetFoldInPreprocessorLevelFlag(int lineFoldStateCurrent) { - return lineFoldStateCurrent & stateFoldInPreprocessorLevelMask; -} - -static void SetFoldInPreprocessorLevelFlag(int &lineFoldStateCurrent, unsigned int nestLevel) { - lineFoldStateCurrent &= ~stateFoldInPreprocessorLevelMask; - lineFoldStateCurrent |= nestLevel & stateFoldInPreprocessorLevelMask; -} - -static int ClassifyDataFlexPreprocessorFoldPoint(int &levelCurrent, int &lineFoldStateCurrent, - Sci_PositionU startPos, Accessor &styler) { - CharacterSet setWord(CharacterSet::setAlpha); - - char s[100]; // Size of the longest possible keyword + one additional character + null - GetForwardRangeLowered(startPos, setWord, styler, s, sizeof(s)); - size_t iLen = strnlen(s,sizeof(s)); - size_t iWordSize = 0; - - unsigned int nestLevel = GetFoldInPreprocessorLevelFlag(lineFoldStateCurrent); - - if (strcmp(s, "command") == 0 || - // The #if/#ifdef etcetera commands are not currently foldable as it is easy to write code that - // breaks the collaps logic, so we keep things simple and not include that for now. - strcmp(s, "header") == 0) { - nestLevel++; - SetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel); - lineFoldStateCurrent |= stateFoldInPreprocessor; - levelCurrent++; - iWordSize = iLen; - } else if (strcmp(s, "endcommand") == 0 || - strcmp(s, "endheader") == 0) { - nestLevel--; - SetFoldInPreprocessorLevelFlag(lineFoldStateCurrent, nestLevel); - if (nestLevel == 0) { - lineFoldStateCurrent &= ~stateFoldInPreprocessor; - } - levelCurrent--; - iWordSize = iLen; - if (levelCurrent < SC_FOLDLEVELBASE) { - levelCurrent = SC_FOLDLEVELBASE; - } - } - return static_cast(iWordSize); -} - - -static void ClassifyDataFlexWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent, - Sci_PositionU lastStart, Sci_PositionU currentPos, WordList *[], Accessor &styler) { - char s[100]; - - // property fold.dataflex.compilerlist - // Set to 1 for enabling the code folding feature in *.prn files - bool foldPRN = styler.GetPropertyInt("fold.dataflex.compilerlist",0) != 0; - - GetRangeLowered(lastStart, currentPos, styler, s, sizeof(s)); - - if (strcmp(s, "case") == 0) { - lineFoldStateCurrent |= stateFoldInCaseStatement; - } else if (strcmp(s, "begin") == 0) { - levelCurrent++; - } else if (strcmp(s, "for") == 0 || - strcmp(s, "while") == 0 || - strcmp(s, "repeat") == 0 || - strcmp(s, "for_all") == 0 || - strcmp(s, "struct") == 0 || - strcmp(s, "type") == 0 || - strcmp(s, "begin_row") == 0 || - strcmp(s, "item_list") == 0 || - strcmp(s, "begin_constraints") == 0 || - strcmp(s, "begin_transaction") == 0 || - strcmp(s, "enum_list") == 0 || - strcmp(s, "class") == 0 || - strcmp(s, "object") == 0 || - strcmp(s, "cd_popup_object") == 0 || - strcmp(s, "procedure") == 0 || - strcmp(s, "procedure_section") == 0 || - strcmp(s, "function") == 0 ) { - if ((IsFirstDataFlexWord(lastStart, styler )) || foldPRN) { - levelCurrent++; - } - } else if (strcmp(s, "end") == 0) { // end is not always the first keyword, for example "case end" - levelCurrent--; - if (levelCurrent < SC_FOLDLEVELBASE) { - levelCurrent = SC_FOLDLEVELBASE; - } - } else if (strcmp(s, "loop") == 0 || - strcmp(s, "until") == 0 || - strcmp(s, "end_class") == 0 || - strcmp(s, "end_object") == 0 || - strcmp(s, "cd_end_object") == 0 || - strcmp(s, "end_procedure") == 0 || - strcmp(s, "end_function") == 0 || - strcmp(s, "end_for_all") == 0 || - strcmp(s, "end_struct") == 0 || - strcmp(s, "end_type") == 0 || - strcmp(s, "end_row") == 0 || - strcmp(s, "end_item_list") == 0 || - strcmp(s, "end_constraints") == 0 || - strcmp(s, "end_transaction") == 0 || - strcmp(s, "end_enum_list") == 0 ) { - // lineFoldStateCurrent &= ~stateFoldInRecord; - if ((IsFirstDataFlexWord(lastStart, styler )) || foldPRN) { - levelCurrent--; - if (levelCurrent < SC_FOLDLEVELBASE) { - levelCurrent = SC_FOLDLEVELBASE; - } - } - } - -} - - -static void ClassifyDataFlexMetaDataFoldPoint(int &levelCurrent, - Sci_PositionU lastStart, Sci_PositionU currentPos, WordList *[], Accessor &styler) { - char s[100]; - - GetRangeLowered(lastStart, currentPos, styler, s, sizeof(s)); - - if (strcmp(s, "#beginsection") == 0) { - levelCurrent++; - } else if (strcmp(s, "#endsection") == 0) { - levelCurrent--; - if (levelCurrent < SC_FOLDLEVELBASE) { - levelCurrent = SC_FOLDLEVELBASE; - } - } - -} - -static void FoldDataFlexDoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *keywordlists[], - Accessor &styler) { - bool foldComment = styler.GetPropertyInt("fold.comment") != 0; - bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; - bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; - Sci_PositionU endPos = startPos + length; - int visibleChars = 0; - Sci_Position lineCurrent = styler.GetLine(startPos); - int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; - int levelCurrent = levelPrev; - int lineFoldStateCurrent = lineCurrent > 0 ? styler.GetLineState(lineCurrent - 1) & stateFoldMaskAll : 0; - char chNext = styler[startPos]; - int styleNext = styler.StyleAt(startPos); - int style = initStyle; - int iWordSize; - - Sci_Position lastStart = 0; - CharacterSet setWord(CharacterSet::setAlphaNum, "_$#@", 0x80, true); - - for (Sci_PositionU i = startPos; i < endPos; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - int stylePrev = style; - style = styleNext; - styleNext = styler.StyleAt(i + 1); - bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); - - if (foldComment && IsStreamCommentStyle(style)) { - if (!IsStreamCommentStyle(stylePrev)) { - levelCurrent++; - } else if (!IsStreamCommentStyle(styleNext)) { - levelCurrent--; - } - } - if (foldComment && atEOL && IsCommentLine(lineCurrent, styler)) - { - if (!IsCommentLine(lineCurrent - 1, styler) - && IsCommentLine(lineCurrent + 1, styler)) - levelCurrent++; - else if (IsCommentLine(lineCurrent - 1, styler) - && !IsCommentLine(lineCurrent+1, styler)) - levelCurrent--; - } - if (foldPreprocessor) { - if (style == SCE_DF_PREPROCESSOR) { - iWordSize = ClassifyDataFlexPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 1, styler); - //} else if (style == SCE_DF_PREPROCESSOR2 && ch == '(' && chNext == '*' - // && styler.SafeGetCharAt(i + 2) == '$') { - // ClassifyDataFlexPreprocessorFoldPoint(levelCurrent, lineFoldStateCurrent, i + 3, styler); - i = i + iWordSize; - } - } - - if (stylePrev != SCE_DF_SCOPEWORD && style == SCE_DF_SCOPEWORD) - { - // Store last word start point. - lastStart = i; - } - if (stylePrev == SCE_DF_SCOPEWORD) { - if(setWord.Contains(ch) && !setWord.Contains(chNext)) { - ClassifyDataFlexWordFoldPoint(levelCurrent, lineFoldStateCurrent, lastStart, i, keywordlists, styler); - } - } - - if (stylePrev == SCE_DF_METATAG && ch == '#') - { - // Store last word start point. - lastStart = i; - } - if (stylePrev == SCE_DF_METATAG) { - if(setWord.Contains(ch) && !setWord.Contains(chNext)) { - ClassifyDataFlexMetaDataFoldPoint(levelCurrent, lastStart, i, keywordlists, styler); - } - } - - if (!IsASpace(ch)) - visibleChars++; - - if (atEOL) { - int lev = levelPrev; - if (visibleChars == 0 && foldCompact) - lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visibleChars > 0)) - lev |= SC_FOLDLEVELHEADERFLAG; - if (lev != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, lev); - } - int newLineState = (styler.GetLineState(lineCurrent) & ~stateFoldMaskAll) | lineFoldStateCurrent; - styler.SetLineState(lineCurrent, newLineState); - lineCurrent++; - levelPrev = levelCurrent; - visibleChars = 0; - } - } - - // If we didn't reach the EOL in previous loop, store line level and whitespace information. - // The rest will be filled in later... - int lev = levelPrev; - if (visibleChars == 0 && foldCompact) - lev |= SC_FOLDLEVELWHITEFLAG; - styler.SetLevel(lineCurrent, lev); -} - -static const char * const dataflexWordListDesc[] = { - "Keywords", - "Scope open", - "Scope close", - "Operators", - 0 -}; - -LexerModule lmDataflex(SCLEX_DATAFLEX, ColouriseDataFlexDoc, "dataflex", FoldDataFlexDoc, dataflexWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFSharp.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFSharp.cxx deleted file mode 100644 index 7d4a50deb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexFSharp.cxx +++ /dev/null @@ -1,729 +0,0 @@ -/** - * @file LexFSharp.cxx - * Lexer for F# 5.0 - * Copyright (c) 2021 Robert Di Pardo - * Parts of LexerFSharp::Lex were adapted from LexCaml.cxx by Robert Roessler ("RR"). - * Parts of LexerFSharp::Fold were adapted from LexCPP.cxx by Neil Hodgson and Udo Lechner. - * The License.txt file describes the conditions under which this software may be distributed. - */ -// clang-format off -#include -#include - -#include -#include -#include -#include - -#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" -// clang-format on - -using namespace Scintilla; -using namespace Lexilla; - -static const char *const lexerName = "fsharp"; -static constexpr int WORDLIST_SIZE = 5; -static const char *const fsharpWordLists[] = { - "standard language keywords", - "core functions, including those in the FSharp.Collections namespace", - "built-in types, core namespaces, modules", - "optional", - "optional", - nullptr, -}; -static constexpr int keywordClasses[] = { - SCE_FSHARP_KEYWORD, SCE_FSHARP_KEYWORD2, SCE_FSHARP_KEYWORD3, SCE_FSHARP_KEYWORD4, SCE_FSHARP_KEYWORD5, -}; - -namespace { - -struct OptionsFSharp { - bool fold; - bool foldCompact; - bool foldComment; - bool foldCommentStream; - bool foldCommentMultiLine; - bool foldPreprocessor; - bool foldImports; - OptionsFSharp() { - fold = true; - foldCompact = true; - foldComment = true; - foldCommentStream = true; - foldCommentMultiLine = true; - foldPreprocessor = false; - foldImports = true; - } -}; - -struct OptionSetFSharp : public OptionSet { - OptionSetFSharp() { - DefineProperty("fold", &OptionsFSharp::fold); - DefineProperty("fold.compact", &OptionsFSharp::foldCompact); - DefineProperty("fold.comment", &OptionsFSharp::foldComment, - "Setting this option to 0 disables comment folding in F# files."); - - DefineProperty("fold.fsharp.comment.stream", &OptionsFSharp::foldCommentStream, - "Setting this option to 0 disables folding of ML-style comments in F# files when " - "fold.comment=1."); - - DefineProperty("fold.fsharp.comment.multiline", &OptionsFSharp::foldCommentMultiLine, - "Setting this option to 0 disables folding of grouped line comments in F# files when " - "fold.comment=1."); - - DefineProperty("fold.fsharp.preprocessor", &OptionsFSharp::foldPreprocessor, - "Setting this option to 1 enables folding of F# compiler directives."); - - DefineProperty("fold.fsharp.imports", &OptionsFSharp::foldImports, - "Setting this option to 0 disables folding of F# import declarations."); - - DefineWordListSets(fsharpWordLists); - } -}; - -const CharacterSet setOperators = CharacterSet(CharacterSet::setNone, "~^'-+*/%=@|&<>()[]{};,:!?"); -const CharacterSet setClosingTokens = CharacterSet(CharacterSet::setNone, ")}]"); -const CharacterSet setFormatSpecs = CharacterSet(CharacterSet::setNone, ".%aAbcdeEfFgGiMoOstuxX0123456789"); -const CharacterSet setFormatFlags = CharacterSet(CharacterSet::setNone, ".-+0 "); -const CharacterSet numericMetaChars1 = CharacterSet(CharacterSet::setNone, "_IbeEflmnosuxy"); -const CharacterSet numericMetaChars2 = CharacterSet(CharacterSet::setNone, "lnsy"); -std::map numericPrefixes = { { 'b', 2 }, { 'o', 8 }, { 'x', 16 } }; -constexpr Sci_Position ZERO_LENGTH = -1; - -struct FSharpString { - Sci_Position startPos; - int startChar; - FSharpString() { - startPos = ZERO_LENGTH; - startChar = '"'; - } - constexpr bool HasLength() const { - return startPos > ZERO_LENGTH; - } - constexpr bool CanInterpolate() const { - return startChar == '$'; - } -}; - -class UnicodeChar { - enum class Notation { none, asciiDec, asciiHex, utf16, utf32 }; - Notation type = Notation::none; - // single-byte Unicode char (000 - 255) - int asciiDigits[3] = { 0 }; - int maxDigit = '9'; - int toEnd = 0; - bool invalid = false; - -public: - UnicodeChar() noexcept = default; - explicit UnicodeChar(const int prefix) { - if (IsADigit(prefix)) { - *asciiDigits = prefix; - if (*asciiDigits >= '0' && *asciiDigits <= '2') { - type = Notation::asciiDec; - // count first digit as "prefix" - toEnd = 2; - } - } else if (prefix == 'x' || prefix == 'u' || prefix == 'U') { - switch (prefix) { - case 'x': - type = Notation::asciiHex; - toEnd = 2; - break; - case 'u': - type = Notation::utf16; - toEnd = 4; - break; - case 'U': - type = Notation::utf32; - toEnd = 8; - break; - } - } - } - void Parse(const int ch) { - invalid = false; - switch (type) { - case Notation::asciiDec: { - maxDigit = (*asciiDigits < '2') ? '9' : (asciiDigits[1] <= '4') ? '9' : '5'; - if (IsADigit(ch) && asciiDigits[1] <= maxDigit && ch <= maxDigit) { - asciiDigits[1] = ch; - toEnd--; - } else { - invalid = true; - } - break; - } - case Notation::asciiHex: - case Notation::utf16: - if (IsADigit(ch, 16)) { - toEnd--; - } else { - invalid = true; - } - break; - case Notation::utf32: - if ((toEnd > 6 && ch == '0') || (toEnd <= 6 && IsADigit(ch, 16))) { - toEnd--; - } else { - invalid = true; - } - break; - case Notation::none: - break; - } - } - constexpr bool AtEnd() noexcept { - return invalid || type == Notation::none || (type != Notation::none && toEnd < 0); - } -}; - -inline bool MatchStreamCommentStart(StyleContext &cxt) { - // match (* ... *), but allow point-free usage of the `*` operator, - // e.g. List.fold (*) 1 [ 1; 2; 3 ] - return (cxt.Match('(', '*') && cxt.GetRelative(2) != ')'); -} - -inline bool MatchStreamCommentEnd(const StyleContext &cxt) { - return (cxt.ch == ')' && cxt.chPrev == '*'); -} - -inline bool MatchLineComment(const StyleContext &cxt) { - // style shebang lines as comments in F# scripts: - // https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf#page=30&zoom=auto,-98,537 - return cxt.Match('/', '/') || cxt.Match('#', '!'); -} - -inline bool MatchLineNumberStart(StyleContext &cxt) { - return cxt.atLineStart && (cxt.MatchIgnoreCase("#line") || - (cxt.ch == '#' && (IsADigit(cxt.chNext) || IsADigit(cxt.GetRelative(2))))); -} - -inline bool MatchPPDirectiveStart(const StyleContext &cxt) { - return (cxt.atLineStart && cxt.ch == '#' && iswordstart(cxt.chNext)); -} - -inline bool MatchTypeAttributeStart(const StyleContext &cxt) { - return cxt.Match('[', '<'); -} - -inline bool MatchTypeAttributeEnd(const StyleContext &cxt) { - return (cxt.ch == ']' && cxt.chPrev == '>'); -} - -inline bool MatchQuotedExpressionStart(const StyleContext &cxt) { - return cxt.Match('<', '@'); -} - -inline bool MatchQuotedExpressionEnd(const StyleContext &cxt) { - return (cxt.ch == '>' && cxt.chPrev == '@'); -} - -inline bool MatchStringStart(const StyleContext &cxt) { - return (cxt.ch == '"' || cxt.Match('@', '"') || cxt.Match('$', '"') || cxt.Match('`', '`')); -} - -inline bool FollowsEscapedBackslash(StyleContext &cxt) { - int count = 0; - for (Sci_Position offset = 1; cxt.GetRelative(-offset) == '\\'; offset++) - count++; - return count % 2 != 0; -} - -inline bool MatchStringEnd(StyleContext &cxt, const FSharpString &fsStr) { - return (fsStr.HasLength() && - // end of quoted identifier? - ((cxt.ch == '`' && cxt.chPrev == '`') || - // end of literal or interpolated triple-quoted string? - ((fsStr.startChar == '"' || (fsStr.CanInterpolate() && cxt.chPrev != '$')) && - cxt.MatchIgnoreCase("\"\"\"")) || - // end of verbatim string? - (fsStr.startChar == '@' && - // embedded quotes must be in pairs - cxt.ch == '"' && cxt.chNext != '"' && - (cxt.chPrev != '"' || (cxt.chPrev == '"' && - // empty verbatim string? - (cxt.GetRelative(-2) == '@' || - // pair of quotes at end of string? - (cxt.GetRelative(-2) == '"' && cxt.GetRelative(-3) != '@'))))))) || - (!fsStr.HasLength() && cxt.ch == '"' && - ((cxt.chPrev != '\\' || (cxt.GetRelative(-2) == '\\' && !FollowsEscapedBackslash(cxt))) || - // treat backslashes as char literals in verbatim strings - (fsStr.startChar == '@' && cxt.chPrev == '\\'))); -} - -inline bool MatchCharacterStart(StyleContext &cxt) { - // don't style generic type parameters: 'a, 'b, 'T, etc. - return (cxt.ch == '\'' && !(cxt.chPrev == ':' || cxt.GetRelative(-2) == ':')); -} - -inline bool CanEmbedQuotes(StyleContext &cxt) { - // allow unescaped double quotes inside literal or interpolated triple-quoted strings, verbatim strings, - // and quoted identifiers: - // - https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings - // - https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/interpolated-strings#syntax - // - https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf#page=25&zoom=auto,-98,600 - return cxt.MatchIgnoreCase("$\"\"\"") || cxt.MatchIgnoreCase("\"\"\"") || cxt.Match('@', '"') || - cxt.Match('`', '`'); -} - -inline bool IsNumber(StyleContext &cxt, const int base = 10) { - return IsADigit(cxt.ch, base) || (IsADigit(cxt.chPrev, base) && numericMetaChars1.Contains(cxt.ch)) || - (IsADigit(cxt.GetRelative(-2), base) && numericMetaChars2.Contains(cxt.ch)); -} - -inline bool IsFloat(const StyleContext &cxt) { - return (cxt.ch == '.' && IsADigit(cxt.chPrev)) || - ((cxt.ch == '+' || cxt.ch == '-' ) && IsADigit(cxt.chNext)); -} - -inline bool IsLineEnd(StyleContext &cxt, const Sci_Position offset) { - const int ch = cxt.GetRelative(offset, '\n'); - return (ch == '\r' || ch == '\n'); -} - -class LexerFSharp : public DefaultLexer { - WordList keywords[WORDLIST_SIZE]; - OptionsFSharp options; - OptionSetFSharp optionSet; - -public: - explicit LexerFSharp() : DefaultLexer(lexerName, SCLEX_FSHARP) { - } - static ILexer5 *LexerFactoryFSharp() { - return new LexerFSharp(); - } - virtual ~LexerFSharp() { - } - void SCI_METHOD Release() noexcept override { - delete this; - } - int SCI_METHOD Version() const noexcept override { - return lvRelease5; - } - const char *SCI_METHOD GetName() noexcept override { - return lexerName; - } - int SCI_METHOD GetIdentifier() noexcept override { - return SCLEX_FSHARP; - } - int SCI_METHOD LineEndTypesSupported() noexcept override { - return SC_LINE_END_TYPE_DEFAULT; - } - void *SCI_METHOD PrivateCall(int, void *) noexcept override { - return nullptr; - } - const char *SCI_METHOD DescribeWordListSets() override { - return optionSet.DescribeWordListSets(); - } - const char *SCI_METHOD PropertyNames() override { - return optionSet.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return optionSet.PropertyType(name); - } - const char *SCI_METHOD DescribeProperty(const char *name) override { - return optionSet.DescribeProperty(name); - } - const char *SCI_METHOD PropertyGet(const char *key) override { - return optionSet.PropertyGet(key); - } - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override { - if (optionSet.PropertySet(&options, key, val)) { - return 0; - } - return ZERO_LENGTH; - } - Sci_Position SCI_METHOD WordListSet(int n, const char *wl) override; - void SCI_METHOD Lex(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) override; - void SCI_METHOD Fold(Sci_PositionU start, Sci_Position length, int initStyle,IDocument *pAccess) override; -}; - -Sci_Position SCI_METHOD LexerFSharp::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - Sci_Position firstModification = ZERO_LENGTH; - - if (n < WORDLIST_SIZE) { - wordListN = &keywords[n]; - } - if (wordListN) { - WordList wlNew; - wlNew.Set(wl); - - if (*wordListN != wlNew) { - wordListN->Set(wl); - firstModification = 0; - } - } - return firstModification; -} - -void SCI_METHOD LexerFSharp::Lex(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) { - LexAccessor styler(pAccess); - StyleContext sc(start, static_cast(length), initStyle, styler); - Sci_PositionU cursor = 0; - UnicodeChar uniCh = UnicodeChar(); - FSharpString fsStr = FSharpString(); - constexpr Sci_Position MAX_WORD_LEN = 64; - constexpr int SPACE = ' '; - int currentBase = 10; - - while (sc.More()) { - Sci_PositionU colorSpan = sc.currentPos - 1; - int state = -1; - bool advance = true; - - switch (sc.state & 0xff) { - case SCE_FSHARP_DEFAULT: - cursor = sc.currentPos; - - if (MatchLineNumberStart(sc)) { - state = SCE_FSHARP_LINENUM; - } else if (MatchPPDirectiveStart(sc)) { - state = SCE_FSHARP_PREPROCESSOR; - } else if (MatchLineComment(sc)) { - state = SCE_FSHARP_COMMENTLINE; - sc.Forward(); - sc.ch = SPACE; - } else if (MatchStreamCommentStart(sc)) { - state = SCE_FSHARP_COMMENT; - sc.Forward(); - sc.ch = SPACE; - } else if (MatchTypeAttributeStart(sc)) { - state = SCE_FSHARP_ATTRIBUTE; - sc.Forward(); - } else if (MatchQuotedExpressionStart(sc)) { - state = SCE_FSHARP_QUOTATION; - sc.Forward(); - } else if (MatchCharacterStart(sc)) { - state = SCE_FSHARP_CHARACTER; - } else if (MatchStringStart(sc)) { - fsStr.startChar = sc.ch; - fsStr.startPos = ZERO_LENGTH; - if (CanEmbedQuotes(sc)) { - // double quotes after this position should be non-terminating - fsStr.startPos = static_cast(sc.currentPos - cursor); - } - if (sc.ch == '`') { - state = SCE_FSHARP_QUOT_IDENTIFIER; - } else if (sc.ch == '@') { - state = SCE_FSHARP_VERBATIM; - } else { - state = SCE_FSHARP_STRING; - } - } else if (IsADigit(sc.ch, currentBase) || - ((sc.ch == '+' || sc.ch == '-') && IsADigit(sc.chNext))) { - state = SCE_FSHARP_NUMBER; - if (sc.ch == '0') { - const int prefix = sc.chNext; - if (numericPrefixes.find(prefix) != numericPrefixes.end()) { - currentBase = numericPrefixes[prefix]; - } - } - } else if (setOperators.Contains(sc.ch) && - // don't use operator style in async keywords (e.g. `return!`) - !(sc.ch == '!' && iswordstart(sc.chPrev)) && - // don't use operator style in member access, array/string indexing - !(sc.ch == '.' && (sc.chPrev == '\"' || iswordstart(sc.chPrev)) && - (iswordstart(sc.chNext) || sc.chNext == '['))) { - state = SCE_FSHARP_OPERATOR; - } else if (iswordstart(sc.ch)) { - state = SCE_FSHARP_IDENTIFIER; - } else { - state = SCE_FSHARP_DEFAULT; - } - break; - case SCE_FSHARP_LINENUM: - case SCE_FSHARP_PREPROCESSOR: - case SCE_FSHARP_COMMENTLINE: - if (sc.MatchLineEnd()) { - state = SCE_FSHARP_DEFAULT; - advance = false; - } - break; - case SCE_FSHARP_COMMENT: - case SCE_FSHARP_ATTRIBUTE: - case SCE_FSHARP_QUOTATION: - if (MatchStreamCommentEnd(sc) || MatchTypeAttributeEnd(sc) || MatchQuotedExpressionEnd(sc)) { - state = SCE_FSHARP_DEFAULT; - colorSpan++; - } - break; - case SCE_FSHARP_CHARACTER: - if (sc.chPrev == '\\' && sc.GetRelative(-2) != '\\') { - uniCh = UnicodeChar(sc.ch); - } else if (sc.ch == '\'' && - ((sc.chPrev == ' ' && sc.GetRelative(-2) == '\'') || sc.chPrev != '\\' || - (sc.chPrev == '\\' && sc.GetRelative(-2) == '\\'))) { - // byte literal? - if (sc.Match('\'', 'B')) { - sc.Forward(); - colorSpan++; - } - if (!sc.atLineEnd) { - colorSpan++; - } else { - sc.ChangeState(SCE_FSHARP_IDENTIFIER); - } - state = SCE_FSHARP_DEFAULT; - } else { - uniCh.Parse(sc.ch); - if (uniCh.AtEnd() && (sc.currentPos - cursor) >= 2) { - // terminate now, since we left the char behind - sc.ChangeState(SCE_FSHARP_IDENTIFIER); - advance = false; - } - } - break; - case SCE_FSHARP_STRING: - case SCE_FSHARP_VERBATIM: - case SCE_FSHARP_QUOT_IDENTIFIER: - if (MatchStringEnd(sc, fsStr)) { - const Sci_Position strLen = static_cast(sc.currentPos - cursor); - // backtrack to start of string - for (Sci_Position i = -strLen; i < 0; i++) { - const int startQuote = sc.GetRelative(i); - if (startQuote == '\"' || (startQuote == '`' && sc.GetRelative(i - 1) == '`')) { - // byte array? - if (sc.Match('\"', 'B')) { - sc.Forward(); - colorSpan++; - } - if (!sc.atLineEnd) { - colorSpan++; - } else { - sc.ChangeState(SCE_FSHARP_IDENTIFIER); - } - state = SCE_FSHARP_DEFAULT; - break; - } - } - } else if (sc.ch == '%' && - !(fsStr.startChar == '`' || sc.MatchIgnoreCase("% ") || sc.MatchIgnoreCase("% \"")) && - (setFormatSpecs.Contains(sc.chNext) || setFormatFlags.Contains(sc.chNext))) { - if (fsStr.CanInterpolate() && sc.chNext != '%') { - for (Sci_Position i = 2; i < length && !IsLineEnd(sc, i); i++) { - if (sc.GetRelative(i) == '{') { - state = setFormatSpecs.Contains(sc.GetRelative(i - 1)) - ? SCE_FSHARP_FORMAT_SPEC - : state; - break; - } - } - } else { - state = SCE_FSHARP_FORMAT_SPEC; - } - } - break; - case SCE_FSHARP_IDENTIFIER: - if (!(iswordstart(sc.ch) || sc.ch == '\'')) { - const Sci_Position wordLen = static_cast(sc.currentPos - cursor); - if (wordLen < MAX_WORD_LEN) { - // wordLength is believable as keyword, [re-]construct token - RR - char token[MAX_WORD_LEN] = { 0 }; - for (Sci_Position i = -wordLen; i < 0; i++) { - token[wordLen + i] = static_cast(sc.GetRelative(i)); - } - token[wordLen] = '\0'; - // a snake_case_identifier can never be a keyword - if (!(sc.ch == '_' || sc.GetRelative(-wordLen - 1) == '_')) { - for (int i = 0; i < WORDLIST_SIZE; i++) { - if (keywords[i].InList(token)) { - sc.ChangeState(keywordClasses[i]); - break; - } - } - } - } - state = SCE_FSHARP_DEFAULT; - advance = false; - } - break; - case SCE_FSHARP_OPERATOR: - // special-case "()" and "[]" tokens as KEYWORDS - RR - if (setClosingTokens.Contains(sc.ch) && - ((sc.ch == ')' && sc.chPrev == '(') || (sc.ch == ']' && sc.chPrev == '['))) { - sc.ChangeState(SCE_FSHARP_KEYWORD); - colorSpan++; - } else { - advance = false; - } - state = SCE_FSHARP_DEFAULT; - break; - case SCE_FSHARP_NUMBER: - state = (IsNumber(sc, currentBase) || IsFloat(sc)) - ? SCE_FSHARP_NUMBER - // change style even when operators aren't spaced - : setOperators.Contains(sc.ch) ? SCE_FSHARP_OPERATOR : SCE_FSHARP_DEFAULT; - currentBase = (state == SCE_FSHARP_NUMBER) ? currentBase : 10; - break; - case SCE_FSHARP_FORMAT_SPEC: - if (!setFormatSpecs.Contains(sc.chNext) || - !(setFormatFlags.Contains(sc.ch) || IsADigit(sc.ch)) || - (setFormatFlags.Contains(sc.ch) && sc.ch == sc.chNext)) { - colorSpan++; - state = (fsStr.startChar == '@') ? SCE_FSHARP_VERBATIM : SCE_FSHARP_STRING; - } - break; - } - - if (state >= SCE_FSHARP_DEFAULT) { - styler.ColourTo(colorSpan, sc.state); - sc.ChangeState(state); - } - - if (advance) { - sc.Forward(); - } - } - - sc.Complete(); -} - -bool LineContains(LexAccessor &styler, const char *word, const Sci_Position start, const Sci_Position end = 1, - const int chAttr = SCE_FSHARP_DEFAULT); - -void FoldLexicalGroup(LexAccessor &styler, int &levelNext, const Sci_Position lineCurrent, const char *word, - const int chAttr); - -void SCI_METHOD LexerFSharp::Fold(Sci_PositionU start, Sci_Position length, int initStyle, IDocument *pAccess) { - if (!options.fold) { - return; - } - - LexAccessor styler(pAccess); - const Sci_Position startPos = static_cast(start); - const Sci_PositionU endPos = start + length; - Sci_Position lineCurrent = styler.GetLine(startPos); - Sci_Position lineNext = lineCurrent + 1; - Sci_Position lineStartNext = styler.LineStart(lineNext); - int style = initStyle; - int styleNext = styler.StyleAt(startPos); - char chNext = styler[startPos]; - int levelNext; - int levelCurrent = SC_FOLDLEVELBASE; - int visibleChars = 0; - - if (lineCurrent > 0) { - levelCurrent = styler.LevelAt(lineCurrent - 1) >> 0x10; - } - - levelNext = levelCurrent; - - for (Sci_PositionU i = start; i < endPos; i++) { - const Sci_Position currentPos = static_cast(i); - const bool atEOL = currentPos == (lineStartNext - 1); - const bool atLineOrDocEnd = (atEOL || (i == (endPos - 1))); - const bool atDosOrMacEOL = (atEOL || styler.SafeGetCharAt(currentPos) == '\r'); - const int stylePrev = style; - const char ch = chNext; - const bool inLineComment = (stylePrev == SCE_FSHARP_COMMENTLINE); - style = styleNext; - styleNext = styler.StyleAt(currentPos + 1); - chNext = styler.SafeGetCharAt(currentPos + 1); - - if (options.foldComment) { - if (options.foldCommentMultiLine && inLineComment && atDosOrMacEOL && - (lineCurrent > 0 || styler.StyleAt(lineStartNext) == SCE_FSHARP_COMMENTLINE)) { - FoldLexicalGroup(styler, levelNext, lineCurrent, "//", SCE_FSHARP_COMMENTLINE); - } - - if (options.foldCommentStream && style == SCE_FSHARP_COMMENT && !inLineComment) { - if (stylePrev != SCE_FSHARP_COMMENT) { - levelNext++; - } else if (styleNext != SCE_FSHARP_COMMENT && !atEOL) { - levelNext--; - } - } - } - - if (options.foldPreprocessor && style == SCE_FSHARP_PREPROCESSOR) { - if (styler.Match(currentPos, "#if")) { - levelNext++; - } else if (styler.Match(currentPos, "#endif")) { - levelNext--; - } - } - - if (options.foldImports && atLineOrDocEnd && - LineContains(styler, "open ", lineCurrent, 1, SCE_FSHARP_KEYWORD)) { - FoldLexicalGroup(styler, levelNext, lineCurrent, "open ", SCE_FSHARP_KEYWORD); - } - - if (!IsASpace(ch)) { - visibleChars++; - } - - if (atLineOrDocEnd) { - int levelUse = levelCurrent; - int lev = levelUse | levelNext << 16; - - if (visibleChars == 0 && options.foldCompact) { - lev |= SC_FOLDLEVELWHITEFLAG; - } - if (levelUse < levelNext) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - if (lev != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, lev); - } - - visibleChars = 0; - lineCurrent++; - lineNext = lineCurrent + 1; - lineStartNext = styler.LineStart(lineNext); - levelCurrent = levelNext; - - if (atEOL && (currentPos == (styler.Length() - 1))) { - styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); - } - } - } -} - -bool LineContains(LexAccessor &styler, const char *word, const Sci_Position start, const Sci_Position end, - const int chAttr) { - bool found = false; - bool requireStyle = (chAttr > SCE_FSHARP_DEFAULT); - const Sci_Position limit = (end > 1) ? end : start; - for (Sci_Position i = start; i < styler.LineEnd(limit); i++) { - if (styler.Match(i, word)) { - found = requireStyle ? styler.StyleAt(i) == chAttr : true; - break; - } - } - return found; -} - -void FoldLexicalGroup(LexAccessor &styler, int &levelNext, const Sci_Position lineCurrent, const char *word, - const int chAttr) { - const Sci_Position linePrev = lineCurrent - 1; - const Sci_Position lineNext = lineCurrent + 1; - const Sci_Position lineStartPrev = styler.LineStart(linePrev); - const Sci_Position lineStartNext = styler.LineStart(lineNext); - const bool atFoldGroupStart = - (lineCurrent == 0 || !LineContains(styler, word, lineStartPrev, linePrev, chAttr)) && - LineContains(styler, word, lineStartNext, lineNext, chAttr); - const bool atFoldGroupEnd = - LineContains(styler, word, lineStartPrev, linePrev, chAttr) && - !LineContains(styler, word, lineStartNext, lineNext, chAttr); - - if (atFoldGroupStart) { - levelNext++; - } else if (atFoldGroupEnd && levelNext > SC_FOLDLEVELBASE) { - levelNext--; - } -} -} // namespace - -LexerModule lmFSharp(SCLEX_FSHARP, LexerFSharp::LexerFactoryFSharp, "fsharp", fsharpWordLists); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGDScript.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGDScript.cxx deleted file mode 100644 index e20ddb02a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexGDScript.cxx +++ /dev/null @@ -1,733 +0,0 @@ -// Scintilla source code edit control -/** @file LexGDScript.cxx - ** Lexer for GDScript. - **/ -// Copyright 1998-2002 by Neil Hodgson -// Heavily modified later for GDScript -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "StringCopy.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "CharacterCategory.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "SubStyles.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { - -enum kwType { kwOther, kwClass, kwDef, kwExtends}; - -constexpr int indicatorWhitespace = 1; - -bool IsGDStringStart(int ch) { - return (ch == '\'' || ch == '"'); -} - -bool IsGDComment(Accessor &styler, Sci_Position pos, Sci_Position len) { - return len > 0 && styler[pos] == '#'; -} - -constexpr bool IsGDSingleQuoteStringState(int st) noexcept { - return ((st == SCE_GD_CHARACTER) || (st == SCE_GD_STRING)); -} - -constexpr bool IsGDTripleQuoteStringState(int st) noexcept { - return ((st == SCE_GD_TRIPLE) || (st == SCE_GD_TRIPLEDOUBLE)); -} - -char GetGDStringQuoteChar(int st) noexcept { - if ((st == SCE_GD_CHARACTER) || (st == SCE_GD_TRIPLE)) - return '\''; - if ((st == SCE_GD_STRING) || (st == SCE_GD_TRIPLEDOUBLE)) - return '"'; - - return '\0'; -} - -/* Return the state to use for the string starting at i; *nextIndex will be set to the first index following the quote(s) */ -int GetGDStringState(Accessor &styler, Sci_Position i, Sci_PositionU *nextIndex) { - char ch = styler.SafeGetCharAt(i); - char chNext = styler.SafeGetCharAt(i + 1); - - if (ch != '"' && ch != '\'') { - *nextIndex = i + 1; - return SCE_GD_DEFAULT; - } - - if (ch == chNext && ch == styler.SafeGetCharAt(i + 2)) { - *nextIndex = i + 3; - - if (ch == '"') - return SCE_GD_TRIPLEDOUBLE; - else - return SCE_GD_TRIPLE; - } else { - *nextIndex = i + 1; - - if (ch == '"') - return SCE_GD_STRING; - else - return SCE_GD_CHARACTER; - } -} - -inline bool IsAWordChar(int ch, bool unicodeIdentifiers) { - if (IsASCII(ch)) - return (IsAlphaNumeric(ch) || ch == '.' || ch == '_'); - - if (!unicodeIdentifiers) - return false; - - return IsXidContinue(ch); -} - -inline bool IsAWordStart(int ch, bool unicodeIdentifiers) { - if (IsASCII(ch)) - return (IsUpperOrLowerCase(ch) || ch == '_'); - - if (!unicodeIdentifiers) - return false; - - return IsXidStart(ch); -} - -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')) - return false; - } - return true; -} - -// Options used for LexerGDScript -struct OptionsGDScript { - int whingeLevel; - bool base2or8Literals; - bool stringsOverNewline; - bool keywords2NoSubIdentifiers; - bool fold; - bool foldQuotes; - bool foldCompact; - bool unicodeIdentifiers; - - OptionsGDScript() noexcept { - whingeLevel = 0; - base2or8Literals = true; - stringsOverNewline = false; - keywords2NoSubIdentifiers = false; - fold = false; - foldQuotes = false; - foldCompact = false; - unicodeIdentifiers = true; - } -}; - -const char *const gdscriptWordListDesc[] = { - "Keywords", - "Highlighted identifiers", - nullptr -}; - -struct OptionSetGDScript : public OptionSet { - OptionSetGDScript() { - DefineProperty("lexer.gdscript.whinge.level", &OptionsGDScript::whingeLevel, - "For GDScript code, checks whether indenting is consistent. " - "The default, 0 turns off indentation checking, " - "1 checks whether each line is potentially inconsistent with the previous line, " - "2 checks whether any space characters occur before a tab character in the indentation, " - "3 checks whether any spaces are in the indentation, and " - "4 checks for any tab characters in the indentation. " - "1 is a good level to use."); - - DefineProperty("lexer.gdscript.literals.binary", &OptionsGDScript::base2or8Literals, - "Set to 0 to not recognise binary and octal literals: 0b1011 0o712."); - - DefineProperty("lexer.gdscript.strings.over.newline", &OptionsGDScript::stringsOverNewline, - "Set to 1 to allow strings to span newline characters."); - - DefineProperty("lexer.gdscript.keywords2.no.sub.identifiers", &OptionsGDScript::keywords2NoSubIdentifiers, - "When enabled, it will not style keywords2 items that are used as a sub-identifier. " - "Example: when set, will not highlight \"foo.open\" when \"open\" is a keywords2 item."); - - DefineProperty("fold", &OptionsGDScript::fold); - - DefineProperty("fold.gdscript.quotes", &OptionsGDScript::foldQuotes, - "This option enables folding multi-line quoted strings when using the GDScript lexer."); - - DefineProperty("fold.compact", &OptionsGDScript::foldCompact); - - DefineProperty("lexer.gdscript.unicode.identifiers", &OptionsGDScript::unicodeIdentifiers, - "Set to 0 to not recognise Unicode identifiers."); - - DefineWordListSets(gdscriptWordListDesc); - } -}; - -const char styleSubable[] = { SCE_GD_IDENTIFIER, 0 }; - -LexicalClass lexicalClasses[] = { - // Lexer GDScript SCLEX_GDSCRIPT SCE_GD_: - 0, "SCE_GD_DEFAULT", "default", "White space", - 1, "SCE_GD_COMMENTLINE", "comment line", "Comment", - 2, "SCE_GD_NUMBER", "literal numeric", "Number", - 3, "SCE_GD_STRING", "literal string", "String", - 4, "SCE_GD_CHARACTER", "literal string", "Single quoted string", - 5, "SCE_GD_WORD", "keyword", "Keyword", - 6, "SCE_GD_TRIPLE", "literal string", "Triple quotes", - 7, "SCE_GD_TRIPLEDOUBLE", "literal string", "Triple double quotes", - 8, "SCE_GD_CLASSNAME", "identifier", "Class name definition", - 9, "SCE_GD_FUNCNAME", "identifier", "Function or method name definition", - 10, "SCE_GD_OPERATOR", "operator", "Operators", - 11, "SCE_GD_IDENTIFIER", "identifier", "Identifiers", - 12, "SCE_GD_COMMENTBLOCK", "comment", "Comment-blocks", - 13, "SCE_GD_STRINGEOL", "error literal string", "End of line where string is not closed", - 14, "SCE_GD_WORD2", "identifier", "Highlighted identifiers", - 15, "SCE_GD_ANNOTATION", "annotation", "Annotations", -}; - -} - -class LexerGDScript : public DefaultLexer { - WordList keywords; - WordList keywords2; - OptionsGDScript options; - OptionSetGDScript osGDScript; - enum { ssIdentifier }; - SubStyles subStyles; -public: - explicit LexerGDScript() : - DefaultLexer("gdscript", SCLEX_GDSCRIPT, lexicalClasses, ELEMENTS(lexicalClasses)), - subStyles(styleSubable, 0x80, 0x40, 0) { - } - ~LexerGDScript() override { - } - void SCI_METHOD Release() override { - delete this; - } - int SCI_METHOD Version() const override { - return lvRelease5; - } - const char *SCI_METHOD PropertyNames() override { - return osGDScript.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return osGDScript.PropertyType(name); - } - const char *SCI_METHOD DescribeProperty(const char *name) override { - return osGDScript.DescribeProperty(name); - } - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; - const char * SCI_METHOD PropertyGet(const char *key) override { - return osGDScript.PropertyGet(key); - } - const char *SCI_METHOD DescribeWordListSets() override { - return osGDScript.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 nullptr; - } - - int SCI_METHOD LineEndTypesSupported() override { - return SC_LINE_END_TYPE_UNICODE; - } - - int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override { - return subStyles.Allocate(styleBase, numberStyles); - } - int SCI_METHOD SubStylesStart(int styleBase) override { - return subStyles.Start(styleBase); - } - int SCI_METHOD SubStylesLength(int styleBase) override { - return subStyles.Length(styleBase); - } - int SCI_METHOD StyleFromSubStyle(int subStyle) override { - const int styleBase = subStyles.BaseStyle(subStyle); - return styleBase; - } - int SCI_METHOD PrimaryStyleFromStyle(int style) override { - return style; - } - void SCI_METHOD FreeSubStyles() override { - subStyles.Free(); - } - void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { - subStyles.SetIdentifiers(style, identifiers); - } - int SCI_METHOD DistanceToSecondaryStyles() override { - return 0; - } - const char *SCI_METHOD GetSubStyleBases() override { - return styleSubable; - } - - static ILexer5 *LexerFactoryGDScript() { - return new LexerGDScript(); - } - -private: - void ProcessLineEnd(StyleContext &sc, bool &inContinuedString); -}; - -Sci_Position SCI_METHOD LexerGDScript::PropertySet(const char *key, const char *val) { - if (osGDScript.PropertySet(&options, key, val)) { - return 0; - } - return -1; -} - -Sci_Position SCI_METHOD LexerGDScript::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &keywords2; - break; - default: - break; - } - Sci_Position firstModification = -1; - if (wordListN) { - WordList wlNew; - wlNew.Set(wl); - if (*wordListN != wlNew) { - wordListN->Set(wl); - firstModification = 0; - } - } - return firstModification; -} - -void LexerGDScript::ProcessLineEnd(StyleContext &sc, bool &inContinuedString) { - if ((sc.state == SCE_GD_DEFAULT) - || IsGDTripleQuoteStringState(sc.state)) { - // Perform colourisation of white space and triple quoted strings at end of each line to allow - // tab marking to work inside white space and triple quoted strings - sc.SetState(sc.state); - } - - if (IsGDSingleQuoteStringState(sc.state)) { - if (inContinuedString || options.stringsOverNewline) { - inContinuedString = false; - } else { - sc.ChangeState(SCE_GD_STRINGEOL); - sc.ForwardSetState(SCE_GD_DEFAULT); - } - } -} - -void SCI_METHOD LexerGDScript::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - Accessor styler(pAccess, nullptr); - - const Sci_Position endPos = startPos + length; - - // Backtrack to previous line in case need to fix its tab whinging - Sci_Position lineCurrent = styler.GetLine(startPos); - if (startPos > 0) { - if (lineCurrent > 0) { - lineCurrent--; - // Look for backslash-continued lines - while (lineCurrent > 0) { - const Sci_Position eolPos = styler.LineStart(lineCurrent) - 1; - const int eolStyle = styler.StyleAt(eolPos); - if (eolStyle == SCE_GD_STRING || eolStyle == SCE_GD_CHARACTER - || eolStyle == SCE_GD_STRINGEOL) { - lineCurrent -= 1; - } else { - break; - } - } - startPos = styler.LineStart(lineCurrent); - } - initStyle = startPos == 0 ? SCE_GD_DEFAULT : styler.StyleAt(startPos - 1); - } - - initStyle = initStyle & 31; - if (initStyle == SCE_GD_STRINGEOL) { - initStyle = SCE_GD_DEFAULT; - } - - kwType kwLast = kwOther; - int spaceFlags = 0; - styler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment); - bool base_n_number = false; - - const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_GD_IDENTIFIER); - - StyleContext sc(startPos, endPos - startPos, initStyle, styler); - - bool indentGood = true; - Sci_Position startIndicator = sc.currentPos; - bool inContinuedString = false; - - for (; sc.More(); sc.Forward()) { - - if (sc.atLineStart) { - styler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment); - indentGood = true; - if (options.whingeLevel == 1) { - indentGood = (spaceFlags & wsInconsistent) == 0; - } else if (options.whingeLevel == 2) { - indentGood = (spaceFlags & wsSpaceTab) == 0; - } else if (options.whingeLevel == 3) { - indentGood = (spaceFlags & wsSpace) == 0; - } else if (options.whingeLevel == 4) { - indentGood = (spaceFlags & wsTab) == 0; - } - if (!indentGood) { - styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0); - startIndicator = sc.currentPos; - } - } - - if (sc.atLineEnd) { - ProcessLineEnd(sc, inContinuedString); - lineCurrent++; - if (!sc.More()) - break; - } - - bool needEOLCheck = false; - - if (sc.state == SCE_GD_OPERATOR) { - kwLast = kwOther; - sc.SetState(SCE_GD_DEFAULT); - } else if (sc.state == SCE_GD_NUMBER) { - if (!IsAWordChar(sc.ch, false) && - !(!base_n_number && ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E')))) { - sc.SetState(SCE_GD_DEFAULT); - } - } else if (sc.state == SCE_GD_IDENTIFIER) { - if ((sc.ch == '.') || (!IsAWordChar(sc.ch, options.unicodeIdentifiers))) { - char s[100]; - sc.GetCurrent(s, sizeof(s)); - int style = SCE_GD_IDENTIFIER; - if (keywords.InList(s)) { - style = SCE_GD_WORD; - } else if (kwLast == kwClass) { - style = SCE_GD_CLASSNAME; - } else if (kwLast == kwDef) { - style = SCE_GD_FUNCNAME; - } else if (keywords2.InList(s)) { - if (options.keywords2NoSubIdentifiers) { - // We don't want to highlight keywords2 - // that are used as a sub-identifier, - // i.e. not open in "foo.open". - const Sci_Position pos = styler.GetStartSegment() - 1; - if (pos < 0 || (styler.SafeGetCharAt(pos, '\0') != '.')) - style = SCE_GD_WORD2; - } else { - style = SCE_GD_WORD2; - } - } else { - const int subStyle = classifierIdentifiers.ValueFor(s); - if (subStyle >= 0) { - style = subStyle; - } - } - sc.ChangeState(style); - sc.SetState(SCE_GD_DEFAULT); - if (style == SCE_GD_WORD) { - if (0 == strcmp(s, "class")) - kwLast = kwClass; - else if (0 == strcmp(s, "func")) - kwLast = kwDef; - else if (0 == strcmp(s, "extends")) - kwLast = kwExtends; - else - kwLast = kwOther; - } else { - kwLast = kwOther; - } - } - } else if ((sc.state == SCE_GD_COMMENTLINE) || (sc.state == SCE_GD_COMMENTBLOCK)) { - if (sc.ch == '\r' || sc.ch == '\n') { - sc.SetState(SCE_GD_DEFAULT); - } - } else if (sc.state == SCE_GD_ANNOTATION) { - if (!IsAWordStart(sc.ch, options.unicodeIdentifiers)) { - sc.SetState(SCE_GD_DEFAULT); - } - } else if (IsGDSingleQuoteStringState(sc.state)) { - if (sc.ch == '\\') { - if ((sc.chNext == '\r') && (sc.GetRelative(2) == '\n')) { - sc.Forward(); - } - if (sc.chNext == '\n' || sc.chNext == '\r') { - inContinuedString = true; - } else { - // Don't roll over the newline. - sc.Forward(); - } - } else if (sc.ch == GetGDStringQuoteChar(sc.state)) { - sc.ForwardSetState(SCE_GD_DEFAULT); - needEOLCheck = true; - } - } else if (sc.state == SCE_GD_TRIPLE) { - if (sc.ch == '\\') { - sc.Forward(); - } else if (sc.Match(R"(''')")) { - sc.Forward(); - sc.Forward(); - sc.ForwardSetState(SCE_GD_DEFAULT); - needEOLCheck = true; - } - } else if (sc.state == SCE_GD_TRIPLEDOUBLE) { - if (sc.ch == '\\') { - sc.Forward(); - } else if (sc.Match(R"(""")")) { - sc.Forward(); - sc.Forward(); - sc.ForwardSetState(SCE_GD_DEFAULT); - needEOLCheck = true; - } - } - - if (!indentGood && !IsASpaceOrTab(sc.ch)) { - styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 1); - startIndicator = sc.currentPos; - indentGood = true; - } - - // State exit code may have moved on to end of line - if (needEOLCheck && sc.atLineEnd) { - ProcessLineEnd(sc, inContinuedString); - lineCurrent++; - styler.IndentAmount(lineCurrent, &spaceFlags, IsGDComment); - if (!sc.More()) - break; - } - - // Check for a new state starting character - if (sc.state == SCE_GD_DEFAULT) { - if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { - if (sc.ch == '0' && (sc.chNext == 'x' || sc.chNext == 'X')) { - base_n_number = true; - sc.SetState(SCE_GD_NUMBER); - } else if (sc.ch == '0' && - (sc.chNext == 'o' || sc.chNext == 'O' || sc.chNext == 'b' || sc.chNext == 'B')) { - if (options.base2or8Literals) { - base_n_number = true; - sc.SetState(SCE_GD_NUMBER); - } else { - sc.SetState(SCE_GD_NUMBER); - sc.ForwardSetState(SCE_GD_IDENTIFIER); - } - } else { - base_n_number = false; - sc.SetState(SCE_GD_NUMBER); - } - } else if (isoperator(sc.ch) || sc.ch == '`') { - sc.SetState(SCE_GD_OPERATOR); - } else if (sc.ch == '#') { - sc.SetState(sc.chNext == '#' ? SCE_GD_COMMENTBLOCK : SCE_GD_COMMENTLINE); - } else if (sc.ch == '@') { - if (IsFirstNonWhitespace(sc.currentPos, styler)) - sc.SetState(SCE_GD_ANNOTATION); - else - sc.SetState(SCE_GD_OPERATOR); - } else if (IsGDStringStart(sc.ch)) { - Sci_PositionU nextIndex = 0; - sc.SetState(GetGDStringState(styler, sc.currentPos, &nextIndex)); - while (nextIndex > (sc.currentPos + 1) && sc.More()) { - sc.Forward(); - } - } else if (IsAWordStart(sc.ch, options.unicodeIdentifiers)) { - sc.SetState(SCE_GD_IDENTIFIER); - } - } - } - styler.IndicatorFill(startIndicator, sc.currentPos, indicatorWhitespace, 0); - sc.Complete(); -} - -static bool IsCommentLine(Sci_Position line, Accessor &styler) { - 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]; - if (ch == '#') - return true; - else if (ch != ' ' && ch != '\t') - return false; - } - return false; -} - -static bool IsQuoteLine(Sci_Position line, const Accessor &styler) { - const int style = styler.StyleAt(styler.LineStart(line)) & 31; - return IsGDTripleQuoteStringState(style); -} - - -void SCI_METHOD LexerGDScript::Fold(Sci_PositionU startPos, Sci_Position length, int /*initStyle - unused*/, IDocument *pAccess) { - if (!options.fold) - return; - - 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 - const Sci_Position docLines = styler.GetLine(styler.Length()); // Available last line - - // Backtrack to previous non-blank line so we can determine indent level - // for any white space lines (needed esp. within triple quoted strings) - // and so we can fix any preceding fold level (which is why we go back - // at least one line in all cases) - int spaceFlags = 0; - Sci_Position lineCurrent = styler.GetLine(startPos); - int indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr); - while (lineCurrent > 0) { - lineCurrent--; - indentCurrent = styler.IndentAmount(lineCurrent, &spaceFlags, nullptr); - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG) && - (!IsCommentLine(lineCurrent, styler)) && - (!IsQuoteLine(lineCurrent, styler))) - break; - } - int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; - - // Set up initial loop state - startPos = styler.LineStart(lineCurrent); - int prev_state = SCE_GD_DEFAULT & 31; - if (lineCurrent >= 1) - prev_state = styler.StyleAt(startPos - 1) & 31; - int prevQuote = options.foldQuotes && IsGDTripleQuoteStringState(prev_state); - - // Process all characters to end of requested range or end of any triple quote - //that hangs over the end of the range. Cap processing in all cases - // to end of document (in case of unclosed quote at end). - while ((lineCurrent <= docLines) && ((lineCurrent <= maxLines) || prevQuote)) { - - // Gather info - int lev = indentCurrent; - Sci_Position lineNext = lineCurrent + 1; - int indentNext = indentCurrent; - int quote = false; - if (lineNext <= docLines) { - // Information about next line is only available if not at end of document - 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 && IsGDTripleQuoteStringState(style); - } - const bool quote_start = (quote && !prevQuote); - const bool quote_continue = (quote && prevQuote); - if (!quote || !prevQuote) - indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; - if (quote) - indentNext = indentCurrentLevel; - if (indentNext & SC_FOLDLEVELWHITEFLAG) - indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel; - - if (quote_start) { - // Place fold point at start of triple quoted string - lev |= SC_FOLDLEVELHEADERFLAG; - } else if (quote_continue || prevQuote) { - // Add level to rest of lines in the string - lev = lev + 1; - } - - // Skip past any blank lines for next indent level info; we skip also - // comments (all comments, not just those starting in column 0) - // which effectively folds them into surrounding code rather - // than screwing up folding. If comments end file, use the min - // comment indent as the level after - - int minCommentLevel = indentCurrentLevel; - while (!quote && - (lineNext < docLines) && - ((indentNext & SC_FOLDLEVELWHITEFLAG) || (IsCommentLine(lineNext, styler)))) { - - if (IsCommentLine(lineNext, styler) && indentNext < minCommentLevel) { - minCommentLevel = indentNext; - } - - lineNext++; - indentNext = styler.IndentAmount(lineNext, &spaceFlags, nullptr); - } - - const int levelAfterComments = ((lineNext < docLines) ? indentNext & SC_FOLDLEVELNUMBERMASK : minCommentLevel); - const int levelBeforeComments = std::max(indentCurrentLevel, levelAfterComments); - - // Now set all the indent levels on the lines we skipped - // Do this from end to start. Once we encounter one line - // which is indented more than the line after the end of - // the comment-block, use the level of the block before - - Sci_Position skipLine = lineNext; - int skipLevel = levelAfterComments; - - while (--skipLine > lineCurrent) { - const int skipLineIndent = styler.IndentAmount(skipLine, &spaceFlags, nullptr); - - if (options.foldCompact) { - if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments) - skipLevel = levelBeforeComments; - - const int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; - - styler.SetLevel(skipLine, skipLevel | whiteFlag); - } else { - if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > levelAfterComments && - !(skipLineIndent & SC_FOLDLEVELWHITEFLAG) && - !IsCommentLine(skipLine, styler)) - skipLevel = levelBeforeComments; - - styler.SetLevel(skipLine, skipLevel); - } - } - - // Set fold header on non-quote line - if (!quote && !(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) - lev |= SC_FOLDLEVELHEADERFLAG; - } - - // Keep track of triple quote state of previous line - prevQuote = quote; - - // Set fold level for this line and move to next line - styler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG); - indentCurrent = indentNext; - lineCurrent = lineNext; - } - - // NOTE: Cannot set level of last line here because indentCurrent doesn't have - // header flag set; the loop above is crafted to take care of this case! - //styler.SetLevel(lineCurrent, indentCurrent); -} - -LexerModule lmGDScript(SCLEX_GDSCRIPT, LexerGDScript::LexerFactoryGDScript, "gdscript", - gdscriptWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHollywood.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHollywood.cxx deleted file mode 100644 index fe9b477fb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexHollywood.cxx +++ /dev/null @@ -1,519 +0,0 @@ -// 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 airsoftsoftwair 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 -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#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; -using namespace Lexilla; - -/* 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, //  ($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 { - 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(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(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); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJAVA.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJAVA.cxx deleted file mode 100644 index a0f9d2cac..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJAVA.cxx +++ /dev/null @@ -1,1825 +0,0 @@ -// Scintilla source code edit control -/** @file LexJAVA.cxx - ** Lexer for C++, C, Java, and JavaScript. - ** Further folding features and configuration properties added by "Udo Lechner" - **/ -// Copyright 1998-2005 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "StringCopy.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "SparseState.h" -#include "SubStyles.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { - // Use an unnamed namespace to protect the functions and classes from name conflicts - -constexpr bool IsSpaceEquiv(int state) noexcept { - return (state <= SCE_JAVA_COMMENTDOC) || - // including SCE_JAVA_DEFAULT, SCE_JAVA_COMMENT, SCE_JAVA_COMMENTLINE - (state == SCE_JAVA_COMMENTLINEDOC) || (state == SCE_JAVA_COMMENTDOCKEYWORD) || - (state == SCE_JAVA_COMMENTDOCKEYWORDERROR); -} - -// Preconditions: sc.currentPos points to a character after '+' or '-'. -// The test for pos reaching 0 should be redundant, -// and is in only for safety measures. -// Limitation: this code will give the incorrect answer for code like -// a = b+++/ptn/... -// Putting a space between the '++' post-inc operator and the '+' binary op -// fixes this, and is highly recommended for readability anyway. -bool FollowsPostfixOperator(const StyleContext &sc, LexAccessor &styler) { - Sci_Position pos = sc.currentPos; - while (--pos > 0) { - const char ch = styler[pos]; - if (ch == '+' || ch == '-') { - return styler[pos - 1] == ch; - } - } - return false; -} - -bool followsReturnKeyword(const StyleContext &sc, LexAccessor &styler) { - // Don't look at styles, so no need to flush. - Sci_Position pos = sc.currentPos; - const Sci_Position currentLine = styler.GetLine(pos); - const Sci_Position lineStartPos = styler.LineStart(currentLine); - while (--pos > lineStartPos) { - const char ch = styler.SafeGetCharAt(pos); - if (ch != ' ' && ch != '\t') { - break; - } - } - const char *retBack = "nruter"; - const char *s = retBack; - while (*s - && pos >= lineStartPos - && styler.SafeGetCharAt(pos) == *s) { - s++; - pos--; - } - return !*s; -} - -constexpr bool IsSpaceOrTab(int ch) noexcept { - return ch == ' ' || ch == '\t'; -} - -bool OnlySpaceOrTab(const std::string &s) noexcept { - for (const char ch : s) { - if (!IsSpaceOrTab(ch)) - return false; - } - return true; -} - -std::vector StringSplit(const std::string &text, int separator) { - std::vector vs(text.empty() ? 0 : 1); - for (const char ch : text) { - if (ch == separator) { - vs.emplace_back(); - } else { - vs.back() += ch; - } - } - return vs; -} - -struct BracketPair { - std::vector::iterator itBracket; - std::vector::iterator itEndBracket; -}; - -BracketPair FindBracketPair(std::vector &tokens) { - BracketPair bp; - std::vector::iterator itTok = std::find(tokens.begin(), tokens.end(), "("); - bp.itBracket = tokens.end(); - bp.itEndBracket = tokens.end(); - if (itTok != tokens.end()) { - bp.itBracket = itTok; - size_t nest = 0; - while (itTok != tokens.end()) { - if (*itTok == "(") { - nest++; - } else if (*itTok == ")") { - nest--; - if (nest == 0) { - bp.itEndBracket = itTok; - return bp; - } - } - ++itTok; - } - } - bp.itBracket = tokens.end(); - return bp; -} - -void highlightTaskMarker(StyleContext &sc, LexAccessor &styler, - int activity, const WordList &markerList, bool caseSensitive){ - if ((isoperator(sc.chPrev) || IsASpace(sc.chPrev)) && markerList.Length()) { - constexpr Sci_PositionU lengthMarker = 50; - char marker[lengthMarker+1] = ""; - 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)) { - break; - } - if (caseSensitive) - marker[i] = ch; - else - marker[i] = MakeLowerCase(ch); - i++; - } - marker[i] = '\0'; - if (markerList.InList(marker)) { - sc.SetState(SCE_JAVA_TASKMARKER|activity); - } - } -} - -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; - if (nextChar == 'U') { - digitsLeft = 9; - escapeSetValid = &setHexDigits; - } else if (nextChar == 'u') { - digitsLeft = 5; - escapeSetValid = &setHexDigits; - } else if (nextChar == 'x') { - digitsLeft = 5; - escapeSetValid = &setHexDigits; - } else if (setOctDigits.Contains(nextChar)) { - digitsLeft = 3; - escapeSetValid = &setOctDigits; - } - } - 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) { - std::string restOfLine; - Sci_Position line = styler.GetLine(start); - Sci_Position pos = start; - Sci_Position endLine = styler.LineEnd(line); - char ch = styler.SafeGetCharAt(start, '\n'); - while (pos < endLine) { - if (ch == '\\' && ((pos + 1) == endLine)) { - // Continuation line - line++; - pos = styler.LineStart(line); - endLine = styler.LineEnd(line); - ch = styler.SafeGetCharAt(pos, '\n'); - } else { - const char chNext = styler.SafeGetCharAt(pos + 1, '\n'); - if (ch == '/' && (chNext == '/' || chNext == '*')) - break; - if (allowSpace || (ch != ' ')) { - restOfLine += ch; - } - pos++; - ch = chNext; - } - } - return restOfLine; -} - -constexpr bool IsStreamCommentStyle(int style) noexcept { - return style == SCE_JAVA_COMMENT || - style == SCE_JAVA_COMMENTDOC || - style == SCE_JAVA_COMMENTDOCKEYWORD || - style == SCE_JAVA_COMMENTDOCKEYWORDERROR; -} - -struct PPDefinition { - Sci_Position line; - std::string key; - std::string value; - bool isUndef; - std::string arguments; - PPDefinition(Sci_Position line_, const std::string &key_, const std::string &value_, bool isUndef_ = false, const std::string &arguments_="") : - line(line_), key(key_), value(value_), isUndef(isUndef_), arguments(arguments_) { - } -}; - -constexpr int inactiveFlag = 0x40; - -class LinePPState { - // Track the state of preprocessor conditionals to allow showing active and inactive - // code in different styles. - // Only works up to 31 levels of conditional nesting. - - // state is a bit mask with 1 bit per level - // bit is 1 for level if section inactive, so any bits set = inactive style - int state = 0; - // ifTaken is a bit mask with 1 bit per level - // bit is 1 for level if some branch at this level has been taken - int ifTaken = 0; - // level is the nesting level of #if constructs - int level = -1; - static const int maximumNestingLevel = 31; - int maskLevel() const noexcept { - if (level >= 0) { - return 1 << level; - } else { - return 1; - } - } -public: - LinePPState() noexcept { - } - bool ValidLevel() const noexcept { - return level >= 0 && level < maximumNestingLevel; - } - bool IsActive() const noexcept { - return state == 0; - } - bool IsInactive() const noexcept { - return state != 0; - } - int ActiveState() const noexcept { - return state ? inactiveFlag : 0; - } - bool CurrentIfTaken() const noexcept { - return (ifTaken & maskLevel()) != 0; - } - void StartSection(bool on) noexcept { - level++; - if (ValidLevel()) { - if (on) { - state &= ~maskLevel(); - ifTaken |= maskLevel(); - } else { - state |= maskLevel(); - ifTaken &= ~maskLevel(); - } - } - } - void EndSection() noexcept { - if (ValidLevel()) { - state &= ~maskLevel(); - ifTaken &= ~maskLevel(); - } - level--; - } - void InvertCurrentLevel() noexcept { - if (ValidLevel()) { - state ^= maskLevel(); - ifTaken |= maskLevel(); - } - } -}; - -// Hold the preprocessor state for each line seen. -// Currently one entry per line but could become sparse with just one entry per preprocessor line. -class PPStates { - std::vector vlls; -public: - LinePPState ForLine(Sci_Position line) const noexcept { - if ((line > 0) && (vlls.size() > static_cast(line))) { - return vlls[line]; - } else { - return LinePPState(); - } - } - void Add(Sci_Position line, LinePPState lls) { - vlls.resize(line+1); - vlls[line] = lls; - } -}; - -// An individual named option for use in an OptionSet - -// Options used for LexerJAVA -struct OptionsJAVA { - bool stylingWithinPreprocessor; - bool identifiersAllowDollars; - bool trackPreprocessor; - bool updatePreprocessor; - bool verbatimStringsAllowEscapes; - bool triplequotedStrings; - bool hashquotedStrings; - bool backQuotedStrings; - bool escapeSequence; - bool fold; - bool foldSyntaxBased; - bool foldComment; - bool foldCommentMultiline; - bool foldCommentExplicit; - std::string foldExplicitStart; - std::string foldExplicitEnd; - bool foldExplicitAnywhere; - bool foldPreprocessor; - bool foldPreprocessorAtElse; - bool foldCompact; - bool foldAtElse; - OptionsJAVA() { - stylingWithinPreprocessor = false; - identifiersAllowDollars = true; - trackPreprocessor = true; - updatePreprocessor = true; - verbatimStringsAllowEscapes = false; - triplequotedStrings = false; - hashquotedStrings = false; - backQuotedStrings = false; - escapeSequence = false; - fold = false; - foldSyntaxBased = true; - foldComment = false; - foldCommentMultiline = true; - foldCommentExplicit = true; - foldExplicitStart = ""; - foldExplicitEnd = ""; - foldExplicitAnywhere = false; - foldPreprocessor = false; - foldPreprocessorAtElse = false; - foldCompact = false; - foldAtElse = false; - } -}; - -const char *const javaWordLists[] = { - "Primary keywords and identifiers", - "Secondary keywords and identifiers", - "Documentation comment keywords", - "Global classes and typedefs", - "Preprocessor definitions", - "Task marker and error marker keywords", - nullptr, -}; - -struct OptionSetJAVA : public OptionSet { - OptionSetJAVA() { - DefineProperty("styling.within.preprocessor", &OptionsJAVA::stylingWithinPreprocessor, - "For C++ code, determines whether all preprocessor code is styled in the " - "preprocessor style (0, the default) or only from the initial # to the end " - "of the command word(1)."); - - DefineProperty("lexer.java.allow.dollars", &OptionsJAVA::identifiersAllowDollars, - "Set to 0 to disallow the '$' character in identifiers with the java lexer."); - - DefineProperty("lexer.java.track.preprocessor", &OptionsJAVA::trackPreprocessor, - "Set to 1 to interpret #if/#else/#endif to grey out code that is not active."); - - DefineProperty("lexer.java.update.preprocessor", &OptionsJAVA::updatePreprocessor, - "Set to 1 to update preprocessor definitions when #define found."); - - DefineProperty("lexer.java.verbatim.strings.allow.escapes", &OptionsJAVA::verbatimStringsAllowEscapes, - "Set to 1 to allow verbatim strings to contain escape sequences."); - - DefineProperty("lexer.java.triplequoted.strings", &OptionsJAVA::triplequotedStrings, - "Set to 1 to enable highlighting of triple-quoted strings."); - - DefineProperty("lexer.java.hashquoted.strings", &OptionsJAVA::hashquotedStrings, - "Set to 1 to enable highlighting of hash-quoted strings."); - - DefineProperty("lexer.java.backquoted.strings", &OptionsJAVA::backQuotedStrings, - "Set to 1 to enable highlighting of back-quoted raw strings ."); - - DefineProperty("lexer.java.escape.sequence", &OptionsJAVA::escapeSequence, - "Set to 1 to enable highlighting of escape sequences in strings"); - - DefineProperty("fold", &OptionsJAVA::fold); - - DefineProperty("fold.java.syntax.based", &OptionsJAVA::foldSyntaxBased, - "Set this property to 0 to disable syntax based folding."); - - DefineProperty("fold.comment", &OptionsJAVA::foldComment, - "This option enables folding multi-line comments and explicit fold points when using the Java lexer. " - "Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //} " - "at the end of a section that should fold."); - - DefineProperty("fold.java.comment.multiline", &OptionsJAVA::foldCommentMultiline, - "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); - - DefineProperty("fold.java.comment.explicit", &OptionsJAVA::foldCommentExplicit, - "Set this property to 0 to disable folding explicit fold points when fold.comment=1."); - - DefineProperty("fold.java.explicit.start", &OptionsJAVA::foldExplicitStart, - "The string to use for explicit fold start points, replacing the standard //{."); - - DefineProperty("fold.java.explicit.end", &OptionsJAVA::foldExplicitEnd, - "The string to use for explicit fold end points, replacing the standard //}."); - - DefineProperty("fold.java.explicit.anywhere", &OptionsJAVA::foldExplicitAnywhere, - "Set this property to 1 to enable explicit fold points anywhere, not just in line comments."); - - DefineProperty("fold.java.preprocessor.at.else", &OptionsJAVA::foldPreprocessorAtElse, - "This option enables folding on a preprocessor #else or #endif line of an #if statement."); - - DefineProperty("fold.preprocessor", &OptionsJAVA::foldPreprocessor, - "This option enables folding preprocessor directives when using the Java lexer. " - "Includes C#'s explicit #region and #endregion folding directives."); - - DefineProperty("fold.compact", &OptionsJAVA::foldCompact); - - DefineProperty("fold.at.else", &OptionsJAVA::foldAtElse, - "This option enables Java folding on a \"} else {\" line of an if statement."); - - DefineWordListSets(javaWordLists); - } -}; - -const char styleSubable[] = {SCE_JAVA_IDENTIFIER, SCE_JAVA_COMMENTDOCKEYWORD, 0}; - -LexicalClass lexicalClasses[] = { - // Lexer Java SCLEX_JAVA SCE_JAVA_: - 0, "SCE_JAVA_DEFAULT", "default", "White space", - 1, "SCE_JAVA_COMMENT", "comment", "Comment: /* */.", - 2, "SCE_JAVA_COMMENTLINE", "comment line", "Line Comment: //.", - 3, "SCE_JAVA_COMMENTDOC", "comment documentation", "Doc comment: block comments beginning with /** or /*!", - 4, "SCE_JAVA_NUMBER", "literal numeric", "Number", - 5, "SCE_JAVA_WORD", "keyword", "Keyword", - 6, "SCE_JAVA_STRING", "literal string", "Double quoted string", - 7, "SCE_JAVA_CHARACTER", "literal string character", "Single quoted string", - 8, "SCE_JAVA_UUID", "literal uuid", "UUIDs (only in IDL)", - 9, "SCE_JAVA_PREPROCESSOR", "preprocessor", "Preprocessor", - 10, "SCE_JAVA_OPERATOR", "operator", "Operators", - 11, "SCE_JAVA_IDENTIFIER", "identifier", "Identifiers", - 12, "SCE_JAVA_STRINGEOL", "error literal string", "End of line where string is not closed", - 13, "SCE_JAVA_VERBATIM", "literal string multiline raw", "Verbatim strings for C#", - 14, "SCE_JAVA_REGEX", "literal regex", "Regular expressions for JavaScript", - 15, "SCE_JAVA_COMMENTLINEDOC", "comment documentation line", "Doc Comment Line: line comments beginning with /// or //!.", - 16, "SCE_JAVA_WORD2", "identifier", "Keywords2", - 17, "SCE_JAVA_COMMENTDOCKEYWORD", "comment documentation keyword", "Comment keyword", - 18, "SCE_JAVA_COMMENTDOCKEYWORDERROR", "error comment documentation keyword", "Comment keyword error", - 19, "SCE_JAVA_GLOBALCLASS", "identifier", "Global class", - 20, "SCE_JAVA_STRINGRAW", "literal string multiline raw", "Raw strings for C++0x", - 21, "SCE_JAVA_TRIPLEVERBATIM", "literal string multiline raw", "Triple-quoted strings for Vala", - 22, "SCE_JAVA_HASHQUOTEDSTRING", "literal string", "Hash-quoted strings for Pike", - 23, "SCE_JAVA_PREPROCESSORCOMMENT", "comment preprocessor", "Preprocessor stream comment", - 24, "SCE_JAVA_PREPROCESSORCOMMENTDOC", "comment preprocessor documentation", "Preprocessor stream doc comment", - 25, "SCE_JAVA_USERLITERAL", "literal", "User defined literals", - 26, "SCE_JAVA_TASKMARKER", "comment taskmarker", "Task Marker", - 27, "SCE_JAVA_ESCAPESEQUENCE", "literal string escapesequence", "Escape sequence", -}; - -const int sizeLexicalClasses = static_cast(std::size(lexicalClasses)); - -} - -class LexerJAVA : public ILexer5 { - bool caseSensitive; - CharacterSet setWord; - CharacterSet setNegationOp; - CharacterSet setAddOp; - CharacterSet setMultOp; - CharacterSet setRelOp; - CharacterSet setLogicalOp; - CharacterSet setWordStart; - PPStates vlls; - std::vector ppDefineHistory; - WordList keywords; - WordList keywords2; - WordList keywords3; - WordList keywords4; - WordList ppDefinitions; - WordList markerList; - struct SymbolValue { - std::string value; - std::string arguments; - SymbolValue() noexcept = default; - SymbolValue(const std::string &value_, const std::string &arguments_) : value(value_), arguments(arguments_) { - } - SymbolValue &operator = (const std::string &value_) { - value = value_; - arguments.clear(); - return *this; - } - bool IsMacro() const noexcept { - return !arguments.empty(); - } - }; - typedef std::map SymbolTable; - SymbolTable preprocessorDefinitionsStart; - OptionsJAVA options; - OptionSetJAVA osJava; - EscapeSequence escapeSeq; - SparseState rawStringTerminators; - enum { ssIdentifier, ssDocKeyword }; - SubStyles subStyles; - std::string returnBuffer; -public: - explicit LexerJAVA(bool caseSensitive_) : - caseSensitive(caseSensitive_), - setWord(CharacterSet::setAlphaNum, "._", true), - setNegationOp(CharacterSet::setNone, "!"), - setAddOp(CharacterSet::setNone, "+-"), - setMultOp(CharacterSet::setNone, "*/%"), - setRelOp(CharacterSet::setNone, "=!<>"), - setLogicalOp(CharacterSet::setNone, "|&"), - subStyles(styleSubable, 0x80, 0x40, inactiveFlag) { - } - // Deleted so LexerJAVA objects can not be copied. - LexerJAVA(const LexerJAVA &) = delete; - LexerJAVA(LexerJAVA &&) = delete; - void operator=(const LexerJAVA &) = delete; - void operator=(LexerJAVA &&) = delete; - virtual ~LexerJAVA() { - } - void SCI_METHOD Release() noexcept override { - delete this; - } - int SCI_METHOD Version() const noexcept override { - return lvRelease5; - } - const char * SCI_METHOD PropertyNames() override { - return osJava.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return osJava.PropertyType(name); - } - const char * SCI_METHOD DescribeProperty(const char *name) override { - return osJava.DescribeProperty(name); - } - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; - const char * SCI_METHOD DescribeWordListSets() override { - return osJava.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 *) noexcept override { - return nullptr; - } - - int SCI_METHOD LineEndTypesSupported() noexcept override { - return SC_LINE_END_TYPE_UNICODE; - } - - int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) override { - return subStyles.Allocate(styleBase, numberStyles); - } - int SCI_METHOD SubStylesStart(int styleBase) override { - return subStyles.Start(styleBase); - } - int SCI_METHOD SubStylesLength(int styleBase) override { - return subStyles.Length(styleBase); - } - int SCI_METHOD StyleFromSubStyle(int subStyle) override { - const int styleBase = subStyles.BaseStyle(MaskActive(subStyle)); - const int inactive = subStyle & inactiveFlag; - return styleBase | inactive; - } - int SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override { - return MaskActive(style); - } - void SCI_METHOD FreeSubStyles() override { - subStyles.Free(); - } - void SCI_METHOD SetIdentifiers(int style, const char *identifiers) override { - subStyles.SetIdentifiers(style, identifiers); - } - int SCI_METHOD DistanceToSecondaryStyles() noexcept override { - return inactiveFlag; - } - const char * SCI_METHOD GetSubStyleBases() noexcept override { - return styleSubable; - } - int SCI_METHOD NamedStyles() override { - return std::max(subStyles.LastAllocated() + 1, - sizeLexicalClasses) + - inactiveFlag; - } - const char * SCI_METHOD NameOfStyle(int style) override { - if (style >= NamedStyles()) - return ""; - if (style < sizeLexicalClasses) - return lexicalClasses[style].name; - // TODO: inactive and substyles - return ""; - } - const char * SCI_METHOD TagsOfStyle(int style) override { - if (style >= NamedStyles()) - return "Excess"; - returnBuffer.clear(); - const int firstSubStyle = subStyles.FirstAllocated(); - if (firstSubStyle >= 0) { - const int lastSubStyle = subStyles.LastAllocated(); - if (((style >= firstSubStyle) && (style <= (lastSubStyle))) || - ((style >= firstSubStyle + inactiveFlag) && (style <= (lastSubStyle + inactiveFlag)))) { - int styleActive = style; - if (style > lastSubStyle) { - returnBuffer = "inactive "; - styleActive -= inactiveFlag; - } - const int styleMain = StyleFromSubStyle(styleActive); - returnBuffer += lexicalClasses[styleMain].tags; - return returnBuffer.c_str(); - } - } - if (style < sizeLexicalClasses) - return lexicalClasses[style].tags; - if (style >= inactiveFlag) { - returnBuffer = "inactive "; - const int styleActive = style - inactiveFlag; - if (styleActive < sizeLexicalClasses) - returnBuffer += lexicalClasses[styleActive].tags; - else - returnBuffer = ""; - return returnBuffer.c_str(); - } - return ""; - } - const char * SCI_METHOD DescriptionOfStyle(int style) override { - if (style >= NamedStyles()) - return ""; - if (style < sizeLexicalClasses) - return lexicalClasses[style].description; - // TODO: inactive and substyles - return ""; - } - - // ILexer5 methods - const char * SCI_METHOD GetName() override { - return caseSensitive ? "java" : "javanocase"; - } - int SCI_METHOD GetIdentifier() override { - return caseSensitive ? SCLEX_JAVA : SCLEX_JAVANOCASE; - } - const char * SCI_METHOD PropertyGet(const char *key) override; - - static ILexer5 *LexerFactoryJAVA() { - return new LexerJAVA(true); - } - static ILexer5 *LexerFactoryJAVAInsensitive() { - return new LexerJAVA(false); - } - constexpr static int MaskActive(int style) noexcept { - return style & ~inactiveFlag; - } - void EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions); - std::vector Tokenize(const std::string &expr) const; - bool EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions); -}; - -Sci_Position SCI_METHOD LexerJAVA::PropertySet(const char *key, const char *val) { - if (osJava.PropertySet(&options, key, val)) { - if (strcmp(key, "lexer.java.allow.dollars") == 0) { - setWord = CharacterSet(CharacterSet::setAlphaNum, "._", true); - if (options.identifiersAllowDollars) { - setWord.Add('$'); - } - } - return 0; - } - return -1; -} - -const char * SCI_METHOD LexerJAVA::PropertyGet(const char *key) { - return osJava.PropertyGet(key); -} - -Sci_Position SCI_METHOD LexerJAVA::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &keywords2; - break; - case 2: - wordListN = &keywords3; - break; - case 3: - wordListN = &keywords4; - break; - case 4: - wordListN = &ppDefinitions; - break; - case 5: - wordListN = &markerList; - break; - } - Sci_Position firstModification = -1; - if (wordListN) { - WordList wlNew; - wlNew.Set(wl); - if (*wordListN != wlNew) { - wordListN->Set(wl); - firstModification = 0; - if (n == 4) { - // Rebuild preprocessorDefinitions - preprocessorDefinitionsStart.clear(); - for (int nDefinition = 0; nDefinition < ppDefinitions.Length(); nDefinition++) { - const char *cpDefinition = ppDefinitions.WordAt(nDefinition); - const char *cpEquals = strchr(cpDefinition, '='); - if (cpEquals) { - std::string name(cpDefinition, cpEquals - cpDefinition); - std::string val(cpEquals+1); - const size_t bracket = name.find('('); - const size_t bracketEnd = name.find(')'); - if ((bracket != std::string::npos) && (bracketEnd != std::string::npos)) { - // Macro - std::string args = name.substr(bracket + 1, bracketEnd - bracket - 1); - name = name.substr(0, bracket); - preprocessorDefinitionsStart[name] = SymbolValue(val, args); - } else { - preprocessorDefinitionsStart[name] = val; - } - } else { - std::string name(cpDefinition); - std::string val("1"); - preprocessorDefinitionsStart[name] = val; - } - } - } - } - } - return firstModification; -} - -void SCI_METHOD LexerJAVA::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - LexAccessor styler(pAccess); - - CharacterSet setOKBeforeRE(CharacterSet::setNone, "([{=,:;!%^&*|?~+-"); - CharacterSet setCouldBePostOp(CharacterSet::setNone, "+-"); - - CharacterSet setDoxygen(CharacterSet::setAlpha, "$@\\&<>#{}[]"); - - setWordStart = CharacterSet(CharacterSet::setAlpha, "_", true); - - CharacterSet setInvalidRawFirst(CharacterSet::setNone, " )\\\t\v\f\n"); - - if (options.identifiersAllowDollars) { - setWordStart.Add('$'); - } - - int chPrevNonWhite = ' '; - int visibleChars = 0; - bool lastWordWasUUID = false; - int styleBeforeDCKeyword = SCE_JAVA_DEFAULT; - int styleBeforeTaskMarker = SCE_JAVA_DEFAULT; - bool continuationLine = false; - bool isIncludePreprocessor = false; - bool isStringInPreprocessor = false; - bool inRERange = false; - bool seenDocKeyBrace = false; - - Sci_Position lineCurrent = styler.GetLine(startPos); - if ((MaskActive(initStyle) == SCE_JAVA_PREPROCESSOR) || - (MaskActive(initStyle) == SCE_JAVA_COMMENTLINE) || - (MaskActive(initStyle) == SCE_JAVA_COMMENTLINEDOC)) { - // Set continuationLine if last character of previous line is '\' - if (lineCurrent > 0) { - const Sci_Position endLinePrevious = styler.LineEnd(lineCurrent - 1); - if (endLinePrevious > 0) { - continuationLine = styler.SafeGetCharAt(endLinePrevious-1) == '\\'; - } - } - } - - // look back to set chPrevNonWhite properly for better regex colouring - if (startPos > 0) { - Sci_Position back = startPos; - while (--back && IsSpaceEquiv(MaskActive(styler.StyleAt(back)))) - ; - if (MaskActive(styler.StyleAt(back)) == SCE_JAVA_OPERATOR) { - chPrevNonWhite = styler.SafeGetCharAt(back); - } - } - - StyleContext sc(startPos, length, initStyle, styler); - LinePPState preproc = vlls.ForLine(lineCurrent); - - bool definitionsChanged = false; - - // Truncate ppDefineHistory before current line - - if (!options.updatePreprocessor) - ppDefineHistory.clear(); - - std::vector::iterator itInvalid = std::find_if(ppDefineHistory.begin(), ppDefineHistory.end(), - [lineCurrent](const PPDefinition &p) noexcept { return p.line >= lineCurrent; }); - if (itInvalid != ppDefineHistory.end()) { - ppDefineHistory.erase(itInvalid, ppDefineHistory.end()); - definitionsChanged = true; - } - - SymbolTable preprocessorDefinitions = preprocessorDefinitionsStart; - for (const PPDefinition &ppDef : ppDefineHistory) { - if (ppDef.isUndef) - preprocessorDefinitions.erase(ppDef.key); - else - preprocessorDefinitions[ppDef.key] = SymbolValue(ppDef.value, ppDef.arguments); - } - - std::string rawStringTerminator = rawStringTerminators.ValueAt(lineCurrent-1); - SparseState rawSTNew(lineCurrent); - - int activitySet = preproc.ActiveState(); - - const WordClassifier &classifierIdentifiers = subStyles.Classifier(SCE_JAVA_IDENTIFIER); - const WordClassifier &classifierDocKeyWords = subStyles.Classifier(SCE_JAVA_COMMENTDOCKEYWORD); - - Sci_PositionU lineEndNext = styler.LineEnd(lineCurrent); - - for (; sc.More();) { - - if (sc.atLineStart) { - // Using MaskActive() is not needed in the following statement. - // Inside inactive preprocessor declaration, state will be reset anyway at the end of this block. - if ((sc.state == SCE_JAVA_STRING) || (sc.state == SCE_JAVA_CHARACTER)) { - // Prevent SCE_JAVA_STRINGEOL from leaking back to previous line which - // ends with a line continuation by locking in the state up to this position. - sc.SetState(sc.state); - } - if ((MaskActive(sc.state) == SCE_JAVA_PREPROCESSOR) && (!continuationLine)) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - // Reset states to beginning of colourise so no surprises - // if different sets of lines lexed. - visibleChars = 0; - lastWordWasUUID = false; - isIncludePreprocessor = false; - inRERange = false; - if (preproc.IsInactive()) { - activitySet = inactiveFlag; - sc.SetState(sc.state | activitySet); - } - } - - if (sc.atLineEnd) { - lineCurrent++; - lineEndNext = styler.LineEnd(lineCurrent); - vlls.Add(lineCurrent, preproc); - if (rawStringTerminator != "") { - rawSTNew.Set(lineCurrent-1, rawStringTerminator); - } - } - - // Handle line continuation generically. - if (sc.ch == '\\') { - if ((sc.currentPos+1) >= lineEndNext) { - lineCurrent++; - lineEndNext = styler.LineEnd(lineCurrent); - vlls.Add(lineCurrent, preproc); - if (rawStringTerminator != "") { - rawSTNew.Set(lineCurrent-1, rawStringTerminator); - } - sc.Forward(); - if (sc.ch == '\r' && sc.chNext == '\n') { - // Even in UTF-8, \r and \n are separate - sc.Forward(); - } - continuationLine = true; - sc.Forward(); - continue; - } - } - - const bool atLineEndBeforeSwitch = sc.atLineEnd; - - // Determine if the current state should terminate. - switch (MaskActive(sc.state)) { - case SCE_JAVA_OPERATOR: - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - break; - case SCE_JAVA_NUMBER: - // We accept almost anything because of hex. and number suffixes - if (sc.ch == '_') { - sc.ChangeState(SCE_JAVA_USERLITERAL|activitySet); - } else if (!(setWord.Contains(sc.ch) - || (sc.ch == '\'') - || ((sc.ch == '+' || sc.ch == '-') && (sc.chPrev == 'e' || sc.chPrev == 'E' || - sc.chPrev == 'p' || sc.chPrev == 'P')))) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - break; - case SCE_JAVA_USERLITERAL: - if (!(setWord.Contains(sc.ch))) - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - break; - case SCE_JAVA_IDENTIFIER: - if (sc.atLineStart || sc.atLineEnd || !setWord.Contains(sc.ch) || (sc.ch == '.')) { - char s[1000]; - if (caseSensitive) { - sc.GetCurrent(s, sizeof(s)); - } else { - sc.GetCurrentLowered(s, sizeof(s)); - } - if (keywords.InList(s)) { - lastWordWasUUID = strcmp(s, "uuid") == 0; - sc.ChangeState(SCE_JAVA_WORD|activitySet); - } else if (keywords2.InList(s)) { - sc.ChangeState(SCE_JAVA_WORD2|activitySet); - } else if (keywords4.InList(s)) { - sc.ChangeState(SCE_JAVA_GLOBALCLASS|activitySet); - } else { - int subStyle = classifierIdentifiers.ValueFor(s); - if (subStyle >= 0) { - sc.ChangeState(subStyle|activitySet); - } - } - const bool literalString = sc.ch == '\"'; - if (literalString || sc.ch == '\'') { - size_t lenS = strlen(s); - const bool raw = literalString && sc.chPrev == 'R' && !setInvalidRawFirst.Contains(sc.chNext); - if (raw) - s[lenS--] = '\0'; - const bool valid = - (lenS == 0) || - ((lenS == 1) && ((s[0] == 'L') || (s[0] == 'u') || (s[0] == 'U'))) || - ((lenS == 2) && literalString && (s[0] == 'u') && (s[1] == '8')); - if (valid) { - if (literalString) { - if (raw) { - // Set the style of the string prefix to SCE_JAVA_STRINGRAW but then change to - // SCE_JAVA_DEFAULT as that allows the raw string start code to run. - sc.ChangeState(SCE_JAVA_STRINGRAW|activitySet); - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } else { - sc.ChangeState(SCE_JAVA_STRING|activitySet); - } - } else { - sc.ChangeState(SCE_JAVA_CHARACTER|activitySet); - } - } else { - sc.SetState(SCE_JAVA_DEFAULT | activitySet); - } - } else { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - } - break; - case SCE_JAVA_PREPROCESSOR: - if (options.stylingWithinPreprocessor) { - if (IsASpace(sc.ch) || (sc.ch == '(')) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - } else if (isStringInPreprocessor && (sc.Match('>') || sc.Match('\"') || sc.atLineEnd)) { - isStringInPreprocessor = false; - } else if (!isStringInPreprocessor) { - if ((isIncludePreprocessor && sc.Match('<')) || sc.Match('\"')) { - isStringInPreprocessor = true; - } else if (sc.Match('/', '*')) { - if (sc.Match("/**") || sc.Match("/*!")) { - sc.SetState(SCE_JAVA_PREPROCESSORCOMMENTDOC|activitySet); - } else { - sc.SetState(SCE_JAVA_PREPROCESSORCOMMENT|activitySet); - } - sc.Forward(); // Eat the * - } else if (sc.Match('/', '/')) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - } - break; - case SCE_JAVA_PREPROCESSORCOMMENT: - case SCE_JAVA_PREPROCESSORCOMMENTDOC: - if (sc.Match('*', '/')) { - sc.Forward(); - sc.ForwardSetState(SCE_JAVA_PREPROCESSOR|activitySet); - continue; // Without advancing in case of '\'. - } - break; - case SCE_JAVA_COMMENT: - if (sc.Match('*', '/')) { - sc.Forward(); - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } else { - styleBeforeTaskMarker = SCE_JAVA_COMMENT; - highlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive); - } - break; - case SCE_JAVA_COMMENTDOC: - if (sc.Match('*', '/')) { - sc.Forward(); - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support - // Verify that we have the conditions to mark a comment-doc-keyword - if ((IsASpace(sc.chPrev) || sc.chPrev == '*') && (!IsASpace(sc.chNext))) { - styleBeforeDCKeyword = SCE_JAVA_COMMENTDOC; - sc.SetState(SCE_JAVA_COMMENTDOCKEYWORD|activitySet); - } - } else if ((sc.ch == '<' && sc.chNext != '/') - || (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style - styleBeforeDCKeyword = SCE_JAVA_COMMENTDOC; - sc.ForwardSetState(SCE_JAVA_COMMENTDOCKEYWORD | activitySet); - } - break; - case SCE_JAVA_COMMENTLINE: - if (sc.atLineStart && !continuationLine) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } else { - styleBeforeTaskMarker = SCE_JAVA_COMMENTLINE; - highlightTaskMarker(sc, styler, activitySet, markerList, caseSensitive); - } - break; - case SCE_JAVA_COMMENTLINEDOC: - if (sc.atLineStart && !continuationLine) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support - // Verify that we have the conditions to mark a comment-doc-keyword - if ((IsASpace(sc.chPrev) || sc.chPrev == '/' || sc.chPrev == '!') && (!IsASpace(sc.chNext))) { - styleBeforeDCKeyword = SCE_JAVA_COMMENTLINEDOC; - sc.SetState(SCE_JAVA_COMMENTDOCKEYWORD|activitySet); - } - } else if ((sc.ch == '<' && sc.chNext != '/') - || (sc.ch == '/' && sc.chPrev == '<')) { // XML comment style - styleBeforeDCKeyword = SCE_JAVA_COMMENTLINEDOC; - sc.ForwardSetState(SCE_JAVA_COMMENTDOCKEYWORD | activitySet); - } - break; - case SCE_JAVA_COMMENTDOCKEYWORD: - if ((styleBeforeDCKeyword == SCE_JAVA_COMMENTDOC) && sc.Match('*', '/')) { - sc.ChangeState(SCE_JAVA_COMMENTDOCKEYWORDERROR); - sc.Forward(); - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - seenDocKeyBrace = false; - } else if (sc.ch == '[' || sc.ch == '{') { - seenDocKeyBrace = true; - } else if (!setDoxygen.Contains(sc.ch) - && !(seenDocKeyBrace && (sc.ch == ',' || sc.ch == '.'))) { - char s[100]; - if (caseSensitive) { - sc.GetCurrent(s, sizeof(s)); - } else { - sc.GetCurrentLowered(s, sizeof(s)); - } - if (!(IsASpace(sc.ch) || (sc.ch == 0))) { - sc.ChangeState(SCE_JAVA_COMMENTDOCKEYWORDERROR|activitySet); - } else if (!keywords3.InList(s + 1) && !keywords3.InList(s)) { - int subStyleCDKW = classifierDocKeyWords.ValueFor(s+1); - if (subStyleCDKW >= 0) { - sc.ChangeState(subStyleCDKW|activitySet); - } else { - sc.ChangeState(SCE_JAVA_COMMENTDOCKEYWORDERROR|activitySet); - } - } - sc.SetState(styleBeforeDCKeyword|activitySet); - seenDocKeyBrace = false; - } else if (sc.ch == '>') { - char s[100]; - if (caseSensitive) { - sc.GetCurrent(s, sizeof(s)); - } else { - sc.GetCurrentLowered(s, sizeof(s)); - } - if (!keywords3.InList(s)) { - int subStyleCDKW = classifierDocKeyWords.ValueFor(s + 1); - if (subStyleCDKW >= 0) { - sc.ChangeState(subStyleCDKW | activitySet); - } else { - sc.ChangeState(SCE_JAVA_COMMENTDOCKEYWORDERROR | activitySet); - } - } - sc.SetState(styleBeforeDCKeyword | activitySet); - seenDocKeyBrace = false; - } - break; - case SCE_JAVA_STRING: - if (sc.atLineEnd) { - sc.ChangeState(SCE_JAVA_STRINGEOL|activitySet); - } else if (isIncludePreprocessor) { - if (sc.ch == '>') { - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - isIncludePreprocessor = false; - } - } else if (sc.ch == '\\') { - if (options.escapeSequence) { - sc.SetState(SCE_JAVA_ESCAPESEQUENCE|activitySet); - escapeSeq.resetEscapeState(sc.chNext); - } - sc.Forward(); // Skip all characters after the backslash - } else if (sc.ch == '\"') { - if (sc.chNext == '_') { - sc.ChangeState(SCE_JAVA_USERLITERAL|activitySet); - } else { - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } - } - break; - case SCE_JAVA_ESCAPESEQUENCE: - escapeSeq.consumeDigit(); - if (!escapeSeq.atEscapeEnd(sc.ch)) { - break; - } - if (sc.ch == '"') { - sc.SetState(SCE_JAVA_STRING|activitySet); - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } else if (sc.ch == '\\') { - escapeSeq.resetEscapeState(sc.chNext); - sc.Forward(); - } else { - sc.SetState(SCE_JAVA_STRING|activitySet); - if (sc.atLineEnd) { - sc.ChangeState(SCE_JAVA_STRINGEOL|activitySet); - } - } - break; - case SCE_JAVA_HASHQUOTEDSTRING: - if (sc.ch == '\\') { - if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { - sc.Forward(); - } - } else if (sc.ch == '\"') { - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } - break; - case SCE_JAVA_STRINGRAW: - if (sc.Match(rawStringTerminator.c_str())) { - for (size_t termPos=rawStringTerminator.size(); termPos; termPos--) - sc.Forward(); - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - rawStringTerminator = ""; - } - break; - case SCE_JAVA_CHARACTER: - if (sc.atLineEnd) { - sc.ChangeState(SCE_JAVA_STRINGEOL|activitySet); - } else if (sc.ch == '\\') { - if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { - sc.Forward(); - } - } else if (sc.ch == '\'') { - if (sc.chNext == '_') { - sc.ChangeState(SCE_JAVA_USERLITERAL|activitySet); - } else { - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } - } - break; - case SCE_JAVA_REGEX: - if (sc.atLineStart) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } else if (!inRERange && sc.ch == '/') { - sc.Forward(); - while (IsLowerCase(sc.ch)) - sc.Forward(); // gobble regex flags - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) { - // Gobble up the escaped character - sc.Forward(); - } else if (sc.ch == '[') { - inRERange = true; - } else if (sc.ch == ']') { - inRERange = false; - } - break; - case SCE_JAVA_STRINGEOL: - if (sc.atLineStart) { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - break; - case SCE_JAVA_VERBATIM: - if (options.verbatimStringsAllowEscapes && (sc.ch == '\\')) { - sc.Forward(); // Skip all characters after the backslash - } else if (sc.ch == '\"') { - if (sc.chNext == '\"') { - sc.Forward(); - } else { - sc.ForwardSetState(SCE_JAVA_DEFAULT|activitySet); - } - } - break; - case SCE_JAVA_TRIPLEVERBATIM: - if (sc.Match(R"(""")")) { - while (sc.Match('"')) { - sc.Forward(); - } - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - break; - case SCE_JAVA_UUID: - if (sc.atLineEnd || sc.ch == ')') { - sc.SetState(SCE_JAVA_DEFAULT|activitySet); - } - break; - case SCE_JAVA_TASKMARKER: - if (isoperator(sc.ch) || IsASpace(sc.ch)) { - sc.SetState(styleBeforeTaskMarker|activitySet); - styleBeforeTaskMarker = SCE_JAVA_DEFAULT; - } - } - - if (sc.atLineEnd && !atLineEndBeforeSwitch) { - // State exit processing consumed characters up to end of line. - lineCurrent++; - lineEndNext = styler.LineEnd(lineCurrent); - vlls.Add(lineCurrent, preproc); - } - - const bool atLineEndBeforeStateEntry = sc.atLineEnd; - - // Determine if a new state should be entered. - if (MaskActive(sc.state) == SCE_JAVA_DEFAULT) { - if (sc.Match('@', '\"')) { - sc.SetState(SCE_JAVA_VERBATIM|activitySet); - sc.Forward(); - } else if (options.triplequotedStrings && sc.Match(R"(""")")) { - sc.SetState(SCE_JAVA_TRIPLEVERBATIM|activitySet); - sc.Forward(2); - } else if (options.hashquotedStrings && sc.Match('#', '\"')) { - sc.SetState(SCE_JAVA_HASHQUOTEDSTRING|activitySet); - sc.Forward(); - } else if (options.backQuotedStrings && sc.Match('`')) { - sc.SetState(SCE_JAVA_STRINGRAW|activitySet); - rawStringTerminator = "`"; - } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { - if (lastWordWasUUID) { - sc.SetState(SCE_JAVA_UUID|activitySet); - lastWordWasUUID = false; - } else { - sc.SetState(SCE_JAVA_NUMBER|activitySet); - } - } else if (!sc.atLineEnd && (setWordStart.Contains(sc.ch) || (sc.ch == '@'))) { - if (lastWordWasUUID) { - sc.SetState(SCE_JAVA_UUID|activitySet); - lastWordWasUUID = false; - } else { - sc.SetState(SCE_JAVA_IDENTIFIER|activitySet); - } - } else if (sc.Match('/', '*')) { - if (sc.Match("/**") || sc.Match("/*!")) { // Support of Qt/Doxygen doc. style - sc.SetState(SCE_JAVA_COMMENTDOC|activitySet); - } else { - sc.SetState(SCE_JAVA_COMMENT|activitySet); - } - sc.Forward(); // Eat the * so it isn't used for the end of the comment - } else if (sc.Match('/', '/')) { - if ((sc.Match("///") && !sc.Match("////")) || sc.Match("//!")) - // Support of Qt/Doxygen doc. style - sc.SetState(SCE_JAVA_COMMENTLINEDOC|activitySet); - else - sc.SetState(SCE_JAVA_COMMENTLINE|activitySet); - } else if (sc.ch == '/' - && (setOKBeforeRE.Contains(chPrevNonWhite) - || followsReturnKeyword(sc, styler)) - && (!setCouldBePostOp.Contains(chPrevNonWhite) - || !FollowsPostfixOperator(sc, styler))) { - sc.SetState(SCE_JAVA_REGEX|activitySet); // JavaScript's RegEx - inRERange = false; - } else if (sc.ch == '\"') { - if (sc.chPrev == 'R') { - styler.Flush(); - if (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_JAVA_STRINGRAW) { - sc.SetState(SCE_JAVA_STRINGRAW|activitySet); - rawStringTerminator = ")"; - for (Sci_Position termPos = sc.currentPos + 1;; termPos++) { - const char chTerminator = styler.SafeGetCharAt(termPos, '('); - if (chTerminator == '(') - break; - rawStringTerminator += chTerminator; - } - rawStringTerminator += '\"'; - } else { - sc.SetState(SCE_JAVA_STRING|activitySet); - } - } else { - sc.SetState(SCE_JAVA_STRING|activitySet); - } - isIncludePreprocessor = false; // ensure that '>' won't end the string - } else if (isIncludePreprocessor && sc.ch == '<') { - sc.SetState(SCE_JAVA_STRING|activitySet); - } else if (sc.ch == '\'') { - sc.SetState(SCE_JAVA_CHARACTER|activitySet); - } else if (sc.ch == '#' && visibleChars == 0) { - // Preprocessor commands are alone on their line - sc.SetState(SCE_JAVA_PREPROCESSOR|activitySet); - // Skip whitespace between # and preprocessor word - do { - sc.Forward(); - } while ((sc.ch == ' ' || sc.ch == '\t') && sc.More()); - if (sc.Match("include")) { - isIncludePreprocessor = true; - } else { - if (options.trackPreprocessor && IsAlphaNumeric(sc.ch)) { - // If #if is nested too deeply (>31 levels) the active/inactive appearance - // will stop reflecting the code. - if (sc.Match("ifdef") || sc.Match("ifndef")) { - const bool isIfDef = sc.Match("ifdef"); - const int startRest = isIfDef ? 5 : 6; - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + startRest + 1, false); - bool foundDef = preprocessorDefinitions.find(restOfLine) != preprocessorDefinitions.end(); - preproc.StartSection(isIfDef == foundDef); - } else if (sc.Match("if")) { - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 2, true); - const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); - preproc.StartSection(ifGood); - } else if (sc.Match("else")) { - // #else is shown as active if either preceding or following section is active - // as that means that it contributed to the result. - if (preproc.ValidLevel()) { - // If #else has no corresponding #if then take no action as invalid - if (!preproc.CurrentIfTaken()) { - // Inactive, may become active if parent scope active - assert(sc.state == (SCE_JAVA_PREPROCESSOR | inactiveFlag)); - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // If following is active then show "else" as active - if (!activitySet) - sc.ChangeState(SCE_JAVA_PREPROCESSOR); - } else if (preproc.IsActive()) { - // Active -> inactive - assert(sc.state == SCE_JAVA_PREPROCESSOR); - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // Continue to show "else" as active as it ends active section. - } - } - } else if (sc.Match("elif")) { - // Ensure only one chosen out of #if .. #elif .. #elif .. #else .. #endif - // #elif is shown as active if either preceding or following section is active - // as that means that it contributed to the result. - if (preproc.ValidLevel()) { - if (!preproc.CurrentIfTaken()) { - // Inactive, if expression true then may become active if parent scope active - assert(sc.state == (SCE_JAVA_PREPROCESSOR | inactiveFlag)); - // Similar to #if - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 4, true); - const bool ifGood = EvaluateExpression(restOfLine, preprocessorDefinitions); - if (ifGood) { - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - if (!activitySet) - sc.ChangeState(SCE_JAVA_PREPROCESSOR); - } - } else if (preproc.IsActive()) { - // Active -> inactive - assert(sc.state == SCE_JAVA_PREPROCESSOR); - preproc.InvertCurrentLevel(); - activitySet = preproc.ActiveState(); - // Continue to show "elif" as active as it ends active section. - } - } - } else if (sc.Match("endif")) { - preproc.EndSection(); - activitySet = preproc.ActiveState(); - sc.ChangeState(SCE_JAVA_PREPROCESSOR|activitySet); - } else if (sc.Match("define")) { - if (options.updatePreprocessor && preproc.IsActive()) { - std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 6, true); - size_t startName = 0; - while ((startName < restOfLine.length()) && IsSpaceOrTab(restOfLine[startName])) - startName++; - size_t endName = startName; - while ((endName < restOfLine.length()) && setWord.Contains(restOfLine[endName])) - endName++; - std::string key = restOfLine.substr(startName, endName-startName); - if ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) { - // Macro - size_t endArgs = endName; - while ((endArgs < restOfLine.length()) && (restOfLine[endArgs] != ')')) - endArgs++; - std::string args = restOfLine.substr(endName + 1, endArgs - endName - 1); - size_t startValue = endArgs+1; - while ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue])) - startValue++; - std::string value; - if (startValue < restOfLine.length()) - value = restOfLine.substr(startValue); - preprocessorDefinitions[key] = SymbolValue(value, args); - ppDefineHistory.push_back(PPDefinition(lineCurrent, key, value, false, args)); - definitionsChanged = true; - } else { - // Value - size_t startValue = endName; - while ((startValue < restOfLine.length()) && IsSpaceOrTab(restOfLine[startValue])) - startValue++; - std::string value = restOfLine.substr(startValue); - if (OnlySpaceOrTab(value)) - value = "1"; // No value defaults to 1 - preprocessorDefinitions[key] = value; - ppDefineHistory.push_back(PPDefinition(lineCurrent, key, value)); - definitionsChanged = true; - } - } - } else if (sc.Match("undef")) { - if (options.updatePreprocessor && preproc.IsActive()) { - const std::string restOfLine = GetRestOfLine(styler, sc.currentPos + 5, false); - std::vector tokens = Tokenize(restOfLine); - if (tokens.size() >= 1) { - const std::string key = tokens[0]; - preprocessorDefinitions.erase(key); - ppDefineHistory.push_back(PPDefinition(lineCurrent, key, "", true)); - definitionsChanged = true; - } - } - } - } - } - } else if (isoperator(sc.ch)) { - sc.SetState(SCE_JAVA_OPERATOR|activitySet); - } - } - - if (sc.atLineEnd && !atLineEndBeforeStateEntry) { - // State entry processing consumed characters up to end of line. - lineCurrent++; - lineEndNext = styler.LineEnd(lineCurrent); - vlls.Add(lineCurrent, preproc); - } - - if (!IsASpace(sc.ch) && !IsSpaceEquiv(MaskActive(sc.state))) { - chPrevNonWhite = sc.ch; - visibleChars++; - } - continuationLine = false; - sc.Forward(); - } - const bool rawStringsChanged = rawStringTerminators.Merge(rawSTNew, lineCurrent); - if (definitionsChanged || rawStringsChanged) - styler.ChangeLexerState(startPos, startPos + length); - sc.Complete(); -} - -// Store both the current line's fold level and the next lines in the -// level store to make it easy to pick up with each increment -// and to make it possible to fiddle the current level for "} else {". - -void SCI_METHOD LexerJAVA::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - - if (!options.fold) - return; - - LexAccessor styler(pAccess); - - const Sci_PositionU endPos = startPos + length; - int visibleChars = 0; - bool inLineComment = false; - Sci_Position lineCurrent = styler.GetLine(startPos); - int levelCurrent = SC_FOLDLEVELBASE; - if (lineCurrent > 0) - levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; - Sci_PositionU lineStartNext = styler.LineStart(lineCurrent+1); - int levelMinCurrent = levelCurrent; - int levelNext = levelCurrent; - char chNext = styler[startPos]; - int styleNext = MaskActive(styler.StyleAt(startPos)); - int style = MaskActive(initStyle); - const bool userDefinedFoldMarkers = !options.foldExplicitStart.empty() && !options.foldExplicitEnd.empty(); - for (Sci_PositionU i = startPos; i < endPos; i++) { - const char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - const int stylePrev = style; - style = styleNext; - styleNext = MaskActive(styler.StyleAt(i + 1)); - const bool atEOL = i == (lineStartNext-1); - if ((style == SCE_JAVA_COMMENTLINE) || (style == SCE_JAVA_COMMENTLINEDOC)) - inLineComment = true; - if (options.foldComment && options.foldCommentMultiline && IsStreamCommentStyle(style) && !inLineComment) { - if (!IsStreamCommentStyle(stylePrev)) { - levelNext++; - } else if (!IsStreamCommentStyle(styleNext) && !atEOL) { - // Comments don't end at end of line and the next character may be unstyled. - levelNext--; - } - } - if (options.foldComment && options.foldCommentExplicit && ((style == SCE_JAVA_COMMENTLINE) || options.foldExplicitAnywhere)) { - if (userDefinedFoldMarkers) { - if (styler.Match(i, options.foldExplicitStart.c_str())) { - levelNext++; - } else if (styler.Match(i, options.foldExplicitEnd.c_str())) { - levelNext--; - } - } else { - if ((ch == '/') && (chNext == '/')) { - const char chNext2 = styler.SafeGetCharAt(i + 2); - if (chNext2 == '{') { - levelNext++; - } else if (chNext2 == '}') { - levelNext--; - } - } - } - } - if (options.foldPreprocessor && (style == SCE_JAVA_PREPROCESSOR)) { - if (ch == '#') { - Sci_PositionU j = i + 1; - while ((j < endPos) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { - j++; - } - if (styler.Match(j, "region") || styler.Match(j, "if")) { - levelNext++; - } else if (styler.Match(j, "end")) { - levelNext--; - } - - if (options.foldPreprocessorAtElse && (styler.Match(j, "else") || styler.Match(j, "elif"))) { - levelMinCurrent--; - } - } - } - if (options.foldSyntaxBased && (style == SCE_JAVA_OPERATOR)) { - if (ch == '{' || ch == '[' || ch == '(') { - // Measure the minimum before a '{' to allow - // folding on "} else {" - if (options.foldAtElse && levelMinCurrent > levelNext) { - levelMinCurrent = levelNext; - } - levelNext++; - } else if (ch == '}' || ch == ']' || ch == ')') { - levelNext--; - } - } - if (!IsASpace(ch)) - visibleChars++; - if (atEOL || (i == endPos-1)) { - int levelUse = levelCurrent; - if ((options.foldSyntaxBased && options.foldAtElse) || - (options.foldPreprocessor && options.foldPreprocessorAtElse) - ) { - levelUse = levelMinCurrent; - } - int lev = levelUse | levelNext << 16; - if (visibleChars == 0 && options.foldCompact) - lev |= SC_FOLDLEVELWHITEFLAG; - if (levelUse < levelNext) - lev |= SC_FOLDLEVELHEADERFLAG; - if (lev != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, lev); - } - lineCurrent++; - lineStartNext = styler.LineStart(lineCurrent+1); - levelCurrent = levelNext; - levelMinCurrent = levelCurrent; - if (atEOL && (i == static_cast(styler.Length()-1))) { - // There is an empty line at end of file so give it same level and empty - styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); - } - visibleChars = 0; - inLineComment = false; - } - } -} - -void LexerJAVA::EvaluateTokens(std::vector &tokens, const SymbolTable &preprocessorDefinitions) { - - // Remove whitespace tokens - tokens.erase(std::remove_if(tokens.begin(), tokens.end(), OnlySpaceOrTab), tokens.end()); - - // Evaluate defined statements to either 0 or 1 - for (size_t i=0; (i+1)) - SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+2]); - if (it != preprocessorDefinitions.end()) { - val = "1"; - } - tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 4); - } else { - // Spurious '(' so erase as more likely to result in false - tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2); - } - } else { - // defined - SymbolTable::const_iterator it = preprocessorDefinitions.find(tokens[i+1]); - if (it != preprocessorDefinitions.end()) { - val = "1"; - } - tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2); - } - tokens[i] = val; - } else { - i++; - } - } - - // Evaluate identifiers - 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 macroTokens = Tokenize(it->second.value); - if (it->second.IsMacro()) { - if ((i + 1 < tokens.size()) && (tokens.at(i + 1) == "(")) { - // Create map of argument name to value - std::vector argumentNames = StringSplit(it->second.arguments, ','); - std::map arguments; - size_t arg = 0; - size_t tok = i+2; - while ((tok < tokens.size()) && (arg < argumentNames.size()) && (tokens.at(tok) != ")")) { - if (tokens.at(tok) != ",") { - arguments[argumentNames.at(arg)] = tokens.at(tok); - arg++; - } - tok++; - } - - // Remove invocation - tokens.erase(tokens.begin() + i, tokens.begin() + tok + 1); - - // Substitute values into macro - macroTokens.erase(std::remove_if(macroTokens.begin(), macroTokens.end(), OnlySpaceOrTab), macroTokens.end()); - - for (size_t iMacro = 0; iMacro < macroTokens.size();) { - if (setWordStart.Contains(macroTokens[iMacro][0])) { - std::map::const_iterator itFind = arguments.find(macroTokens[iMacro]); - if (itFind != arguments.end()) { - // TODO: Possible that value will be expression so should insert tokenized form - macroTokens[iMacro] = itFind->second; - } - } - iMacro++; - } - - // Insert results back into tokens - tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end()); - - } else { - i++; - } - } else { - // Remove invocation - tokens.erase(tokens.begin() + i); - // Insert results back into tokens - tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end()); - } - } else { - // Identifier not found and value defaults to zero - tokens[i] = "0"; - } - } else { - i++; - } - } - - // Find bracketed subexpressions and recurse on them - BracketPair bracketPair = FindBracketPair(tokens); - while (bracketPair.itBracket != tokens.end()) { - std::vector inBracket(bracketPair.itBracket + 1, bracketPair.itEndBracket); - EvaluateTokens(inBracket, preprocessorDefinitions); - - // The insertion is done before the removal because there were failures with the opposite approach - tokens.insert(bracketPair.itBracket, inBracket.begin(), inBracket.end()); - - bracketPair = FindBracketPair(tokens); - tokens.erase(bracketPair.itBracket, bracketPair.itEndBracket + 1); - - bracketPair = FindBracketPair(tokens); - } - - // Evaluate logical negations - for (size_t j=0; (j+1)::iterator itInsert = - tokens.erase(tokens.begin() + j, tokens.begin() + j + 2); - tokens.insert(itInsert, isTrue ? "1" : "0"); - } else { - j++; - } - } - - // Evaluate expressions in precedence order - enum precedence { precMult, precAdd, precRelative - , precLogical, /* end marker */ precLast }; - for (int prec = precMult; prec < precLast; prec++) { - // Looking at 3 tokens at a time so end at 2 before end - for (size_t k=0; (k+2)") - result = valA > valB; - else if (tokens[k+1] == ">=") - result = valA >= valB; - else if (tokens[k+1] == "==") - result = valA == valB; - else if (tokens[k+1] == "!=") - result = valA != valB; - else if (tokens[k+1] == "||") - result = valA || valB; - else if (tokens[k+1] == "&&") - result = valA && valB; - std::vector::iterator itInsert = - tokens.erase(tokens.begin() + k, tokens.begin() + k + 3); - tokens.insert(itInsert, std::to_string(result)); - } else { - k++; - } - } - } -} - -std::vector LexerJAVA::Tokenize(const std::string &expr) const { - // Break into tokens - std::vector tokens; - const char *cp = expr.c_str(); - while (*cp) { - std::string word; - if (setWord.Contains(*cp)) { - // Identifiers and numbers - while (setWord.Contains(*cp)) { - word += *cp; - cp++; - } - } else if (IsSpaceOrTab(*cp)) { - while (IsSpaceOrTab(*cp)) { - word += *cp; - cp++; - } - } else if (setRelOp.Contains(*cp)) { - word += *cp; - cp++; - if (setRelOp.Contains(*cp)) { - word += *cp; - cp++; - } - } else if (setLogicalOp.Contains(*cp)) { - word += *cp; - cp++; - if (setLogicalOp.Contains(*cp)) { - word += *cp; - cp++; - } - } else { - // Should handle strings, characters, and comments here - word += *cp; - cp++; - } - tokens.push_back(word); - } - return tokens; -} - -bool LexerJAVA::EvaluateExpression(const std::string &expr, const SymbolTable &preprocessorDefinitions) { - std::vector tokens = Tokenize(expr); - - EvaluateTokens(tokens, preprocessorDefinitions); - - // "0" or "" -> false else true - const bool isFalse = tokens.empty() || - ((tokens.size() == 1) && ((tokens[0] == "") || tokens[0] == "0")); - return !isFalse; -} - -LexerModule lmJAVA(SCLEX_JAVA, LexerJAVA::LexerFactoryJAVA, "java", javaWordLists); -LexerModule lmJAVANoCase(SCLEX_JAVANOCASE, LexerJAVA::LexerFactoryJAVAInsensitive, "javanocase", javaWordLists); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJS.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJS.cxx deleted file mode 100644 index ad5b0dc51..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJS.cxx +++ /dev/null @@ -1,2613 +0,0 @@ -// Scintilla source code edit control -/** @file LexJS.cxx - ** Lexer for JS. - **/ -// Copyright 1998-2005 by Neil Hodgson -// Copyright 2023 by Uniontech Software Technology Co., Ltd. Port html to pure javascript language. -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { - -#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START) -#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START) -#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START) -#define SCLEX_JS (SCLEX_JAVANOCASE + 1) - -enum script_type { eScriptNone = 0, eScriptJS, eScriptVBS, eScriptPython, eScriptPHP, eScriptXML, eScriptSGML, eScriptSGMLblock, eScriptComment }; -enum script_mode { eHtml = 0, eNonHtmlScript, eNonHtmlPreProc, eNonHtmlScriptPreProc }; - -inline bool IsAWordChar(const int ch) { - return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_'); -} - -inline bool IsAWordStart(const int ch) { - return (ch < 0x80) && (isalnum(ch) || ch == '_'); -} - -inline bool IsOperator(int ch) { - if (IsASCII(ch) && isalnum(ch)) - return false; - // '.' left out as it is used to make up numbers - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || - ch == '(' || ch == ')' || ch == '-' || ch == '+' || - ch == '=' || ch == '|' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' || ch == ':' || ch == ';' || - ch == '<' || ch == '>' || ch == ',' || ch == '/' || - ch == '?' || ch == '!' || ch == '.' || ch == '~') - return true; - return false; -} - -void GetTextSegment(Accessor &styler, Sci_PositionU start, Sci_PositionU end, char *s, size_t len) { - Sci_PositionU i = 0; - for (; (i < end - start + 1) && (i < len-1); i++) { - s[i] = MakeLowerCase(styler[start + i]); - } - s[i] = '\0'; -} - -std::string GetStringSegment(Accessor &styler, Sci_PositionU start, Sci_PositionU end) { - std::string s; - Sci_PositionU i = 0; - for (; (i < end - start + 1); i++) { - s.push_back(MakeLowerCase(styler[start + i])); - } - return s; -} - -std::string GetNextWord(Accessor &styler, Sci_PositionU start) { - std::string ret; - Sci_PositionU i = 0; - for (; i < 200; i++) { // Put an upper limit to bound time taken for unexpected text. - const char ch = styler.SafeGetCharAt(start + i); - if ((i == 0) && !IsAWordStart(ch)) - break; - if ((i > 0) && !IsAWordChar(ch)) - break; - ret.push_back(ch); - } - return ret; -} - -script_type segIsScriptingIndicator(Accessor &styler, Sci_PositionU start, Sci_PositionU end, script_type prevValue) { - char s[100]; - GetTextSegment(styler, start, end, s, sizeof(s)); - //Platform::DebugPrintf("Scripting indicator [%s]\n", s); - if (strstr(s, "src")) // External script - return eScriptNone; - if (strstr(s, "vbs")) - return eScriptVBS; - if (strstr(s, "pyth")) - return eScriptPython; - if (strstr(s, "javas")) - return eScriptJS; - if (strstr(s, "jscr")) - return eScriptJS; - if (strstr(s, "php")) - return eScriptPHP; - if (strstr(s, "xml")) { - const char *xml = strstr(s, "xml"); - for (const char *t=s; t= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { - return eScriptPython; - } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { - return eScriptVBS; - } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { - return eScriptJS; - } else if ((state >= SCE_HPHP_DEFAULT) && (state <= SCE_HPHP_COMMENTLINE)) { - return eScriptPHP; - } else if ((state >= SCE_H_SGML_DEFAULT) && (state < SCE_H_SGML_BLOCK_DEFAULT)) { - return eScriptSGML; - } else if (state == SCE_H_SGML_BLOCK_DEFAULT) { - return eScriptSGMLblock; - } else { - return eScriptNone; - } -} - -int statePrintForState(int state, script_mode inScriptType) { - int StateToPrint = state; - - if (state >= SCE_HJ_START) { - if ((state >= SCE_HP_START) && (state <= SCE_HP_IDENTIFIER)) { - StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_PYTHON); - } else if ((state >= SCE_HB_START) && (state <= SCE_HB_STRINGEOL)) { - StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_VBS); - } else if ((state >= SCE_HJ_START) && (state <= SCE_HJ_REGEX)) { - StateToPrint = state + ((inScriptType == eNonHtmlScript) ? 0 : SCE_HA_JS); - } - } - - return StateToPrint; -} - -int stateForPrintState(int StateToPrint) { - int state; - - if ((StateToPrint >= SCE_HPA_START) && (StateToPrint <= SCE_HPA_IDENTIFIER)) { - state = StateToPrint - SCE_HA_PYTHON; - } else if ((StateToPrint >= SCE_HBA_START) && (StateToPrint <= SCE_HBA_STRINGEOL)) { - state = StateToPrint - SCE_HA_VBS; - } else if ((StateToPrint >= SCE_HJA_START) && (StateToPrint <= SCE_HJA_REGEX)) { - state = StateToPrint - SCE_HA_JS; - } else { - state = StateToPrint; - } - - return state; -} - -inline bool IsNumber(Sci_PositionU start, Accessor &styler) { - return IsADigit(styler[start]) || (styler[start] == '.') || - (styler[start] == '-') || (styler[start] == '#'); -} - -inline bool isStringState(int state) { - bool bResult; - - switch (state) { - case SCE_HJ_DOUBLESTRING: - case SCE_HJ_SINGLESTRING: - case SCE_HJA_DOUBLESTRING: - case SCE_HJA_SINGLESTRING: - case SCE_HB_STRING: - case SCE_HBA_STRING: - case SCE_HP_STRING: - case SCE_HP_CHARACTER: - case SCE_HP_TRIPLE: - case SCE_HP_TRIPLEDOUBLE: - case SCE_HPA_STRING: - case SCE_HPA_CHARACTER: - case SCE_HPA_TRIPLE: - case SCE_HPA_TRIPLEDOUBLE: - case SCE_HPHP_HSTRING: - case SCE_HPHP_SIMPLESTRING: - case SCE_HPHP_HSTRING_VARIABLE: - case SCE_HPHP_COMPLEX_VARIABLE: - bResult = true; - break; - default : - bResult = false; - break; - } - return bResult; -} - -inline bool stateAllowsTermination(int state) { - bool allowTermination = !isStringState(state); - if (allowTermination) { - switch (state) { - case SCE_HB_COMMENTLINE: - case SCE_HPHP_COMMENT: - case SCE_HP_COMMENTLINE: - case SCE_HPA_COMMENTLINE: - allowTermination = false; - } - } - return allowTermination; -} - -// not really well done, since it's only comments that should lex the %> and <% -inline bool isCommentASPState(int state) { - bool bResult; - - switch (state) { - case SCE_HJ_COMMENT: - case SCE_HJ_COMMENTLINE: - case SCE_HJ_COMMENTDOC: - case SCE_HB_COMMENTLINE: - case SCE_HP_COMMENTLINE: - case SCE_HPHP_COMMENT: - case SCE_HPHP_COMMENTLINE: - bResult = true; - break; - default : - bResult = false; - break; - } - return bResult; -} - -void classifyAttribHTML(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { - const bool wordIsNumber = IsNumber(start, styler); - char chAttr = SCE_H_ATTRIBUTEUNKNOWN; - if (wordIsNumber) { - chAttr = SCE_H_NUMBER; - } else { - std::string s = GetStringSegment(styler, start, end); - if (keywords.InList(s.c_str())) - chAttr = SCE_H_ATTRIBUTE; - } - if ((chAttr == SCE_H_ATTRIBUTEUNKNOWN) && !keywords) - // No keywords -> all are known - chAttr = SCE_H_ATTRIBUTE; - 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 &nonFoldingTags) { - std::string tag; - // 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)); - } - } - // if the current language is XML, I can fold any tag - // if the current language is HTML, I don't want to fold certain tags (input, meta, etc.) - //...to find it in the list of no-container-tags - tagDontFold = (!isXml) && (nonFoldingTags.count(tag) > 0); - // No keywords -> all are known - char chAttr = SCE_H_TAGUNKNOWN; - if (!tag.empty() && (tag[0] == '!')) { - 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); - } - if (chAttr == SCE_H_TAG) { - if (allowScripts && (tag == "script")) { - // check to see if this is a self-closing tag by sniffing ahead - bool isSelfClose = false; - for (Sci_PositionU cPos = end; cPos <= end + 200; cPos++) { - const char ch = styler.SafeGetCharAt(cPos, '\0'); - if (ch == '\0' || ch == '>') - break; - else if (ch == '/' && styler.SafeGetCharAt(cPos + 1, '\0') == '>') { - isSelfClose = true; - break; - } - } - - // do not enter a script state if the tag self-closed - if (!isSelfClose) - chAttr = SCE_H_SCRIPT; - } else if (!isXml && (tag == "comment")) { - chAttr = SCE_H_COMMENT; - } - } - return chAttr; -} - -void classifyWordHTJS(Sci_PositionU start, Sci_PositionU end, - const WordList &keywords, Accessor &styler, script_mode inScriptType) { - char s[30 + 1]; - Sci_PositionU i = 0; - for (; i < end - start + 1 && i < 30; i++) { - s[i] = styler[start + i]; - } - s[i] = '\0'; - - char chAttr = SCE_HJ_WORD; - const bool wordIsNumber = IsADigit(s[0]) || ((s[0] == '.') && IsADigit(s[1])); - if (wordIsNumber) { - chAttr = SCE_HJ_NUMBER; - } else if (keywords.InList(s)) { - chAttr = SCE_HJ_KEYWORD; - } - styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); -} - -int classifyWordHTVB(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler, script_mode inScriptType) { - char chAttr = SCE_HB_IDENTIFIER; - const bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.'); - if (wordIsNumber) { - chAttr = SCE_HB_NUMBER; - } else { - std::string s = GetStringSegment(styler, start, end); - if (keywords.InList(s.c_str())) { - chAttr = SCE_HB_WORD; - if (s == "rem") - chAttr = SCE_HB_COMMENTLINE; - } - } - styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); - if (chAttr == SCE_HB_COMMENTLINE) - return SCE_HB_COMMENTLINE; - else - return SCE_HB_DEFAULT; -} - -void classifyWordHTPy(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler, std::string &prevWord, script_mode inScriptType, bool isMako) { - const bool wordIsNumber = IsADigit(styler[start]); - std::string s; - for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { - s.push_back(styler[start + i]); - } - char chAttr = SCE_HP_IDENTIFIER; - if (prevWord == "class") - chAttr = SCE_HP_CLASSNAME; - else if (prevWord == "def") - chAttr = SCE_HP_DEFNAME; - else if (wordIsNumber) - chAttr = SCE_HP_NUMBER; - else if (keywords.InList(s.c_str())) - chAttr = SCE_HP_WORD; - else if (isMako && (s == "block")) - chAttr = SCE_HP_WORD; - styler.ColourTo(end, statePrintForState(chAttr, inScriptType)); - prevWord = s; -} - -// Update the word colour to default or keyword -// Called when in a PHP word -void classifyWordHTPHP(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { - char chAttr = SCE_HPHP_DEFAULT; - const bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1])); - if (wordIsNumber) { - chAttr = SCE_HPHP_NUMBER; - } else { - std::string s = GetStringSegment(styler, start, end); - if (keywords.InList(s.c_str())) - chAttr = SCE_HPHP_WORD; - } - styler.ColourTo(end, chAttr); -} - -bool isWordHSGML(Sci_PositionU start, Sci_PositionU end, const WordList &keywords, Accessor &styler) { - std::string s; - for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { - s.push_back(styler[start + i]); - } - return keywords.InList(s.c_str()); -} - -bool isWordCdata(Sci_PositionU start, Sci_PositionU end, Accessor &styler) { - std::string s; - for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++) { - s.push_back(styler[start + i]); - } - return s == "[CDATA["; -} - -// Return the first state to reach when entering a scripting language -int StateForScript(script_type scriptLanguage) { - int Result; - switch (scriptLanguage) { - case eScriptVBS: - Result = SCE_HB_START; - break; - case eScriptPython: - Result = SCE_HP_START; - break; - case eScriptPHP: - Result = SCE_HPHP_DEFAULT; - break; - case eScriptXML: - Result = SCE_H_TAGUNKNOWN; - break; - case eScriptSGML: - Result = SCE_H_SGML_DEFAULT; - break; - case eScriptComment: - Result = SCE_H_COMMENT; - break; - default : - Result = SCE_HJ_START; - break; - } - return Result; -} - -inline bool issgmlwordchar(int ch) { - return !IsASCII(ch) || - (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); -} - -inline bool IsPhpWordStart(int ch) { - return (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); -} - -inline bool IsPhpWordChar(int ch) { - return IsADigit(ch) || IsPhpWordStart(ch); -} - -bool IsCommentState(const int state) { - return state == SCE_H_COMMENT || state == SCE_H_SGML_COMMENT; -} - -bool IsScriptCommentState(const int state) { - return state == SCE_HJ_COMMENT || state == SCE_HJ_COMMENTLINE || state == SCE_HJA_COMMENT || - state == SCE_HJA_COMMENTLINE || state == SCE_HB_COMMENTLINE || state == SCE_HBA_COMMENTLINE; -} - -bool isLineEnd(int ch) { - return ch == '\r' || ch == '\n'; -} - -bool isMakoBlockEnd(const int ch, const int chNext, const std::string &blockType) { - if (blockType.empty()) { - return ((ch == '%') && (chNext == '>')); - } else if ((blockType == "inherit") || - (blockType == "namespace") || - (blockType == "include") || - (blockType == "page")) { - return ((ch == '/') && (chNext == '>')); - } else if (blockType == "%") { - if (ch == '/' && isLineEnd(chNext)) - return true; - else - return isLineEnd(ch); - } else if (blockType == "{") { - return ch == '}'; - } else { - return (ch == '>'); - } -} - -bool isDjangoBlockEnd(const int ch, const int chNext, const std::string &blockType) { - if (blockType.empty()) { - return false; - } else if (blockType == "%") { - return ((ch == '%') && (chNext == '}')); - } else if (blockType == "{") { - return ((ch == '}') && (chNext == '}')); - } else { - return false; - } -} - -class PhpNumberState { - enum NumberBase { BASE_10 = 0, BASE_2, BASE_8, BASE_16 }; - static constexpr const char *const digitList[] = { "_0123456789", "_01", "_01234567", "_0123456789abcdefABCDEF" }; - - NumberBase base = BASE_10; - bool decimalPart = false; - bool exponentPart = false; - bool invalid = false; - bool finished = false; - - bool leadingZero = false; - bool invalidBase8 = false; - - bool betweenDigits = false; - bool decimalChar = false; - bool exponentChar = false; - -public: - inline bool isInvalid() { return invalid; } - inline bool isFinished() { return finished; } - - bool init(int ch, int chPlus1, int chPlus2) { - base = BASE_10; - decimalPart = false; - exponentPart = false; - invalid = false; - finished = false; - - leadingZero = false; - invalidBase8 = false; - - betweenDigits = false; - decimalChar = false; - exponentChar = false; - - if (ch == '.' && strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr) { - decimalPart = true; - betweenDigits = true; - } else if (ch == '0' && (chPlus1 == 'b' || chPlus1 == 'B')) { - base = BASE_2; - } else if (ch == '0' && (chPlus1 == 'o' || chPlus1 == 'O')) { - base = BASE_8; - } else if (ch == '0' && (chPlus1 == 'x' || chPlus1 == 'X')) { - base = BASE_16; - } else if (strchr(digitList[BASE_10] + !betweenDigits, ch) != nullptr) { - leadingZero = ch == '0'; - betweenDigits = true; - check(chPlus1, chPlus2); - if (finished && leadingZero) { - // single zero should be base 10 - base = BASE_10; - } - } else { - return false; - } - return true; - } - - bool check(int ch, int chPlus1) { - if (strchr(digitList[base] + !betweenDigits, ch) != nullptr) { - if (leadingZero) { - invalidBase8 = invalidBase8 || strchr(digitList[BASE_8] + !betweenDigits, ch) == nullptr; - } - - betweenDigits = ch != '_'; - decimalChar = false; - exponentChar = false; - } else if (ch == '_') { - invalid = true; - - betweenDigits = false; - decimalChar = false; - // exponentChar is unchanged - } else if (base == BASE_10 && ch == '.' && ( - !(decimalPart || exponentPart) || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) != nullptr) - ) { - invalid = invalid || !betweenDigits || decimalPart || exponentPart; - decimalPart = true; - - betweenDigits = false; - decimalChar = true; - exponentChar = false; - } else if (base == BASE_10 && (ch == 'e' || ch == 'E')) { - invalid = invalid || !(betweenDigits || decimalChar) || exponentPart; - exponentPart = true; - - betweenDigits = false; - decimalChar = false; - exponentChar = true; - } else if (base == BASE_10 && (ch == '-' || ch == '+') && exponentChar) { - invalid = invalid || strchr(digitList[BASE_10] + !betweenDigits, chPlus1) == nullptr; - - betweenDigits = false; - decimalChar = false; - // exponentChar is unchanged - } else if (IsPhpWordChar(ch)) { - invalid = true; - - betweenDigits = false; - decimalChar = false; - exponentChar = false; - } else { - invalid = invalid || !(betweenDigits || decimalChar); - finished = true; - if (base == BASE_10 && leadingZero && !decimalPart && !exponentPart) { - base = BASE_8; - invalid = invalid || invalidBase8; - } - } - return finished; - } -}; - -bool isPHPStringState(int state) { - return - (state == SCE_HPHP_HSTRING) || - (state == SCE_HPHP_SIMPLESTRING) || - (state == SCE_HPHP_HSTRING_VARIABLE) || - (state == SCE_HPHP_COMPLEX_VARIABLE); -} - -Sci_Position FindPhpStringDelimiter(std::string &phpStringDelimiter, Sci_Position i, const Sci_Position lengthDoc, Accessor &styler, bool &isSimpleString) { - Sci_Position j; - const Sci_Position beginning = i - 1; - bool isQuoted = false; - - while (i < lengthDoc && (styler[i] == ' ' || styler[i] == '\t')) - i++; - char ch = styler.SafeGetCharAt(i); - const char chNext = styler.SafeGetCharAt(i + 1); - phpStringDelimiter.clear(); - if (!IsPhpWordStart(ch)) { - if ((ch == '\'' || ch == '\"') && IsPhpWordStart(chNext)) { - isSimpleString = ch == '\''; - isQuoted = true; - i++; - ch = chNext; - } else { - return beginning; - } - } - phpStringDelimiter.push_back(ch); - i++; - for (j = i; j < lengthDoc && !isLineEnd(styler[j]); j++) { - if (!IsPhpWordChar(styler[j]) && isQuoted) { - if (((isSimpleString && styler[j] == '\'') || (!isSimpleString && styler[j] == '\"')) && isLineEnd(styler.SafeGetCharAt(j + 1))) { - isQuoted = false; - j++; - break; - } else { - phpStringDelimiter.clear(); - return beginning; - } - } - phpStringDelimiter.push_back(styler[j]); - } - if (isQuoted) { - phpStringDelimiter.clear(); - return beginning; - } - return j - 1; -} - -// Options used for LexerHTML -struct OptionsHTML { - int aspDefaultLanguage = eScriptJS; - bool caseSensitive = false; - bool allowScripts = true; - bool isMako = false; - bool isDjango = false; - bool fold = false; - bool foldHTML = false; - bool foldHTMLPreprocessor = true; - bool foldCompact = true; - bool foldComment = false; - bool foldHeredoc = false; - bool foldXmlAtTagOpen = false; - OptionsHTML() noexcept { - } -}; - -const char * const jsWordListDesc[] = { - "", - "JavaScript keywords", - "", - "", - "", - "", - 0, -}; - -const char * const phpscriptWordListDesc[] = { - "", //Unused - "", //Unused - "", //Unused - "", //Unused - "PHP keywords", - "", //Unused - 0, -}; - -struct OptionSetHTML : public OptionSet { - OptionSetHTML(bool isPHPScript_) { - - DefineProperty("asp.default.language", &OptionsHTML::aspDefaultLanguage, - "Script in ASP code is initially assumed to be in JavaScript. " - "To change this to VBScript set asp.default.language to 2. Python is 3."); - - DefineProperty("html.tags.case.sensitive", &OptionsHTML::caseSensitive, - "For XML and HTML, setting this property to 1 will make tags match in a case " - "sensitive way which is the expected behaviour for XML and XHTML."); - - DefineProperty("lexer.xml.allow.scripts", &OptionsHTML::allowScripts, - "Set to 0 to disable scripts in XML."); - - DefineProperty("lexer.html.mako", &OptionsHTML::isMako, - "Set to 1 to enable the mako template language."); - - DefineProperty("lexer.html.django", &OptionsHTML::isDjango, - "Set to 1 to enable the django template language."); - - DefineProperty("fold", &OptionsHTML::fold); - - DefineProperty("fold.html", &OptionsHTML::foldHTML, - "Folding is turned on or off for HTML and XML files with this option. " - "The fold option must also be on for folding to occur."); - - DefineProperty("fold.html.preprocessor", &OptionsHTML::foldHTMLPreprocessor, - "Folding is turned on or off for scripts embedded in HTML files with this option. " - "The default is on."); - - DefineProperty("fold.compact", &OptionsHTML::foldCompact); - - DefineProperty("fold.hypertext.comment", &OptionsHTML::foldComment, - "Allow folding for comments in scripts embedded in HTML. " - "The default is off."); - - DefineProperty("fold.hypertext.heredoc", &OptionsHTML::foldHeredoc, - "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 : jsWordListDesc); - } -}; - -LexicalClass lexicalClassesHTML[] = { - // Lexer HTML SCLEX_HTML SCE_H_ SCE_HJ_ SCE_HJA_ SCE_HB_ SCE_HBA_ SCE_HP_ SCE_HPHP_ SCE_HPA_: - 0, "SCE_H_DEFAULT", "default", "Text", - 1, "SCE_H_TAG", "tag", "Tags", - 2, "SCE_H_ERRORTAGUNKNOWN", "error tag", "Unknown Tags", - 3, "SCE_H_ATTRIBUTE", "attribute", "Attributes", - 4, "SCE_H_ATTRIBUTEUNKNOWN", "error attribute", "Unknown Attributes", - 5, "SCE_H_NUMBER", "literal numeric", "Numbers", - 6, "SCE_H_DOUBLESTRING", "literal string", "Double quoted strings", - 7, "SCE_H_SINGLESTRING", "literal string", "Single quoted strings", - 8, "SCE_H_OTHER", "tag operator", "Other inside tag, including space and '='", - 9, "SCE_H_COMMENT", "comment", "Comment", - 10, "SCE_H_ENTITY", "literal", "Entities", - 11, "SCE_H_TAGEND", "tag", "XML style tag ends '/>'", - 12, "SCE_H_XMLSTART", "identifier", "XML identifier start ''", - 14, "SCE_H_SCRIPT", "error", "Internal state which should never be visible", - 15, "SCE_H_ASP", "preprocessor", "ASP <% ... %>", - 16, "SCE_H_ASPAT", "preprocessor", "ASP <% ... %>", - 17, "SCE_H_CDATA", "literal", "CDATA", - 18, "SCE_H_QUESTION", "preprocessor", "PHP", - 19, "SCE_H_VALUE", "literal string", "Unquoted values", - 20, "SCE_H_XCCOMMENT", "comment", "JSP Comment <%-- ... --%>", - 21, "SCE_H_SGML_DEFAULT", "default", "SGML tags ", - 22, "SCE_H_SGML_COMMAND", "preprocessor", "SGML command", - 23, "SCE_H_SGML_1ST_PARAM", "preprocessor", "SGML 1st param", - 24, "SCE_H_SGML_DOUBLESTRING", "literal string", "SGML double string", - 25, "SCE_H_SGML_SIMPLESTRING", "literal string", "SGML single string", - 26, "SCE_H_SGML_ERROR", "error", "SGML error", - 27, "SCE_H_SGML_SPECIAL", "literal", "SGML special (#XXXX type)", - 28, "SCE_H_SGML_ENTITY", "literal", "SGML entity", - 29, "SCE_H_SGML_COMMENT", "comment", "SGML comment", - 30, "SCE_H_SGML_1ST_PARAM_COMMENT", "error comment", "SGML first parameter - lexer internal. It is an error if any text is in this style.", - 31, "SCE_H_SGML_BLOCK_DEFAULT", "default", "SGML block", - 32, "", "predefined", "", - 33, "", "predefined", "", - 34, "", "predefined", "", - 35, "", "predefined", "", - 36, "", "predefined", "", - 37, "", "predefined", "", - 38, "", "predefined", "", - 39, "", "predefined", "", - 40, "SCE_HJ_START", "client javascript default", "JS Start - allows eol filled background to not start on same line as SCRIPT tag", - 41, "SCE_HJ_DEFAULT", "client javascript default", "JS Default", - 42, "SCE_HJ_COMMENT", "client javascript comment", "JS Comment", - 43, "SCE_HJ_COMMENTLINE", "client javascript comment line", "JS Line Comment", - 44, "SCE_HJ_COMMENTDOC", "client javascript comment documentation", "JS Doc comment", - 45, "SCE_HJ_NUMBER", "client javascript literal numeric", "JS Number", - 46, "SCE_HJ_WORD", "client javascript identifier", "JS Word", - 47, "SCE_HJ_KEYWORD", "client javascript keyword", "JS Keyword", - 48, "SCE_HJ_DOUBLESTRING", "client javascript literal string", "JS Double quoted string", - 49, "SCE_HJ_SINGLESTRING", "client javascript literal string", "JS Single quoted string", - 50, "SCE_HJ_SYMBOLS", "client javascript operator", "JS Symbols", - 51, "SCE_HJ_STRINGEOL", "client javascript error literal string", "JavaScript EOL", - 52, "SCE_HJ_REGEX", "client javascript literal regex", "JavaScript RegEx", - 53, "", "unused", "", - 54, "", "unused", "", - 55, "SCE_HJA_START", "server javascript default", "JS Start - allows eol filled background to not start on same line as SCRIPT tag", - 56, "SCE_HJA_DEFAULT", "server javascript default", "JS Default", - 57, "SCE_HJA_COMMENT", "server javascript comment", "JS Comment", - 58, "SCE_HJA_COMMENTLINE", "server javascript comment line", "JS Line Comment", - 59, "SCE_HJA_COMMENTDOC", "server javascript comment documentation", "JS Doc comment", - 60, "SCE_HJA_NUMBER", "server javascript literal numeric", "JS Number", - 61, "SCE_HJA_WORD", "server javascript identifier", "JS Word", - 62, "SCE_HJA_KEYWORD", "server javascript keyword", "JS Keyword", - 63, "SCE_HJA_DOUBLESTRING", "server javascript literal string", "JS Double quoted string", - 64, "SCE_HJA_SINGLESTRING", "server javascript literal string", "JS Single quoted string", - 65, "SCE_HJA_SYMBOLS", "server javascript operator", "JS Symbols", - 66, "SCE_HJA_STRINGEOL", "server javascript error literal string", "JavaScript EOL", - 67, "SCE_HJA_REGEX", "server javascript literal regex", "JavaScript RegEx", - 68, "", "unused", "", - 69, "", "unused", "", - 70, "SCE_HB_START", "client basic default", "Start", - 71, "SCE_HB_DEFAULT", "client basic default", "Default", - 72, "SCE_HB_COMMENTLINE", "client basic comment line", "Comment", - 73, "SCE_HB_NUMBER", "client basic literal numeric", "Number", - 74, "SCE_HB_WORD", "client basic keyword", "KeyWord", - 75, "SCE_HB_STRING", "client basic literal string", "String", - 76, "SCE_HB_IDENTIFIER", "client basic identifier", "Identifier", - 77, "SCE_HB_STRINGEOL", "client basic literal string", "Unterminated string", - 78, "", "unused", "", - 79, "", "unused", "", - 80, "SCE_HBA_START", "server basic default", "Start", - 81, "SCE_HBA_DEFAULT", "server basic default", "Default", - 82, "SCE_HBA_COMMENTLINE", "server basic comment line", "Comment", - 83, "SCE_HBA_NUMBER", "server basic literal numeric", "Number", - 84, "SCE_HBA_WORD", "server basic keyword", "KeyWord", - 85, "SCE_HBA_STRING", "server basic literal string", "String", - 86, "SCE_HBA_IDENTIFIER", "server basic identifier", "Identifier", - 87, "SCE_HBA_STRINGEOL", "server basic literal string", "Unterminated string", - 88, "", "unused", "", - 89, "", "unused", "", - 90, "SCE_HP_START", "client python default", "Embedded Python", - 91, "SCE_HP_DEFAULT", "client python default", "Embedded Python", - 92, "SCE_HP_COMMENTLINE", "client python comment line", "Comment", - 93, "SCE_HP_NUMBER", "client python literal numeric", "Number", - 94, "SCE_HP_STRING", "client python literal string", "String", - 95, "SCE_HP_CHARACTER", "client python literal string character", "Single quoted string", - 96, "SCE_HP_WORD", "client python keyword", "Keyword", - 97, "SCE_HP_TRIPLE", "client python literal string", "Triple quotes", - 98, "SCE_HP_TRIPLEDOUBLE", "client python literal string", "Triple double quotes", - 99, "SCE_HP_CLASSNAME", "client python identifier", "Class name definition", - 100, "SCE_HP_DEFNAME", "client python identifier", "Function or method name definition", - 101, "SCE_HP_OPERATOR", "client python operator", "Operators", - 102, "SCE_HP_IDENTIFIER", "client python identifier", "Identifiers", - 103, "", "unused", "", - 104, "SCE_HPHP_COMPLEX_VARIABLE", "server php identifier", "PHP complex variable", - 105, "SCE_HPA_START", "server python default", "ASP Python", - 106, "SCE_HPA_DEFAULT", "server python default", "ASP Python", - 107, "SCE_HPA_COMMENTLINE", "server python comment line", "Comment", - 108, "SCE_HPA_NUMBER", "server python literal numeric", "Number", - 109, "SCE_HPA_STRING", "server python literal string", "String", - 110, "SCE_HPA_CHARACTER", "server python literal string character", "Single quoted string", - 111, "SCE_HPA_WORD", "server python keyword", "Keyword", - 112, "SCE_HPA_TRIPLE", "server python literal string", "Triple quotes", - 113, "SCE_HPA_TRIPLEDOUBLE", "server python literal string", "Triple double quotes", - 114, "SCE_HPA_CLASSNAME", "server python identifier", "Class name definition", - 115, "SCE_HPA_DEFNAME", "server python identifier", "Function or method name definition", - 116, "SCE_HPA_OPERATOR", "server python operator", "Operators", - 117, "SCE_HPA_IDENTIFIER", "server python identifier", "Identifiers", - 118, "SCE_HPHP_DEFAULT", "server php default", "Default", - 119, "SCE_HPHP_HSTRING", "server php literal string", "Double quoted String", - 120, "SCE_HPHP_SIMPLESTRING", "server php literal string", "Single quoted string", - 121, "SCE_HPHP_WORD", "server php keyword", "Keyword", - 122, "SCE_HPHP_NUMBER", "server php literal numeric", "Number", - 123, "SCE_HPHP_VARIABLE", "server php identifier", "Variable", - 124, "SCE_HPHP_COMMENT", "server php comment", "Comment", - 125, "SCE_HPHP_COMMENTLINE", "server php comment line", "One line comment", - 126, "SCE_HPHP_HSTRING_VARIABLE", "server php literal string identifier", "PHP variable in double quoted string", - 127, "SCE_HPHP_OPERATOR", "server php operator", "PHP operator", -}; - -LexicalClass lexicalClassesXML[] = { - // Lexer.Secondary XML SCLEX_XML SCE_H_: - 0, "SCE_H_DEFAULT", "default", "Default", - 1, "SCE_H_TAG", "tag", "Tags", - 2, "SCE_H_TAGUNKNOWN", "error tag", "Unknown Tags", - 3, "SCE_H_ATTRIBUTE", "attribute", "Attributes", - 4, "SCE_H_ERRORATTRIBUTEUNKNOWN", "error attribute", "Unknown Attributes", - 5, "SCE_H_NUMBER", "literal numeric", "Numbers", - 6, "SCE_H_DOUBLESTRING", "literal string", "Double quoted strings", - 7, "SCE_H_SINGLESTRING", "literal string", "Single quoted strings", - 8, "SCE_H_OTHER", "tag operator", "Other inside tag, including space and '='", - 9, "SCE_H_COMMENT", "comment", "Comment", - 10, "SCE_H_ENTITY", "literal", "Entities", - 11, "SCE_H_TAGEND", "tag", "XML style tag ends '/>'", - 12, "SCE_H_XMLSTART", "identifier", "XML identifier start ''", - 14, "", "unused", "", - 15, "", "unused", "", - 16, "", "unused", "", - 17, "SCE_H_CDATA", "literal", "CDATA", - 18, "SCE_H_QUESTION", "preprocessor", "Question", - 19, "SCE_H_VALUE", "literal string", "Unquoted Value", - 20, "", "unused", "", - 21, "SCE_H_SGML_DEFAULT", "default", "SGML tags ", - 22, "SCE_H_SGML_COMMAND", "preprocessor", "SGML command", - 23, "SCE_H_SGML_1ST_PARAM", "preprocessor", "SGML 1st param", - 24, "SCE_H_SGML_DOUBLESTRING", "literal string", "SGML double string", - 25, "SCE_H_SGML_SIMPLESTRING", "literal string", "SGML single string", - 26, "SCE_H_SGML_ERROR", "error", "SGML error", - 27, "SCE_H_SGML_SPECIAL", "literal", "SGML special (#XXXX type)", - 28, "SCE_H_SGML_ENTITY", "literal", "SGML entity", - 29, "SCE_H_SGML_COMMENT", "comment", "SGML comment", - 30, "", "unused", "", - 31, "SCE_H_SGML_BLOCK_DEFAULT", "default", "SGML block", -}; - -const char *tagsThatDoNotFold[] = { - "area", - "base", - "basefont", - "br", - "col", - "command", - "embed", - "frame", - "hr", - "img", - "input", - "isindex", - "keygen", - "link", - "meta", - "param", - "source", - "track", - "wbr" -}; - -} - -class LexerJS : public DefaultLexer { - bool isXml; - bool isPHPScript; - WordList keywords; - WordList keywords2; - WordList keywords3; - WordList keywords4; - WordList keywords5; - WordList keywords6; // SGML (DTD) keywords - OptionsHTML options; - OptionSetHTML osHTML; - std::set nonFoldingTags; -public: - explicit LexerJS(bool isXml_, bool isPHPScript_) : - DefaultLexer( - isXml_ ? "xml" : (isPHPScript_ ? "phpscript" : "hypertext"), - isXml_ ? SCLEX_XML : (isPHPScript_ ? SCLEX_PHPSCRIPT : SCLEX_JS), - isXml_ ? lexicalClassesXML : lexicalClassesHTML, - isXml_ ? std::size(lexicalClassesXML) : std::size(lexicalClassesHTML)), - isXml(isXml_), - isPHPScript(isPHPScript_), - osHTML(isPHPScript_), - nonFoldingTags(std::begin(tagsThatDoNotFold), std::end(tagsThatDoNotFold)) { - } - ~LexerJS() override { - } - void SCI_METHOD Release() override { - delete this; - } - const char *SCI_METHOD PropertyNames() override { - return osHTML.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return osHTML.PropertyType(name); - } - const char *SCI_METHOD DescribeProperty(const char *name) override { - 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(); - } - 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; - // No Fold as all folding performs in Lex. - - static ILexer5 *LexerFactoryHTML() { - return new LexerJS(false, false); - } - static ILexer5 *LexerFactoryJS() { - return new LexerJS(false, false); - } - static ILexer5 *LexerFactoryXML() { - return new LexerJS(true, false); - } - static ILexer5 *LexerFactoryPHPScript() { - return new LexerJS(false, true); - } -}; - -Sci_Position SCI_METHOD LexerJS::PropertySet(const char *key, const char *val) { - if (osHTML.PropertySet(&options, key, val)) { - return 0; - } - return -1; -} - -Sci_Position SCI_METHOD LexerJS::WordListSet(int n, const char *wl) { - WordList *wordListN = 0; - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &keywords2; - break; - case 2: - wordListN = &keywords3; - break; - case 3: - wordListN = &keywords4; - break; - case 4: - wordListN = &keywords5; - break; - case 5: - wordListN = &keywords6; - 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 LexerJS::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - Accessor styler(pAccess, nullptr); - if (isPHPScript && (startPos == 0)) { - initStyle = SCE_HPHP_DEFAULT; - } - styler.StartAt(startPos); - std::string prevWord; - PhpNumberState phpNumber; - std::string phpStringDelimiter; - int StateToPrint = initStyle; - int state = stateForPrintState(StateToPrint); - std::string makoBlockType; - int makoComment = 0; - std::string djangoBlockType; - styler.StartAt(startPos); - - Sci_Position lineCurrent = styler.GetLine(startPos); - int lineState; - if (lineCurrent > 0) { - lineState = styler.GetLineState(lineCurrent-1); - } else { - // Default client and ASP scripting language is JavaScript - lineState = eScriptJS << 8; - lineState |= options.aspDefaultLanguage << 4; - } - script_mode inScriptType = static_cast((lineState >> 0) & 0x03); // 2 bits of scripting mode - - bool tagOpened = (lineState >> 2) & 0x01; // 1 bit to know if we are in an opened tag - bool tagClosing = (lineState >> 3) & 0x01; // 1 bit to know if we are in a closing tag - bool tagDontFold = false; //some HTML tags should not be folded - script_type aspScript = static_cast((lineState >> 4) & 0x0F); // 4 bits of script name - script_type clientScript = static_cast((lineState >> 8) & 0x0F); // 4 bits of script name - int beforePreProc = (lineState >> 12) & 0xFF; // 8 bits of state - - script_type scriptLanguage = ScriptOfState(state); - // If eNonHtmlScript coincides with SCE_H_COMMENT, assume eScriptComment - if (inScriptType == eNonHtmlScript && state == SCE_H_COMMENT) { - scriptLanguage = eScriptComment; - } - script_type beforeLanguage = ScriptOfState(beforePreProc); - const bool foldHTML = options.foldHTML; - const bool fold = foldHTML && options.fold; - const bool foldHTMLPreprocessor = foldHTML && options.foldHTMLPreprocessor; - 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; - const bool isDjango = options.isDjango; - const CharacterSet setHTMLWord(CharacterSet::setAlphaNum, ".-_:!#", true); - const CharacterSet setTagContinue(CharacterSet::setAlphaNum, ".-_:!#[", true); - const CharacterSet setAttributeContinue(CharacterSet::setAlphaNum, ".-_:!#/", true); - // TODO: also handle + and - (except if they're part of ++ or --) and return keywords - const CharacterSet setOKBeforeJSRE(CharacterSet::setNone, "([{=,:;!%^&*|?~"); - - int levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK; - int levelCurrent = levelPrev; - int visibleChars = 0; - int lineStartVisibleChars = 0; - - int chPrev = ' '; - int ch = ' '; - int chPrevNonWhite = ' '; - // look back to set chPrevNonWhite properly for better regex colouring - if (scriptLanguage == eScriptJS && startPos > 0) { - Sci_Position back = startPos; - int style = 0; - while (--back) { - style = styler.StyleAt(back); - if (style < SCE_HJ_DEFAULT || style > SCE_HJ_COMMENTDOC) - // includes SCE_HJ_COMMENT & SCE_HJ_COMMENTLINE - break; - } - if (style == SCE_HJ_SYMBOLS) { - chPrevNonWhite = static_cast(styler.SafeGetCharAt(back)); - } - } - - styler.StartSegment(startPos); - const Sci_Position lengthDoc = startPos + length; - bool bFirst = true; - int chNext = 0; - int chNext2 = 0; - int chPrev2 = 0; - for (Sci_Position i = startPos; i < lengthDoc; i++) { - if (bFirst) { - StateToPrint = 2; - aspScript=eScriptJS; - beforeLanguage=eScriptNone; - ch = 10; - chNext = 102; - chNext2 = 117; - chPrev = 62; - chPrev2 = 116; - chPrevNonWhite = 62; - clientScript=eScriptJS; - inScriptType= eNonHtmlScript; - initStyle =0; - scriptLanguage = clientScript; - state=SCE_HJ_START; - tagOpened =false; - tagClosing=false; - tagDontFold =false; - StateToPrint = 2; - bFirst = false; - } - chPrev2 = chPrev; - chPrev = ch; - if (!IsASpace(ch) && state != SCE_HJ_COMMENT && - state != SCE_HJ_COMMENTLINE && state != SCE_HJ_COMMENTDOC) - chPrevNonWhite = ch; - ch = static_cast(styler[i]); - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - chNext2 = static_cast(styler.SafeGetCharAt(i + 2)); - printf("---%d:%c %c %c", static_cast(i), ch, chNext, chNext2); - - // Handle DBCS codepages - if (styler.IsLeadByte(static_cast(ch))) { - chPrev = ' '; - i += 1; - continue; - } - - if ((!IsASpace(ch) || !foldCompact) && fold) - visibleChars++; - if (!IsASpace(ch)) - lineStartVisibleChars++; - - // decide what is the current state to print (depending of the script tag) - StateToPrint = statePrintForState(state, inScriptType); - - // handle script folding - if (fold) { - switch (scriptLanguage) { - case eScriptJS: - case eScriptPHP: - //not currently supported case eScriptVBS: - - if ((state != SCE_HPHP_COMMENT) && (state != SCE_HPHP_COMMENTLINE) && (state != SCE_HJ_COMMENT) && (state != SCE_HJ_COMMENTLINE) && (state != SCE_HJ_COMMENTDOC) && (!isStringState(state))) { - //Platform::DebugPrintf("state=%d, StateToPrint=%d, initStyle=%d\n", state, StateToPrint, initStyle); - //if ((state == SCE_HPHP_OPERATOR) || (state == SCE_HPHP_DEFAULT) || (state == SCE_HJ_SYMBOLS) || (state == SCE_HJ_START) || (state == SCE_HJ_DEFAULT)) { - if (ch == '#') { - Sci_Position j = i + 1; - while ((j < lengthDoc) && IsASpaceOrTab(styler.SafeGetCharAt(j))) { - j++; - } - if (styler.Match(j, "region") || styler.Match(j, "if")) { - levelCurrent++; - } else if (styler.Match(j, "end")) { - levelCurrent--; - } - } else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*'))) { - levelCurrent += (((ch == '{') || (ch == '/')) ? 1 : -1); - } - } else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) { - levelCurrent--; - } - break; - case eScriptPython: - if (state != SCE_HP_COMMENTLINE && !isMako) { - if ((ch == ':') && ((chNext == '\n') || (chNext == '\r' && chNext2 == '\n'))) { - levelCurrent++; - } else if ((ch == '\n') && !((chNext == '\r') && (chNext2 == '\n')) && (chNext != '\n')) { - // check if the number of tabs is lower than the level - int Findlevel = (levelCurrent & ~SC_FOLDLEVELBASE) * 8; - for (Sci_Position j = 0; Findlevel > 0; j++) { - const char chTmp = styler.SafeGetCharAt(i + j + 1); - if (chTmp == '\t') { - Findlevel -= 8; - } else if (chTmp == ' ') { - Findlevel--; - } else { - break; - } - } - - if (Findlevel > 0) { - levelCurrent -= Findlevel / 8; - if (Findlevel % 8) - levelCurrent--; - } - } - } - break; - default: - break; - } - } - - if ((ch == '\r' && chNext != '\n') || (ch == '\n')) { - // Trigger on CR only (Mac style) or either on LF from CR+LF (Dos/Win) or on LF alone (Unix) - // Avoid triggering two times on Dos/Win - // New line -> record any line state onto /next/ line - if (fold) { - int lev = levelPrev; - if (visibleChars == 0) - lev |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visibleChars > 0)) - lev |= SC_FOLDLEVELHEADERFLAG; - - styler.SetLevel(lineCurrent, lev); - visibleChars = 0; - levelPrev = levelCurrent; - } - styler.SetLineState(lineCurrent, - ((inScriptType & 0x03) << 0) | - ((tagOpened ? 1 : 0) << 2) | - ((tagClosing ? 1 : 0) << 3) | - ((aspScript & 0x0F) << 4) | - ((clientScript & 0x0F) << 8) | - ((beforePreProc & 0xFF) << 12)); - lineCurrent++; - lineStartVisibleChars = 0; - } - - // handle start of Mako comment line - if (isMako && ch == '#' && chNext == '#') { - makoComment = 1; - state = SCE_HP_COMMENTLINE; - } - - // handle end of Mako comment line - else if (isMako && makoComment && (ch == '\r' || ch == '\n')) { - makoComment = 0; - styler.ColourTo(i - 1, StateToPrint); - if (scriptLanguage == eScriptPython) { - state = SCE_HP_DEFAULT; - } else { - state = SCE_H_DEFAULT; - } - } - // Allow falling through to mako handling code if newline is going to end a block - if (((ch == '\r' && chNext != '\n') || (ch == '\n')) && - (!isMako || (makoBlockType != "%"))) { - } - // Ignore everything in mako comment until the line ends - else if (isMako && makoComment) { - } - - // generic end of script processing - else if ((inScriptType == eNonHtmlScript) && (ch == '<') && (chNext == '/')) { - // Check if it's the end of the script tag (or any other HTML tag) - switch (state) { - // in these cases, you can embed HTML tags (to confirm !!!!!!!!!!!!!!!!!!!!!!) - case SCE_H_DOUBLESTRING: - case SCE_H_SINGLESTRING: - case SCE_HJ_COMMENT: - case SCE_HJ_COMMENTDOC: - //case SCE_HJ_COMMENTLINE: // removed as this is a common thing done to hide - // the end of script marker from some JS interpreters. - case SCE_HB_COMMENTLINE: - case SCE_HBA_COMMENTLINE: - case SCE_HJ_DOUBLESTRING: - case SCE_HJ_SINGLESTRING: - case SCE_HJ_REGEX: - case SCE_HB_STRING: - case SCE_HBA_STRING: - case SCE_HP_STRING: - case SCE_HP_TRIPLE: - case SCE_HP_TRIPLEDOUBLE: - case SCE_HPHP_HSTRING: - case SCE_HPHP_SIMPLESTRING: - case SCE_HPHP_COMMENT: - case SCE_HPHP_COMMENTLINE: - break; - default : - // check if the closing tag is a script tag - if (const char *tag = - state == SCE_HJ_COMMENTLINE || isXml ? "script" : - state == SCE_H_COMMENT ? "comment" : 0) { - Sci_Position j = i + 2; - int chr; - do { - chr = static_cast(*tag++); - } while (chr != 0 && chr == MakeLowerCase(styler.SafeGetCharAt(j++))); - if (chr != 0) break; - } - // closing tag of the script (it's a closing HTML tag anyway) - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_TAGUNKNOWN; - inScriptType = eHtml; - scriptLanguage = eScriptNone; - clientScript = eScriptJS; - i += 2; - visibleChars += 2; - tagClosing = true; - if (foldXmlAtTagOpen) { - levelCurrent--; - } - continue; - } - } - - ///////////////////////////////////// - // handle the start of PHP pre-processor = Non-HTML - else if ((state != SCE_H_ASPAT) && - !isPHPStringState(state) && - (state != SCE_HPHP_COMMENT) && - (state != SCE_HPHP_COMMENTLINE) && - (ch == '<') && - (chNext == '?') && - !IsScriptCommentState(state)) { - beforeLanguage = scriptLanguage; - scriptLanguage = segIsScriptingIndicator(styler, i + 2, i + 6, isXml ? eScriptXML : eScriptPHP); - if ((scriptLanguage != eScriptPHP) && (isStringState(state) || (state==SCE_H_COMMENT))) continue; - styler.ColourTo(i - 1, StateToPrint); - beforePreProc = state; - i++; - visibleChars++; - i += PrintScriptingIndicatorOffset(styler, styler.GetStartSegment() + 2, i + 6); - if (scriptLanguage == eScriptXML) - styler.ColourTo(i, SCE_H_XMLSTART); - else - styler.ColourTo(i, SCE_H_QUESTION); - state = StateForScript(scriptLanguage); - if (inScriptType == eNonHtmlScript) - inScriptType = eNonHtmlScriptPreProc; - else - inScriptType = eNonHtmlPreProc; - // Fold whole script, but not if the XML first tag (all XML-like tags in this case) - if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { - levelCurrent++; - } - // should be better - ch = static_cast(styler.SafeGetCharAt(i)); - continue; - } - - // handle the start Mako template Python code - else if (isMako && scriptLanguage == eScriptNone && ((ch == '<' && chNext == '%') || - (lineStartVisibleChars == 1 && ch == '%') || - (lineStartVisibleChars == 1 && ch == '/' && chNext == '%') || - (ch == '$' && chNext == '{') || - (ch == '<' && chNext == '/' && chNext2 == '%'))) { - if (ch == '%' || ch == '/') - makoBlockType = "%"; - else if (ch == '$') - makoBlockType = "{"; - else if (chNext == '/') - makoBlockType = GetNextWord(styler, i+3); - else - makoBlockType = GetNextWord(styler, i+2); - styler.ColourTo(i - 1, StateToPrint); - beforePreProc = state; - if (inScriptType == eNonHtmlScript) - inScriptType = eNonHtmlScriptPreProc; - else - inScriptType = eNonHtmlPreProc; - - if (chNext == '/') { - i += 2; - visibleChars += 2; - } else if (ch != '%') { - i++; - visibleChars++; - } - state = SCE_HP_START; - scriptLanguage = eScriptPython; - styler.ColourTo(i, SCE_H_ASP); - if (ch != '%' && ch != '$' && ch != '/') { - i += makoBlockType.length(); - visibleChars += static_cast(makoBlockType.length()); - if (keywords4.InList(makoBlockType.c_str())) - styler.ColourTo(i, SCE_HP_WORD); - else - styler.ColourTo(i, SCE_H_TAGUNKNOWN); - } - - ch = static_cast(styler.SafeGetCharAt(i)); - continue; - } - - // handle the start/end of Django comment - else if (isDjango && state != SCE_H_COMMENT && (ch == '{' && chNext == '#')) { - styler.ColourTo(i - 1, StateToPrint); - beforePreProc = state; - beforeLanguage = scriptLanguage; - if (inScriptType == eNonHtmlScript) - inScriptType = eNonHtmlScriptPreProc; - else - inScriptType = eNonHtmlPreProc; - i += 1; - visibleChars += 1; - scriptLanguage = eScriptComment; - state = SCE_H_COMMENT; - styler.ColourTo(i, SCE_H_ASP); - ch = static_cast(styler.SafeGetCharAt(i)); - continue; - } else if (isDjango && state == SCE_H_COMMENT && (ch == '#' && chNext == '}')) { - styler.ColourTo(i - 1, StateToPrint); - i += 1; - visibleChars += 1; - styler.ColourTo(i, SCE_H_ASP); - state = beforePreProc; - if (inScriptType == eNonHtmlScriptPreProc) - inScriptType = eNonHtmlScript; - else - inScriptType = eHtml; - scriptLanguage = beforeLanguage; - continue; - } - - // handle the start Django template code - else if (isDjango && scriptLanguage != eScriptPython && scriptLanguage != eScriptComment && (ch == '{' && (chNext == '%' || chNext == '{'))) { - if (chNext == '%') - djangoBlockType = "%"; - else - djangoBlockType = "{"; - styler.ColourTo(i - 1, StateToPrint); - beforePreProc = state; - if (inScriptType == eNonHtmlScript) - inScriptType = eNonHtmlScriptPreProc; - else - inScriptType = eNonHtmlPreProc; - - i += 1; - visibleChars += 1; - state = SCE_HP_START; - beforeLanguage = scriptLanguage; - scriptLanguage = eScriptPython; - styler.ColourTo(i, SCE_H_ASP); - - ch = static_cast(styler.SafeGetCharAt(i)); - continue; - } - - // handle the start of ASP pre-processor = Non-HTML - else if (!isMako && !isDjango && !isCommentASPState(state) && (ch == '<') && (chNext == '%') && !isPHPStringState(state)) { - styler.ColourTo(i - 1, StateToPrint); - beforePreProc = state; - if (inScriptType == eNonHtmlScript) - inScriptType = eNonHtmlScriptPreProc; - else - inScriptType = eNonHtmlPreProc; - - if (chNext2 == '@') { - i += 2; // place as if it was the second next char treated - visibleChars += 2; - state = SCE_H_ASPAT; - scriptLanguage = eScriptVBS; - } else if ((chNext2 == '-') && (styler.SafeGetCharAt(i + 3) == '-')) { - styler.ColourTo(i + 3, SCE_H_ASP); - state = SCE_H_XCCOMMENT; - scriptLanguage = eScriptVBS; - continue; - } else { - if (chNext2 == '=') { - i += 2; // place as if it was the second next char treated - visibleChars += 2; - } else { - i++; // place as if it was the next char treated - visibleChars++; - } - - state = StateForScript(aspScript); - scriptLanguage = aspScript; - } - styler.ColourTo(i, SCE_H_ASP); - // fold whole script - if (foldHTMLPreprocessor) - levelCurrent++; - // should be better - ch = static_cast(styler.SafeGetCharAt(i)); - continue; - } - - ///////////////////////////////////// - // handle the start of SGML language (DTD) - else if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) && - (chPrev == '<') && - (ch == '!') && - (StateToPrint != SCE_H_CDATA) && - (!isStringState(StateToPrint)) && - (!IsCommentState(StateToPrint)) && - (!IsScriptCommentState(StateToPrint))) { - beforePreProc = state; - styler.ColourTo(i - 2, StateToPrint); - if ((chNext == '-') && (chNext2 == '-')) { - state = SCE_H_COMMENT; // wait for a pending command - styler.ColourTo(i + 2, SCE_H_COMMENT); - i += 2; // follow styling after the -- - } else if (isWordCdata(i + 1, i + 7, styler)) { - state = SCE_H_CDATA; - } else { - styler.ColourTo(i, SCE_H_SGML_DEFAULT); // ') { - i++; - visibleChars++; - } - else if ((makoBlockType == "%") && ch == '/') { - i++; - visibleChars++; - } - if ((makoBlockType != "%") || ch == '/') { - styler.ColourTo(i, SCE_H_ASP); - } - state = beforePreProc; - if (inScriptType == eNonHtmlScriptPreProc) - inScriptType = eNonHtmlScript; - else - inScriptType = eHtml; - scriptLanguage = eScriptNone; - continue; - } - - // handle the end of Django template code - else if (isDjango && - ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && - (scriptLanguage != eScriptNone) && stateAllowsTermination(state) && - isDjangoBlockEnd(ch, chNext, djangoBlockType)) { - if (state == SCE_H_ASPAT) { - aspScript = segIsScriptingIndicator(styler, - styler.GetStartSegment(), i - 1, aspScript); - } - if (state == SCE_HP_WORD) { - classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); - } else { - styler.ColourTo(i - 1, StateToPrint); - } - i += 1; - visibleChars += 1; - styler.ColourTo(i, SCE_H_ASP); - state = beforePreProc; - if (inScriptType == eNonHtmlScriptPreProc) - inScriptType = eNonHtmlScript; - else - inScriptType = eHtml; - scriptLanguage = beforeLanguage; - continue; - } - - // handle the end of a pre-processor = Non-HTML - else if ((!isMako && !isDjango && ((inScriptType == eNonHtmlPreProc) || (inScriptType == eNonHtmlScriptPreProc)) && - (((scriptLanguage != eScriptNone) && stateAllowsTermination(state))) && - (((ch == '%') || (ch == '?')) && (chNext == '>'))) || - ((scriptLanguage == eScriptSGML) && (ch == '>') && (state != SCE_H_SGML_COMMENT))) { - if (state == SCE_H_ASPAT) { - aspScript = segIsScriptingIndicator(styler, - styler.GetStartSegment(), i - 1, aspScript); - } - // Bounce out of any ASP mode - switch (state) { - case SCE_HJ_WORD: - classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); - break; - case SCE_HB_WORD: - classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); - break; - case SCE_HP_WORD: - classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); - break; - case SCE_HPHP_WORD: - classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); - break; - case SCE_H_XCCOMMENT: - styler.ColourTo(i - 1, state); - break; - default : - styler.ColourTo(i - 1, StateToPrint); - break; - } - if (scriptLanguage != eScriptSGML) { - i++; - visibleChars++; - } - if (ch == '%') - styler.ColourTo(i, SCE_H_ASP); - else if (scriptLanguage == eScriptXML) - styler.ColourTo(i, SCE_H_XMLEND); - else if (scriptLanguage == eScriptSGML) - styler.ColourTo(i, SCE_H_SGML_DEFAULT); - else - styler.ColourTo(i, SCE_H_QUESTION); - state = beforePreProc; - if (inScriptType == eNonHtmlScriptPreProc) - inScriptType = eNonHtmlScript; - else - inScriptType = eHtml; - // Unfold all scripting languages, except for XML tag - if (foldHTMLPreprocessor && (scriptLanguage != eScriptXML)) { - levelCurrent--; - } - scriptLanguage = beforeLanguage; - continue; - } - ///////////////////////////////////// - - switch (state) { - case SCE_H_DEFAULT: - if (ch == '<') { - // 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; - } else if (ch == '&') { - styler.ColourTo(i - 1, SCE_H_DEFAULT); - state = SCE_H_ENTITY; - } - break; - case SCE_H_SGML_DEFAULT: - case SCE_H_SGML_BLOCK_DEFAULT: -// if (scriptLanguage == eScriptSGMLblock) -// StateToPrint = SCE_H_SGML_BLOCK_DEFAULT; - - if (ch == '\"') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_SGML_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_SGML_SIMPLESTRING; - } else if ((ch == '-') && (chPrev == '-')) { - if (static_cast(styler.GetStartSegment()) <= (i - 2)) { - styler.ColourTo(i - 2, StateToPrint); - } - state = SCE_H_SGML_COMMENT; - } else if (IsASCII(ch) && isalpha(ch) && (chPrev == '%')) { - styler.ColourTo(i - 2, StateToPrint); - state = SCE_H_SGML_ENTITY; - } else if (ch == '#') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_SGML_SPECIAL; - } else if (ch == '[') { - styler.ColourTo(i - 1, StateToPrint); - scriptLanguage = eScriptSGMLblock; - state = SCE_H_SGML_BLOCK_DEFAULT; - } else if (ch == ']') { - if (scriptLanguage == eScriptSGMLblock) { - styler.ColourTo(i, StateToPrint); - scriptLanguage = eScriptSGML; - } else { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, SCE_H_SGML_ERROR); - } - state = SCE_H_SGML_DEFAULT; - } else if (scriptLanguage == eScriptSGMLblock) { - if ((ch == '!') && (chPrev == '<')) { - styler.ColourTo(i - 2, StateToPrint); - styler.ColourTo(i, SCE_H_SGML_DEFAULT); - state = SCE_H_SGML_COMMAND; - } else if (ch == '>') { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, SCE_H_SGML_DEFAULT); - } - } - break; - case SCE_H_SGML_COMMAND: - if ((ch == '-') && (chPrev == '-')) { - styler.ColourTo(i - 2, StateToPrint); - state = SCE_H_SGML_COMMENT; - } else if (!issgmlwordchar(ch)) { - if (isWordHSGML(styler.GetStartSegment(), i - 1, keywords6, styler)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_SGML_1ST_PARAM; - } else { - state = SCE_H_SGML_ERROR; - } - } - break; - case SCE_H_SGML_1ST_PARAM: - // wait for the beginning of the word - if ((ch == '-') && (chPrev == '-')) { - if (scriptLanguage == eScriptSGMLblock) { - styler.ColourTo(i - 2, SCE_H_SGML_BLOCK_DEFAULT); - } else { - styler.ColourTo(i - 2, SCE_H_SGML_DEFAULT); - } - state = SCE_H_SGML_1ST_PARAM_COMMENT; - } else if (issgmlwordchar(ch)) { - if (scriptLanguage == eScriptSGMLblock) { - styler.ColourTo(i - 1, SCE_H_SGML_BLOCK_DEFAULT); - } else { - styler.ColourTo(i - 1, SCE_H_SGML_DEFAULT); - } - // find the length of the word - int size = 1; - while (setHTMLWord.Contains(static_cast(styler.SafeGetCharAt(i + size)))) - size++; - styler.ColourTo(i + size - 1, StateToPrint); - i += size - 1; - visibleChars += size - 1; - ch = static_cast(styler.SafeGetCharAt(i)); - if (scriptLanguage == eScriptSGMLblock) { - state = SCE_H_SGML_BLOCK_DEFAULT; - } else { - state = SCE_H_SGML_DEFAULT; - } - continue; - } - break; - case SCE_H_SGML_ERROR: - if ((ch == '-') && (chPrev == '-')) { - styler.ColourTo(i - 2, StateToPrint); - state = SCE_H_SGML_COMMENT; - } - break; - case SCE_H_SGML_DOUBLESTRING: - if (ch == '\"') { - styler.ColourTo(i, StateToPrint); - state = SCE_H_SGML_DEFAULT; - } - break; - case SCE_H_SGML_SIMPLESTRING: - if (ch == '\'') { - styler.ColourTo(i, StateToPrint); - state = SCE_H_SGML_DEFAULT; - } - break; - case SCE_H_SGML_COMMENT: - if ((ch == '-') && (chPrev == '-')) { - styler.ColourTo(i, StateToPrint); - state = SCE_H_SGML_DEFAULT; - } - break; - case SCE_H_CDATA: - if ((chPrev2 == ']') && (chPrev == ']') && (ch == '>')) { - styler.ColourTo(i, StateToPrint); - state = SCE_H_DEFAULT; - levelCurrent--; - } - break; - case SCE_H_COMMENT: - if ((scriptLanguage != eScriptComment) && (chPrev2 == '-') && (chPrev == '-') && (ch == '>')) { - styler.ColourTo(i, StateToPrint); - state = SCE_H_DEFAULT; - levelCurrent--; - } - break; - case SCE_H_SGML_1ST_PARAM_COMMENT: - if ((ch == '-') && (chPrev == '-')) { - styler.ColourTo(i, SCE_H_SGML_COMMENT); - state = SCE_H_SGML_1ST_PARAM; - } - break; - case SCE_H_SGML_SPECIAL: - if (!(IsASCII(ch) && isupper(ch))) { - styler.ColourTo(i - 1, StateToPrint); - if (isalnum(ch)) { - state = SCE_H_SGML_ERROR; - } else { - state = SCE_H_SGML_DEFAULT; - } - } - break; - case SCE_H_SGML_ENTITY: - if (ch == ';') { - styler.ColourTo(i, StateToPrint); - state = SCE_H_SGML_DEFAULT; - } else if (!(IsASCII(ch) && isalnum(ch)) && ch != '-' && ch != '.') { - styler.ColourTo(i, SCE_H_SGML_ERROR); - state = SCE_H_SGML_DEFAULT; - } - break; - case SCE_H_ENTITY: - if (ch == ';') { - styler.ColourTo(i, StateToPrint); - state = SCE_H_DEFAULT; - } - if (ch != '#' && !(IsASCII(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... - && ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML - if (!IsASCII(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style - styler.ColourTo(i-1, SCE_H_TAGUNKNOWN); - else - styler.ColourTo(i, SCE_H_TAGUNKNOWN); - state = SCE_H_DEFAULT; - } - break; - case SCE_H_TAGUNKNOWN: - if (!setTagContinue.Contains(ch) && !((ch == '/') && (chPrev == '<'))) { - int eClass = classifyTagHTML(styler.GetStartSegment(), - i - 1, keywords, styler, tagDontFold, caseSensitive, isXml, allowScripts, nonFoldingTags); - if (eClass == SCE_H_SCRIPT || eClass == SCE_H_COMMENT) { - if (!tagClosing) { - inScriptType = eNonHtmlScript; - scriptLanguage = eClass == SCE_H_SCRIPT ? clientScript : eScriptComment; - } else { - scriptLanguage = eScriptNone; - } - eClass = SCE_H_TAG; - } - if (ch == '>') { - styler.ColourTo(i, eClass); - if (inScriptType == eNonHtmlScript) { - state = StateForScript(scriptLanguage); - } else { - state = SCE_H_DEFAULT; - } - tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { - if (tagClosing) { - levelCurrent--; - } else { - levelCurrent++; - } - } - tagClosing = false; - } else if (ch == '/' && chNext == '>') { - if (eClass == SCE_H_TAGUNKNOWN) { - styler.ColourTo(i + 1, SCE_H_TAGUNKNOWN); - } else { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i + 1, SCE_H_TAGEND); - } - i++; - ch = chNext; - state = SCE_H_DEFAULT; - tagOpened = false; - if (foldXmlAtTagOpen) { - levelCurrent--; - } - } else { - if (eClass != SCE_H_TAGUNKNOWN) { - if (eClass == SCE_H_SGML_DEFAULT) { - state = SCE_H_SGML_DEFAULT; - } else { - state = SCE_H_OTHER; - } - } - } - } - break; - case SCE_H_ATTRIBUTE: - if (!setAttributeContinue.Contains(ch)) { - if (inScriptType == eNonHtmlScript) { - const int scriptLanguagePrev = scriptLanguage; - clientScript = segIsScriptingIndicator(styler, styler.GetStartSegment(), i - 1, scriptLanguage); - scriptLanguage = clientScript; - if ((scriptLanguagePrev != scriptLanguage) && (scriptLanguage == eScriptNone)) - inScriptType = eHtml; - } - classifyAttribHTML(styler.GetStartSegment(), i - 1, keywords, styler); - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (inScriptType == eNonHtmlScript) { - state = StateForScript(scriptLanguage); - } else { - state = SCE_H_DEFAULT; - } - tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { - if (tagClosing) { - levelCurrent--; - } else { - levelCurrent++; - } - } - tagClosing = false; - } else if (ch == '=') { - styler.ColourTo(i, SCE_H_OTHER); - state = SCE_H_VALUE; - } else { - state = SCE_H_OTHER; - } - } - break; - case SCE_H_OTHER: - if (ch == '>') { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, SCE_H_TAG); - if (inScriptType == eNonHtmlScript) { - state = StateForScript(scriptLanguage); - } else { - state = SCE_H_DEFAULT; - } - tagOpened = false; - if (!(foldXmlAtTagOpen || tagDontFold)) { - if (tagClosing) { - levelCurrent--; - } else { - levelCurrent++; - } - } - tagClosing = false; - } else if (ch == '\"') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_SINGLESTRING; - } else if (ch == '=') { - styler.ColourTo(i, StateToPrint); - state = SCE_H_VALUE; - } else if (ch == '/' && chNext == '>') { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i + 1, SCE_H_TAGEND); - i++; - 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); - i++; - ch = chNext; - state = SCE_H_DEFAULT; - } else if (setHTMLWord.Contains(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_H_ATTRIBUTE; - } - break; - case SCE_H_DOUBLESTRING: - if (ch == '\"') { - if (inScriptType == eNonHtmlScript) { - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - } - styler.ColourTo(i, SCE_H_DOUBLESTRING); - state = SCE_H_OTHER; - } - break; - case SCE_H_SINGLESTRING: - if (ch == '\'') { - if (inScriptType == eNonHtmlScript) { - scriptLanguage = segIsScriptingIndicator(styler, styler.GetStartSegment(), i, scriptLanguage); - } - styler.ColourTo(i, SCE_H_SINGLESTRING); - state = SCE_H_OTHER; - } - break; - case SCE_H_VALUE: - if (!setHTMLWord.Contains(ch)) { - if (ch == '\"' && chPrev == '=') { - // Should really test for being first character - state = SCE_H_DOUBLESTRING; - } else if (ch == '\'' && chPrev == '=') { - state = SCE_H_SINGLESTRING; - } else { - if (IsNumber(styler.GetStartSegment(), styler)) { - styler.ColourTo(i - 1, SCE_H_NUMBER); - } else { - styler.ColourTo(i - 1, StateToPrint); - } - if (ch == '>') { - styler.ColourTo(i, SCE_H_TAG); - if (inScriptType == eNonHtmlScript) { - state = StateForScript(scriptLanguage); - } else { - state = SCE_H_DEFAULT; - } - tagOpened = false; - if (!tagDontFold) { - if (tagClosing) { - levelCurrent--; - } else { - levelCurrent++; - } - } - tagClosing = false; - } else { - state = SCE_H_OTHER; - } - } - } - break; - case SCE_HJ_DEFAULT: - case SCE_HJ_START: - case SCE_HJ_SYMBOLS: - if (IsAWordStart(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_WORD; - } else if (ch == '/' && chNext == '*') { - styler.ColourTo(i - 1, StateToPrint); - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - if (chNext2 == '/') { - // Eat the * so it isn't used for the end of the comment - i++; - } - } else if (ch == '/' && chNext == '/') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_COMMENTLINE; - } else if (ch == '/' && setOKBeforeJSRE.Contains(chPrevNonWhite)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_REGEX; - } else if (ch == '\"') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_SINGLESTRING; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_COMMENTLINE; - } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_COMMENTLINE; - i += 2; - } else if (IsOperator(ch)) { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); - state = SCE_HJ_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HJ_START) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_DEFAULT; - } - } - break; - case SCE_HJ_WORD: - if (!IsAWordChar(ch)) { - classifyWordHTJS(styler.GetStartSegment(), i - 1, keywords2, styler, inScriptType); - //styler.ColourTo(i - 1, eHTJSKeyword); - state = SCE_HJ_DEFAULT; - if (ch == '/' && chNext == '*') { - if (chNext2 == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HJ_DOUBLESTRING; - } else if (ch == '\'') { - state = SCE_HJ_SINGLESTRING; - } else if ((ch == '-') && (chNext == '-') && (chNext2 == '>')) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_COMMENTLINE; - i += 2; - } else if (IsOperator(ch)) { - styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); - state = SCE_HJ_DEFAULT; - } - } - break; - case SCE_HJ_COMMENT: - case SCE_HJ_COMMENTDOC: - if (ch == '/' && chPrev == '*') { - styler.ColourTo(i, StateToPrint); - state = SCE_HJ_DEFAULT; - ch = ' '; - } - break; - case SCE_HJ_COMMENTLINE: - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, statePrintForState(SCE_HJ_COMMENTLINE, inScriptType)); - state = SCE_HJ_DEFAULT; - ch = ' '; - } - break; - case SCE_HJ_DOUBLESTRING: - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\"') { - styler.ColourTo(i, statePrintForState(SCE_HJ_DOUBLESTRING, inScriptType)); - state = SCE_HJ_DEFAULT; - } else if (isLineEnd(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_STRINGEOL; - } - break; - case SCE_HJ_SINGLESTRING: - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - } - } else if (ch == '\'') { - styler.ColourTo(i, statePrintForState(SCE_HJ_SINGLESTRING, inScriptType)); - state = SCE_HJ_DEFAULT; - } else if (isLineEnd(ch)) { - styler.ColourTo(i - 1, StateToPrint); - if (chPrev != '\\' && (chPrev2 != '\\' || chPrev != '\r' || ch != '\n')) { - state = SCE_HJ_STRINGEOL; - } - } - break; - case SCE_HJ_STRINGEOL: - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HJ_DEFAULT; - } else if (!isLineEnd(chNext)) { - styler.ColourTo(i, StateToPrint); - state = SCE_HJ_DEFAULT; - } - break; - case SCE_HJ_REGEX: - if (ch == '\r' || ch == '\n' || ch == '/') { - if (ch == '/') { - while (IsASCII(chNext) && islower(chNext)) { // gobble regex flags - i++; - ch = chNext; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } - } - styler.ColourTo(i, StateToPrint); - state = SCE_HJ_DEFAULT; - } else if (ch == '\\') { - // Gobble up the quoted character - if (chNext == '\\' || chNext == '/') { - i++; - ch = chNext; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } - } - break; - case SCE_HB_DEFAULT: - case SCE_HB_START: - if (IsAWordStart(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_WORD; - } else if (ch == '\'') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_STRING; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_COMMENTLINE; - } else if (IsOperator(ch)) { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); - state = SCE_HB_DEFAULT; - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HB_START) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_DEFAULT; - } - } - break; - case SCE_HB_WORD: - if (!IsAWordChar(ch)) { - state = classifyWordHTVB(styler.GetStartSegment(), i - 1, keywords3, styler, inScriptType); - if (state == SCE_HB_DEFAULT) { - if (ch == '\"') { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (IsOperator(ch)) { - styler.ColourTo(i, statePrintForState(SCE_HB_DEFAULT, inScriptType)); - state = SCE_HB_DEFAULT; - } - } - } - break; - case SCE_HB_STRING: - if (ch == '\"') { - styler.ColourTo(i, StateToPrint); - state = SCE_HB_DEFAULT; - } else if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_STRINGEOL; - } - break; - case SCE_HB_COMMENTLINE: - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_DEFAULT; - } - break; - case SCE_HB_STRINGEOL: - if (!isLineEnd(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HB_DEFAULT; - } else if (!isLineEnd(chNext)) { - styler.ColourTo(i, StateToPrint); - state = SCE_HB_DEFAULT; - } - break; - case SCE_HP_DEFAULT: - case SCE_HP_START: - if (IsAWordStart(ch)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HP_WORD; - } else if ((ch == '<') && (chNext == '!') && (chNext2 == '-') && - styler.SafeGetCharAt(i + 3) == '-') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HP_COMMENTLINE; - } else if (ch == '#') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - styler.ColourTo(i - 1, StateToPrint); - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } else { - // state = statePrintForState(SCE_HP_STRING,inScriptType); - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - styler.ColourTo(i - 1, StateToPrint); - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } else { - state = SCE_HP_CHARACTER; - } - } else if (IsOperator(ch)) { - styler.ColourTo(i - 1, StateToPrint); - styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); - } else if ((ch == ' ') || (ch == '\t')) { - if (state == SCE_HP_START) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HP_DEFAULT; - } - } - break; - case SCE_HP_WORD: - if (!IsAWordChar(ch)) { - classifyWordHTPy(styler.GetStartSegment(), i - 1, keywords4, styler, prevWord, inScriptType, isMako); - state = SCE_HP_DEFAULT; - if (ch == '#') { - state = SCE_HP_COMMENTLINE; - } else if (ch == '\"') { - if (chNext == '\"' && chNext2 == '\"') { - i += 2; - state = SCE_HP_TRIPLEDOUBLE; - ch = ' '; - chPrev = ' '; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } else { - state = SCE_HP_STRING; - } - } else if (ch == '\'') { - if (chNext == '\'' && chNext2 == '\'') { - i += 2; - state = SCE_HP_TRIPLE; - ch = ' '; - chPrev = ' '; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } else { - state = SCE_HP_CHARACTER; - } - } else if (IsOperator(ch)) { - styler.ColourTo(i, statePrintForState(SCE_HP_OPERATOR, inScriptType)); - } - } - break; - case SCE_HP_COMMENTLINE: - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HP_DEFAULT; - } - break; - case SCE_HP_STRING: - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } - } else if (ch == '\"') { - styler.ColourTo(i, StateToPrint); - state = SCE_HP_DEFAULT; - } - break; - case SCE_HP_CHARACTER: - if (ch == '\\') { - if (chNext == '\"' || chNext == '\'' || chNext == '\\') { - i++; - ch = chNext; - chNext = static_cast(styler.SafeGetCharAt(i + 1)); - } - } else if (ch == '\'') { - styler.ColourTo(i, StateToPrint); - state = SCE_HP_DEFAULT; - } - break; - case SCE_HP_TRIPLE: - if (ch == '\'' && chPrev == '\'' && chPrev2 == '\'') { - styler.ColourTo(i, StateToPrint); - state = SCE_HP_DEFAULT; - } - break; - case SCE_HP_TRIPLEDOUBLE: - if (ch == '\"' && chPrev == '\"' && chPrev2 == '\"') { - styler.ColourTo(i, StateToPrint); - state = SCE_HP_DEFAULT; - } - break; - ///////////// start - PHP state handling - case SCE_HPHP_WORD: - if (!IsPhpWordChar(ch)) { - classifyWordHTPHP(styler.GetStartSegment(), i - 1, keywords5, styler); - if (ch == '/' && chNext == '*') { - i++; - state = SCE_HPHP_COMMENT; - } else if (ch == '/' && chNext == '/') { - i++; - state = SCE_HPHP_COMMENTLINE; - } else if (ch == '#' && chNext != '[') { - state = SCE_HPHP_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HPHP_HSTRING; - phpStringDelimiter = "\""; - } else if (styler.Match(i, "<<<")) { - bool isSimpleString = false; - i = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString); - if (!phpStringDelimiter.empty()) { - state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); - if (foldHeredoc) levelCurrent++; - } - } else if (ch == '\'') { - state = SCE_HPHP_SIMPLESTRING; - phpStringDelimiter = "\'"; - } else if (ch == '$' && IsPhpWordStart(chNext)) { - state = SCE_HPHP_VARIABLE; - } else if (IsOperator(ch)) { - state = SCE_HPHP_OPERATOR; - } else { - state = SCE_HPHP_DEFAULT; - } - } - break; - case SCE_HPHP_NUMBER: - if (phpNumber.check(chNext, chNext2)) { - styler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER); - state = SCE_HPHP_DEFAULT; - } - break; - case SCE_HPHP_VARIABLE: - if (!IsPhpWordChar(chNext)) { - styler.ColourTo(i, SCE_HPHP_VARIABLE); - state = SCE_HPHP_DEFAULT; - } - break; - case SCE_HPHP_COMMENT: - if (ch == '/' && chPrev == '*') { - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_DEFAULT; - } - break; - case SCE_HPHP_COMMENTLINE: - if (ch == '\r' || ch == '\n') { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HPHP_DEFAULT; - } - break; - case SCE_HPHP_HSTRING: - if (ch == '\\' && ((phpStringDelimiter == "\"") || chNext == '$' || chNext == '{')) { - // skip the next char - i++; - } else if (((ch == '{' && chNext == '$') || (ch == '$' && chNext == '{')) - && IsPhpWordStart(chNext2)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HPHP_COMPLEX_VARIABLE; - } else if (ch == '$' && IsPhpWordStart(chNext)) { - styler.ColourTo(i - 1, StateToPrint); - state = SCE_HPHP_HSTRING_VARIABLE; - } else if (styler.Match(i, phpStringDelimiter.c_str())) { - if (phpStringDelimiter == "\"") { - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_DEFAULT; - } else if (lineStartVisibleChars == 1) { - const int psdLength = static_cast(phpStringDelimiter.length()); - if (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) { - i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_DEFAULT; - if (foldHeredoc) levelCurrent--; - } - } - } - break; - case SCE_HPHP_SIMPLESTRING: - if (phpStringDelimiter == "\'") { - if (ch == '\\') { - // skip the next char - i++; - } else if (ch == '\'') { - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_DEFAULT; - } - } else if (lineStartVisibleChars == 1 && styler.Match(i, phpStringDelimiter.c_str())) { - const int psdLength = static_cast(phpStringDelimiter.length()); - if (!IsPhpWordChar(styler.SafeGetCharAt(i + psdLength))) { - i += (((i + psdLength) < lengthDoc) ? psdLength : lengthDoc) - 1; - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_DEFAULT; - if (foldHeredoc) levelCurrent--; - } - } - break; - case SCE_HPHP_HSTRING_VARIABLE: - if (!IsPhpWordChar(chNext)) { - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_HSTRING; - } - break; - case SCE_HPHP_COMPLEX_VARIABLE: - if (ch == '}') { - styler.ColourTo(i, StateToPrint); - state = SCE_HPHP_HSTRING; - } - break; - case SCE_HPHP_OPERATOR: - case SCE_HPHP_DEFAULT: - styler.ColourTo(i - 1, StateToPrint); - if (phpNumber.init(ch, chNext, chNext2)) { - if (phpNumber.isFinished()) { - styler.ColourTo(i, phpNumber.isInvalid() ? SCE_HPHP_DEFAULT : SCE_HPHP_NUMBER); - state = SCE_HPHP_DEFAULT; - } else { - state = SCE_HPHP_NUMBER; - } - } else if (IsAWordStart(ch)) { - state = SCE_HPHP_WORD; - } else if (ch == '/' && chNext == '*') { - i++; - state = SCE_HPHP_COMMENT; - } else if (ch == '/' && chNext == '/') { - i++; - state = SCE_HPHP_COMMENTLINE; - } else if (ch == '#' && chNext != '[') { - state = SCE_HPHP_COMMENTLINE; - } else if (ch == '\"') { - state = SCE_HPHP_HSTRING; - phpStringDelimiter = "\""; - } else if (styler.Match(i, "<<<")) { - bool isSimpleString = false; - i = FindPhpStringDelimiter(phpStringDelimiter, i + 3, lengthDoc, styler, isSimpleString); - if (!phpStringDelimiter.empty()) { - state = (isSimpleString ? SCE_HPHP_SIMPLESTRING : SCE_HPHP_HSTRING); - if (foldHeredoc) levelCurrent++; - } - } else if (ch == '\'') { - state = SCE_HPHP_SIMPLESTRING; - phpStringDelimiter = "\'"; - } else if (ch == '$' && IsPhpWordStart(chNext)) { - state = SCE_HPHP_VARIABLE; - } else if (IsOperator(ch)) { - state = SCE_HPHP_OPERATOR; - } else if ((state == SCE_HPHP_OPERATOR) && (IsASpace(ch))) { - state = SCE_HPHP_DEFAULT; - } - break; - ///////////// end - PHP state handling - } - - // Some of the above terminated their lexeme but since the same character starts - // the same class again, only reenter if non empty segment. - - const bool nonEmptySegment = i >= static_cast(styler.GetStartSegment()); - if (state == SCE_HB_DEFAULT) { // One of the above succeeded - if ((ch == '\"') && (nonEmptySegment)) { - state = SCE_HB_STRING; - } else if (ch == '\'') { - state = SCE_HB_COMMENTLINE; - } else if (IsAWordStart(ch)) { - state = SCE_HB_WORD; - } else if (IsOperator(ch)) { - styler.ColourTo(i, SCE_HB_DEFAULT); - } - } else if (state == SCE_HBA_DEFAULT) { // One of the above succeeded - if ((ch == '\"') && (nonEmptySegment)) { - state = SCE_HBA_STRING; - } else if (ch == '\'') { - state = SCE_HBA_COMMENTLINE; - } else if (IsAWordStart(ch)) { - state = SCE_HBA_WORD; - } else if (IsOperator(ch)) { - styler.ColourTo(i, SCE_HBA_DEFAULT); - } - } else if (state == SCE_HJ_DEFAULT) { // One of the above succeeded - if (ch == '/' && chNext == '*') { - if (styler.SafeGetCharAt(i + 2) == '*') - state = SCE_HJ_COMMENTDOC; - else - state = SCE_HJ_COMMENT; - } else if (ch == '/' && chNext == '/') { - state = SCE_HJ_COMMENTLINE; - } else if ((ch == '\"') && (nonEmptySegment)) { - state = SCE_HJ_DOUBLESTRING; - } else if ((ch == '\'') && (nonEmptySegment)) { - state = SCE_HJ_SINGLESTRING; - } else if (IsAWordStart(ch)) { - state = SCE_HJ_WORD; - } else if (IsOperator(ch)) { - styler.ColourTo(i, statePrintForState(SCE_HJ_SYMBOLS, inScriptType)); - } - } - } - - switch (state) { - case SCE_HJ_WORD: - classifyWordHTJS(styler.GetStartSegment(), lengthDoc - 1, keywords2, styler, inScriptType); - break; - case SCE_HB_WORD: - classifyWordHTVB(styler.GetStartSegment(), lengthDoc - 1, keywords3, styler, inScriptType); - break; - case SCE_HP_WORD: - classifyWordHTPy(styler.GetStartSegment(), lengthDoc - 1, keywords4, styler, prevWord, inScriptType, isMako); - break; - case SCE_HPHP_WORD: - classifyWordHTPHP(styler.GetStartSegment(), lengthDoc - 1, keywords5, styler); - break; - default: - StateToPrint = statePrintForState(state, inScriptType); - if (static_cast(styler.GetStartSegment()) < lengthDoc) - styler.ColourTo(lengthDoc - 1, StateToPrint); - break; - } - - // Fill in the real level of the next line, keeping the current flags as they will be filled in later - if (fold) { - const int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; - styler.SetLevel(lineCurrent, levelPrev | flagsNext); - } - styler.Flush(); -} - -LexerModule lmJS(SCLEX_JS, LexerJS::LexerFactoryJS, "js", jsWordListDesc); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJulia.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJulia.cxx deleted file mode 100644 index 7bbbe51ef..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexJulia.cxx +++ /dev/null @@ -1,1263 +0,0 @@ -// Scintilla source code edit control -// Encoding: UTF-8 -/** @file LexJulia.cxx - ** Lexer for Julia. - ** Reusing code from LexMatlab, LexPython and LexRust - ** - ** Written by Bertrand Lacoste - ** - **/ -// Copyright 1998-2001 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "StringCopy.h" -#include "PropSetSimple.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "CharacterCategory.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -static const int MAX_JULIA_IDENT_CHARS = 1023; - -// Options used for LexerJulia -struct OptionsJulia { - bool fold; - bool foldComment; - bool foldCompact; - bool foldDocstring; - bool foldSyntaxBased; - bool highlightTypeannotation; - bool highlightLexerror; - OptionsJulia() { - fold = true; - foldComment = true; - foldCompact = false; - foldDocstring = true; - foldSyntaxBased = true; - highlightTypeannotation = false; - highlightLexerror = false; - } -}; - -const char * const juliaWordLists[] = { - "Primary keywords and identifiers", - "Built in types", - "Other keywords", - "Built in functions", - 0, -}; - -struct OptionSetJulia : public OptionSet { - OptionSetJulia() { - DefineProperty("fold", &OptionsJulia::fold); - - DefineProperty("fold.compact", &OptionsJulia::foldCompact); - - DefineProperty("fold.comment", &OptionsJulia::foldComment); - - DefineProperty("fold.julia.docstring", &OptionsJulia::foldDocstring, - "Fold multiline triple-doublequote strings, usually used to document a function or type above the definition."); - - DefineProperty("fold.julia.syntax.based", &OptionsJulia::foldSyntaxBased, - "Set this property to 0 to disable syntax based folding."); - - DefineProperty("lexer.julia.highlight.typeannotation", &OptionsJulia::highlightTypeannotation, - "This option enables highlighting of the type identifier after `::`."); - - DefineProperty("lexer.julia.highlight.lexerror", &OptionsJulia::highlightLexerror, - "This option enables highlighting of syntax error int character or number definition."); - - DefineWordListSets(juliaWordLists); - } -}; - -LexicalClass juliaLexicalClasses[] = { - // Lexer Julia SCLEX_JULIA SCE_JULIA_: - 0, "SCE_JULIA_DEFAULT", "default", "White space", - 1, "SCE_JULIA_COMMENT", "comment", "Comment", - 2, "SCE_JULIA_NUMBER", "literal numeric", "Number", - 3, "SCE_JULIA_KEYWORD1", "keyword", "Reserved keywords", - 4, "SCE_JULIA_KEYWORD2", "identifier", "Builtin type names", - 5, "SCE_JULIA_KEYWORD3", "identifier", "Constants", - 6, "SCE_JULIA_CHAR", "literal string character", "Single quoted string", - 7, "SCE_JULIA_OPERATOR", "operator", "Operator", - 8, "SCE_JULIA_BRACKET", "bracket operator", "Bracket operator", - 9, "SCE_JULIA_IDENTIFIER", "identifier", "Identifier", - 10, "SCE_JULIA_STRING", "literal string", "Double quoted String", - 11, "SCE_JULIA_SYMBOL", "literal string symbol", "Symbol", - 12, "SCE_JULIA_MACRO", "macro preprocessor", "Macro", - 13, "SCE_JULIA_STRINGINTERP", "literal string interpolated", "String interpolation", - 14, "SCE_JULIA_DOCSTRING", "literal string documentation", "Docstring", - 15, "SCE_JULIA_STRINGLITERAL", "literal string", "String literal prefix", - 16, "SCE_JULIA_COMMAND", "literal string command", "Command", - 17, "SCE_JULIA_COMMANDLITERAL", "literal string command", "Command literal prefix", - 18, "SCE_JULIA_TYPEANNOT", "identifier type", "Type annotation identifier", - 19, "SCE_JULIA_LEXERROR", "lexer error", "Lexing error", - 20, "SCE_JULIA_KEYWORD4", "identifier", "Builtin function names", - 21, "SCE_JULIA_TYPEOPERATOR", "operator type", "Type annotation operator", -}; - -class LexerJulia : public DefaultLexer { - WordList keywords; - WordList identifiers2; - WordList identifiers3; - WordList identifiers4; - OptionsJulia options; - OptionSetJulia osJulia; -public: - explicit LexerJulia() : - DefaultLexer("julia", SCLEX_JULIA, juliaLexicalClasses, ELEMENTS(juliaLexicalClasses)) { - } - virtual ~LexerJulia() { - } - void SCI_METHOD Release() override { - delete this; - } - int SCI_METHOD Version() const override { - return lvRelease5; - } - const char * SCI_METHOD PropertyNames() override { - return osJulia.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return osJulia.PropertyType(name); - } - const char * SCI_METHOD DescribeProperty(const char *name) override { - return osJulia.DescribeProperty(name); - } - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; - const char * SCI_METHOD PropertyGet(const char *key) override { - return osJulia.PropertyGet(key); - } - const char * SCI_METHOD DescribeWordListSets() override { - return osJulia.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 *LexerFactoryJulia() { - return new LexerJulia(); - } -}; - -Sci_Position SCI_METHOD LexerJulia::PropertySet(const char *key, const char *val) { - if (osJulia.PropertySet(&options, key, val)) { - return 0; - } - return -1; -} - -Sci_Position SCI_METHOD LexerJulia::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &identifiers2; - break; - case 2: - wordListN = &identifiers3; - break; - case 3: - wordListN = &identifiers4; - break; - } - Sci_Position firstModification = -1; - if (wordListN) { - WordList wlNew; - wlNew.Set(wl); - if (*wordListN != wlNew) { - wordListN->Set(wl); - firstModification = 0; - } - } - return firstModification; -} - -static inline bool IsJuliaOperator(int ch) { - if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || - ch == '-' || ch == '+' || ch == '=' || ch == '|' || - ch == '<' || ch == '>' || ch == '/' || ch == '~' || - ch == '\\' ) { - return true; - } - return false; -} - -// The list contains non-ascii unary operators -static inline bool IsJuliaUnaryOperator (int ch) { - if (ch == 0x00ac || ch == 0x221a || ch == 0x221b || - ch == 0x221c || ch == 0x22c6 || ch == 0x00b1 || - ch == 0x2213 ) { - return true; - } - return false; -} - -static inline bool IsJuliaParen (int ch) { - if (ch == '(' || ch == ')' || ch == '{' || ch == '}' || - ch == '[' || ch == ']' ) { - return true; - } - return false; -} - -// Unicode parsing from Julia source code: -// https://github.com/JuliaLang/julia/blob/master/src/flisp/julia_extensions.c -// keep the same function name to be easy to find again -static int is_wc_cat_id_start(uint32_t wc) { - const CharacterCategory cat = CategoriseCharacter((int) wc); - - return (cat == ccLu || cat == ccLl || - cat == ccLt || cat == ccLm || - cat == ccLo || cat == ccNl || - cat == ccSc || // allow currency symbols - // other symbols, but not arrows or replacement characters - (cat == ccSo && !(wc >= 0x2190 && wc <= 0x21FF) && - wc != 0xfffc && wc != 0xfffd && - wc != 0x233f && // notslash - wc != 0x00a6) || // broken bar - - // math symbol (category Sm) whitelist - (wc >= 0x2140 && wc <= 0x2a1c && - ((wc >= 0x2140 && wc <= 0x2144) || // ⅀, ⅁, ⅂, ⅃, ⅄ - wc == 0x223f || wc == 0x22be || wc == 0x22bf || // ∿, ⊾, ⊿ - wc == 0x22a4 || wc == 0x22a5 || // ⊤ ⊥ - - (wc >= 0x2202 && wc <= 0x2233 && - (wc == 0x2202 || wc == 0x2205 || wc == 0x2206 || // ∂, ∅, ∆ - wc == 0x2207 || wc == 0x220e || wc == 0x220f || // ∇, ∎, ∏ - wc == 0x2210 || wc == 0x2211 || // ∐, ∑ - wc == 0x221e || wc == 0x221f || // ∞, ∟ - wc >= 0x222b)) || // ∫, ∬, ∭, ∮, ∯, ∰, ∱, ∲, ∳ - - (wc >= 0x22c0 && wc <= 0x22c3) || // N-ary big ops: ⋀, ⋁, ⋂, ⋃ - (wc >= 0x25F8 && wc <= 0x25ff) || // ◸, ◹, ◺, ◻, ◼, ◽, ◾, ◿ - - (wc >= 0x266f && - (wc == 0x266f || wc == 0x27d8 || wc == 0x27d9 || // ♯, ⟘, ⟙ - (wc >= 0x27c0 && wc <= 0x27c1) || // ⟀, ⟁ - (wc >= 0x29b0 && wc <= 0x29b4) || // ⦰, ⦱, ⦲, ⦳, ⦴ - (wc >= 0x2a00 && wc <= 0x2a06) || // ⨀, ⨁, ⨂, ⨃, ⨄, ⨅, ⨆ - (wc >= 0x2a09 && wc <= 0x2a16) || // ⨉, ⨊, ⨋, ⨌, ⨍, ⨎, ⨏, ⨐, ⨑, ⨒, ⨓, ⨔, ⨕, ⨖ - wc == 0x2a1b || wc == 0x2a1c)))) || // ⨛, ⨜ - - (wc >= 0x1d6c1 && // variants of \nabla and \partial - (wc == 0x1d6c1 || wc == 0x1d6db || - wc == 0x1d6fb || wc == 0x1d715 || - wc == 0x1d735 || wc == 0x1d74f || - wc == 0x1d76f || wc == 0x1d789 || - wc == 0x1d7a9 || wc == 0x1d7c3)) || - - // super- and subscript +-=() - (wc >= 0x207a && wc <= 0x207e) || - (wc >= 0x208a && wc <= 0x208e) || - - // angle symbols - (wc >= 0x2220 && wc <= 0x2222) || // ∠, ∡, ∢ - (wc >= 0x299b && wc <= 0x29af) || // ⦛, ⦜, ⦝, ⦞, ⦟, ⦠, ⦡, ⦢, ⦣, ⦤, ⦥, ⦦, ⦧, ⦨, ⦩, ⦪, ⦫, ⦬, ⦭, ⦮, ⦯ - - // Other_ID_Start - wc == 0x2118 || wc == 0x212E || // ℘, ℮ - (wc >= 0x309B && wc <= 0x309C) || // katakana-hiragana sound marks - - // bold-digits and double-struck digits - (wc >= 0x1D7CE && wc <= 0x1D7E1)); // 𝟎 through 𝟗 (inclusive), 𝟘 through 𝟡 (inclusive) -} - -static inline bool IsIdentifierFirstCharacter (int ch) { - if (IsASCII(ch)) { - return (bool) (isalpha(ch) || ch == '_'); - } - if (ch < 0xA1 || ch > 0x10ffff) { - return false; - } - - return is_wc_cat_id_start((uint32_t) ch); -} - -static inline bool IsIdentifierCharacter (int ch) { - if (IsASCII(ch)) { - return (bool) (isalnum(ch) || ch == '_' || ch == '!'); - } - if (ch < 0xA1 || ch > 0x10ffff) { - return false; - } - - if (is_wc_cat_id_start((uint32_t) ch)) { - return true; - } - - const CharacterCategory cat = CategoriseCharacter(ch); - - if (cat == ccMn || cat == ccMc || - cat == ccNd || cat == ccPc || - cat == ccSk || cat == ccMe || - cat == ccNo || - // primes (single, double, triple, their reverses, and quadruple) - (ch >= 0x2032 && ch <= 0x2037) || (ch == 0x2057)) { - return true; - } - return false; -} - -// keep the same function name to be easy to find again -static const uint32_t opsuffs[] = { - 0x00b2, // ² - 0x00b3, // ³ - 0x00b9, // ¹ - 0x02b0, // ʰ - 0x02b2, // ʲ - 0x02b3, // ʳ - 0x02b7, // ʷ - 0x02b8, // ʸ - 0x02e1, // ˡ - 0x02e2, // ˢ - 0x02e3, // ˣ - 0x1d2c, // ᴬ - 0x1d2e, // ᴮ - 0x1d30, // ᴰ - 0x1d31, // ᴱ - 0x1d33, // ᴳ - 0x1d34, // ᴴ - 0x1d35, // ᴵ - 0x1d36, // ᴶ - 0x1d37, // ᴷ - 0x1d38, // ᴸ - 0x1d39, // ᴹ - 0x1d3a, // ᴺ - 0x1d3c, // ᴼ - 0x1d3e, // ᴾ - 0x1d3f, // ᴿ - 0x1d40, // ᵀ - 0x1d41, // ᵁ - 0x1d42, // ᵂ - 0x1d43, // ᵃ - 0x1d47, // ᵇ - 0x1d48, // ᵈ - 0x1d49, // ᵉ - 0x1d4d, // ᵍ - 0x1d4f, // ᵏ - 0x1d50, // ᵐ - 0x1d52, // ᵒ - 0x1d56, // ᵖ - 0x1d57, // ᵗ - 0x1d58, // ᵘ - 0x1d5b, // ᵛ - 0x1d5d, // ᵝ - 0x1d5e, // ᵞ - 0x1d5f, // ᵟ - 0x1d60, // ᵠ - 0x1d61, // ᵡ - 0x1d62, // ᵢ - 0x1d63, // ᵣ - 0x1d64, // ᵤ - 0x1d65, // ᵥ - 0x1d66, // ᵦ - 0x1d67, // ᵧ - 0x1d68, // ᵨ - 0x1d69, // ᵩ - 0x1d6a, // ᵪ - 0x1d9c, // ᶜ - 0x1da0, // ᶠ - 0x1da5, // ᶥ - 0x1da6, // ᶦ - 0x1dab, // ᶫ - 0x1db0, // ᶰ - 0x1db8, // ᶸ - 0x1dbb, // ᶻ - 0x1dbf, // ᶿ - 0x2032, // ′ - 0x2033, // ″ - 0x2034, // ‴ - 0x2035, // ‵ - 0x2036, // ‶ - 0x2037, // ‷ - 0x2057, // ⁗ - 0x2070, // ⁰ - 0x2071, // ⁱ - 0x2074, // ⁴ - 0x2075, // ⁵ - 0x2076, // ⁶ - 0x2077, // ⁷ - 0x2078, // ⁸ - 0x2079, // ⁹ - 0x207a, // ⁺ - 0x207b, // ⁻ - 0x207c, // ⁼ - 0x207d, // ⁽ - 0x207e, // ⁾ - 0x207f, // ⁿ - 0x2080, // ₀ - 0x2081, // ₁ - 0x2082, // ₂ - 0x2083, // ₃ - 0x2084, // ₄ - 0x2085, // ₅ - 0x2086, // ₆ - 0x2087, // ₇ - 0x2088, // ₈ - 0x2089, // ₉ - 0x208a, // ₊ - 0x208b, // ₋ - 0x208c, // ₌ - 0x208d, // ₍ - 0x208e, // ₎ - 0x2090, // ₐ - 0x2091, // ₑ - 0x2092, // ₒ - 0x2093, // ₓ - 0x2095, // ₕ - 0x2096, // ₖ - 0x2097, // ₗ - 0x2098, // ₘ - 0x2099, // ₙ - 0x209a, // ₚ - 0x209b, // ₛ - 0x209c, // ₜ - 0x2c7c, // ⱼ - 0x2c7d, // ⱽ - 0xa71b, // ꜛ - 0xa71c, // ꜜ - 0xa71d // ꜝ -}; -static const size_t opsuffs_len = sizeof(opsuffs) / (sizeof(uint32_t)); - -// keep the same function name to be easy to find again -static bool jl_op_suffix_char(uint32_t wc) { - if (wc < 0xA1 || wc > 0x10ffff) { - return false; - } - const CharacterCategory cat = CategoriseCharacter((int) wc); - if (cat == ccMn || cat == ccMc || - cat == ccMe) { - return true; - } - - for (size_t i = 0; i < opsuffs_len; ++i) { - if (wc == opsuffs[i]) { - return true; - } - } - return false; -} - -// keep the same function name to be easy to find again -static bool never_id_char(uint32_t wc) { - const CharacterCategory cat = CategoriseCharacter((int) wc); - return ( - // spaces and control characters: - (cat >= ccZs && cat <= ccCs) || - - // ASCII and Latin1 non-connector punctuation - (wc < 0xff && - cat >= ccPd && cat <= ccPo) || - - wc == '`' || - - // mathematical brackets - (wc >= 0x27e6 && wc <= 0x27ef) || - // angle, corner, and lenticular brackets - (wc >= 0x3008 && wc <= 0x3011) || - // tortoise shell, square, and more lenticular brackets - (wc >= 0x3014 && wc <= 0x301b) || - // fullwidth parens - (wc == 0xff08 || wc == 0xff09) || - // fullwidth square brackets - (wc == 0xff3b || wc == 0xff3d)); -} - - -static bool IsOperatorFirstCharacter (int ch) { - if (IsASCII(ch)) { - if (IsJuliaOperator(ch) || - ch == '!' || ch == '?' || - ch == ':' || ch == ';' || - ch == ',' || ch == '.' ) { - return true; - }else { - return false; - } - } else if (is_wc_cat_id_start((uint32_t) ch)) { - return false; - } else if (IsJuliaUnaryOperator(ch) || - ! never_id_char((uint32_t) ch)) { - return true; - } - return false; -} - -static bool IsOperatorCharacter (int ch) { - if (IsOperatorFirstCharacter(ch) || - (!IsASCII(ch) && jl_op_suffix_char((uint32_t) ch)) ) { - return true; - } - return false; -} - -static bool CheckBoundsIndexing(char *str) { - if (strcmp("begin", str) == 0 || strcmp("end", str) == 0 ) { - return true; - } - return false; -} - -static int CheckKeywordFoldPoint(char *str) { - if (strcmp ("if", str) == 0 || - strcmp ("for", str) == 0 || - strcmp ("while", str) == 0 || - strcmp ("try", str) == 0 || - strcmp ("do", str) == 0 || - strcmp ("begin", str) == 0 || - strcmp ("let", str) == 0 || - strcmp ("baremodule", str) == 0 || - strcmp ("quote", str) == 0 || - strcmp ("module", str) == 0 || - strcmp ("struct", str) == 0 || - strcmp ("type", str) == 0 || - strcmp ("macro", str) == 0 || - strcmp ("function", str) == 0) { - return 1; - } - if (strcmp("end", str) == 0) { - return -1; - } - return 0; -} - -static bool IsNumberExpon(int ch, int base) { - if ((base == 10 && (ch == 'e' || ch == 'E' || ch == 'f')) || - (base == 16 && (ch == 'p' || ch == 'P'))) { - return true; - } - return false; -} - -/* Scans a sequence of digits, returning true if it found any. */ -static bool ScanDigits(StyleContext& sc, int base, bool allow_sep) { - bool found = false; - for (;;) { - if (IsADigit(sc.chNext, base) || (allow_sep && sc.chNext == '_')) { - found = true; - sc.Forward(); - } else { - break; - } - } - return found; -} - -static inline bool ScanNHexas(StyleContext &sc, int max) { - int n = 0; - bool error = false; - - sc.Forward(); - if (!IsADigit(sc.ch, 16)) { - error = true; - } else { - while (IsADigit(sc.ch, 16) && n < max) { - sc.Forward(); - n++; - } - } - return error; -} - -static void resumeCharacter(StyleContext &sc, bool lexerror) { - bool error = false; - - // ''' case - if (sc.chPrev == '\'' && sc.ch == '\'' && sc.chNext == '\'') { - sc.Forward(); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - return; - } else if (lexerror && sc.chPrev == '\'' && sc.ch == '\'') { - sc.ChangeState(SCE_JULIA_LEXERROR); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - - // Escape characters - } else if (sc.ch == '\\') { - sc.Forward(); - if (sc.ch == '\'' || sc.ch == '\\' ) { - sc.Forward(); - } else if (sc.ch == 'n' || sc.ch == 't' || sc.ch == 'a' || - sc.ch == 'b' || sc.ch == 'e' || sc.ch == 'f' || - sc.ch == 'r' || sc.ch == 'v' ) { - sc.Forward(); - } else if (sc.ch == 'x') { - error |= ScanNHexas(sc, 2); - } else if (sc.ch == 'u') { - error |= ScanNHexas(sc, 4); - } else if (sc.ch == 'U') { - error |= ScanNHexas(sc, 8); - } else if (IsADigit(sc.ch, 8)) { - int n = 1; - int max = 3; - sc.Forward(); - while (IsADigit(sc.ch, 8) && n < max) { - sc.Forward(); - n++; - } - } - - if (lexerror) { - if (sc.ch != '\'') { - error = true; - while (sc.ch != '\'' && - sc.ch != '\r' && - sc.ch != '\n') { - sc.Forward(); - } - } - - if (error) { - sc.ChangeState(SCE_JULIA_LEXERROR); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } - } else if (lexerror) { - if (sc.ch < 0x20 || sc.ch > 0x10ffff) { - error = true; - } else { - // single character - sc.Forward(); - - if (sc.ch != '\'') { - error = true; - while (sc.ch != '\'' && - sc.ch != '\r' && - sc.ch != '\n') { - sc.Forward(); - } - } - } - - if (error) { - sc.ChangeState(SCE_JULIA_LEXERROR); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } - - // closing quote - if (sc.ch == '\'') { - if (sc.chNext == '\'') { - sc.Forward(); - } else { - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } -} - -static inline bool IsACharacter(StyleContext &sc) { - return (sc.chPrev == '\'' && sc.chNext == '\''); -} - -static void ScanParenInterpolation(StyleContext &sc) { - // TODO: no syntax highlighting inside a string interpolation - - // Level of nested parenthesis - int interp_level = 0; - - // If true, it is inside a string and parenthesis are not counted. - bool allow_paren_string = false; - - - // check for end of states - for (; sc.More(); sc.Forward()) { - // TODO: check corner cases for nested string interpolation - // TODO: check corner cases with Command inside interpolation - - if ( sc.ch == '\"' && sc.chPrev != '\\') { - // Toggle the string environment (parenthesis are not counted inside a string) - allow_paren_string = !allow_paren_string; - } else if ( !allow_paren_string ) { - if ( sc.ch == '(' && !IsACharacter(sc) ) { - interp_level ++; - } else if ( sc.ch == ')' && !IsACharacter(sc) && interp_level > 0 ) { - interp_level --; - if (interp_level == 0) { - // Exit interpolation - return; - } - } - } - } -} -/* - * Start parsing a number, parse the base. - */ -static void initNumber (StyleContext &sc, int &base, bool &with_dot) { - base = 10; - with_dot = false; - sc.SetState(SCE_JULIA_NUMBER); - if (sc.ch == '0') { - if (sc.chNext == 'x') { - sc.Forward(); - base = 16; - if (sc.chNext == '.') { - sc.Forward(); - with_dot = true; - } - } else if (sc.chNext == 'o') { - sc.Forward(); - base = 8; - } else if (sc.chNext == 'b') { - sc.Forward(); - base = 2; - } - } else if (sc.ch == '.') { - with_dot = true; - } -} - -/* - * Resume parsing a String or Command, bounded by the `quote` character (\" or \`) - * The `triple` argument specifies if it is a triple-quote String or Command. - * Interpolation is detected (with `$`), and parsed if `allow_interp` is true. - */ -static void resumeStringLike(StyleContext &sc, int quote, bool triple, bool allow_interp, bool full_highlight) { - int stylePrev = sc.state; - bool checkcurrent = false; - - // Escape characters - if (sc.ch == '\\') { - if (sc.chNext == quote || sc.chNext == '\\' || sc.chNext == '$') { - sc.Forward(); - } - } else if (allow_interp && sc.ch == '$') { - // If the interpolation is only of a variable, do not change state - if (sc.chNext == '(') { - if (full_highlight) { - sc.SetState(SCE_JULIA_STRINGINTERP); - } else { - sc.ForwardSetState(SCE_JULIA_STRINGINTERP); - } - ScanParenInterpolation(sc); - sc.ForwardSetState(stylePrev); - - checkcurrent = true; - - } else if (full_highlight && IsIdentifierFirstCharacter(sc.chNext)) { - sc.SetState(SCE_JULIA_STRINGINTERP); - sc.Forward(); - sc.Forward(); - for (; sc.More(); sc.Forward()) { - if (! IsIdentifierCharacter(sc.ch)) { - break; - } - } - sc.SetState(stylePrev); - - checkcurrent = true; - } - - if (checkcurrent) { - // Check that the current character is not a special char, - // otherwise it will be skipped - resumeStringLike(sc, quote, triple, allow_interp, full_highlight); - } - - } else if (sc.ch == quote) { - if (triple) { - if (sc.chNext == quote && sc.GetRelativeCharacter(2) == quote) { - // Move to the end of the triple quotes - Sci_PositionU nextIndex = sc.currentPos + 2; - while (nextIndex > sc.currentPos && sc.More()) { - sc.Forward(); - } - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } else { - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } -} - -static void resumeCommand(StyleContext &sc, bool triple, bool allow_interp) { - return resumeStringLike(sc, '`', triple, allow_interp, true); -} - -static void resumeString(StyleContext &sc, bool triple, bool allow_interp) { - return resumeStringLike(sc, '"', triple, allow_interp, true); -} - -static void resumeNumber (StyleContext &sc, int base, bool &with_dot, bool lexerror) { - if (IsNumberExpon(sc.ch, base)) { - if (IsADigit(sc.chNext) || sc.chNext == '+' || sc.chNext == '-') { - sc.Forward(); - // Capture all digits - ScanDigits(sc, 10, false); - sc.Forward(); - } - sc.SetState(SCE_JULIA_DEFAULT); - } else if (sc.ch == '.' && sc.chNext == '.') { - // Interval operator `..` - sc.SetState(SCE_JULIA_OPERATOR); - sc.Forward(); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } else if (sc.ch == '.' && !with_dot) { - with_dot = true; - ScanDigits(sc, base, true); - } else if (IsADigit(sc.ch, base) || sc.ch == '_') { - ScanDigits(sc, base, true); - } else if (IsADigit(sc.ch) && !IsADigit(sc.ch, base)) { - if (lexerror) { - sc.ChangeState(SCE_JULIA_LEXERROR); - } - ScanDigits(sc, 10, false); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } else { - sc.SetState(SCE_JULIA_DEFAULT); - } -} - -static void resumeOperator (StyleContext &sc) { - if (sc.chNext == ':' && (sc.ch == ':' || sc.ch == '<' || - (sc.ch == '>' && (sc.chPrev != '-' && sc.chPrev != '=')))) { - // Case `:a=>:b` - sc.Forward(); - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } else if (sc.ch == ':') { - // Case `foo(:baz,:baz)` or `:one+:two` - // Let the default case switch decide if it is a symbol - sc.SetState(SCE_JULIA_DEFAULT); - } else if (sc.ch == '\'') { - sc.SetState(SCE_JULIA_DEFAULT); - } else if ((sc.ch == '.' && sc.chPrev != '.') || IsIdentifierFirstCharacter(sc.ch) || - (! (sc.chPrev == '.' && IsOperatorFirstCharacter(sc.ch)) && - ! IsOperatorCharacter(sc.ch)) ) { - sc.SetState(SCE_JULIA_DEFAULT); - } -} - -void SCI_METHOD LexerJulia::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - PropSetSimple props; - Accessor styler(pAccess, &props); - - Sci_Position pos = startPos; - styler.StartAt(pos); - styler.StartSegment(pos); - - // use the line state of each line to store block/multiline states - Sci_Position curLine = styler.GetLine(startPos); - // Default is false for everything and 0 counters. - int lineState = (curLine > 0) ? styler.GetLineState(curLine-1) : 0; - - bool transpose = (lineState >> 0) & 0x01; // 1 bit to know if ' is allowed to mean transpose - bool istripledocstring = (lineState >> 1) & 0x01; // 1 bit to know if we are in a triple doublequotes string - bool triple_backtick = (lineState >> 2) & 0x01; // 1 bit to know if we are in a triple backtick command - bool israwstring = (lineState >> 3) & 0x01; // 1 bit to know if we are in a raw string - int indexing_level = (int)((lineState >> 4) & 0x0F); // 4 bits of bracket nesting counter - int list_comprehension = (int)((lineState >> 8) & 0x0F); // 4 bits of parenthesis nesting counter - int commentDepth = (int)((lineState >> 12) & 0x0F); // 4 bits of nested comment counter - - // base for parsing number - int base = 10; - // number has a float dot ? - bool with_dot = false; - - StyleContext sc(startPos, length, initStyle, styler); - - for (; sc.More(); sc.Forward()) { - - //// check for end of states - switch (sc.state) { - case SCE_JULIA_BRACKET: - sc.SetState(SCE_JULIA_DEFAULT); - break; - case SCE_JULIA_OPERATOR: - resumeOperator(sc); - break; - case SCE_JULIA_TYPEOPERATOR: - sc.SetState(SCE_JULIA_DEFAULT); - break; - case SCE_JULIA_TYPEANNOT: - if (! IsIdentifierCharacter(sc.ch)) { - sc.SetState(SCE_JULIA_DEFAULT); - } - break; - case SCE_JULIA_IDENTIFIER: - // String literal - if (sc.ch == '\"') { - // If the string literal has a prefix, interpolation is disabled - israwstring = true; - sc.ChangeState(SCE_JULIA_STRINGLITERAL); - sc.SetState(SCE_JULIA_DEFAULT); - - } else if (sc.ch == '`') { - // If the string literal has a prefix, interpolation is disabled - israwstring = true; - sc.ChangeState(SCE_JULIA_COMMANDLITERAL); - sc.SetState(SCE_JULIA_DEFAULT); - - // Continue if the character is an identifier character - } else if (! IsIdentifierCharacter(sc.ch)) { - char s[MAX_JULIA_IDENT_CHARS + 1]; - sc.GetCurrent(s, sizeof(s)); - - // Treat the keywords differently if we are indexing or not - if ( indexing_level > 0 && CheckBoundsIndexing(s)) { - // Inside [], (), `begin` and `end` are numbers not block keywords - sc.ChangeState(SCE_JULIA_NUMBER); - transpose = false; - - } else { - if (keywords.InList(s)) { - sc.ChangeState(SCE_JULIA_KEYWORD1); - transpose = false; - } else if (identifiers2.InList(s)) { - sc.ChangeState(SCE_JULIA_KEYWORD2); - transpose = false; - } else if (identifiers3.InList(s)) { - sc.ChangeState(SCE_JULIA_KEYWORD3); - transpose = false; - } else if (identifiers4.InList(s)) { - sc.ChangeState(SCE_JULIA_KEYWORD4); - // These identifiers can be used for variable names also, - // so transpose is not forbidden. - //transpose = false; - } - } - sc.SetState(SCE_JULIA_DEFAULT); - - // TODO: recognize begin-end blocks inside list comprehension - // b = [(begin n%2; n*2 end) for n in 1:10] - // TODO: recognize better comprehension for-if to avoid problem with code-folding - // c = [(if isempty(a); missing else first(b) end) for (a, b) in zip(l1, l2)] - } - break; - case SCE_JULIA_NUMBER: - resumeNumber(sc, base, with_dot, options.highlightLexerror); - break; - case SCE_JULIA_CHAR: - resumeCharacter(sc, options.highlightLexerror); - break; - case SCE_JULIA_DOCSTRING: - resumeString(sc, true, !israwstring); - if (sc.state == SCE_JULIA_DEFAULT && israwstring) { - israwstring = false; - } - break; - case SCE_JULIA_STRING: - resumeString(sc, false, !israwstring); - if (sc.state == SCE_JULIA_DEFAULT && israwstring) { - israwstring = false; - } - break; - case SCE_JULIA_COMMAND: - resumeCommand(sc, triple_backtick, !israwstring); - break; - case SCE_JULIA_MACRO: - if (IsASpace(sc.ch) || ! IsIdentifierCharacter(sc.ch)) { - sc.SetState(SCE_JULIA_DEFAULT); - } - break; - case SCE_JULIA_SYMBOL: - if (! IsIdentifierCharacter(sc.ch)) { - sc.SetState(SCE_JULIA_DEFAULT); - } - break; - case SCE_JULIA_COMMENT: - if( commentDepth > 0 ) { - // end or start of a nested a block comment - if ( sc.ch == '=' && sc.chNext == '#') { - commentDepth --; - sc.Forward(); - - if (commentDepth == 0) { - sc.ForwardSetState(SCE_JULIA_DEFAULT); - } - } else if( sc.ch == '#' && sc.chNext == '=') { - commentDepth ++; - sc.Forward(); - } - } else { - // single line comment - if (sc.atLineEnd || sc.ch == '\r' || sc.ch == '\n') { - sc.SetState(SCE_JULIA_DEFAULT); - transpose = false; - } - } - break; - } - - // check start of a new state - if (sc.state == SCE_JULIA_DEFAULT) { - if (sc.ch == '#') { - sc.SetState(SCE_JULIA_COMMENT); - // increment depth if we are a block comment - if(sc.chNext == '=') { - commentDepth ++; - sc.Forward(); - } - } else if (sc.ch == '!') { - sc.SetState(SCE_JULIA_OPERATOR); - } else if (sc.ch == '\'') { - if (transpose) { - sc.SetState(SCE_JULIA_OPERATOR); - } else { - sc.SetState(SCE_JULIA_CHAR); - } - } else if (sc.ch == '\"') { - istripledocstring = (sc.chNext == '\"' && sc.GetRelativeCharacter(2) == '\"'); - if (istripledocstring) { - sc.SetState(SCE_JULIA_DOCSTRING); - // Move to the end of the triple quotes - Sci_PositionU nextIndex = sc.currentPos + 2; - while (nextIndex > sc.currentPos && sc.More()) { - sc.Forward(); - } - } else { - sc.SetState(SCE_JULIA_STRING); - } - } else if (sc.ch == '`') { - triple_backtick = (sc.chNext == '`' && sc.GetRelativeCharacter(2) == '`'); - sc.SetState(SCE_JULIA_COMMAND); - if (triple_backtick) { - // Move to the end of the triple backticks - Sci_PositionU nextIndex = sc.currentPos + 2; - while (nextIndex > sc.currentPos && sc.More()) { - sc.Forward(); - } - } - } else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) { - initNumber(sc, base, with_dot); - } else if (IsIdentifierFirstCharacter(sc.ch)) { - sc.SetState(SCE_JULIA_IDENTIFIER); - transpose = true; - } else if (sc.ch == '@') { - sc.SetState(SCE_JULIA_MACRO); - transpose = false; - - // Several parsing of operators, should keep the order of `if` blocks - } else if ((sc.ch == ':' || sc.ch == '<' || sc.ch == '>') && sc.chNext == ':') { - sc.SetState(SCE_JULIA_TYPEOPERATOR); - sc.Forward(); - // Highlight the next identifier, if option is set - if (options.highlightTypeannotation && - IsIdentifierFirstCharacter(sc.chNext)) { - sc.ForwardSetState(SCE_JULIA_TYPEANNOT); - } - } else if (sc.ch == ':') { - // TODO: improve detection of range - // should be solved with begin-end parsing - // `push!(arr, s1 :s2)` and `a[begin :end] - if (IsIdentifierFirstCharacter(sc.chNext) && - ! IsIdentifierCharacter(sc.chPrev) && - sc.chPrev != ')' && sc.chPrev != ']' ) { - sc.SetState(SCE_JULIA_SYMBOL); - } else { - sc.SetState(SCE_JULIA_OPERATOR); - } - } else if (IsJuliaParen(sc.ch)) { - if (sc.ch == '[') { - list_comprehension ++; - indexing_level ++; - } else if (sc.ch == ']' && (indexing_level > 0)) { - list_comprehension --; - indexing_level --; - } else if (sc.ch == '(') { - list_comprehension ++; - } else if (sc.ch == ')' && (list_comprehension > 0)) { - list_comprehension --; - } - - if (sc.ch == ')' || sc.ch == ']' || sc.ch == '}') { - transpose = true; - } else { - transpose = false; - } - sc.SetState(SCE_JULIA_BRACKET); - } else if (IsOperatorFirstCharacter(sc.ch)) { - transpose = false; - sc.SetState(SCE_JULIA_OPERATOR); - } else { - transpose = false; - } - } - - // update the line information (used for line-by-line lexing and folding) - if (sc.atLineEnd) { - // set the line state to the current state - curLine = styler.GetLine(sc.currentPos); - - lineState = ((transpose ? 1 : 0) << 0) | - ((istripledocstring ? 1 : 0) << 1) | - ((triple_backtick ? 1 : 0) << 2) | - ((israwstring ? 1 : 0) << 3) | - ((indexing_level & 0x0F) << 4) | - ((list_comprehension & 0x0F) << 8) | - ((commentDepth & 0x0F) << 12); - styler.SetLineState(curLine, lineState); - } - } - sc.Complete(); -} - -void SCI_METHOD LexerJulia::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - - if (!options.fold) - return; - - LexAccessor styler(pAccess); - - Sci_PositionU endPos = startPos + length; - int visibleChars = 0; - Sci_Position lineCurrent = styler.GetLine(startPos); - int levelCurrent = SC_FOLDLEVELBASE; - int lineState = 0; - if (lineCurrent > 0) { - levelCurrent = styler.LevelAt(lineCurrent-1) >> 16; - lineState = styler.GetLineState(lineCurrent-1); - } - - // level of nested brackets - int indexing_level = (int)((lineState >> 4) & 0x0F); // 4 bits of bracket nesting counter - // level of nested parenthesis or brackets - int list_comprehension = (int)((lineState >> 8) & 0x0F); // 4 bits of parenthesis nesting counter - //int commentDepth = (int)((lineState >> 12) & 0x0F); // 4 bits of nested comment counter - - Sci_PositionU lineStartNext = styler.LineStart(lineCurrent+1); - int levelNext = levelCurrent; - char chNext = styler[startPos]; - int stylePrev = styler.StyleAt(startPos - 1); - int styleNext = styler.StyleAt(startPos); - int style = initStyle; - char word[100]; - int wordlen = 0; - for (Sci_PositionU i = startPos; i < endPos; i++) { - char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - style = styleNext; - styleNext = styler.StyleAt(i + 1); - bool atEOL = i == (lineStartNext-1); - - // a start/end of comment block - if (options.foldComment && style == SCE_JULIA_COMMENT) { - // start of block comment - if (ch == '#' && chNext == '=') { - levelNext ++; - } - // end of block comment - if (ch == '=' && chNext == '#' && levelNext > 0) { - levelNext --; - } - } - - // Syntax based folding, accounts for list comprehension - if (options.foldSyntaxBased) { - // list comprehension allow `for`, `if` and `begin` without `end` - if (style == SCE_JULIA_BRACKET) { - if (ch == '[') { - list_comprehension ++; - indexing_level ++; - levelNext ++; - } else if (ch == ']') { - list_comprehension --; - indexing_level --; - levelNext --; - } else if (ch == '(') { - list_comprehension ++; - levelNext ++; - } else if (ch == ')') { - list_comprehension --; - levelNext --; - } - // check non-negative - if (indexing_level < 0) { - indexing_level = 0; - } - if (list_comprehension < 0) { - list_comprehension = 0; - } - } - - // keyword - if (style == SCE_JULIA_KEYWORD1) { - word[wordlen++] = static_cast(ch); - if (wordlen == 100) { // prevent overflow - word[0] = '\0'; - wordlen = 1; - } - if (styleNext != SCE_JULIA_KEYWORD1) { - word[wordlen] = '\0'; - wordlen = 0; - if (list_comprehension <= 0 && indexing_level <= 0) { - levelNext += CheckKeywordFoldPoint(word); - } - } - } - } - - // Docstring - if (options.foldDocstring) { - if (stylePrev != SCE_JULIA_DOCSTRING && style == SCE_JULIA_DOCSTRING) { - levelNext ++; - } else if (style == SCE_JULIA_DOCSTRING && styleNext != SCE_JULIA_DOCSTRING) { - levelNext --; - } - } - - // check non-negative level - if (levelNext < 0) { - levelNext = 0; - } - - if (!IsASpace(ch)) { - visibleChars++; - } - stylePrev = style; - - if (atEOL || (i == endPos-1)) { - int levelUse = levelCurrent; - int lev = levelUse | levelNext << 16; - if (visibleChars == 0 && options.foldCompact) { - lev |= SC_FOLDLEVELWHITEFLAG; - } - if (levelUse < levelNext) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - if (lev != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, lev); - } - lineCurrent++; - lineStartNext = styler.LineStart(lineCurrent+1); - levelCurrent = levelNext; - if (atEOL && (i == static_cast(styler.Length() - 1))) { - // There is an empty line at end of file so give it same level and empty - styler.SetLevel(lineCurrent, (levelCurrent | levelCurrent << 16) | SC_FOLDLEVELWHITEFLAG); - } - visibleChars = 0; - } - } -} - -LexerModule lmJulia(SCLEX_JULIA, LexerJulia::LexerFactoryJulia, "julia", juliaWordLists); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNim.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNim.cxx deleted file mode 100644 index 3e8a6e006..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexNim.cxx +++ /dev/null @@ -1,814 +0,0 @@ -// Scintilla source code edit control -/** @file LexNim.cxx -** Lexer for Nim -** Written by Jad Altahan (github.com/xv) -** Nim manual: https://nim-lang.org/docs/manual.html -**/ -// Copyright 1998-2001 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "StringCopy.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { - // Use an unnamed namespace to protect the functions and classes from name conflicts - -enum NumType { - Binary, - Octal, - Exponent, - Hexadecimal, - Decimal, - FormatError -}; - -int GetNumStyle(const int numType) noexcept { - if (numType == NumType::FormatError) { - return SCE_NIM_NUMERROR; - } - - return SCE_NIM_NUMBER; -} - -constexpr bool IsLetter(const int ch) noexcept { - // 97 to 122 || 65 to 90 - return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); -} - -bool IsAWordChar(const int ch) noexcept { - return ch < 0x80 && (isalnum(ch) || ch == '_' || ch == '.'); -} - -int IsNumHex(const StyleContext &sc) noexcept { - return sc.chNext == 'x' || sc.chNext == 'X'; -} - -int IsNumBinary(const StyleContext &sc) noexcept { - return sc.chNext == 'b' || sc.chNext == 'B'; -} - -int IsNumOctal(const StyleContext &sc) { - return IsADigit(sc.chNext) || sc.chNext == 'o'; -} - -constexpr bool IsNewline(const int ch) noexcept { - return (ch == '\n' || ch == '\r'); -} - -bool IsFuncName(const char *str) noexcept { - const char *identifiers[] = { - "proc", - "func", - "macro", - "method", - "template", - "iterator", - "converter" - }; - - for (const char *id : identifiers) { - if (strcmp(str, id) == 0) { - return true; - } - } - - return false; -} - -constexpr bool IsTripleLiteral(const int style) noexcept { - return style == SCE_NIM_TRIPLE || style == SCE_NIM_TRIPLEDOUBLE; -} - -constexpr bool IsLineComment(const int style) noexcept { - return style == SCE_NIM_COMMENTLINE || style == SCE_NIM_COMMENTLINEDOC; -} - -constexpr bool IsStreamComment(const int style) noexcept { - return style == SCE_NIM_COMMENT || style == SCE_NIM_COMMENTDOC; -} - -// Adopted from Accessor.cxx -int GetIndent(const Sci_Position line, Accessor &styler) { - Sci_Position startPos = styler.LineStart(line); - const Sci_Position eolPos = styler.LineStart(line + 1) - 1; - - char ch = styler[startPos]; - int style = styler.StyleAt(startPos); - - int indent = 0; - bool inPrevPrefix = line > 0; - Sci_Position posPrev = inPrevPrefix ? styler.LineStart(line - 1) : 0; - - // No fold points inside triple literals - while ((IsASpaceOrTab(ch) || IsTripleLiteral(style)) && (startPos < eolPos)) { - if (inPrevPrefix) { - const char chPrev = styler[posPrev++]; - if (chPrev != ' ' && chPrev != '\t') { - inPrevPrefix = false; - } - } - - if (ch == '\t') { - indent = (indent / 8 + 1) * 8; - } else { - indent++; - } - - startPos++; - ch = styler[startPos]; - style = styler.StyleAt(startPos); - } - - // Prevent creating fold lines for comments if indented - if (!(IsStreamComment(style) || IsLineComment(style))) - indent += SC_FOLDLEVELBASE; - - if (styler.LineStart(line) == styler.Length() - || IsASpaceOrTab(ch) - || IsNewline(ch) - || IsStreamComment(style) - || IsLineComment(style)) { - return indent | SC_FOLDLEVELWHITEFLAG; - } else { - return indent; - } -} - -int IndentAmount(const Sci_Position line, Accessor &styler) { - const int indent = GetIndent(line, styler); - const int indentLevel = indent & SC_FOLDLEVELNUMBERMASK; - return indentLevel <= SC_FOLDLEVELBASE ? indent : indentLevel | (indent & ~SC_FOLDLEVELNUMBERMASK); -} - -struct OptionsNim { - bool fold; - bool foldCompact; - bool highlightRawStrIdent; - - OptionsNim() { - fold = true; - foldCompact = true; - highlightRawStrIdent = false; - } -}; - -static const char *const nimWordListDesc[] = { - "Keywords", - nullptr -}; - -struct OptionSetNim : public OptionSet { - OptionSetNim() { - DefineProperty("lexer.nim.raw.strings.highlight.ident", &OptionsNim::highlightRawStrIdent, - "Set to 1 to enable highlighting generalized raw string identifiers. " - "Generalized raw string identifiers are anything other than r (or R)."); - - DefineProperty("fold", &OptionsNim::fold); - DefineProperty("fold.compact", &OptionsNim::foldCompact); - - DefineWordListSets(nimWordListDesc); - } -}; - -LexicalClass lexicalClasses[] = { - // Lexer Nim SCLEX_NIM SCE_NIM_: - 0, "SCE_NIM_DEFAULT", "default", "White space", - 1, "SCE_NIM_COMMENT", "comment block", "Block comment", - 2, "SCE_NIM_COMMENTDOC", "comment block doc", "Block doc comment", - 3, "SCE_NIM_COMMENTLINE", "comment line", "Line comment", - 4, "SCE_NIM_COMMENTLINEDOC", "comment doc", "Line doc comment", - 5, "SCE_NIM_NUMBER", "literal numeric", "Number", - 6, "SCE_NIM_STRING", "literal string", "String", - 7, "SCE_NIM_CHARACTER", "literal string", "Single quoted string", - 8, "SCE_NIM_WORD", "keyword", "Keyword", - 9, "SCE_NIM_TRIPLE", "literal string", "Triple quotes", - 10, "SCE_NIM_TRIPLEDOUBLE", "literal string", "Triple double quotes", - 11, "SCE_NIM_BACKTICKS", "operator definition", "Identifiers", - 12, "SCE_NIM_FUNCNAME", "identifier", "Function name definition", - 13, "SCE_NIM_STRINGEOL", "error literal string", "String is not closed", - 14, "SCE_NIM_NUMERROR", "numeric error", "Numeric format error", - 15, "SCE_NIM_OPERATOR", "operator", "Operators", - 16, "SCE_NIM_IDENTIFIER", "identifier", "Identifiers", -}; - -} - -class LexerNim : public DefaultLexer { - CharacterSet setWord; - WordList keywords; - OptionsNim options; - OptionSetNim osNim; - -public: - LexerNim() : - DefaultLexer("nim", SCLEX_NIM, lexicalClasses, ELEMENTS(lexicalClasses)), - setWord(CharacterSet::setAlphaNum, "_", 0x80, true) { } - - virtual ~LexerNim() { } - - void SCI_METHOD Release() noexcept override { - delete this; - } - - int SCI_METHOD Version() const noexcept override { - return lvRelease5; - } - - const char * SCI_METHOD PropertyNames() override { - return osNim.PropertyNames(); - } - - int SCI_METHOD PropertyType(const char *name) override { - return osNim.PropertyType(name); - } - - const char * SCI_METHOD DescribeProperty(const char *name) override { - return osNim.DescribeProperty(name); - } - - 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(); - } - - 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 *) noexcept override { - return nullptr; - } - - int SCI_METHOD LineEndTypesSupported() noexcept override { - return SC_LINE_END_TYPE_UNICODE; - } - - int SCI_METHOD PrimaryStyleFromStyle(int style) noexcept override { - return style; - } - - static ILexer5 *LexerFactoryNim() { - return new LexerNim(); - } -}; - -Sci_Position SCI_METHOD LexerNim::PropertySet(const char *key, const char *val) { - if (osNim.PropertySet(&options, key, val)) { - return 0; - } - - return -1; -} - -Sci_Position SCI_METHOD LexerNim::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - - switch (n) { - case 0: - wordListN = &keywords; - 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 LexerNim::Lex(Sci_PositionU startPos, Sci_Position length, - int initStyle, IDocument *pAccess) { - // No one likes a leaky string - if (initStyle == SCE_NIM_STRINGEOL) { - initStyle = SCE_NIM_DEFAULT; - } - - Accessor styler(pAccess, nullptr); - StyleContext sc(startPos, length, initStyle, styler); - - // Nim supports nested block comments! - Sci_Position lineCurrent = styler.GetLine(startPos); - int commentNestLevel = lineCurrent > 0 ? styler.GetLineState(lineCurrent - 1) : 0; - - int numType = NumType::Decimal; - int decimalCount = 0; - - bool funcNameExists = false; - bool isStylingRawString = false; - bool isStylingRawStringIdent = false; - - for (; sc.More(); sc.Forward()) { - if (sc.atLineStart) { - if (sc.state == SCE_NIM_STRING) { - sc.SetState(SCE_NIM_STRING); - } - - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - } - - // Handle string line continuation - if (sc.ch == '\\' && (sc.chNext == '\n' || sc.chNext == '\r') && - (sc.state == SCE_NIM_STRING || sc.state == SCE_NIM_CHARACTER) && !isStylingRawString) { - sc.Forward(); - - if (sc.ch == '\r' && sc.chNext == '\n') { - sc.Forward(); - } - - continue; - } - - switch (sc.state) { - case SCE_NIM_OPERATOR: - funcNameExists = false; - sc.SetState(SCE_NIM_DEFAULT); - break; - case SCE_NIM_NUMBER: - // For a type suffix, such as 0x80'u8 - if (sc.ch == '\'') { - if (sc.chNext == 'i' || sc.chNext == 'I' || - sc.chNext == 'u' || sc.chNext == 'U' || - sc.chNext == 'f' || sc.chNext == 'F' || - sc.chNext == 'd' || sc.chNext == 'D') { - sc.Forward(2); - } - } else if (sc.ch == '.') { - if (IsADigit(sc.chNext)) { - sc.Forward(); - } else if (numType <= NumType::Exponent) { - sc.SetState(SCE_NIM_OPERATOR); - break; - } else { - decimalCount++; - - if (numType == NumType::Decimal) { - if (decimalCount <= 1 && !IsAWordChar(sc.chNext)) { - break; - } - } else if (numType == NumType::Hexadecimal) { - if (decimalCount <= 1 && IsADigit(sc.chNext, 16)) { - break; - } - - sc.SetState(SCE_NIM_OPERATOR); - break; - } - } - } else if (sc.ch == '_') { - // Accept only one underscore between digits - if (IsADigit(sc.chNext)) { - sc.Forward(); - } - } else if (numType == NumType::Decimal) { - if (sc.chPrev != '\'' && (sc.ch == 'e' || sc.ch == 'E')) { - numType = NumType::Exponent; - - if (sc.chNext == '-' || sc.chNext == '+') { - sc.Forward(); - } - - break; - } - - if (IsADigit(sc.ch)) { - break; - } - } else if (numType == NumType::Hexadecimal) { - if (IsADigit(sc.ch, 16)) { - break; - } - } else if (IsADigit(sc.ch)) { - if (numType == NumType::Exponent) { - break; - } - - if (numType == NumType::Octal) { - // Accept only 0-7 - if (sc.ch <= '7') { - break; - } - } else if (numType == NumType::Binary) { - // Accept only 0 and 1 - if (sc.ch <= '1') { - break; - } - } - - numType = NumType::FormatError; - break; - } - - sc.ChangeState(GetNumStyle(numType)); - sc.SetState(SCE_NIM_DEFAULT); - break; - case SCE_NIM_IDENTIFIER: - if (sc.ch == '.' || !IsAWordChar(sc.ch)) { - char s[100]; - sc.GetCurrent(s, sizeof(s)); - int style = SCE_NIM_IDENTIFIER; - - if (keywords.InList(s) && !funcNameExists) { - // Prevent styling keywords if they are sub-identifiers - const Sci_Position segStart = styler.GetStartSegment() - 1; - if (segStart < 0 || styler.SafeGetCharAt(segStart, '\0') != '.') { - style = SCE_NIM_WORD; - } - } else if (funcNameExists) { - style = SCE_NIM_FUNCNAME; - } - - sc.ChangeState(style); - sc.SetState(SCE_NIM_DEFAULT); - - if (style == SCE_NIM_WORD) { - funcNameExists = IsFuncName(s); - } else { - funcNameExists = false; - } - } - - if (IsAlphaNumeric(sc.ch) && sc.chNext == '\"') { - isStylingRawStringIdent = true; - - if (options.highlightRawStrIdent) { - if (styler.SafeGetCharAt(sc.currentPos + 2) == '\"' && - styler.SafeGetCharAt(sc.currentPos + 3) == '\"') { - sc.ChangeState(SCE_NIM_TRIPLEDOUBLE); - } else { - sc.ChangeState(SCE_NIM_STRING); - } - } - - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_FUNCNAME: - if (sc.ch == '`') { - funcNameExists = false; - sc.ForwardSetState(SCE_NIM_DEFAULT); - } else if (sc.atLineEnd) { - // Prevent leaking the style to the next line if not closed - funcNameExists = false; - - sc.ChangeState(SCE_NIM_STRINGEOL); - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_COMMENT: - if (sc.Match(']', '#')) { - if (commentNestLevel > 0) { - commentNestLevel--; - } - - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - sc.Forward(); - - if (commentNestLevel == 0) { - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - } else if (sc.Match('#', '[')) { - commentNestLevel++; - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - } - break; - case SCE_NIM_COMMENTDOC: - if (sc.Match("]##")) { - if (commentNestLevel > 0) { - commentNestLevel--; - } - - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - sc.Forward(2); - - if (commentNestLevel == 0) { - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - } else if (sc.Match("##[")) { - commentNestLevel++; - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - } - break; - case SCE_NIM_COMMENTLINE: - case SCE_NIM_COMMENTLINEDOC: - if (sc.atLineStart) { - sc.SetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_STRING: - if (!isStylingRawStringIdent && !isStylingRawString && sc.ch == '\\') { - if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { - sc.Forward(); - } - } else if (isStylingRawString && sc.ch == '\"' && sc.chNext == '\"') { - // Forward in situations such as r"a""bc\" so that "bc\" wouldn't be - // considered a string of its own - sc.Forward(); - } else if (sc.ch == '\"') { - sc.ForwardSetState(SCE_NIM_DEFAULT); - } else if (sc.atLineEnd) { - sc.ChangeState(SCE_NIM_STRINGEOL); - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_CHARACTER: - if (sc.ch == '\\') { - if (sc.chNext == '\"' || sc.chNext == '\'' || sc.chNext == '\\') { - sc.Forward(); - } - } else if (sc.ch == '\'') { - sc.ForwardSetState(SCE_NIM_DEFAULT); - } else if (sc.atLineEnd) { - sc.ChangeState(SCE_NIM_STRINGEOL); - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_BACKTICKS: - if (sc.ch == '`' ) { - sc.ForwardSetState(SCE_NIM_DEFAULT); - } else if (sc.atLineEnd) { - sc.ChangeState(SCE_NIM_STRINGEOL); - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_TRIPLEDOUBLE: - if (sc.Match(R"(""")")) { - - // Outright forward all " after the closing """ as a triple double - // - // A valid example where this is needed is: """8 double quotes->"""""""" - // You can have as many """ at the end as you wish, as long as the actual - // closing literal is there - while (sc.ch == '"') { - sc.Forward(); - } - - sc.SetState(SCE_NIM_DEFAULT); - } - break; - case SCE_NIM_TRIPLE: - if (sc.Match("'''")) { - sc.Forward(2); - sc.ForwardSetState(SCE_NIM_DEFAULT); - } - break; - } - - if (sc.state == SCE_NIM_DEFAULT) { - // Number - if (IsADigit(sc.ch)) { - sc.SetState(SCE_NIM_NUMBER); - - numType = NumType::Decimal; - decimalCount = 0; - - if (sc.ch == '0') { - if (IsNumHex(sc)) { - numType = NumType::Hexadecimal; - } else if (IsNumBinary(sc)) { - numType = NumType::Binary; - } else if (IsNumOctal(sc)) { - numType = NumType::Octal; - } - - if (numType != NumType::Decimal) { - sc.Forward(); - } - } - } - // Raw string - else if (IsAlphaNumeric(sc.ch) && sc.chNext == '\"') { - isStylingRawString = true; - - // Triple doubles can be raw strings too. How sweet - if (styler.SafeGetCharAt(sc.currentPos + 2) == '\"' && - styler.SafeGetCharAt(sc.currentPos + 3) == '\"') { - sc.SetState(SCE_NIM_TRIPLEDOUBLE); - } else { - sc.SetState(SCE_NIM_STRING); - } - - const int rawStrStyle = options.highlightRawStrIdent ? IsLetter(sc.ch) : - (sc.ch == 'r' || sc.ch == 'R'); - - if (rawStrStyle) { - sc.Forward(); - - if (sc.state == SCE_NIM_TRIPLEDOUBLE) { - sc.Forward(2); - } - } else { - // Anything other than r/R is considered a general raw string identifier - isStylingRawStringIdent = true; - sc.SetState(SCE_NIM_IDENTIFIER); - } - } - // String and triple double literal - else if (sc.ch == '\"') { - isStylingRawString = false; - - if (sc.Match(R"(""")")) { - sc.SetState(SCE_NIM_TRIPLEDOUBLE); - - // Keep forwarding until the total opening literal count is 5 - // A valid example where this is needed is: """""<-5 double quotes""" - while (sc.ch == '"') { - sc.Forward(); - - if (sc.Match(R"(""")")) { - sc.Forward(); - break; - } - } - } else { - sc.SetState(SCE_NIM_STRING); - } - } - // Charecter and triple literal - else if (sc.ch == '\'') { - if (sc.Match("'''")) { - sc.SetState(SCE_NIM_TRIPLE); - } else { - sc.SetState(SCE_NIM_CHARACTER); - } - } - // Operator definition - else if (sc.ch == '`') { - if (funcNameExists) { - sc.SetState(SCE_NIM_FUNCNAME); - } else { - sc.SetState(SCE_NIM_BACKTICKS); - } - } - // Keyword - else if (iswordstart(sc.ch)) { - sc.SetState(SCE_NIM_IDENTIFIER); - } - // Comments - else if (sc.ch == '#') { - if (sc.Match("##[") || sc.Match("#[")) { - commentNestLevel++; - lineCurrent = styler.GetLine(sc.currentPos); - styler.SetLineState(lineCurrent, commentNestLevel); - } - - if (sc.Match("##[")) { - sc.SetState(SCE_NIM_COMMENTDOC); - sc.Forward(); - } else if (sc.Match("#[")) { - sc.SetState(SCE_NIM_COMMENT); - sc.Forward(); - } else if (sc.Match("##")) { - sc.SetState(SCE_NIM_COMMENTLINEDOC); - } else { - sc.SetState(SCE_NIM_COMMENTLINE); - } - } - // Operators - else if (strchr("()[]{}:=;-\\/&%$!+<>|^?,.*~@", sc.ch)) { - sc.SetState(SCE_NIM_OPERATOR); - } - } - - if (sc.atLineEnd) { - funcNameExists = false; - isStylingRawString = false; - isStylingRawStringIdent = false; - } - } - - sc.Complete(); -} - -void SCI_METHOD LexerNim::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) { - if (!options.fold) { - return; - } - - Accessor styler(pAccess, nullptr); - - const Sci_Position docLines = styler.GetLine(styler.Length()); - const Sci_Position maxPos = startPos + length; - const Sci_Position maxLines = styler.GetLine(maxPos == styler.Length() ? maxPos : maxPos - 1); - - Sci_Position lineCurrent = styler.GetLine(startPos); - int indentCurrent = IndentAmount(lineCurrent, styler); - - while (lineCurrent > 0) { - lineCurrent--; - indentCurrent = IndentAmount(lineCurrent, styler); - - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - break; - } - } - - int indentCurrentLevel = indentCurrent & SC_FOLDLEVELNUMBERMASK; - indentCurrent = indentCurrentLevel | (indentCurrent & ~SC_FOLDLEVELNUMBERMASK); - - while (lineCurrent <= docLines && lineCurrent <= maxLines) { - Sci_Position lineNext = lineCurrent + 1; - int indentNext = indentCurrent; - int lev = indentCurrent; - - if (lineNext <= docLines) { - indentNext = IndentAmount(lineNext, styler); - } - - if (indentNext & SC_FOLDLEVELWHITEFLAG) { - indentNext = SC_FOLDLEVELWHITEFLAG | indentCurrentLevel; - } - - while (lineNext < docLines && (indentNext & SC_FOLDLEVELWHITEFLAG)) { - lineNext++; - indentNext = IndentAmount(lineNext, styler); - } - - const int indentNextLevel = indentNext & SC_FOLDLEVELNUMBERMASK; - indentNext = indentNextLevel | (indentNext & ~SC_FOLDLEVELNUMBERMASK); - - const int levelBeforeComments = std::max(indentCurrentLevel, indentNextLevel); - - Sci_Position skipLine = lineNext; - int skipLevel = indentNextLevel; - - while (--skipLine > lineCurrent) { - const int skipLineIndent = IndentAmount(skipLine, styler); - - if (options.foldCompact) { - if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel) { - skipLevel = levelBeforeComments; - } - - const int whiteFlag = skipLineIndent & SC_FOLDLEVELWHITEFLAG; - styler.SetLevel(skipLine, skipLevel | whiteFlag); - } else { - if ((skipLineIndent & SC_FOLDLEVELNUMBERMASK) > indentNextLevel && - !(skipLineIndent & SC_FOLDLEVELWHITEFLAG)) { - skipLevel = levelBeforeComments; - } - - styler.SetLevel(skipLine, skipLevel); - } - } - - if (!(indentCurrent & SC_FOLDLEVELWHITEFLAG)) { - if ((indentCurrent & SC_FOLDLEVELNUMBERMASK) < (indentNext & SC_FOLDLEVELNUMBERMASK)) { - lev |= SC_FOLDLEVELHEADERFLAG; - } - } - - styler.SetLevel(lineCurrent, options.foldCompact ? lev : lev & ~SC_FOLDLEVELWHITEFLAG); - - indentCurrent = indentNext; - indentCurrentLevel = indentNextLevel; - lineCurrent = lineNext; - } -} - -LexerModule lmNim(SCLEX_NIM, LexerNim::LexerFactoryNim, "nim", nimWordListDesc); \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRaku.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRaku.cxx deleted file mode 100644 index 7406b91b7..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexRaku.cxx +++ /dev/null @@ -1,1632 +0,0 @@ -/** @file LexRaku.cxx - ** Lexer for Raku - ** - ** Copyright (c) 2019 Mark Reay - **/ -// Copyright 1998-2005 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -/* - * Raku (Perl6) Lexer for Scintilla - * --------------------------------- - * --------------------------------- - * 06-Dec-2019: More Unicode support: - * - Added a full scope of allowed numbers and letters - * 29-Nov-2019: More highlighting / implemented basic folding: - * - Operators (blanket cover, no sequence checking) - * - Class / Grammar name highlighting - * - Folding: - * - Comments: line / multi-line - * - POD sections - * - Code blocks {} - * 26-Nov-2019: Basic syntax highlighting covering the following: - * - Comments, both line and embedded (multi-line) - * - POD, no inline highlighting as yet... - * - Heredoc block string, with variable highlighting (with qq) - * - Strings, with variable highlighting (with ") - * - Q Language, including adverbs (also basic q and qq) - * - Regex, including adverbs - * - Numbers - * - Bareword / identifiers - * - Types - * - Variables: mu, positional, associative, callable - * TODO: - * - POD inline - * - Better operator sequence coverage - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" - -#include "WordList.h" -#include "LexAccessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "CharacterCategory.h" -#include "LexerModule.h" -#include "OptionSet.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -namespace { // anonymous namespace to isolate any name clashes -/*----------------------------------------------------------------------------* - * --- DEFINITIONS: OPTIONS / CONSTANTS --- - *----------------------------------------------------------------------------*/ - -// Number types -#define RAKUNUM_BINARY 1 // order is significant: 1-3 cannot have a dot -#define RAKUNUM_OCTAL 2 -#define RAKUNUM_FLOAT_EXP 3 // exponent part only -#define RAKUNUM_HEX 4 // may be a hex float -#define RAKUNUM_DECIMAL 5 // 1-5 are numbers; 6-7 are strings -#define RAKUNUM_VECTOR 6 -#define RAKUNUM_V_VECTOR 7 -#define RAKUNUM_VERSION 8 // can contain multiple '.'s -#define RAKUNUM_BAD 9 - -// Regex / Q string types -#define RAKUTYPE_REGEX_NORM 0 // 0 char ident -#define RAKUTYPE_REGEX_S 1 // order is significant: -#define RAKUTYPE_REGEX_M 2 // 1 char ident -#define RAKUTYPE_REGEX_Y 3 // 1 char ident -#define RAKUTYPE_REGEX 4 // > RAKUTYPE_REGEX == 2 char identifiers -#define RAKUTYPE_REGEX_RX 5 // 2 char ident -#define RAKUTYPE_REGEX_TR 6 // 2 char ident -#define RAKUTYPE_QLANG 7 // < RAKUTYPE_QLANG == RAKUTYPE_REGEX_? -#define RAKUTYPE_STR_WQ 8 // 0 char ident < word quote > -#define RAKUTYPE_STR_Q 9 // 1 char ident -#define RAKUTYPE_STR_QX 10 // 2 char ident -#define RAKUTYPE_STR_QW 11 // 2 char ident -#define RAKUTYPE_STR_QQ 12 // 2 char ident -#define RAKUTYPE_STR_QQX 13 // 3 char ident -#define RAKUTYPE_STR_QQW 14 // 3 char ident -#define RAKUTYPE_STR_QQWW 15 // 4 char ident - -// Delimiter types -#define RAKUDELIM_BRACKET 0 // bracket: regex, Q language -#define RAKUDELIM_QUOTE 1 // quote: normal string - -// rakuWordLists: keywords as defined in config -const char *const rakuWordLists[] = { - "Keywords and identifiers", - "Functions", - "Types basic", - "Types composite", - "Types domain-specific", - "Types exception", - "Adverbs", - nullptr, -}; - -// Options and defaults -struct OptionsRaku { - bool fold; - bool foldCompact; - bool foldComment; - bool foldCommentMultiline; - bool foldCommentPOD; - OptionsRaku() { - fold = true; - foldCompact = false; - foldComment = true; - foldCommentMultiline = true; - foldCommentPOD = true; - } -}; - -// init options and words -struct OptionSetRaku : public OptionSet { - OptionSetRaku() { - DefineProperty("fold", &OptionsRaku::fold); - DefineProperty("fold.comment", &OptionsRaku::foldComment); - DefineProperty("fold.compact", &OptionsRaku::foldCompact); - - DefineProperty("fold.raku.comment.multiline", &OptionsRaku::foldCommentMultiline, - "Set this property to 0 to disable folding multi-line comments when fold.comment=1."); - DefineProperty("fold.raku.comment.pod", &OptionsRaku::foldCommentPOD, - "Set this property to 0 to disable folding POD comments when fold.comment=1."); - - // init word lists - DefineWordListSets(rakuWordLists); - } -}; - -// Delimiter pair -struct DelimPair { - int opener; // opener char - int closer[2]; // closer chars - bool interpol; // can variables be interpolated? - short count; // delimiter char count - DelimPair() { - opener = 0; - closer[0] = 0; - closer[1] = 0; - interpol = false; - count = 0; - } - bool isCloser(int ch) const { - return ch == closer[0] || ch == closer[1]; - } -}; - -/*----------------------------------------------------------------------------* - * --- FUNCTIONS --- - *----------------------------------------------------------------------------*/ - -/* - * IsANewLine - * - returns true if this is a new line char - */ -constexpr bool IsANewLine(int ch) noexcept { - return ch == '\r' || ch == '\n'; -} - -/* - * IsAWhitespace - * - returns true if this is a whitespace (or newline) char - */ -bool IsAWhitespace(int ch) noexcept { - return IsASpaceOrTab(ch) || IsANewLine(ch); -} - -/* - * IsAlphabet - * - returns true if this is an alphabetical char - */ -constexpr bool IsAlphabet(int ch) noexcept { - return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); -} - -/* - * IsCommentLine - * - returns true if this is a comment line - * - tests: SCE_RAKU_COMMENTLINE or SCE_RAKU_COMMENTEMBED - * modified from: LexPerl.cxx - */ -bool IsCommentLine(Sci_Position line, LexAccessor &styler, int type = SCE_RAKU_COMMENTLINE) { - Sci_Position pos = styler.LineStart(line); - Sci_Position eol_pos = styler.LineStart(line + 1) - 1; - for (Sci_Position i = pos; i < eol_pos; i++) { - char ch = styler[i]; - int style = styler.StyleAt(i); - if (type == SCE_RAKU_COMMENTEMBED) { - if (i == (eol_pos - 1) && style == type) - return true; - } else { // make sure the line is NOT a SCE_RAKU_COMMENTEMBED - if (ch == '#' && style == type && styler[i+1] != '`' ) - return true; - else if (!IsASpaceOrTab(ch)) - return false; - } - } - return false; -} - -/* - * ContainsQTo - * - returns true if this range contains ":to" in style SCE_RAKU_ADVERB indicating the start - * of a SCE_RAKU_HEREDOC_Q or SCE_RAKU_HEREDOC_QQ. - */ -bool ContainsQTo(Sci_Position start, Sci_Position end, LexAccessor &styler) { - std::string adverb; - for (Sci_Position i = start; i < end; i++) { - if (styler.StyleAt(i) == SCE_RAKU_ADVERB) { - adverb.push_back(styler[i]); - } - } - return adverb.find(":to") != std::string::npos; -} - -/* - * GetBracketCloseChar - * - returns the end bracket char: opposite of start - * - see: http://www.unicode.org/Public/5.1.0/ucd/BidiMirroring.txt (first section) - * - Categories are general matches for valid BiDi types - * - Most closer chars are opener + 1 - */ -int GetBracketCloseChar(const int ch) noexcept { - const CharacterCategory cc = CategoriseCharacter(ch); - switch (cc) { - case ccSm: - switch (ch) { - case 0x3C: return 0x3E; // LESS-THAN SIGN - case 0x2208: return 0x220B; // ELEMENT OF - case 0x2209: return 0x220C; // NOT AN ELEMENT OF - case 0x220A: return 0x220D; // SMALL ELEMENT OF - case 0x2215: return 0x29F5; // DIVISION SLASH - case 0x2243: return 0x22CD; // ASYMPTOTICALLY EQUAL TO - case 0x2298: return 0x29B8; // CIRCLED DIVISION SLASH - case 0x22A6: return 0x2ADE; // ASSERTION - case 0x22A8: return 0x2AE4; // TRUE - case 0x22A9: return 0x2AE3; // FORCES - case 0x22AB: return 0x2AE5; // DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE - case 0x22F2: return 0x22FA; // ELEMENT OF WITH LONG HORIZONTAL STROKE - case 0x22F3: return 0x22FB; // ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE - case 0x22F4: return 0x22FC; // SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE - case 0x22F6: return 0x22FD; // ELEMENT OF WITH OVERBAR - case 0x22F7: return 0x22FE; // SMALL ELEMENT OF WITH OVERBAR - case 0xFF1C: return 0xFF1E; // FULLWIDTH LESS-THAN SIGN - } - break; - case ccPs: - switch (ch) { - case 0x5B: return 0x5D; // LEFT SQUARE BRACKET - case 0x7B: return 0x7D; // LEFT CURLY BRACKET - case 0x298D: return 0x2990; // LEFT SQUARE BRACKET WITH TICK IN TOP CORNER - case 0x298F: return 0x298E; // LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER - case 0xFF3B: return 0xFF3D; // FULLWIDTH LEFT SQUARE BRACKET - case 0xFF5B: return 0xFF5D; // FULLWIDTH LEFT CURLY BRACKET - } - break; - case ccPi: - break; - default: return 0; - } - return ch + 1; -} - -/* - * IsValidQuoteOpener - * - - */ -bool IsValidQuoteOpener(const int ch, DelimPair &dp, int type = RAKUDELIM_BRACKET) noexcept { - dp.closer[0] = 0; - dp.closer[1] = 0; - dp.interpol = true; - if (type == RAKUDELIM_QUOTE) { - switch (ch) { - // Opener Closer Description - case '\'': dp.closer[0] = '\''; // APOSTROPHE - dp.interpol = false; - break; - case '"': dp.closer[0] = '"'; // QUOTATION MARK - break; - case 0x2018: dp.closer[0] = 0x2019; // LEFT SINGLE QUOTATION MARK - dp.interpol = false; - break; - case 0x201C: dp.closer[0] = 0x201D; // LEFT DOUBLE QUOTATION MARK - break; - case 0x201D: dp.closer[0] = 0x201C; // RIGHT DOUBLE QUOTATION MARK - break; - case 0x201E: dp.closer[0] = 0x201C; // DOUBLE LOW-9 QUOTATION MARK - dp.closer[1] = 0x201D; - break; - case 0xFF62: dp.closer[0] = 0xFF63; // HALFWIDTH LEFT CORNER BRACKET - dp.interpol = false; - break; - default: return false; - } - } else if (type == RAKUDELIM_BRACKET) { - dp.closer[0] = GetBracketCloseChar(ch); - } - dp.opener = ch; - dp.count = 1; - return dp.closer[0] > 0; -} - -/* - * IsBracketOpenChar - * - true if this is a valid start bracket character - */ -bool IsBracketOpenChar(int ch) noexcept { - return GetBracketCloseChar(ch) > 0; -} - -/* - * IsValidRegOrQAdjacent - * - returns true if ch is a valid character to put directly after Q / q - * * ref: Q Language: https://docs.raku.org/language/quoting - */ -bool IsValidRegOrQAdjacent(int ch) noexcept { - return !(IsAlphaNumeric(ch) || ch == '_' || ch == '(' || ch == ')' || ch == '\'' ); -} - -/* - * IsValidRegOrQPrecede - * - returns true if ch is a valid preceeding character to put directly before Q / q - * * ref: Q Language: https://docs.raku.org/language/quoting - */ -bool IsValidRegOrQPrecede(int ch) noexcept { - return !(IsAlphaNumeric(ch) || ch == '_'); -} - -/* - * MatchCharInRange - * - returns true if the mach character is found in range (of length) - * - ignoreDelim (default false) - */ -bool MatchCharInRange(StyleContext &sc, const Sci_Position length, - const int match, bool ignoreDelim = false) { - Sci_Position len = 0; - int chPrev = sc.chPrev; - while (++len < length) { - const int ch = sc.GetRelativeCharacter(len); - if (ch == match && (ignoreDelim || chPrev != '\\')) - return true; - } - return false; -} - -/* - * PrevNonWhitespaceChar - * - returns the last non-whitespace char - */ -int PrevNonWhitespaceChar(StyleContext &sc) { - Sci_Position rel = 0; - Sci_Position max_back = 0 - sc.currentPos; - while (--rel > max_back) { - const int ch = sc.GetRelativeCharacter(rel); - if (!IsAWhitespace(ch)) - return ch; - } - return 0; // no matching char -} - -/* - * IsQLangStartAtScPos - * - returns true if this is a valid Q Language sc position - * - ref: https://docs.raku.org/language/quoting - * - Q :adverb :adverb //; - * - q,qx,qw,qq,qqx,qqw,qqww :adverb /:adverb /; - */ -bool IsQLangStartAtScPos(StyleContext &sc, int &type, const Sci_Position length) { - const bool valid_adj = IsValidRegOrQAdjacent(sc.chNext); - const int chFw2 = sc.GetRelativeCharacter(2); - const int chFw3 = sc.GetRelativeCharacter(3); - type = -1; - if (IsValidRegOrQPrecede(sc.chPrev)) { - if (sc.ch == 'Q' && valid_adj) { - type = RAKUTYPE_QLANG; - } else if (sc.ch == 'q') { - switch (sc.chNext) { - case 'x': - type = RAKUTYPE_STR_QX; - break; - case 'w': - type = RAKUTYPE_STR_QW; - break; - case 'q': - if (chFw2 == 'x') { - type = RAKUTYPE_STR_QQX; - } else if (chFw2 == 'w') { - if (chFw3 == 'w') { - type = RAKUTYPE_STR_QQWW; - } else { - type = RAKUTYPE_STR_QQW; - } - } else { - type = RAKUTYPE_STR_QQ; - } - break; - default: - type = RAKUTYPE_STR_Q; - } - } else if (sc.ch == '<' && MatchCharInRange(sc, length, '>')) { - type = RAKUTYPE_STR_WQ; // < word quote > - } - } - return type >= 0; -} - -/* - * IsRegexStartAtScPos - * - returns true if this is a valid Regex sc position - * - ref: https://docs.raku.org/language/regexes - * - Regex: (rx/s/m/tr/y) :adverb /:adverb /; - * - regex R :adverb //; - * - /:adverb /; - */ -bool IsRegexStartAtScPos(StyleContext &sc, int &type, CharacterSet &set) { - const bool valid_adj = IsValidRegOrQAdjacent(sc.chNext); - type = -1; - if (IsValidRegOrQPrecede(sc.chPrev)) { - switch (sc.ch) { - case 'r': - if (sc.chNext == 'x') - type = RAKUTYPE_REGEX_RX; - break; - case 't': - case 'T': - if (sc.chNext == 'r' || sc.chNext == 'R') - type = RAKUTYPE_REGEX_TR; - break; - case 'm': - if (valid_adj) - type = RAKUTYPE_REGEX_M; - break; - case 's': - case 'S': - if (valid_adj) - type = RAKUTYPE_REGEX_S; - break; - case 'y': - if (valid_adj) - type = RAKUTYPE_REGEX_Y; - break; - case '/': - if (set.Contains(PrevNonWhitespaceChar(sc))) - type = RAKUTYPE_REGEX_NORM; - } - } - return type >= 0; -} - -/* - * IsValidIdentPrecede - * - returns if ch is a valid preceeding char to put directly before an identifier - */ -bool IsValidIdentPrecede(int ch) noexcept { - return !(IsAlphaNumeric(ch) || ch == '_' || ch == '@' || ch == '$' || ch == '%'); -} - -/* - * IsValidDelimiter - * - returns if ch is a valid delimiter (most chars are valid) - * * ref: Q Language: https://docs.raku.org/language/quoting - */ -bool IsValidDelimiter(int ch) noexcept { - return !(IsAlphaNumeric(ch) || ch == ':'); -} - -/* - * GetDelimiterCloseChar - * - returns the corrisponding close char for a given delimiter (could be the same char) - */ -int GetDelimiterCloseChar(int ch) noexcept { - int ch_end = GetBracketCloseChar(ch); - if (ch_end == 0 && IsValidDelimiter(ch)) { - ch_end = ch; - } - return ch_end; -} - -/* - * GetRepeatCharCount - * - returns the occurence count of match - */ -Sci_Position GetRepeatCharCount(StyleContext &sc, int chMatch, Sci_Position length) { - Sci_Position cnt = 0; - while (cnt < length) { - if (sc.GetRelativeCharacter(cnt) != chMatch) { - break; - } - cnt++; - } - return cnt; -} - -/* - * LengthToDelimiter - * - returns the length until the end of a delimited string section - * - Ignores nested delimiters (if opener != closer) - * - no trailing char after last closer (default false) - */ -Sci_Position LengthToDelimiter(StyleContext &sc, const DelimPair &dp, - Sci_Position length, bool noTrailing = false) { - short cnt_open = 0; // count open bracket - short cnt_close = 0; // count close bracket - Sci_Position len = 0; // count characters - int chOpener = dp.opener; // look for nested opener / closer - if (dp.opener == dp.closer[0]) - chOpener = 0; // no opening delimiter (no nesting possible) - - while (len < length) { - const int chPrev = sc.GetRelativeCharacter(len - 1); - const int ch = sc.GetRelativeCharacter(len); - const int chNext = sc.GetRelativeCharacter(len+1); - - if (cnt_open == 0 && cnt_close == dp.count) { - return len; // end condition has been met - } else { - if (chPrev != '\\' && ch == chOpener) { // ignore escape sequence - cnt_open++; // open nested bracket - } else if (chPrev != '\\' && dp.isCloser(ch)) { // ignore escape sequence - if ( cnt_open > 0 ) { - cnt_open--; // close nested bracket - } else if (dp.count > 1 && cnt_close < (dp.count - 1)) { - if (cnt_close > 1) { - if (dp.isCloser(chPrev)) { - cnt_close++; - } else { // reset if previous char was not close - cnt_close = 0; - } - } else { - cnt_close++; - } - } else if (!noTrailing || (IsAWhitespace(chNext))) { - cnt_close++; // found last close - if (cnt_close > 1 && !dp.isCloser(chPrev)) { - cnt_close = 0; // reset if previous char was not close - } - } else { - cnt_close = 0; // non handled close: reset - } - } else if (IsANewLine(ch)) { - cnt_open = 0; // reset after each line - cnt_close = 0; - } - } - len++; - } - return -1; // end condition has NOT been met -} - -/* - * LengthToEndHeredoc - * - returns the length until the end of a heredoc section - * - delimiter string MUST begin on a new line - */ -Sci_Position LengthToEndHeredoc(const StyleContext &sc, LexAccessor &styler, - const Sci_Position length, const char *delim) { - bool on_new_ln = false; - int i = 0; // str index - for (int n = 0; n < length; n++) { - const char ch = styler.SafeGetCharAt(sc.currentPos + n, 0); - if (on_new_ln) { - if (delim[i] == '\0') - return n; // at end of str, match found! - if (ch != delim[i++]) - i = 0; // no char match, reset 'i'ndex - } - if (i == 0) // detect new line - on_new_ln = IsANewLine(ch); - } - return -1; // no match found -} - -/* - * LengthToNextChar - * - returns the length until the next character - */ -Sci_Position LengthToNextChar(StyleContext &sc, const Sci_Position length) { - Sci_Position len = 0; - while (++len < length) { - const int ch = sc.GetRelativeCharacter(len); - if (!IsASpaceOrTab(ch) && !IsANewLine(ch)) { - break; - } - } - return len; -} - -/* - * GetRelativeString - * - gets a relitive string and sets it in &str - * - resets string before seting - */ -void GetRelativeString(StyleContext &sc, Sci_Position offset, Sci_Position length, - std::string &str) { - Sci_Position pos = offset; - str.clear(); - while (pos < length) { - str += sc.GetRelativeCharacter(pos++); - } -} - -} // end anonymous namespace - -/*----------------------------------------------------------------------------* - * --- class: LexerRaku --- - *----------------------------------------------------------------------------*/ -//class LexerRaku : public ILexerWithMetaData { -class LexerRaku : public DefaultLexer { - CharacterSet setWord; - CharacterSet setSigil; - CharacterSet setTwigil; - CharacterSet setOperator; - CharacterSet setSpecialVar; - WordList regexIdent; // identifiers that specify a regex - OptionsRaku options; // Options from config - OptionSetRaku osRaku; - WordList keywords; // Word Lists from config - WordList functions; - WordList typesBasic; - WordList typesComposite; - WordList typesDomainSpecific; - WordList typesExceptions; - WordList adverbs; - -public: - // Defined as explicit, so that constructor can not be copied - explicit LexerRaku() : - DefaultLexer("raku", SCLEX_RAKU), - setWord(CharacterSet::setAlphaNum, "-_", 0x80), - setSigil(CharacterSet::setNone, "$&%@"), - setTwigil(CharacterSet::setNone, "!*.:<=?^~"), - setOperator(CharacterSet::setNone, "^&\\()-+=|{}[]:;<>,?!.~"), - setSpecialVar(CharacterSet::setNone, "_/!") { - regexIdent.Set("regex rule token"); - } - // Deleted so LexerRaku objects can not be copied. - LexerRaku(const LexerRaku &) = delete; - LexerRaku(LexerRaku &&) = delete; - void operator=(const LexerRaku &) = delete; - void operator=(LexerRaku &&) = delete; - virtual ~LexerRaku() { - } - void SCI_METHOD Release() noexcept override { - delete this; - } - int SCI_METHOD Version() const noexcept override { - return lvRelease5; - } - const char *SCI_METHOD PropertyNames() override { - return osRaku.PropertyNames(); - } - int SCI_METHOD PropertyType(const char *name) override { - return osRaku.PropertyType(name); - } - const char *SCI_METHOD DescribeProperty(const char *name) override { - return osRaku.DescribeProperty(name); - } - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override; - const char *SCI_METHOD PropertyGet(const char *key) override { - return osRaku.PropertyGet(key); - } - const char *SCI_METHOD DescribeWordListSets() override { - return osRaku.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; - - static ILexer5 *LexerFactoryRaku() { - return new LexerRaku(); - } - -protected: - bool IsOperatorChar(const int ch); - bool IsWordChar(const int ch, bool allowNumber = true); - bool IsWordStartChar(const int ch); - bool IsNumberChar(const int ch, int base = 10); - bool ProcessRegexTwinCapture(StyleContext &sc, const Sci_Position length, - int &type, const DelimPair &dp); - void ProcessStringVars(StyleContext &sc, const Sci_Position length, const int varState); - bool ProcessValidRegQlangStart(StyleContext &sc, Sci_Position length, const int type, - WordList &wordsAdverbs, DelimPair &dp); - Sci_Position LengthToNonWordChar(StyleContext &sc, Sci_Position length, - char *s, const int size, Sci_Position offset = 0); -}; - -/*----------------------------------------------------------------------------* - * --- METHODS: LexerRaku --- - *----------------------------------------------------------------------------*/ - -/* - * LexerRaku::IsOperatorChar - * - Test for both ASCII and Unicode operators - * see: https://docs.raku.org/language/unicode_entry - */ -bool LexerRaku::IsOperatorChar(const int ch) { - if (ch > 0x7F) { - switch (ch) { - // Unicode ASCII Equiv. - case 0x2208: // (elem) - case 0x2209: // !(elem) - case 0x220B: // (cont) - case 0x220C: // !(cont) - case 0x2216: // (-) - case 0x2229: // (&) - case 0x222A: // (|) - case 0x2282: // (<) - case 0x2283: // (>) - case 0x2284: // !(<) - case 0x2285: // !(>) - case 0x2286: // (<=) - case 0x2287: // (>=) - case 0x2288: // !(<=) - case 0x2289: // !(>=) - case 0x228D: // (.) - case 0x228E: // (+) - case 0x2296: // (^) - return true; - } - } - return setOperator.Contains(ch); -} - -/* - * LexerRaku::IsWordChar - * - Test for both ASCII and Unicode identifier characters - * see: https://docs.raku.org/language/unicode_ascii - * also: ftp://ftp.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt - * FIXME: *still* may not contain all valid characters - */ -bool LexerRaku::IsWordChar(const int ch, bool allowNumber) { - // Unicode numbers should not apear in word identifiers - if (ch > 0x7F) { - const CharacterCategory cc = CategoriseCharacter(ch); - switch (cc) { - // Letters - case ccLu: - case ccLl: - case ccLt: - case ccLm: - case ccLo: - return true; - default: - return false; - } - } else if (allowNumber && IsADigit(ch)) { - return true; // an ASCII number type - } - return setWord.Contains(ch); -} - -/* - * LexerRaku::IsWordStartChar - * - Test for both ASCII and Unicode identifier "start / first" characters - */ -bool LexerRaku::IsWordStartChar(const int ch) { - return ch != '-' && IsWordChar(ch, false); // no numbers allowed -} - -/* - * LexerRaku::IsNumberChar - * - Test for both ASCII and Unicode identifier number characters - * see: https://docs.raku.org/language/unicode_ascii - * also: ftp://ftp.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt - * FILTERED by Unicode letters that are NUMBER - * and NOT PARENTHESIZED or CIRCLED - * FIXME: *still* may not contain all valid number characters - */ -bool LexerRaku::IsNumberChar(const int ch, int base) { - if (ch > 0x7F) { - const CharacterCategory cc = CategoriseCharacter(ch); - switch (cc) { - // Numbers - case ccNd: - case ccNl: - case ccNo: - return true; - default: - return false; - } - } - return IsADigit(ch, base); -} - -/* - * LexerRaku::PropertySet - * - - */ -Sci_Position SCI_METHOD LexerRaku::PropertySet(const char *key, const char *val) { - if (osRaku.PropertySet(&options, key, val)) - return 0; - return -1; -} - -/* - * LexerRaku::WordListSet - * - - */ -Sci_Position SCI_METHOD LexerRaku::WordListSet(int n, const char *wl) { - WordList *wordListN = nullptr; - switch (n) { - case 0: - wordListN = &keywords; - break; - case 1: - wordListN = &functions; - break; - case 2: - wordListN = &typesBasic; - break; - case 3: - wordListN = &typesComposite; - break; - case 4: - wordListN = &typesDomainSpecific; - break; - case 5: - wordListN = &typesExceptions; - break; - case 6: - wordListN = &adverbs; - break; - } - Sci_Position firstModification = -1; - if (wordListN) { - WordList wlNew; - wlNew.Set(wl); - if (*wordListN != wlNew) { - wordListN->Set(wl); - firstModification = 0; - } - } - return firstModification; -} - -/* - * LexerRaku::ProcessRegexTwinCapture - * - processes the transition between a regex pair (two sets of delimiters) - * - moves to first new delimiter, if a bracket - * - returns true when valid delimiter start found (if bracket) - */ -bool LexerRaku::ProcessRegexTwinCapture(StyleContext &sc, const Sci_Position length, - int &type, const DelimPair &dp) { - - if (type == RAKUTYPE_REGEX_S || type == RAKUTYPE_REGEX_TR || type == RAKUTYPE_REGEX_Y) { - type = -1; // clear type - - // move past chRegQClose if it was the previous char - if (dp.isCloser(sc.chPrev)) - sc.Forward(); - - // no processing needed for non-bracket - if (dp.isCloser(dp.opener)) - return true; - - // move to next opening bracket - const Sci_Position len = LengthToNextChar(sc, length); - if (sc.GetRelativeCharacter(len) == dp.opener) { - sc.Forward(len); - return true; - } - } - return false; -} - -/* - * LexerRaku::ProcessStringVars - * - processes a string and highlights any valid variables - */ -void LexerRaku::ProcessStringVars(StyleContext &sc, const Sci_Position length, const int varState) { - const int state = sc.state; - for (Sci_Position pos = 0; pos < length; pos++) { - if (sc.state == varState && !IsWordChar(sc.ch)) { - sc.SetState(state); - } else if (sc.chPrev != '\\' - && (sc.ch == '$' || sc.ch == '@') - && IsWordStartChar(sc.chNext)) { - sc.SetState(varState); - } - sc.Forward(); // Next character - } -} -/* - * LexerRaku::ProcessValidRegQlangStart - * - processes a section of the document range from after a Regex / Q delimiter - * - returns true on success - * - sets: adverbs, chOpen, chClose, chCount - * ref: https://docs.raku.org/language/regexes - */ -bool LexerRaku::ProcessValidRegQlangStart(StyleContext &sc, Sci_Position length, const int type, - WordList &wordsAdverbs, DelimPair &dp) { - Sci_Position startPos = sc.currentPos; - Sci_Position startLen = length; - const int target_state = sc.state; - int state = SCE_RAKU_DEFAULT; - std::string str; - - // find our opening delimiter (and occurrences) / save any adverbs - dp.opener = 0; // adverbs can be after the first delimiter - bool got_all_adverbs = false; // in Regex statements - bool got_ident = false; // regex can have an identifier: 'regex R' - sc.SetState(state); // set state default to avoid pre-highlights - while ((dp.opener == 0 || !got_all_adverbs) && sc.More()) { - - // move to the next non-space character - const bool was_space = IsAWhitespace(sc.ch); - if (!got_all_adverbs && was_space) { - sc.Forward(LengthToNextChar(sc, length)); - } - length = startLen - (sc.currentPos - startPos); // update length remaining - - // parse / eat an identifier (if type == RAKUTYPE_REGEX) - if (dp.opener == 0 && !got_ident && type == RAKUTYPE_REGEX && IsAlphabet(sc.ch)) { - - // eat identifier / account for special adverb :sym - bool got_sym = false; - while (sc.More()) { - sc.SetState(SCE_RAKU_IDENTIFIER); - while (sc.More() && (IsAlphaNumeric(sc.chNext) - || sc.chNext == '_' || sc.chNext == '-')) { - sc.Forward(); - } - sc.Forward(); - if (got_sym && sc.ch == '>') { - sc.SetState(SCE_RAKU_OPERATOR); // '>' - sc.Forward(); - break; - } else if (type == RAKUTYPE_REGEX && sc.Match(":sym<")) { - sc.SetState(SCE_RAKU_ADVERB); // ':sym' - sc.Forward(4); - sc.SetState(SCE_RAKU_OPERATOR); // '<' - sc.Forward(); - got_sym = true; - } else { - break; - } - } - sc.SetState(state); - got_ident = true; - } - - // parse / save an adverb: RAKUTYPE_REGEX only has adverbs after delim - // >= RAKUTYPE_QLANG only has adverbs before delim - else if (!got_all_adverbs && sc.ch == ':' && (!(dp.opener == 0 && got_ident) - && !(dp.opener > 0 && type >= RAKUTYPE_QLANG))) { - sc.SetState(SCE_RAKU_ADVERB); - while (IsAlphaNumeric(sc.chNext) && sc.More()) { - sc.Forward(); - str += sc.ch; - } - str += ' '; - sc.Forward(); - sc.SetState(state); - } - - // find starting delimiter - else if (dp.opener == 0 && (was_space || IsValidRegOrQAdjacent(sc.ch)) - && IsValidDelimiter(sc.ch)) { // make sure the delimiter is legal (most are) - sc.SetState((state = target_state));// start state here... - dp.opener = sc.ch; // this is our delimiter, get count - if (type < RAKUTYPE_QLANG) // type is Regex - dp.count = 1; // has only one delimiter - else - dp.count = GetRepeatCharCount(sc, dp.opener, length); - sc.Forward(dp.count); - } - - // we must have all the adverbs by now... - else { - if (got_all_adverbs) - break; // prevent infinite loop: occurs on missing open char - got_all_adverbs = true; - } - } - - // set word list / find a valid closing delimiter (or bomb!) - wordsAdverbs.Set(str.c_str()); - dp.closer[0] = GetDelimiterCloseChar(dp.opener); - dp.closer[1] = 0; // no other closer char - return dp.closer[0] > 0; -} - -/* - * LexerRaku::LengthToNonWordChar - * - returns the length until the next non "word" character: AlphaNum + '_' - * - also sets all the parsed chars in 's' - */ -Sci_Position LexerRaku::LengthToNonWordChar(StyleContext &sc, Sci_Position length, - char *s, const int size, Sci_Position offset) { - Sci_Position len = 0; - Sci_Position max_length = size < length ? size : length; - while (len <= max_length) { - const int ch = sc.GetRelativeCharacter(len + offset); - if (!IsWordChar(ch)) { - s[len] = '\0'; - break; - } - s[len] = ch; - len++; - } - s[len + 1] = '\0'; - return len; -} - -/* - * LexerRaku::Lex - * - Main lexer method - */ -void SCI_METHOD LexerRaku::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) { - LexAccessor styler(pAccess); - DelimPair dpEmbeded; // delimiter pair: embeded comments - DelimPair dpString; // delimiter pair: string - DelimPair dpRegQ; // delimiter pair: Regex / Q Lang - std::string hereDelim; // heredoc delimiter (if in heredoc) - int hereState = 0; // heredoc state to use (Q / QQ) - int numState = 0; // number state / type - short cntDecimal = 0; // number decinal count - std::string wordLast; // last word seen - std::string identLast; // last identifier seen - std::string adverbLast; // last (single) adverb seen - WordList lastAdverbs; // last adverbs seen - Sci_Position len; // temp length value - char s[100]; // temp char string - int typeDetect; // temp type detected (for regex and Q lang) - Sci_Position lengthToEnd; // length until the end of range - - // Backtrack to safe start position before complex quoted elements - - Sci_PositionU newStartPos = startPos; - if (initStyle != SCE_RAKU_DEFAULT) { - // Backtrack to last SCE_RAKU_DEFAULT or 0 - while (newStartPos > 0) { - newStartPos--; - if (styler.StyleAt(newStartPos) == SCE_RAKU_DEFAULT) - break; - } - // Backtrack to start of line before SCE_RAKU_HEREDOC_Q? - if (initStyle == SCE_RAKU_HEREDOC_Q || initStyle == SCE_RAKU_HEREDOC_QQ) { - if (newStartPos > 0) { - newStartPos = styler.LineStart(styler.GetLine(newStartPos)); - } - } - } else { - const Sci_Position line = styler.GetLine(newStartPos); - if (line > 0) { - // If the previous line is a start of a q or qq heredoc, backtrack to start of line - const Sci_Position startPreviousLine = styler.LineStart(line-1); - if (ContainsQTo(startPreviousLine, newStartPos, styler)) { - newStartPos = startPreviousLine; - } - } - } - - - // Re-calculate (any) changed startPos, length and initStyle state - if (newStartPos < startPos) { - initStyle = SCE_RAKU_DEFAULT; - length += startPos - newStartPos; - startPos = newStartPos; - } - - // init StyleContext - StyleContext sc(startPos, length, initStyle, styler); - - // StyleContext Loop - for (; sc.More(); sc.Forward()) { - lengthToEnd = (length - (sc.currentPos - startPos)); // end of range - - /* *** Determine if the current state should terminate ************** * - * Everything within the 'switch' statement processes characters up - * until the end of a syntax highlight section / state. - * ****************************************************************** */ - switch (sc.state) { - case SCE_RAKU_OPERATOR: - sc.SetState(SCE_RAKU_DEFAULT); - break; // FIXME: better valid operator sequences needed? - case SCE_RAKU_COMMENTLINE: - if (IsANewLine(sc.ch)) { - sc.SetState(SCE_RAKU_DEFAULT); - } - break; - case SCE_RAKU_COMMENTEMBED: - if ((len = LengthToDelimiter(sc, dpEmbeded, lengthToEnd)) >= 0) { - sc.Forward(len); // Move to end delimiter - sc.SetState(SCE_RAKU_DEFAULT); - } else { - sc.Forward(lengthToEnd); // no end delimiter found - } - break; - case SCE_RAKU_POD: - if (sc.atLineStart && sc.Match("=end pod")) { - sc.Forward(8); - sc.SetState(SCE_RAKU_DEFAULT); - } - break; - case SCE_RAKU_STRING: - - // Process the string for variables: move to end delimiter - if ((len = LengthToDelimiter(sc, dpString, lengthToEnd)) >= 0) { - if (dpString.interpol) { - ProcessStringVars(sc, len, SCE_RAKU_STRING_VAR); - } else { - sc.Forward(len); - } - sc.SetState(SCE_RAKU_DEFAULT); - } else { - sc.Forward(lengthToEnd); // no end delimiter found - } - break; - case SCE_RAKU_STRING_Q: - case SCE_RAKU_STRING_QQ: - case SCE_RAKU_STRING_Q_LANG: - - // No string: previous char was the delimiter - if (dpRegQ.count == 1 && dpRegQ.isCloser(sc.chPrev)) { - sc.SetState(SCE_RAKU_DEFAULT); - } - - // Process the string for variables: move to end delimiter - else if ((len = LengthToDelimiter(sc, dpRegQ, lengthToEnd)) >= 0) { - - // set (any) heredoc delimiter string - if (lastAdverbs.InList("to")) { - GetRelativeString(sc, -1, len - dpRegQ.count, hereDelim); - hereState = SCE_RAKU_HEREDOC_Q; // default heredoc state - } - - // select variable identifiers - if (sc.state == SCE_RAKU_STRING_QQ || lastAdverbs.InList("qq")) { - ProcessStringVars(sc, len, SCE_RAKU_STRING_VAR); - hereState = SCE_RAKU_HEREDOC_QQ; // potential heredoc state - } else { - sc.Forward(len); - } - sc.SetState(SCE_RAKU_DEFAULT); - } else { - sc.Forward(lengthToEnd); // no end delimiter found - } - break; - case SCE_RAKU_HEREDOC_Q: - case SCE_RAKU_HEREDOC_QQ: - if ((len = LengthToEndHeredoc(sc, styler, lengthToEnd, hereDelim.c_str())) >= 0) { - // select variable identifiers - if (sc.state == SCE_RAKU_HEREDOC_QQ) { - ProcessStringVars(sc, len, SCE_RAKU_STRING_VAR); - } else { - sc.Forward(len); - } - sc.SetState(SCE_RAKU_DEFAULT); - } else { - sc.Forward(lengthToEnd); // no end delimiter found - } - hereDelim.clear(); // clear heredoc delimiter - break; - case SCE_RAKU_REGEX: - // account for typeDetect = RAKUTYPE_REGEX_S/TR/Y - while (sc.state == SCE_RAKU_REGEX) { - - // No string: previous char was the delimiter - if (dpRegQ.count == 1 && dpRegQ.isCloser(sc.chPrev)) { - if (ProcessRegexTwinCapture(sc, lengthToEnd, typeDetect, dpRegQ)) - continue; - sc.SetState(SCE_RAKU_DEFAULT); - break; - } - - // Process the string for variables: move to end delimiter - else if ((len = LengthToDelimiter(sc, dpRegQ, lengthToEnd)) >= 0) { - ProcessStringVars(sc, len, SCE_RAKU_REGEX_VAR); - if (ProcessRegexTwinCapture(sc, lengthToEnd, typeDetect, dpRegQ)) - continue; - sc.SetState(SCE_RAKU_DEFAULT); - break; - } else { - sc.Forward(lengthToEnd); // no end delimiter found - break; - } - } - break; - case SCE_RAKU_NUMBER: - if (sc.ch == '.') { - if (sc.chNext == '.') { // '..' is an operator - sc.SetState(SCE_RAKU_OPERATOR); - sc.Forward(); - if (sc.chNext == '.') // '...' is also an operator - sc.Forward(); - break; - } else if (numState > RAKUNUM_FLOAT_EXP - && (cntDecimal < 1 || numState == RAKUNUM_VERSION)) { - cntDecimal++; - sc.Forward(); - } else { - sc.SetState(SCE_RAKU_DEFAULT); - break; // too many decinal places - } - } - switch (numState) { - case RAKUNUM_BINARY: - if (!IsNumberChar(sc.ch, 2)) - sc.SetState(SCE_RAKU_DEFAULT); - break; - case RAKUNUM_OCTAL: - if (!IsNumberChar(sc.ch, 8)) - sc.SetState(SCE_RAKU_DEFAULT); - break; - case RAKUNUM_HEX: - if (!IsNumberChar(sc.ch, 16)) - sc.SetState(SCE_RAKU_DEFAULT); - break; - case RAKUNUM_DECIMAL: - case RAKUNUM_VERSION: - if (!IsNumberChar(sc.ch)) - sc.SetState(SCE_RAKU_DEFAULT); - } - break; - case SCE_RAKU_WORD: - case SCE_RAKU_FUNCTION: - case SCE_RAKU_TYPEDEF: - case SCE_RAKU_ADVERB: - sc.SetState(SCE_RAKU_DEFAULT); - break; - case SCE_RAKU_MU: - case SCE_RAKU_POSITIONAL: - case SCE_RAKU_ASSOCIATIVE: - case SCE_RAKU_CALLABLE: - case SCE_RAKU_IDENTIFIER: - case SCE_RAKU_GRAMMAR: - case SCE_RAKU_CLASS: - sc.SetState(SCE_RAKU_DEFAULT); - break; - } - - /* *** Determine if a new state should be entered ******************* * - * Everything below here identifies the beginning of a state, all or part - * of the characters within this state are processed here, the rest are - * completed above in the terminate state section. - * ****************************************************************** */ - if (sc.state == SCE_RAKU_DEFAULT) { - - // --- Single line comment - if (sc.ch == '#') { - sc.SetState(SCE_RAKU_COMMENTLINE); - } - - // --- POD block - else if (sc.atLineStart && sc.Match("=begin pod")) { - sc.SetState(SCE_RAKU_POD); - sc.Forward(10); - } - - // --- String (normal) - else if (sc.chPrev != '\\' && (IsValidQuoteOpener(sc.ch, dpString, RAKUDELIM_QUOTE))) { - sc.SetState(SCE_RAKU_STRING); - } - - // --- String (Q Language) ---------------------------------------- - // - https://docs.raku.org/language/quoting - // - Q :adverb :adverb //; - // - q,qx,qw,qq,qqx,qqw,qqww :adverb :adverb //; - else if (IsQLangStartAtScPos(sc, typeDetect, lengthToEnd)) { - int state = SCE_RAKU_STRING_Q_LANG; - Sci_Position forward = 1; // single char ident (default) - if (typeDetect > RAKUTYPE_QLANG) { - state = SCE_RAKU_STRING_Q; - if (typeDetect == RAKUTYPE_STR_WQ) - forward = 0; // no char ident - } - if (typeDetect > RAKUTYPE_STR_Q) { - if (typeDetect == RAKUTYPE_STR_QQ) - state = SCE_RAKU_STRING_QQ; - forward++; // two char ident - } - if (typeDetect > RAKUTYPE_STR_QQ) - forward++; // three char ident - if (typeDetect == RAKUTYPE_STR_QQWW) - forward++; // four char ident - - // Proceed: check for a valid character after statement - if (IsValidRegOrQAdjacent(sc.GetRelative(forward)) || typeDetect == RAKUTYPE_QLANG) { - sc.SetState(state); - sc.Forward(forward); - lastAdverbs.Clear(); - - // Process: adverbs / opening delimiter / adverbs after delim - if (ProcessValidRegQlangStart(sc, lengthToEnd, typeDetect, - lastAdverbs, dpRegQ)) - sc.SetState(state); - } - } - - // --- Regex (rx/s/m/tr/y) ---------------------------------------- - // - https://docs.raku.org/language/regexes - else if ((IsRegexStartAtScPos(sc, typeDetect, setOperator) || regexIdent.InList(wordLast.c_str()))) { - if (typeDetect == -1) { // must be a regex identifier word - wordLast.clear(); - typeDetect = RAKUTYPE_REGEX; - } - Sci_Position forward = 0; // no ident (RAKUTYPE_REGEX, RAKUTYPE_REGEX_NORM) - if (typeDetect > 0 && typeDetect != RAKUTYPE_REGEX) - forward++; // single char ident - if (typeDetect > RAKUTYPE_REGEX) - forward++; // two char ident - - // Proceed: check for a valid character after statement - if (IsValidRegOrQAdjacent(sc.GetRelative(forward)) || typeDetect == RAKUTYPE_REGEX_NORM) { - sc.SetState(SCE_RAKU_REGEX); - sc.Forward(forward); - lastAdverbs.Clear(); - - // Process: adverbs / opening delimiter / adverbs after delim - if (ProcessValidRegQlangStart(sc, lengthToEnd, typeDetect, - lastAdverbs, dpRegQ)) - sc.SetState(SCE_RAKU_REGEX); - } - } - - // --- Numbers ---------------------------------------------------- - else if (IsValidIdentPrecede(sc.chPrev) && (IsNumberChar(sc.ch) - || (sc.ch == 'v' && IsNumberChar(sc.chNext) && wordLast == "use"))) { - numState = RAKUNUM_DECIMAL; // default: decimal (base 10) - cntDecimal = 0; - sc.SetState(SCE_RAKU_NUMBER); - if (sc.ch == 'v') // forward past 'v' - sc.Forward(); - if (wordLast == "use") { // package version number - numState = RAKUNUM_VERSION; - } else if (sc.ch == '0') { // other type of number - switch (sc.chNext) { - case 'b': // binary (base 2) - numState = RAKUNUM_BINARY; - break; - case 'o': // octal (base 8) - numState = RAKUNUM_OCTAL; - break; - case 'x': // hexadecimal (base 16) - numState = RAKUNUM_HEX; - } - if (numState != RAKUNUM_DECIMAL) - sc.Forward(); // forward to number type char - } - } - - // --- Keywords / functions / types / barewords ------------------- - else if ((sc.currentPos == 0 || sc.atLineStart || IsValidIdentPrecede(sc.chPrev)) - && IsWordStartChar(sc.ch)) { - len = LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s)); - if (keywords.InList(s)) { - sc.SetState(SCE_RAKU_WORD); // Keywords - } else if(functions.InList(s)) { - sc.SetState(SCE_RAKU_FUNCTION); // Functions - } else if(typesBasic.InList(s)) { - sc.SetState(SCE_RAKU_TYPEDEF); // Types (basic) - } else if(typesComposite.InList(s)) { - sc.SetState(SCE_RAKU_TYPEDEF); // Types (composite) - } else if(typesDomainSpecific.InList(s)) { - sc.SetState(SCE_RAKU_TYPEDEF); // Types (domain-specific) - } else if(typesExceptions.InList(s)) { - sc.SetState(SCE_RAKU_TYPEDEF); // Types (exceptions) - } else { - if (wordLast == "class") - sc.SetState(SCE_RAKU_CLASS); // a Class ident - else if (wordLast == "grammar") - sc.SetState(SCE_RAKU_GRAMMAR); // a Grammar ident - else - sc.SetState(SCE_RAKU_IDENTIFIER); // Bareword - identLast = s; // save identifier - } - if (adverbLast == "sym") { // special adverb ":sym" - sc.SetState(SCE_RAKU_IDENTIFIER); // treat as identifier - identLast = s; // save identifier - } - if (sc.state != SCE_RAKU_IDENTIFIER) - wordLast = s; // save word - sc.Forward(len - 1); // ...forward past word - } - - // --- Adverbs ---------------------------------------------------- - else if (sc.ch == ':' && IsWordStartChar(sc.chNext)) { - len = LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s), 1); - if (adverbs.InList(s)) { - sc.SetState(SCE_RAKU_ADVERB); // Adverbs (begin with ':') - adverbLast = s; // save word - sc.Forward(len); // ...forward past word (less offset: 1) - } - } - - // --- Identifiers: $mu / @positional / %associative / &callable -- - // see: https://docs.raku.org/language/variables - else if (setSigil.Contains(sc.ch) && (setTwigil.Contains(sc.chNext) - || setSpecialVar.Contains(sc.chNext) - || IsWordStartChar(sc.chNext))) { - - // State based on sigil - switch (sc.ch) { - case '$': sc.SetState(SCE_RAKU_MU); - break; - case '@': sc.SetState(SCE_RAKU_POSITIONAL); - break; - case '%': sc.SetState(SCE_RAKU_ASSOCIATIVE); - break; - case '&': sc.SetState(SCE_RAKU_CALLABLE); - } - const int state = sc.state; - sc.Forward(); - char ch_delim = 0; - if (setSpecialVar.Contains(sc.ch) - && !setWord.Contains(sc.chNext)) { // Process Special Var - ch_delim = -1; - } else if (setTwigil.Contains(sc.ch)) { // Process Twigil - sc.SetState(SCE_RAKU_OPERATOR); - if (sc.ch == '<' && setWord.Contains(sc.chNext)) - ch_delim = '>'; - sc.Forward(); - sc.SetState(state); - } - - // Process (any) identifier - if (ch_delim >= 0) { - sc.Forward(LengthToNonWordChar(sc, lengthToEnd, s, sizeof(s)) - 1); - if (ch_delim > 0 && sc.chNext == ch_delim) { - sc.Forward(); - sc.SetState(SCE_RAKU_OPERATOR); - } - identLast = s; // save identifier - } - } - - // --- Operators -------------------------------------------------- - else if (IsOperatorChar(sc.ch)) { - // FIXME: better valid operator sequences needed? - sc.SetState(SCE_RAKU_OPERATOR); - } - - // --- Heredoc: begin --------------------------------------------- - else if (!hereDelim.empty() && sc.atLineEnd) { - if (IsANewLine(sc.ch)) - sc.Forward(); // skip a possible CRLF situation - sc.SetState(hereState); - } - - // Reset words: on operator simi-colon OR '}' (end of statement) - if (sc.state == SCE_RAKU_OPERATOR && (sc.ch == ';' || sc.ch == '}')) { - wordLast.clear(); - identLast.clear(); - adverbLast.clear(); - } - } - - /* *** Determine if an "embedded comment" is to be entered ********** * - * This type of embedded comment section, or multi-line comment comes - * after a normal comment has begun... e.g: #`[ ... ] - * ****************************************************************** */ - else if (sc.state == SCE_RAKU_COMMENTLINE && sc.chPrev == '#' && sc.ch == '`') { - if (IsBracketOpenChar(sc.chNext)) { - sc.Forward(); // Condition met for "embedded comment" - dpEmbeded.opener = sc.ch; - - // Find the opposite (termination) closeing bracket (if any) - dpEmbeded.closer[0] = GetBracketCloseChar(dpEmbeded.opener); - if (dpEmbeded.closer[0] > 0) { // Enter "embedded comment" - - // Find multiple opening character occurence - dpEmbeded.count = GetRepeatCharCount(sc, dpEmbeded.opener, lengthToEnd); - sc.SetState(SCE_RAKU_COMMENTEMBED); - sc.Forward(dpEmbeded.count - 1); // incremented in the next loop - } - } - } - } - - // And we're done... - sc.Complete(); -} - -/* - * LexerRaku::Lex - * - Main fold method - * NOTE: although Raku uses and supports UNICODE characters, we're only looking - * at normal chars here, using 'SafeGetCharAt' - for folding purposes - * that is all we need. - */ -#define RAKU_HEADFOLD_SHIFT 4 -#define RAKU_HEADFOLD_MASK 0xF0 -void SCI_METHOD LexerRaku::Fold(Sci_PositionU startPos, Sci_Position length, int /* initStyle */, IDocument *pAccess) { - - // init LexAccessor / return if fold option is off - if (!options.fold) return; - LexAccessor styler(pAccess); - - // init char and line positions - const Sci_PositionU endPos = startPos + length; - Sci_Position lineCurrent = styler.GetLine(startPos); - - // Backtrack to last SCE_RAKU_DEFAULT line - if (startPos > 0 && lineCurrent > 0) { - while (lineCurrent > 0 && styler.StyleAt(startPos) != SCE_RAKU_DEFAULT) { - lineCurrent--; - startPos = styler.LineStart(lineCurrent); - } - lineCurrent = styler.GetLine(startPos); - } - Sci_PositionU lineStart = startPos; - Sci_PositionU lineStartNext = styler.LineStart(lineCurrent + 1); - - // init line folding level - int levelPrev = SC_FOLDLEVELBASE; - if (lineCurrent > 0) - levelPrev = styler.LevelAt(lineCurrent - 1) >> 16; - int levelCurrent = levelPrev; - - // init char and style variables - char chNext = styler[startPos]; - int stylePrev = styler.StyleAt(startPos - 1); - int styleNext = styler.StyleAt(startPos); - int styleNextStartLine = styler.StyleAt(lineStartNext); - int visibleChars = 0; - bool wasCommentMulti = false; - - // main loop - for (Sci_PositionU i = startPos; i < endPos; i++) { - - // next char, style and flags - const char ch = chNext; - chNext = styler.SafeGetCharAt(i + 1); - const int style = styleNext; - styleNext = styler.StyleAt(i + 1); - const bool atEOL = i == (lineStartNext - 1); - const bool atLineStart = i == lineStart; - - // --- Comments / Multi-line / POD ------------------------------------ - if (options.foldComment) { - - // Multi-line - if (options.foldCommentMultiline) { - if (style == SCE_RAKU_COMMENTLINE && atLineStart && ch == '#' && chNext == '`' - && styleNextStartLine == SCE_RAKU_COMMENTEMBED) { - levelCurrent++; - wasCommentMulti = true; // don't confuse line comments - } else if (style == SCE_RAKU_COMMENTEMBED && atLineStart - && styleNextStartLine != SCE_RAKU_COMMENTEMBED) { - levelCurrent--; - } - } - - // Line comments - if (!wasCommentMulti && atEOL && stylePrev == SCE_RAKU_COMMENTLINE - && IsCommentLine(lineCurrent, styler)) { - if (!IsCommentLine(lineCurrent - 1, styler) - && IsCommentLine(lineCurrent + 1, styler)) - levelCurrent++; - else if (IsCommentLine(lineCurrent - 1, styler) - && !IsCommentLine(lineCurrent + 1, styler)) - levelCurrent--; - } - - // POD - if (options.foldCommentPOD && atLineStart && style == SCE_RAKU_POD) { - if (styler.Match(i, "=begin")) - levelCurrent++; - else if (styler.Match(i, "=end")) - levelCurrent--; - } - } - - // --- Code block ----------------------------------------------------- - if (style == SCE_RAKU_OPERATOR) { - if (ch == '{') { - if (levelCurrent < levelPrev) levelPrev--; - levelCurrent++; - } else if (ch == '}') { - levelCurrent--; - } - } - - // --- at end of line / range / apply fold ---------------------------- - if (atEOL) { - int level = levelPrev; - - // set level flags - level |= levelCurrent << 16; - if (visibleChars == 0 && options.foldCompact) - level |= SC_FOLDLEVELWHITEFLAG; - if ((levelCurrent > levelPrev) && (visibleChars > 0)) - level |= SC_FOLDLEVELHEADERFLAG; - if (level != styler.LevelAt(lineCurrent)) { - styler.SetLevel(lineCurrent, level); - } - lineCurrent++; - lineStart = lineStartNext; - lineStartNext = styler.LineStart(lineCurrent + 1); - styleNextStartLine = styler.StyleAt(lineStartNext); - levelPrev = levelCurrent; - visibleChars = 0; - wasCommentMulti = false; - } - - // increment visibleChars / set previous char - if (!isspacechar(ch)) - visibleChars++; - stylePrev = style; - } - - // Done: set real level of the next line - int flagsNext = styler.LevelAt(lineCurrent) & ~SC_FOLDLEVELNUMBERMASK; - styler.SetLevel(lineCurrent, levelPrev | flagsNext); -} - -/*----------------------------------------------------------------------------* - * --- Scintilla: LexerModule --- - *----------------------------------------------------------------------------*/ - -LexerModule lmRaku(SCLEX_RAKU, LexerRaku::LexerFactoryRaku, "raku", rakuWordLists); diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexX12.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexers/LexX12.cxx deleted file mode 100644 index 0f3bf22c8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexers/LexX12.cxx +++ /dev/null @@ -1,400 +0,0 @@ -// 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 -// 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. -// - -// Header order must match order in scripts/HeaderOrder.txt -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include "ILexer.h" -#include "Scintilla.h" -#include "SciLexer.h" -#include "LexerModule.h" -#include "DefaultLexer.h" - -using namespace Scintilla; -using namespace Lexilla; - -class LexerX12 : public DefaultLexer -{ -public: - LexerX12(); - virtual ~LexerX12() {} // virtual destructor, as we inherit from ILexer - - static ILexer5 *Factory() { - return new LexerX12; - } - - int SCI_METHOD Version() const override - { - return lvRelease5; - } - void SCI_METHOD Release() override - { - delete this; - } - - const char * SCI_METHOD PropertyNames() override - { - return "fold"; - } - int SCI_METHOD PropertyType(const char *) override - { - return SC_TYPE_BOOLEAN; // Only one property! - } - const char * SCI_METHOD DescribeProperty(const char *name) override - { - if (!strcmp(name, "fold")) - return "Whether to apply folding to document or not"; - return ""; - } - - Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) override - { - if (!strcmp(key, "fold")) - { - m_bFold = strcmp(val, "0") ? true : false; - return 0; - } - return -1; - } - const char * SCI_METHOD PropertyGet(const char *) override { - return ""; - } - const char * SCI_METHOD DescribeWordListSets() override - { - return ""; - } - Sci_Position SCI_METHOD WordListSet(int, const char *) override - { - return -1; - } - 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 NULL; - } - -protected: - struct Terminator - { - int Style = SCE_X12_BAD; - Sci_PositionU pos = 0; - Sci_PositionU length = 0; - int FoldChange = 0; - }; - Terminator InitialiseFromISA(IDocument *pAccess); - Sci_PositionU FindPreviousSegmentStart(IDocument *pAccess, Sci_Position startPos) const; - Terminator DetectSegmentHeader(IDocument *pAccess, Sci_PositionU pos) const; - Terminator FindNextTerminator(IDocument *pAccess, Sci_PositionU pos, bool bJustSegmentTerminator = false) const; - - bool m_bFold = false; - char m_SeparatorSubElement = 0; - char m_SeparatorElement = 0; - std::string m_SeparatorSegment; // might be multiple characters - std::string m_LineFeed; -}; - -LexerModule lmX12(SCLEX_X12, LexerX12::Factory, "x12"); - -/////////////////////////////////////////////////////////////////////////////// - - - -/////////////////////////////////////////////////////////////////////////////// - -LexerX12::LexerX12() : DefaultLexer("x12", SCLEX_X12) -{ -} - -void LexerX12::Lex(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) -{ - Sci_PositionU posFinish = startPos + length; - - Terminator T = InitialiseFromISA(pAccess); - - if (T.Style == SCE_X12_BAD) - { - if (T.pos < startPos) - T.pos = startPos; // we may be colouring in batches. - pAccess->StartStyling(startPos); - pAccess->SetStyleFor(T.pos - startPos, SCE_X12_ENVELOPE); - pAccess->SetStyleFor(posFinish - T.pos, SCE_X12_BAD); - return; - } - - // Look backwards for a segment start or a document beginning - Sci_PositionU posCurrent = FindPreviousSegmentStart (pAccess, startPos); - - // Style buffer, so we're not issuing loads of notifications - pAccess->StartStyling(posCurrent); - - while (posCurrent < posFinish) - { - // Look for first element marker, so we can denote segment - T = DetectSegmentHeader(pAccess, posCurrent); - if (T.Style == SCE_X12_BAD) - break; - - pAccess->SetStyleFor(T.pos - posCurrent, T.Style); - pAccess->SetStyleFor(T.length, SCE_X12_SEP_ELEMENT); - posCurrent = T.pos + T.length; - - while (T.Style != SCE_X12_BAD && T.Style != SCE_X12_SEGMENTEND) // Break on bad or segment ending - { - T = FindNextTerminator(pAccess, posCurrent, false); - if (T.Style == SCE_X12_BAD) - break; - - int Style = T.Style; - - pAccess->SetStyleFor(T.pos - posCurrent, SCE_X12_DEFAULT); - pAccess->SetStyleFor(T.length, Style); - posCurrent = T.pos + T.length; - } - if (T.Style == SCE_X12_BAD) - break; - } - - pAccess->SetStyleFor(posFinish - posCurrent, SCE_X12_BAD); -} - -void LexerX12::Fold(Sci_PositionU startPos, Sci_Position length, int, IDocument *pAccess) -{ - if (!m_bFold) - return; - - // Are we even foldable? - // check for cr,lf,cr+lf. - if (m_LineFeed.empty()) - return; - - Sci_PositionU posFinish = startPos + length; - - // Look backwards for a segment start or a document beginning - startPos = FindPreviousSegmentStart(pAccess, startPos); - Terminator T; - - Sci_PositionU currLine = pAccess->LineFromPosition(startPos); - int levelCurrentStyle = SC_FOLDLEVELBASE; - int indentCurrent = 0; - if (currLine > 0) - { - levelCurrentStyle = pAccess->GetLevel(currLine - 1); // bottom 12 bits are level - indentCurrent = levelCurrentStyle & (SC_FOLDLEVELBASE - 1); // indent from previous line - Sci_PositionU posLine = pAccess->LineStart(currLine - 1); - T = DetectSegmentHeader(pAccess, posLine); - indentCurrent += T.FoldChange; - } - - while (startPos < posFinish) - { - T = DetectSegmentHeader(pAccess, startPos); - int indentNext = indentCurrent + T.FoldChange; - if (indentNext < 0) - indentNext = 0; - - levelCurrentStyle = (T.FoldChange > 0) ? (SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG) : SC_FOLDLEVELBASE; - - currLine = pAccess->LineFromPosition(startPos); - pAccess->SetLevel(currLine, levelCurrentStyle | indentCurrent); - - T = FindNextTerminator(pAccess, startPos, true); - - if (T.Style == SCE_X12_BAD) - break; - - startPos = T.pos + T.length; - indentCurrent = indentNext; - } -} - -LexerX12::Terminator LexerX12::InitialiseFromISA(IDocument *pAccess) -{ - Sci_Position length = pAccess->Length(); - if (length <= 108) - return { SCE_X12_BAD, 0 }; - - pAccess->GetCharRange(&m_SeparatorElement, 3, 1); - pAccess->GetCharRange(&m_SeparatorSubElement, 104, 1); - - // Look for GS, as that's the next segment. Anything between 105 and GS is our segment separator. - Sci_Position posGS; - char bufGS[3] = { 0 }; - for (posGS = 105; posGS < length - 2; posGS++) - { - pAccess->GetCharRange(bufGS, posGS, 2); - if (bufGS[0] == 'G' && bufGS[1] == 'S') - { - m_SeparatorSegment.resize(posGS - 105); - pAccess->GetCharRange(&m_SeparatorSegment.at(0), 105, posGS - 105); - - // Is some of that CR+LF? - size_t nPos = m_SeparatorSegment.find_last_not_of("\r\n"); - m_LineFeed = m_SeparatorSegment.substr(nPos + 1); - m_SeparatorSegment = m_SeparatorSegment.substr(0, nPos + 1); - break; - } - } - if (m_SeparatorSegment.empty() && m_LineFeed.empty()) - { - return { SCE_X12_BAD, 105 }; - } - - // Validate we have an element separator, and it's not silly! - if (m_SeparatorElement == '\0' || m_SeparatorElement == '\n' || m_SeparatorElement == '\r') - return { SCE_X12_BAD, 3 }; - - // Validate we have an element separator, and it's not silly! - if (m_SeparatorSubElement == '\0' || m_SeparatorSubElement == '\n' || m_SeparatorSubElement == '\r') - return { SCE_X12_BAD, 103 }; - if (m_SeparatorElement == m_SeparatorSubElement) - return { SCE_X12_BAD, 104 }; - for (auto& c : m_SeparatorSegment) - { - if (m_SeparatorElement == c) - return { SCE_X12_BAD, 105 }; - if (m_SeparatorSubElement == c) - return { SCE_X12_BAD, 105 }; - } - - // Check we have element markers at all the right places! ISA element has fixed entries. - std::vector ElementMarkers = { 3, 6, 17, 20, 31, 34, 50, 53, 69, 76, 81, 83, 89, 99, 101, 103 }; - for (auto i : ElementMarkers) - { - char c; - pAccess->GetCharRange(&c, i, 1); - if (c != m_SeparatorElement) - return { SCE_X12_BAD, i }; - } - // Check we have no element markers anywhere else! - for (Sci_PositionU i = 0; i < 105; i++) - { - if (std::find(ElementMarkers.begin(), ElementMarkers.end(), i) != ElementMarkers.end()) - continue; - - char c; - pAccess->GetCharRange(&c, i, 1); - if (c == m_SeparatorElement) - return { SCE_X12_BAD, i }; - } - - return { SCE_X12_ENVELOPE }; -} - -Sci_PositionU LexerX12::FindPreviousSegmentStart(IDocument *pAccess, Sci_Position startPos) const -{ - Sci_PositionU length = pAccess->Length(); - std::string bufTest = m_SeparatorSegment + m_LineFeed; // quick way of making the lengths the same - std::string bufCompare = bufTest; - - for (; startPos > 0; startPos--) - { - if (startPos + bufTest.size() > length) - continue; - - pAccess->GetCharRange(&bufTest.at(0), startPos, bufTest.size()); - if (bufTest == bufCompare) - { - return startPos + bufTest.size(); - } - } - // We didn't find a ', so just go with the beginning - return 0; -} - -LexerX12::Terminator LexerX12::DetectSegmentHeader(IDocument *pAccess, Sci_PositionU pos) const -{ - Sci_PositionU Length = pAccess->Length(); - Length -= pos; - char c, Buf[4] = { 0 }; // max 3 + separator - for (Sci_PositionU posOffset = 0; posOffset < std::size(Buf) && posOffset < Length; posOffset++) - { - pAccess->GetCharRange(&c, pos + posOffset, 1); - if (c != m_SeparatorElement) - { - Buf[posOffset] = c; - continue; - } - - // check for special segments, involved in folding start/stop. - if (memcmp(Buf, "ISA", 3) == 0) - return { SCE_X12_ENVELOPE, pos + posOffset, 1, +1 }; - if (memcmp(Buf, "IEA", 3) == 0) - return { SCE_X12_ENVELOPE, pos + posOffset, 1, -1 }; - if (memcmp(Buf, "GS", 2) == 0) - return { SCE_X12_FUNCTIONGROUP, pos + posOffset, 1, +1 }; - if (memcmp(Buf, "GE", 2) == 0) - return { SCE_X12_FUNCTIONGROUP, pos + posOffset, 1, -1 }; - if (memcmp(Buf, "ST", 2) == 0) - return { SCE_X12_TRANSACTIONSET, pos + posOffset, 1, +1 }; - if (memcmp(Buf, "SE", 2) == 0) - return { SCE_X12_TRANSACTIONSET, pos + posOffset, 1, -1 }; - return { SCE_X12_SEGMENTHEADER, pos + posOffset, 1, 0 }; - } - return { SCE_X12_BAD, pos, 0, 0 }; -} - -LexerX12::Terminator LexerX12::FindNextTerminator(IDocument *pAccess, Sci_PositionU pos, bool bJustSegmentTerminator) const -{ - char c; - Sci_PositionU length = pAccess->Length(); - std::string bufTestSegment = m_SeparatorSegment; // quick way of making the lengths the same - std::string bufTestLineFeed = m_LineFeed; // quick way of making the lengths the same - - - while (pos < (Sci_PositionU)length) - { - pAccess->GetCharRange(&c, pos, 1); - if (pos + m_SeparatorSegment.size() > length) - bufTestSegment.clear(); // going up - so once we can't get this, we're done with the buffer. - else if (!bufTestSegment.empty()) - pAccess->GetCharRange(&bufTestSegment.at(0), pos, bufTestSegment.size()); - if (pos + m_LineFeed.size() > length) - bufTestLineFeed.clear(); // going up - so once we can't get this, we're done with the buffer. - else if (!bufTestLineFeed.empty()) - pAccess->GetCharRange(&bufTestLineFeed.at(0), pos, bufTestLineFeed.size()); - - if (!bJustSegmentTerminator && c == m_SeparatorElement) - return { SCE_X12_SEP_ELEMENT, pos, 1 }; - else if (!bJustSegmentTerminator && c == m_SeparatorSubElement) - return { SCE_X12_SEP_SUBELEMENT, pos, 1 }; - else if (!m_SeparatorSegment.empty() && bufTestSegment == m_SeparatorSegment) - { - if (m_LineFeed.empty()) - return { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() }; - // is this the end? - if (pos + m_SeparatorSegment.size() == length) - return { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() }; - // Check if we're followed by a linefeed. - if (pos + m_SeparatorSegment.size() + m_LineFeed.size() > length) - return { SCE_X12_BAD, pos }; - bufTestSegment = m_LineFeed; - pAccess->GetCharRange(&bufTestSegment.at(0), pos + m_SeparatorSegment.size(), bufTestSegment.size()); - if (bufTestSegment == m_LineFeed) - return { SCE_X12_SEGMENTEND, pos, m_SeparatorSegment.size() + m_LineFeed.size() }; - break; - } - else if (m_SeparatorSegment.empty() && bufTestLineFeed == m_LineFeed) - { - return { SCE_X12_SEGMENTEND, pos, m_LineFeed.size() }; - } - pos++; - } - - return { SCE_X12_BAD, pos }; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CatalogueModules.h b/3rdparty/unioncode-scintilla515/lexilla/lexlib/CatalogueModules.h deleted file mode 100644 index f66ef8920..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/CatalogueModules.h +++ /dev/null @@ -1,74 +0,0 @@ -// Scintilla source code edit control -/** @file CatalogueModules.h - ** Lexer infrastructure. - ** Contains a list of LexerModules which can be searched to find a module appropriate for a - ** particular language. - **/ -// Copyright 1998-2010 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef CATALOGUEMODULES_H -#define CATALOGUEMODULES_H - -namespace Lexilla { - -class CatalogueModules { - std::vector lexerCatalogue; -public: - const LexerModule *Find(int language) const { - for (const LexerModule *lm : lexerCatalogue) { - if (lm->GetLanguage() == language) { - return lm; - } - } - return nullptr; - } - - const LexerModule *Find(const char *languageName) const noexcept { - if (languageName) { - for (const LexerModule *lm : lexerCatalogue) { - if (lm->languageName && (0 == strcmp(lm->languageName, languageName))) { - return lm; - } - } - } - return nullptr; - } - - void AddLexerModule(LexerModule *plm) { - lexerCatalogue.push_back(plm); - } - - void AddLexerModules(std::initializer_list modules) { - lexerCatalogue.insert(lexerCatalogue.end(), modules); - } - - unsigned int Count() const noexcept { - return static_cast(lexerCatalogue.size()); - } - - const char *Name(unsigned int index) const noexcept { - if (index < static_cast(lexerCatalogue.size())) { - return lexerCatalogue[index]->languageName; - } else { - return ""; - } - } - - LexerFactoryFunction Factory(unsigned int index) const noexcept { - // Works for object lexers but not for function lexers - return lexerCatalogue[index]->fnFactory; - } - - Scintilla::ILexer5 *Create(unsigned int index) const { - const LexerModule *plm = lexerCatalogue[index]; - if (!plm) { - return nullptr; - } - return plm->Create(); - } -}; - -} - -#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.cxx deleted file mode 100644 index 7a15fb614..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/LexAccessor.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Scintilla source code edit control -/** @file LexAccessor.cxx - ** Interfaces between Scintilla and lexers. - **/ -// Copyright 1998-2010 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. -#include -#include - -#include -#include - -#include "ILexer.h" - -#include "LexAccessor.h" -#include "CharacterSet.h" - -using namespace Lexilla; - -namespace Lexilla { - -bool LexAccessor::MatchIgnoreCase(Sci_Position pos, const char *s) { - for (; *s; s++, pos++) { - if (*s != MakeLowerCase(SafeGetCharAt(pos))) { - return false; - } - } - return true; -} - -void LexAccessor::GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len) { - assert(startPos_ <= endPos_ && len != 0 && s != nullptr); - endPos_ = std::min(endPos_, startPos_ + len - 1); - len = endPos_ - startPos_; - if (startPos_ >= static_cast(startPos) && endPos_ <= static_cast(endPos)) { - const char * const p = buf + (startPos_ - startPos); - memcpy(s, p, len); - } else { - pAccess->GetCharRange(s, startPos_, len); - } - s[len] = '\0'; -} - -void LexAccessor::GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_, char *s, Sci_PositionU len) { - GetRange(startPos_, endPos_, s, len); - while (*s) { - if (*s >= 'A' && *s <= 'Z') { - *s += 'a' - 'A'; - } - ++s; - } -} - -std::string LexAccessor::GetRange(Sci_PositionU startPos_, Sci_PositionU endPos_) { - assert(startPos_ < endPos_); - const Sci_PositionU len = endPos_ - startPos_; - std::string s(len, '\0'); - GetRange(startPos_, endPos_, s.data(), len); - return s; -} - -std::string LexAccessor::GetRangeLowered(Sci_PositionU startPos_, Sci_PositionU endPos_) { - assert(startPos_ < endPos_); - const Sci_PositionU len = endPos_ - startPos_; - std::string s(len, '\0'); - GetRangeLowered(startPos_, endPos_, s.data(), len); - return s; -} - -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.cxx b/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.cxx deleted file mode 100644 index 903d9790b..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.cxx +++ /dev/null @@ -1,75 +0,0 @@ -// Scintilla source code edit control -/** @file PropSetSimple.cxx - ** A basic string to string map. - **/ -// Copyright 1998-2010 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -// Maintain a dictionary of properties - -#include -#include - -#include -#include -#include -#include - -#include "PropSetSimple.h" - -using namespace Lexilla; - -namespace { - -typedef std::map> mapss; - -mapss *PropsFromPointer(void *impl) noexcept { - return static_cast(impl); -} - -} - -PropSetSimple::PropSetSimple() { - mapss *props = new mapss; - impl = static_cast(props); -} - -PropSetSimple::~PropSetSimple() { - mapss *props = PropsFromPointer(impl); - delete props; - impl = nullptr; -} - -bool PropSetSimple::Set(std::string_view key, std::string_view val) { - mapss *props = PropsFromPointer(impl); - if (!props) - return false; - mapss::iterator it = props->find(key); - if (it != props->end()) { - if (val == it->second) - return false; - it->second = val; - } else { - props->emplace(key, val); - } - return true; -} - -const char *PropSetSimple::Get(std::string_view key) const { - mapss *props = PropsFromPointer(impl); - if (props) { - mapss::const_iterator keyPos = props->find(key); - if (keyPos != props->end()) { - return keyPos->second.c_str(); - } - } - return ""; -} - -int PropSetSimple::GetInt(std::string_view key, int defaultValue) const { - const char *val = Get(key); - if (*val) { - return atoi(val); - } - return defaultValue; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.h b/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.h deleted file mode 100644 index c5d85f6a9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/PropSetSimple.h +++ /dev/null @@ -1,31 +0,0 @@ -// Scintilla source code edit control -/** @file PropSetSimple.h - ** A basic string to string map. - **/ -// Copyright 1998-2009 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef PROPSETSIMPLE_H -#define PROPSETSIMPLE_H - -namespace Lexilla { - -class PropSetSimple { - void *impl; -public: - PropSetSimple(); - // Deleted so PropSetSimple objects can not be copied. - PropSetSimple(const PropSetSimple&) = delete; - PropSetSimple(PropSetSimple&&) = delete; - PropSetSimple &operator=(const PropSetSimple&) = delete; - PropSetSimple &operator=(PropSetSimple&&) = delete; - virtual ~PropSetSimple(); - - bool Set(std::string_view key, std::string_view val); - const char *Get(std::string_view key) const; - int GetInt(std::string_view key, int defaultValue=0) const; -}; - -} - -#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.h b/3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.h deleted file mode 100644 index 380deb6cd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/lexlib/WordList.h +++ /dev/null @@ -1,43 +0,0 @@ -// Scintilla source code edit control -/** @file WordList.h - ** Hold a list of words. - **/ -// Copyright 1998-2010 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef WORDLIST_H -#define WORDLIST_H - -namespace Lexilla { - -/** - */ -class WordList { - // Each word contains at least one character - a empty word acts as sentinel at the end. - char **words; - char *list; - size_t len; - bool onlyLineEnds; ///< Delimited by any white space or only line ends - int starts[256]; -public: - explicit WordList(bool onlyLineEnds_ = false) noexcept; - // Deleted so WordList objects can not be copied. - WordList(const WordList &) = delete; - WordList(WordList &&) = delete; - WordList &operator=(const WordList &) = delete; - WordList &operator=(WordList &&) = delete; - ~WordList(); - operator bool() const noexcept; - bool operator!=(const WordList &other) const noexcept; - int Length() const noexcept; - void Clear() noexcept; - bool Set(const char *s); - bool InList(const char *s) const noexcept; - bool InListAbbreviated(const char *s, const char marker) const noexcept; - bool InListAbridged(const char *s, const char marker) const noexcept; - const char *WordAt(int n) const noexcept; -}; - -} - -#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/HeaderOrder.txt b/3rdparty/unioncode-scintilla515/lexilla/scripts/HeaderOrder.txt deleted file mode 100644 index b5c871421..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/HeaderOrder.txt +++ /dev/null @@ -1,103 +0,0 @@ -// Define the standard order in which to include header files -// All platform headers should be included before Scintilla headers -// and each of these groups are then divided into directory groups. - -// Base of the repository relative to this file - -//base:.. - -// File patterns to check: - -//source:include/*.h -//source:src/*.cxx -//source:lexlib/*.cxx -//source:lexers/*.cxx -//source:access/*.cxx -//source:test/*.cxx -//source:test/unit/*.cxx - -// C standard library -#include -#include -#include -#include -#include -#include - -// C++ wrappers of C standard library -#include -#include -#include -#include -#include -#include - -// C++ standard library -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// POSIX -#include - -// Windows header needed for loading DLL -#include - -// Scintilla/Lexilla headers - -// Non-platform-specific headers - -// Scintilla include - -#include "Sci_Position.h" -#include "ILexer.h" -#include "Scintilla.h" - -// Lexilla include - -#include "SciLexer.h" -#include "Lexilla.h" - -// access - -#include "LexillaAccess.h" - -// lexlib -#include "StringCopy.h" -#include "PropSetSimple.h" -#include "WordList.h" -#include "LexAccessor.h" -#include "Accessor.h" -#include "StyleContext.h" -#include "CharacterSet.h" -#include "CharacterCategory.h" -#include "LexerModule.h" -#include "CatalogueModules.h" -#include "OptionSet.h" -#include "SparseState.h" -#include "SubStyles.h" -#include "DefaultLexer.h" -#include "LexerBase.h" -#include "LexerSimple.h" -#include "LexerNoExceptions.h" - -// src - -#include "TestDocument.h" - -// Catch testing framework -#include "catch.hpp" - diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexFacer.py b/3rdparty/unioncode-scintilla515/lexilla/scripts/LexFacer.py deleted file mode 100644 index 4b4f7dec2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexFacer.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 -# LexFacer.py - regenerate the SciLexer.h files from the Scintilla.iface interface -# definition file. -# Implemented 2000 by Neil Hodgson neilh@scintilla.org -# Requires Python 3.6 or later - -import os, pathlib, sys - -sys.path.append(os.path.join("..", "..", "scintilla", "scripts")) - -import Face -import FileGenerator - -def printLexHFile(f): - out = [] - for name in f.order: - v = f.features[name] - if v["FeatureType"] in ["val"]: - if "SCE_" in name or "SCLEX_" in name: - out.append("#define " + name + " " + v["Value"]) - return out - -def RegenerateAll(root, _showMaxID): - f = Face.Face() - f.ReadFromFile(root / "include/LexicalStyles.iface") - FileGenerator.Regenerate(root / "include/SciLexer.h", "/* ", printLexHFile(f)) - -if __name__ == "__main__": - RegenerateAll(pathlib.Path(__file__).resolve().parent.parent, True) diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaData.py b/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaData.py deleted file mode 100644 index 0e875bd03..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaData.py +++ /dev/null @@ -1,282 +0,0 @@ -#!/usr/bin/env python3 -# ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org -# Released to the public domain. - -# Common code used by Scintilla and SciTE for source file regeneration. -# The ScintillaData object exposes information about Scintilla as properties: -# Version properties -# version -# versionDotted -# versionCommad -# -# Date last modified -# dateModified -# yearModified -# mdyModified -# dmyModified -# myModified -# -# Information about lexers and properties defined in lexers -# lexFiles -# sorted list of lexer files -# lexerModules -# sorted list of module names -# lexerProperties -# sorted list of lexer properties -# propertyDocuments -# dictionary of property documentation { name: document string } -# sclexFromName -# dictionary of SCLEX_* IDs { name: SCLEX_ID } -# fileFromSclex -# dictionary of file names { SCLEX_ID: file name } - -# This file can be run to see the data it provides. -# Requires Python 3.6 or later - -import datetime, pathlib, sys, textwrap - -thisPath = pathlib.Path(__file__).resolve() - -sys.path.append(str(thisPath.parent.parent.parent / "scintilla" / "scripts")) - -import FileGenerator - -neutralEncoding = "cp437" # Each byte value is valid in cp437 - -def FindModules(lexFile): - modules = [] - partLine = "" - with lexFile.open(encoding=neutralEncoding) as f: - lineNum = 0 - for l in f.readlines(): - lineNum += 1 - l = l.rstrip() - if partLine or l.startswith("LexerModule"): - if ")" in l: - l = partLine + l - original = l - l = l.replace("(", " ") - l = l.replace(")", " ") - l = l.replace(",", " ") - parts = l.split() - lexerName = parts[4] - if not (lexerName.startswith('"') and lexerName.endswith('"')): - print(f"{lexFile}:{lineNum}: Bad LexerModule statement:\n{original}") - exit(1) - lexerName = lexerName.strip('"') - modules.append([parts[1], parts[2], lexerName]) - partLine = "" - else: - partLine = partLine + l - return modules - -def FindLexersInXcode(xCodeProject): - lines = FileGenerator.ReadFileAsList(xCodeProject) - - uidsOfBuild = {} - markersPBXBuildFile = ["Begin PBXBuildFile section", "", "End PBXBuildFile section"] - for buildLine in lines[FileGenerator.FindSectionInList(lines, markersPBXBuildFile)]: - # Occurs for each file in the build. Find the UIDs used for the file. - #\t\t[0-9A-F]+ /* [a-zA-Z]+.cxx in sources */ = {isa = PBXBuildFile; fileRef = [0-9A-F]+ /* [a-zA-Z]+ */; }; - pieces = buildLine.split() - uid1 = pieces[0] - filename = pieces[2].split(".")[0] - uid2 = pieces[12] - uidsOfBuild[filename] = [uid1, uid2] - - lexers = {} - markersLexers = ["/* Lexers */ =", "children", ");"] - for lexerLine in lines[FileGenerator.FindSectionInList(lines, markersLexers)]: - #\t\t\t\t[0-9A-F]+ /* [a-zA-Z]+.cxx */, - uid, _, rest = lexerLine.partition("/* ") - uid = uid.strip() - lexer, _, _ = rest.partition(".") - lexers[lexer] = uidsOfBuild[lexer] - - return lexers - -# Properties that start with lexer. or fold. are automatically found but there are some -# older properties that don't follow this pattern so must be explicitly listed. -knownIrregularProperties = [ - "fold", - "styling.within.preprocessor", - "tab.timmy.whinge.level", - "asp.default.language", - "html.tags.case.sensitive", - "ps.level", - "ps.tokenize", - "sql.backslash.escapes", - "nsis.uservars", - "nsis.ignorecase" -] - -def FindProperties(lexFile): - properties = {} - with open(lexFile, encoding=neutralEncoding) as f: - for l in f.readlines(): - if ("GetProperty" in l or "DefineProperty" in l) and "\"" in l: - l = l.strip() - if not l.startswith("//"): # Drop comments - propertyName = l.split("\"")[1] - if propertyName.lower() == propertyName: - # Only allow lower case property names - if propertyName in knownIrregularProperties or \ - propertyName.startswith("fold.") or \ - propertyName.startswith("lexer."): - properties[propertyName] = 1 - return properties - -def FindPropertyDocumentation(lexFile): - documents = {} - with lexFile.open(encoding=neutralEncoding) as f: - name = "" - for l in f.readlines(): - l = l.strip() - if "// property " in l: - propertyName = l.split()[2] - if propertyName.lower() == propertyName: - # Only allow lower case property names - name = propertyName - documents[name] = "" - elif "DefineProperty" in l and "\"" in l: - propertyName = l.split("\"")[1] - if propertyName.lower() == propertyName: - # Only allow lower case property names - name = propertyName - documents[name] = "" - elif name: - if l.startswith("//"): - if documents[name]: - documents[name] += " " - documents[name] += l[2:].strip() - elif l.startswith("\""): - l = l[1:].strip() - if l.endswith(";"): - l = l[:-1].strip() - if l.endswith(")"): - l = l[:-1].strip() - if l.endswith("\""): - l = l[:-1] - # Fix escaped double quotes - l = l.replace("\\\"", "\"") - documents[name] += l - else: - name = "" - for name in list(documents.keys()): - if documents[name] == "": - del documents[name] - return documents - -def FindCredits(historyFile): - credits = [] - stage = 0 - with historyFile.open(encoding="utf-8") as f: - for l in f.readlines(): - l = l.strip() - if stage == 0 and l == "": - stage = 1 - elif stage == 1 and l == "
": - stage = 2 - if stage == 1 and l.startswith(""): - credit = l[4:-5] - if "") - name = end.split("<")[0] - url = urlplus[1:-1] - credit = title.strip() - if credit: - credit += " " - credit += name + " " + url - credits.append(credit) - return credits - -def ciKey(a): - return str(a).lower() - -def SortListInsensitive(l): - l.sort(key=ciKey) - -class LexillaData: - def __init__(self, scintillaRoot): - # Discover version information - self.version = (scintillaRoot / "version.txt").read_text().strip() - self.versionDotted = self.version[0] + '.' + self.version[1] + '.' + \ - self.version[2] - self.versionCommad = self.versionDotted.replace(".", ", ") + ', 0' - - with (scintillaRoot / "doc" / "Lexilla.html").open() as f: - self.dateModified = [l for l in f.readlines() if "Date.Modified" in l]\ - [0].split('\"')[3] - # 20130602 - # Lexilla.html - dtModified = datetime.datetime.strptime(self.dateModified, "%Y%m%d") - self.yearModified = self.dateModified[0:4] - monthModified = dtModified.strftime("%B") - dayModified = "%d" % dtModified.day - self.mdyModified = monthModified + " " + dayModified + " " + self.yearModified - # May 22 2013 - # Lexilla.html, SciTE.html - self.dmyModified = dayModified + " " + monthModified + " " + self.yearModified - # 22 May 2013 - # LexillaHistory.html -- only first should change - self.myModified = monthModified + " " + self.yearModified - - # Find all the lexer source code files - lexFilePaths = list((scintillaRoot / "lexers").glob("Lex*.cxx")) - SortListInsensitive(lexFilePaths) - self.lexFiles = [f.stem for f in lexFilePaths] - self.lexerModules = [] - lexerProperties = set() - self.propertyDocuments = {} - self.sclexFromName = {} - self.fileFromSclex = {} - for lexFile in lexFilePaths: - modules = FindModules(lexFile) - for module in modules: - self.sclexFromName[module[2]] = module[1] - self.fileFromSclex[module[1]] = lexFile - self.lexerModules.append(module[0]) - for k in FindProperties(lexFile).keys(): - lexerProperties.add(k) - documents = FindPropertyDocumentation(lexFile) - for k in documents.keys(): - if k not in self.propertyDocuments: - self.propertyDocuments[k] = documents[k] - SortListInsensitive(self.lexerModules) - self.lexerProperties = list(lexerProperties) - SortListInsensitive(self.lexerProperties) - - self.lexersXcode = FindLexersInXcode(scintillaRoot / - "src/Lexilla/Lexilla.xcodeproj/project.pbxproj") - self.credits = FindCredits(scintillaRoot / "doc" / "LexillaHistory.html") - -def printWrapped(text): - print(textwrap.fill(text, subsequent_indent=" ")) - -if __name__=="__main__": - sci = LexillaData(pathlib.Path(__file__).resolve().parent.parent) - print("Version %s %s %s" % (sci.version, sci.versionDotted, sci.versionCommad)) - print("Date last modified %s %s %s %s %s" % ( - sci.dateModified, sci.yearModified, sci.mdyModified, sci.dmyModified, sci.myModified)) - printWrapped(str(len(sci.lexFiles)) + " lexer files: " + ", ".join(sci.lexFiles)) - printWrapped(str(len(sci.lexerModules)) + " lexer modules: " + ", ".join(sci.lexerModules)) - #~ printWrapped(str(len(sci.lexersXcode)) + " Xcode lexer references: " + ", ".join( - #~ [lex+":"+uids[0]+","+uids[1] for lex, uids in sci.lexersXcode.items()])) - print("Lexer name to ID:") - lexNames = sorted(sci.sclexFromName.keys()) - for lexName in lexNames: - sclex = sci.sclexFromName[lexName] - fileName = sci.fileFromSclex[sclex].name - print(" " + lexName + " -> " + sclex + " in " + fileName) - printWrapped("Lexer properties: " + ", ".join(sci.lexerProperties)) - print("Lexer property documentation:") - documentProperties = list(sci.propertyDocuments.keys()) - SortListInsensitive(documentProperties) - for k in documentProperties: - print(" " + k) - print(textwrap.fill(sci.propertyDocuments[k], initial_indent=" ", - subsequent_indent=" ")) - print("Credits:") - for c in sci.credits: - sys.stdout.buffer.write(b" " + c.encode("utf-8") + b"\n") diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaGen.py b/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaGen.py deleted file mode 100644 index be72ba1ae..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaGen.py +++ /dev/null @@ -1,158 +0,0 @@ -#!/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 / "scintilla" / "scripts")) - -from FileGenerator import Regenerate, UpdateLineInFile, \ - ReplaceREInFile, UpdateLineInPlistFile, ReadFileAsList, UpdateFileFromLines, \ - FindSectionInList -import LexillaData -import LexFacer - -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) - - lexillaBase = root.resolve() - - lex = LexillaData.LexillaData(lexillaBase) - - lexillaDir = lexillaBase - srcDir = lexillaDir / "src" - docDir = lexillaDir / "doc" - - Regenerate(srcDir / "Lexilla.cxx", "//", lex.lexerModules) - Regenerate(srcDir / "lexilla.mak", "#", lex.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) - ReplaceREInFile(docDir / "LexillaDownload.html", - r"/www.scintilla.org/([a-zA-Z]+)\d\d\d", - r"/www.scintilla.org/\g<1>" + version, - 0) - - pathMain = lexillaDir / "doc" / "Lexilla.html" - UpdateLineInFile(pathMain, - ' Release version', - ' Release version ' + \ - versionDotted + '
') - UpdateLineInFile(pathMain, - ' Site last modified', - ' Site last modified ' + lex.mdyModified + '
') - UpdateLineInFile(pathMain, - ' ') - UpdateLineInFile(lexillaDir / "doc" / "LexillaHistory.html", - ' Released ', - ' Released ' + lex.dmyModified + '.') - - lexillaXcode = lexillaDir / "src" / "Lexilla" - lexillaXcodeProject = lexillaXcode / "Lexilla.xcodeproj" / "project.pbxproj" - - lexerReferences = LexillaData.FindLexersInXcode(lexillaXcodeProject) - - UpdateLineInPlistFile(lexillaXcode / "Info.plist", - "CFBundleShortVersionString", versionDotted) - - ReplaceREInFile(lexillaXcodeProject, "CURRENT_PROJECT_VERSION = [0-9.]+;", - f'CURRENT_PROJECT_VERSION = {versionDotted};', - 0) - - RegenerateXcodeProject(lexillaXcodeProject, lex.lexFiles, lexerReferences) - - LexFacer.RegenerateAll(root, False) - - currentDirectory = pathlib.Path.cwd() - os.chdir(srcDir) - DepGen.Generate() - os.chdir(currentDirectory) - -if __name__=="__main__": - RegenerateAll(pathlib.Path(__file__).resolve().parent.parent) diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaLogo.py b/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaLogo.py deleted file mode 100644 index 904ca2c56..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/LexillaLogo.py +++ /dev/null @@ -1,75 +0,0 @@ -# LexillaLogo.py -# Requires Python 3.6. -# Requires Pillow https://python-pillow.org/, tested with 7.2.0 on Windows 10 - -import random -from PIL import Image, ImageDraw, ImageFont - -colours = [ -(136,0,21,255), -(237,28,36,255), -(255,127,39,255), -(255,201,14,255), -(185,122,87,255), -(255,174,201,255), -(181,230,29,255), -(34,177,76,255), -(153,217,234,255), -(0,162,232,255), -(112,146,190,255), -(63,72,204,255), -(200,191,231,255), -] - -width = 1280 -height = 150 - -def drawLines(dr): - for y in range(0,height, 2): - x = 0 - while x < width: - #lexeme = random.randint(2, 20) - lexeme = int(random.expovariate(0.3)) - colour = random.choice(colours) - strokeRectangle = (x, y, x+lexeme, y) - dr.rectangle(strokeRectangle, fill=colour) - x += lexeme + 3 - -def drawGuide(dr): - for y in range(0,height, 2): - x = 0 - while x < width: - lexeme = int(random.expovariate(0.3)) - colour = (0x30, 0x30, 0x30) - strokeRectangle = (x, y, x+lexeme, y) - dr.rectangle(strokeRectangle, fill=colour) - x += lexeme + 3 - -def drawLogo(): - # Ensure same image each time - random.seed(1) - - # Georgia bold italic - font = ImageFont.truetype(font="georgiaz.ttf", size=190) - - imageMask = Image.new("L", (width, height), color=(0xff)) - drMask = ImageDraw.Draw(imageMask) - drMask.text((30, -29), "Lexilla", font=font, fill=(0)) - - imageBack = Image.new("RGB", (width, height), color=(0,0,0)) - drBack = ImageDraw.Draw(imageBack) - drawGuide(drBack) - - imageLines = Image.new("RGB", (width, height), color=(0,0,0)) - dr = ImageDraw.Draw(imageLines) - drawLines(dr) - - imageOut = Image.composite(imageBack, imageLines, imageMask) - - imageOut.save("../doc/LexillaLogo.png", "png") - - imageDoubled = imageOut.resize((width*2, height * 2), Image.NEAREST) - - imageDoubled.save("../doc/LexillaLogo2x.png", "png") - -drawLogo() diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.bat b/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.bat deleted file mode 100644 index 5c03a0750..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.bat +++ /dev/null @@ -1,7 +0,0 @@ -rem Test lexers -rem build lexilla.dll and TestLexers.exe then run TestLexers.exe -cd ../src -make DEBUG=1 -cd ../test -make DEBUG=1 -make test diff --git a/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.sh b/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.sh deleted file mode 100644 index 3a54b106a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/scripts/RunTest.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Test lexers -# build lexilla.so and TestLexers then run TestLexers -cd ../src -make DEBUG=1 -cd ../test -make DEBUG=1 -make test diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/CMakeLists.txt b/3rdparty/unioncode-scintilla515/lexilla/src/CMakeLists.txt deleted file mode 100644 index 7679a42f8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -project(unioncode-lexilla) - -set(CMAKE_VERBOSE_MAKEFILE ON) - -include_directories( - ../include - ../lexlib - ../../scintilla/include - ) - -file(GLOB LEXLIB_SRC "../lexlib/*.cxx") -file(GLOB LEXERS_SRC "../lexers/*.cxx") -aux_source_directory(. SOURCES) - -list(APPEND SOURCES ${LEXLIB_SRC} ${LEXERS_SRC}) - -set(HEADERS ../include/Lexilla.h) -file(GLOB LEXERS_INC "../lexers/*.h") -list(APPEND HEADERS ${LEXERS_INC}) - -add_library( - ${PROJECT_NAME} - SHARED - ${SOURCES} - ${HEADERS} - ) - -install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${LIBRARY_INSTALL_PREFIX}) diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/DepGen.py b/3rdparty/unioncode-scintilla515/lexilla/src/DepGen.py deleted file mode 100644 index e0b3f8d37..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/DepGen.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python3 -# DepGen.py - produce a make dependencies file for Scintilla -# Copyright 2019 by Neil Hodgson -# The License.txt file describes the conditions under which this software may be distributed. -# Requires Python 3.6 or later - -import os, sys - -scintilla = os.path.join("..", "..", "scintilla") -sys.path.append(scintilla) - -from scripts import Dependencies - -topComment = "# Created by DepGen.py. To recreate, run DepGen.py.\n" - -def Generate(): - lexilla = os.path.join("..") - sources = [ - os.path.join(lexilla, "src", "Lexilla.cxx"), - os.path.join(lexilla, "lexlib", "*.cxx"), - os.path.join(lexilla, "lexers", "*.cxx")] - includes = [ - os.path.join(lexilla, "include"), - os.path.join(scintilla, "include"), - os.path.join(lexilla, "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() \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.cxx b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.cxx deleted file mode 100644 index e5012d362..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.cxx +++ /dev/null @@ -1,385 +0,0 @@ -// Lexilla lexer library -/** @file Lexilla.cxx - ** Lexer infrastructure. - ** Provides entry points to shared library. - **/ -// Copyright 2019 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include - -#include -#include - -#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 Lexilla; - -//++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 lmAsciidoc; -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 lmFSharp; -extern LexerModule lmGAP; -extern LexerModule lmGDScript; -extern LexerModule lmGui4Cli; -extern LexerModule lmHaskell; -extern LexerModule lmHollywood; -extern LexerModule lmHTML; -extern LexerModule lmJS; -extern LexerModule lmIHex; -extern LexerModule lmIndent; -extern LexerModule lmInno; -extern LexerModule lmJSON; -extern LexerModule lmJulia; -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; -extern LexerModule lmJAVA; -extern LexerModule lmJAVANoCase; -//--Autogenerated -- end of automatically generated section - -namespace { - -CatalogueModules catalogueLexilla; - -void AddEachLexer() { - - if (catalogueLexilla.Count() > 0) { - return; - } - - catalogueLexilla.AddLexerModules({ -//++Autogenerated -- run scripts/LexillaGen.py to regenerate -//**\(\t\t&\*,\n\) - &lmA68k, - &lmAbaqus, - &lmAda, - &lmAPDL, - &lmAs, - &lmAsciidoc, - &lmAsm, - &lmAsn1, - &lmASY, - &lmAU3, - &lmAVE, - &lmAVS, - &lmBaan, - &lmBash, - &lmBatch, - &lmBibTeX, - &lmBlitzBasic, - &lmBullant, - &lmCaml, - &lmCIL, - &lmClw, - &lmClwNoCase, - &lmCmake, - &lmCOBOL, - &lmCoffeeScript, - &lmConf, - &lmCPP, - &lmCPPNoCase, - &lmCsound, - &lmCss, - &lmD, - &lmDataflex, - &lmDiff, - &lmDMAP, - &lmDMIS, - &lmECL, - &lmEDIFACT, - &lmEiffel, - &lmEiffelkw, - &lmErlang, - &lmErrorList, - &lmESCRIPT, - &lmF77, - &lmFlagShip, - &lmForth, - &lmFortran, - &lmFreeBasic, - &lmFSharp, - &lmGAP, - &lmGDScript, - &lmGui4Cli, - &lmHaskell, - &lmHollywood, - &lmHTML, - &lmJS, - &lmIHex, - &lmIndent, - &lmInno, - &lmJAVA, - &lmJAVANoCase, - &lmJSON, - &lmJulia, - &lmKix, - &lmKVIrc, - &lmLatex, - &lmLISP, - &lmLiterateHaskell, - &lmLot, - &lmLout, - &lmLua, - &lmMagikSF, - &lmMake, - &lmMarkdown, - &lmMatlab, - &lmMaxima, - &lmMETAPOST, - &lmMMIXAL, - &lmModula, - &lmMSSQL, - &lmMySQL, - &lmNim, - &lmNimrod, - &lmNncrontab, - &lmNsis, - &lmNull, - &lmOctave, - &lmOpal, - &lmOScript, - &lmPascal, - &lmPB, - &lmPerl, - &lmPHPSCRIPT, - &lmPLM, - &lmPO, - &lmPOV, - &lmPowerPro, - &lmPowerShell, - &lmProgress, - &lmProps, - &lmPS, - &lmPureBasic, - &lmPython, - &lmR, - &lmRaku, - &lmREBOL, - &lmRegistry, - &lmRuby, - &lmRust, - &lmSAS, - &lmScriptol, - &lmSmalltalk, - &lmSML, - &lmSorc, - &lmSpecman, - &lmSpice, - &lmSQL, - &lmSrec, - &lmStata, - &lmSTTXT, - &lmTACL, - &lmTADS3, - &lmTAL, - &lmTCL, - &lmTCMD, - &lmTEHex, - &lmTeX, - &lmTxt2tags, - &lmVB, - &lmVBScript, - &lmVerilog, - &lmVHDL, - &lmVisualProlog, - &lmX12, - &lmXML, - &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(buflength) > strlen(lexerName)) { - strcpy(name, lexerName); - } -} - -EXPORT_FUNCTION LexerFactoryFunction CALLING_CONVENTION GetLexerFactory(unsigned int index) { - AddEachLexer(); - return catalogueLexilla.Factory(index); -} - -EXPORT_FUNCTION Scintilla::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; -} - -EXPORT_FUNCTION const char * CALLING_CONVENTION LexerNameFromID(int identifier) { - AddEachLexer(); - const LexerModule *pModule = catalogueLexilla.Find(identifier); - if (pModule) { - return pModule->languageName; - } else { - return nullptr; - } -} - -EXPORT_FUNCTION const char * CALLING_CONVENTION GetLibraryPropertyNames() { - return ""; -} - -EXPORT_FUNCTION void CALLING_CONVENTION SetLibraryProperty(const char *, const char *) { - // Null implementation -} - -EXPORT_FUNCTION const char * CALLING_CONVENTION GetNameSpace() { - return "lexilla"; -} - -// Not exported from binary as LexerModule must be built exactly the same as -// modules listed above -void AddStaticLexerModule(LexerModule *plm) { - AddEachLexer(); - catalogueLexilla.AddLexerModule(plm); -} - -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.def b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.def deleted file mode 100644 index 7caa47918..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.def +++ /dev/null @@ -1,9 +0,0 @@ -EXPORTS - GetLexerCount - GetLexerName - GetLexerFactory - CreateLexer - LexerNameFromID - GetLibraryPropertyNames - SetLibraryProperty - GetNameSpace diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.pro b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.pro deleted file mode 100644 index 69fc8c897..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.pro +++ /dev/null @@ -1,33 +0,0 @@ -# This Qt Creator project file is not meant for creating Lexilla libraries -# but instead for easily running Clang-Tidy on lexers. - -QT += core - -TARGET = Lexilla -TEMPLATE = lib -CONFIG += lib_bundle -CONFIG += c++1z - -VERSION = 5.1.3 - -SOURCES += \ - Lexilla.cxx \ - $$files(../lexlib/*.cxx, false) \ - $$files(../lexers/*.cxx, false) - -HEADERS += \ - ../include/Lexilla.h \ - $$files(../lexers/*.h, false) - -INCLUDEPATH += ../include ../lexlib ../../scintilla/include - -DEFINES += _CRT_SECURE_NO_DEPRECATE=1 -CONFIG(release, debug|release) { - DEFINES += NDEBUG=1 -} - -DESTDIR = ../bin - -macx { - QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/ -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.vcxproj b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.vcxproj deleted file mode 100644 index 5370e5e18..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla.vcxproj +++ /dev/null @@ -1,170 +0,0 @@ - - - - - Debug - ARM64 - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM64 - - - Release - Win32 - - - Release - x64 - - - - {E541C9BE-13BC-4CE6-A0A4-31145F51A2C1} - Win32Proj - Lexilla - 10.0 - - - - DynamicLibrary - Unicode - v142 - - - true - - - true - - - true - - - false - true - - - false - true - - - false - true - - - - - - - - - - false - - - - Level4 - WIN32;SCI_LEXER;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\include;..\..\scintilla\include;..\lexlib; - true - true - false - ProgramDatabase - - - Windows - true - gdi32.lib;imm32.lib;ole32.lib;oleaut32.lib;msimg32.lib;%(AdditionalDependencies) - true - Lexilla.def - - - - - _DEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - Default - - - - - _DEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - Default - - - - - _DEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - Default - false - - - - - true - true - NDEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - true - true - - - - - true - true - NDEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - true - true - - - - - true - true - NDEBUG;%(PreprocessorDefinitions) - stdcpp17 - - - true - true - false - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Info.plist b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Info.plist deleted file mode 100644 index 7962ac390..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 5.1.4 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSHumanReadableCopyright - Copyright © 2020 Neil Hodgson. All rights reserved. - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.pbxproj b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.pbxproj deleted file mode 100644 index 1db7d0b91..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.pbxproj +++ /dev/null @@ -1,925 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 283639BC268FD4EA009D58A1 /* LexAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 283639BB268FD4EA009D58A1 /* LexAccessor.cxx */; }; - 28BA72AB24E34D5B00272C2D /* LexerBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA728F24E34D5A00272C2D /* LexerBase.cxx */; }; - 28BA72AC24E34D5B00272C2D /* LexAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729024E34D5A00272C2D /* LexAccessor.h */; }; - 28BA72AD24E34D5B00272C2D /* DefaultLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729124E34D5A00272C2D /* DefaultLexer.h */; }; - 28BA72AE24E34D5B00272C2D /* SubStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729224E34D5A00272C2D /* SubStyles.h */; }; - 28BA72AF24E34D5B00272C2D /* LexerNoExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729324E34D5A00272C2D /* LexerNoExceptions.h */; }; - 28BA72B024E34D5B00272C2D /* LexerModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729424E34D5A00272C2D /* LexerModule.h */; }; - 28BA72B124E34D5B00272C2D /* CharacterCategory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729524E34D5A00272C2D /* CharacterCategory.cxx */; }; - 28BA72B224E34D5B00272C2D /* LexerSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729624E34D5A00272C2D /* LexerSimple.h */; }; - 28BA72B324E34D5B00272C2D /* Accessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729724E34D5A00272C2D /* Accessor.h */; }; - 28BA72B424E34D5B00272C2D /* PropSetSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729824E34D5A00272C2D /* PropSetSimple.cxx */; }; - 28BA72B524E34D5B00272C2D /* CharacterSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729924E34D5A00272C2D /* CharacterSet.cxx */; }; - 28BA72B624E34D5B00272C2D /* SparseState.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729A24E34D5A00272C2D /* SparseState.h */; }; - 28BA72B724E34D5B00272C2D /* WordList.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729B24E34D5A00272C2D /* WordList.h */; }; - 28BA72B824E34D5B00272C2D /* DefaultLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */; }; - 28BA72B924E34D5B00272C2D /* LexerNoExceptions.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */; }; - 28BA72BA24E34D5B00272C2D /* WordList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA729E24E34D5A00272C2D /* WordList.cxx */; }; - 28BA72BB24E34D5B00272C2D /* OptionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA729F24E34D5A00272C2D /* OptionSet.h */; }; - 28BA72BC24E34D5B00272C2D /* CatalogueModules.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A024E34D5B00272C2D /* CatalogueModules.h */; }; - 28BA72BD24E34D5B00272C2D /* CharacterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A124E34D5B00272C2D /* CharacterSet.h */; }; - 28BA72BE24E34D5B00272C2D /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A224E34D5B00272C2D /* StyleContext.h */; }; - 28BA72BF24E34D5B00272C2D /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A324E34D5B00272C2D /* PropSetSimple.h */; }; - 28BA72C024E34D5B00272C2D /* StringCopy.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A424E34D5B00272C2D /* StringCopy.h */; }; - 28BA72C124E34D5B00272C2D /* LexerModule.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A524E34D5B00272C2D /* LexerModule.cxx */; }; - 28BA72C224E34D5B00272C2D /* LexerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A624E34D5B00272C2D /* LexerBase.h */; }; - 28BA72C324E34D5B00272C2D /* LexerSimple.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A724E34D5B00272C2D /* LexerSimple.cxx */; }; - 28BA72C424E34D5B00272C2D /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72A824E34D5B00272C2D /* StyleContext.cxx */; }; - 28BA72C524E34D5B00272C2D /* CharacterCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA72A924E34D5B00272C2D /* CharacterCategory.h */; }; - 28BA72C624E34D5B00272C2D /* Accessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72AA24E34D5B00272C2D /* Accessor.cxx */; }; - 28BA733924E34D9700272C2D /* LexBasic.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C724E34D9100272C2D /* LexBasic.cxx */; }; - 28BA733A24E34D9700272C2D /* LexCIL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C824E34D9100272C2D /* LexCIL.cxx */; }; - 28BA733B24E34D9700272C2D /* LexTCL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72C924E34D9100272C2D /* LexTCL.cxx */; }; - 28BA733C24E34D9700272C2D /* LexMetapost.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CA24E34D9100272C2D /* LexMetapost.cxx */; }; - 28BA733D24E34D9700272C2D /* LexForth.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CB24E34D9100272C2D /* LexForth.cxx */; }; - 28BA733E24E34D9700272C2D /* LexSML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CC24E34D9100272C2D /* LexSML.cxx */; }; - 28BA733F24E34D9700272C2D /* LexOScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CD24E34D9100272C2D /* LexOScript.cxx */; }; - 28BA734024E34D9700272C2D /* LexTACL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CE24E34D9100272C2D /* LexTACL.cxx */; }; - 28BA734124E34D9700272C2D /* LexGui4Cli.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */; }; - 28BA734224E34D9700272C2D /* LexCLW.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D024E34D9200272C2D /* LexCLW.cxx */; }; - 28BA734324E34D9700272C2D /* LexRebol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D124E34D9200272C2D /* LexRebol.cxx */; }; - 28BA734424E34D9700272C2D /* LexSAS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D224E34D9200272C2D /* LexSAS.cxx */; }; - 28BA734524E34D9700272C2D /* LexNim.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D324E34D9200272C2D /* LexNim.cxx */; }; - 28BA734624E34D9700272C2D /* LexSmalltalk.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */; }; - 28BA734724E34D9700272C2D /* LexModula.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D524E34D9200272C2D /* LexModula.cxx */; }; - 28BA734824E34D9700272C2D /* LexBullant.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D624E34D9200272C2D /* LexBullant.cxx */; }; - 28BA734924E34D9700272C2D /* LexASY.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D724E34D9200272C2D /* LexASY.cxx */; }; - 28BA734A24E34D9700272C2D /* LexBash.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D824E34D9200272C2D /* LexBash.cxx */; }; - 28BA734B24E34D9700272C2D /* LexEiffel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72D924E34D9200272C2D /* LexEiffel.cxx */; }; - 28BA734C24E34D9700272C2D /* LexVHDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DA24E34D9200272C2D /* LexVHDL.cxx */; }; - 28BA734D24E34D9700272C2D /* LexAsn1.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DB24E34D9200272C2D /* LexAsn1.cxx */; }; - 28BA734E24E34D9700272C2D /* LexCoffeeScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */; }; - 28BA734F24E34D9700272C2D /* LexDiff.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DD24E34D9200272C2D /* LexDiff.cxx */; }; - 28BA735024E34D9700272C2D /* LexSorcus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DE24E34D9200272C2D /* LexSorcus.cxx */; }; - 28BA735124E34D9700272C2D /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72DF24E34D9200272C2D /* LexAPDL.cxx */; }; - 28BA735224E34D9700272C2D /* LexD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E024E34D9200272C2D /* LexD.cxx */; }; - 28BA735324E34D9700272C2D /* LexMySQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E124E34D9200272C2D /* LexMySQL.cxx */; }; - 28BA735424E34D9700272C2D /* LexHollywood.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E224E34D9200272C2D /* LexHollywood.cxx */; }; - 28BA735524E34D9700272C2D /* LexProgress.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E324E34D9200272C2D /* LexProgress.cxx */; }; - 28BA735624E34D9700272C2D /* LexLisp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E424E34D9200272C2D /* LexLisp.cxx */; }; - 28BA735724E34D9700272C2D /* LexPowerShell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E524E34D9200272C2D /* LexPowerShell.cxx */; }; - 28BA735824E34D9700272C2D /* LexPS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E624E34D9200272C2D /* LexPS.cxx */; }; - 28BA735924E34D9700272C2D /* LexYAML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E724E34D9200272C2D /* LexYAML.cxx */; }; - 28BA735A24E34D9700272C2D /* LexErlang.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E824E34D9200272C2D /* LexErlang.cxx */; }; - 28BA735B24E34D9700272C2D /* LexRuby.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72E924E34D9300272C2D /* LexRuby.cxx */; }; - 28BA735C24E34D9700272C2D /* LexIndent.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EA24E34D9300272C2D /* LexIndent.cxx */; }; - 28BA735D24E34D9700272C2D /* LexErrorList.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EB24E34D9300272C2D /* LexErrorList.cxx */; }; - 28BA735E24E34D9700272C2D /* LexFlagship.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EC24E34D9300272C2D /* LexFlagship.cxx */; }; - 28BA735F24E34D9700272C2D /* LexLaTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */; }; - 28BA736024E34D9700272C2D /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */; }; - 28BA736124E34D9700272C2D /* LexBatch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72EF24E34D9300272C2D /* LexBatch.cxx */; }; - 28BA736224E34D9700272C2D /* LexCPP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F024E34D9300272C2D /* LexCPP.cxx */; }; - 28BA736324E34D9700272C2D /* LexRaku.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F124E34D9300272C2D /* LexRaku.cxx */; }; - 28BA736424E34D9700272C2D /* LexGAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F224E34D9300272C2D /* LexGAP.cxx */; }; - 28BA736524E34D9700272C2D /* LexSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F324E34D9300272C2D /* LexSQL.cxx */; }; - 28BA736624E34D9700272C2D /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F424E34D9300272C2D /* LexNsis.cxx */; }; - 28BA736724E34D9700272C2D /* LexEDIFACT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */; }; - 28BA736824E34D9700272C2D /* LexEScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F624E34D9300272C2D /* LexEScript.cxx */; }; - 28BA736924E34D9700272C2D /* LexPOV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F724E34D9300272C2D /* LexPOV.cxx */; }; - 28BA736A24E34D9700272C2D /* LexKVIrc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F824E34D9300272C2D /* LexKVIrc.cxx */; }; - 28BA736B24E34D9700272C2D /* LexSpecman.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72F924E34D9300272C2D /* LexSpecman.cxx */; }; - 28BA736C24E34D9700272C2D /* LexHTML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FA24E34D9300272C2D /* LexHTML.cxx */; }; - 28BA736D24E34D9700272C2D /* LexFortran.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FB24E34D9400272C2D /* LexFortran.cxx */; }; - 28BA736E24E34D9700272C2D /* LexRegistry.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FC24E34D9400272C2D /* LexRegistry.cxx */; }; - 28BA736F24E34D9700272C2D /* LexPython.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FD24E34D9400272C2D /* LexPython.cxx */; }; - 28BA737024E34D9700272C2D /* LexCmake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FE24E34D9400272C2D /* LexCmake.cxx */; }; - 28BA737124E34D9700272C2D /* LexAsm.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA72FF24E34D9400272C2D /* LexAsm.cxx */; }; - 28BA737224E34D9700272C2D /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730024E34D9400272C2D /* LexAda.cxx */; }; - 28BA737324E34D9700272C2D /* LexCrontab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730124E34D9400272C2D /* LexCrontab.cxx */; }; - 28BA737424E34D9700272C2D /* LexDMIS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730224E34D9400272C2D /* LexDMIS.cxx */; }; - 28BA737524E34D9700272C2D /* LexTCMD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730324E34D9400272C2D /* LexTCMD.cxx */; }; - 28BA737624E34D9700272C2D /* LexConf.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730424E34D9400272C2D /* LexConf.cxx */; }; - 28BA737724E34D9700272C2D /* LexInno.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730524E34D9400272C2D /* LexInno.cxx */; }; - 28BA737824E34D9700272C2D /* LexA68k.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730624E34D9400272C2D /* LexA68k.cxx */; }; - 28BA737924E34D9700272C2D /* LexMake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730724E34D9400272C2D /* LexMake.cxx */; }; - 28BA737A24E34D9700272C2D /* LexTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730824E34D9400272C2D /* LexTeX.cxx */; }; - 28BA737B24E34D9700272C2D /* LexSpice.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730924E34D9400272C2D /* LexSpice.cxx */; }; - 28BA737C24E34D9700272C2D /* LexX12.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730A24E34D9400272C2D /* LexX12.cxx */; }; - 28BA737D24E34D9700272C2D /* LexAU3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730B24E34D9400272C2D /* LexAU3.cxx */; }; - 28BA737E24E34D9700272C2D /* LexBaan.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730C24E34D9400272C2D /* LexBaan.cxx */; }; - 28BA737F24E34D9700272C2D /* LexMPT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730D24E34D9500272C2D /* LexMPT.cxx */; }; - 28BA738024E34D9700272C2D /* LexTADS3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730E24E34D9500272C2D /* LexTADS3.cxx */; }; - 28BA738124E34D9700272C2D /* LexTxt2tags.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */; }; - 28BA738224E34D9700272C2D /* LexMMIXAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731024E34D9500272C2D /* LexMMIXAL.cxx */; }; - 28BA738324E34D9700272C2D /* LexKix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731124E34D9500272C2D /* LexKix.cxx */; }; - 28BA738424E34D9700272C2D /* LexSTTXT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731224E34D9500272C2D /* LexSTTXT.cxx */; }; - 28BA738524E34D9700272C2D /* LexMagik.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731324E34D9500272C2D /* LexMagik.cxx */; }; - 28BA738624E34D9700272C2D /* LexNull.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731424E34D9500272C2D /* LexNull.cxx */; }; - 28BA738724E34D9700272C2D /* LexCsound.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731524E34D9500272C2D /* LexCsound.cxx */; }; - 28BA738824E34D9700272C2D /* LexLua.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731624E34D9500272C2D /* LexLua.cxx */; }; - 28BA738924E34D9700272C2D /* LexStata.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731724E34D9500272C2D /* LexStata.cxx */; }; - 28BA738A24E34D9700272C2D /* LexOpal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731824E34D9500272C2D /* LexOpal.cxx */; }; - 28BA738B24E34D9700272C2D /* LexHex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731924E34D9500272C2D /* LexHex.cxx */; }; - 28BA738C24E34D9700272C2D /* LexVerilog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731A24E34D9500272C2D /* LexVerilog.cxx */; }; - 28BA738D24E34D9700272C2D /* LexHaskell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731B24E34D9500272C2D /* LexHaskell.cxx */; }; - 28BA738E24E34D9700272C2D /* LexR.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731C24E34D9500272C2D /* LexR.cxx */; }; - 28BA738F24E34D9700272C2D /* LexScriptol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731D24E34D9500272C2D /* LexScriptol.cxx */; }; - 28BA739024E34D9700272C2D /* LexVisualProlog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */; }; - 28BA739124E34D9700272C2D /* LexVB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA731F24E34D9600272C2D /* LexVB.cxx */; }; - 28BA739224E34D9700272C2D /* LexDMAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732024E34D9600272C2D /* LexDMAP.cxx */; }; - 28BA739324E34D9700272C2D /* LexAVS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732124E34D9600272C2D /* LexAVS.cxx */; }; - 28BA739424E34D9700272C2D /* LexPB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732224E34D9600272C2D /* LexPB.cxx */; }; - 28BA739524E34D9700272C2D /* LexPO.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732324E34D9600272C2D /* LexPO.cxx */; }; - 28BA739624E34D9700272C2D /* LexPowerPro.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732424E34D9600272C2D /* LexPowerPro.cxx */; }; - 28BA739724E34D9700272C2D /* LexProps.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732524E34D9600272C2D /* LexProps.cxx */; }; - 28BA739824E34D9700272C2D /* LexCOBOL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732624E34D9600272C2D /* LexCOBOL.cxx */; }; - 28BA739924E34D9700272C2D /* LexPLM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732724E34D9600272C2D /* LexPLM.cxx */; }; - 28BA739A24E34D9700272C2D /* LexMSSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732824E34D9600272C2D /* LexMSSQL.cxx */; }; - 28BA739B24E34D9700272C2D /* LexCSS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732924E34D9600272C2D /* LexCSS.cxx */; }; - 28BA739C24E34D9700272C2D /* LexMaxima.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732A24E34D9600272C2D /* LexMaxima.cxx */; }; - 28BA739D24E34D9700272C2D /* LexCaml.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732B24E34D9600272C2D /* LexCaml.cxx */; }; - 28BA739E24E34D9700272C2D /* LexDataflex.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732C24E34D9600272C2D /* LexDataflex.cxx */; }; - 28BA739F24E34D9700272C2D /* LexLout.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732D24E34D9600272C2D /* LexLout.cxx */; }; - 28BA73A024E34D9700272C2D /* LexTAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732E24E34D9600272C2D /* LexTAL.cxx */; }; - 28BA73A124E34D9700272C2D /* LexMarkdown.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA732F24E34D9600272C2D /* LexMarkdown.cxx */; }; - 28BA73A224E34D9700272C2D /* LexJSON.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733024E34D9600272C2D /* LexJSON.cxx */; }; - 28BA73A324E34D9700272C2D /* LexPascal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733124E34D9700272C2D /* LexPascal.cxx */; }; - 28BA73A424E34D9700272C2D /* LexAVE.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733224E34D9700272C2D /* LexAVE.cxx */; }; - 28BA73A524E34D9700272C2D /* LexECL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733324E34D9700272C2D /* LexECL.cxx */; }; - 28BA73A624E34D9700272C2D /* LexMatlab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733424E34D9700272C2D /* LexMatlab.cxx */; }; - 28BA73A724E34D9700272C2D /* LexBibTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733524E34D9700272C2D /* LexBibTeX.cxx */; }; - 28BA73A824E34D9700272C2D /* LexNimrod.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733624E34D9700272C2D /* LexNimrod.cxx */; }; - 28BA73A924E34D9700272C2D /* LexPerl.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733724E34D9700272C2D /* LexPerl.cxx */; }; - 28BA73AA24E34D9700272C2D /* LexRust.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA733824E34D9700272C2D /* LexRust.cxx */; }; - 28BA73AD24E34DBC00272C2D /* Lexilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BA73AB24E34DBC00272C2D /* Lexilla.h */; }; - 28BA73AE24E34DBC00272C2D /* Lexilla.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28BA73AC24E34DBC00272C2D /* Lexilla.cxx */; }; - 70BF497C8D265026B77C97DA /* LexJulia.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 315E4E969868C52C125686B2 /* LexJulia.cxx */; }; - B32D4A2A9CEC222A5140E99F /* LexFSharp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = F8E54626B22BD9493090F40B /* LexFSharp.cxx */; }; - 510D44AFB91EE873E86ABDD4 /* LexAsciidoc.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */; }; - 00D544CC992062D2E3CD4BF6 /* LexGDScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = A383409E9A994F461550FEC1 /* LexGDScript.cxx */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 280262A5246DF655000DF3B8 /* liblexilla.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = liblexilla.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; - 283639BB268FD4EA009D58A1 /* LexAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAccessor.cxx; path = ../../lexlib/LexAccessor.cxx; sourceTree = ""; }; - 28BA728F24E34D5A00272C2D /* LexerBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerBase.cxx; path = ../../lexlib/LexerBase.cxx; sourceTree = ""; }; - 28BA729024E34D5A00272C2D /* LexAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexAccessor.h; path = ../../lexlib/LexAccessor.h; sourceTree = ""; }; - 28BA729124E34D5A00272C2D /* DefaultLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DefaultLexer.h; path = ../../lexlib/DefaultLexer.h; sourceTree = ""; }; - 28BA729224E34D5A00272C2D /* SubStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SubStyles.h; path = ../../lexlib/SubStyles.h; sourceTree = ""; }; - 28BA729324E34D5A00272C2D /* LexerNoExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerNoExceptions.h; path = ../../lexlib/LexerNoExceptions.h; sourceTree = ""; }; - 28BA729424E34D5A00272C2D /* LexerModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerModule.h; path = ../../lexlib/LexerModule.h; sourceTree = ""; }; - 28BA729524E34D5A00272C2D /* CharacterCategory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategory.cxx; path = ../../lexlib/CharacterCategory.cxx; sourceTree = ""; }; - 28BA729624E34D5A00272C2D /* LexerSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerSimple.h; path = ../../lexlib/LexerSimple.h; sourceTree = ""; }; - 28BA729724E34D5A00272C2D /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../lexlib/Accessor.h; sourceTree = ""; }; - 28BA729824E34D5A00272C2D /* PropSetSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSetSimple.cxx; path = ../../lexlib/PropSetSimple.cxx; sourceTree = ""; }; - 28BA729924E34D5A00272C2D /* CharacterSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterSet.cxx; path = ../../lexlib/CharacterSet.cxx; sourceTree = ""; }; - 28BA729A24E34D5A00272C2D /* SparseState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseState.h; path = ../../lexlib/SparseState.h; sourceTree = ""; }; - 28BA729B24E34D5A00272C2D /* WordList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordList.h; path = ../../lexlib/WordList.h; sourceTree = ""; }; - 28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DefaultLexer.cxx; path = ../../lexlib/DefaultLexer.cxx; sourceTree = ""; }; - 28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerNoExceptions.cxx; path = ../../lexlib/LexerNoExceptions.cxx; sourceTree = ""; }; - 28BA729E24E34D5A00272C2D /* WordList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordList.cxx; path = ../../lexlib/WordList.cxx; sourceTree = ""; }; - 28BA729F24E34D5A00272C2D /* OptionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionSet.h; path = ../../lexlib/OptionSet.h; sourceTree = ""; }; - 28BA72A024E34D5B00272C2D /* CatalogueModules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CatalogueModules.h; path = ../../lexlib/CatalogueModules.h; sourceTree = ""; }; - 28BA72A124E34D5B00272C2D /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../lexlib/CharacterSet.h; sourceTree = ""; }; - 28BA72A224E34D5B00272C2D /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../lexlib/StyleContext.h; sourceTree = ""; }; - 28BA72A324E34D5B00272C2D /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../lexlib/PropSetSimple.h; sourceTree = ""; }; - 28BA72A424E34D5B00272C2D /* StringCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringCopy.h; path = ../../lexlib/StringCopy.h; sourceTree = ""; }; - 28BA72A524E34D5B00272C2D /* LexerModule.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerModule.cxx; path = ../../lexlib/LexerModule.cxx; sourceTree = ""; }; - 28BA72A624E34D5B00272C2D /* LexerBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexerBase.h; path = ../../lexlib/LexerBase.h; sourceTree = ""; }; - 28BA72A724E34D5B00272C2D /* LexerSimple.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexerSimple.cxx; path = ../../lexlib/LexerSimple.cxx; sourceTree = ""; }; - 28BA72A824E34D5B00272C2D /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../lexlib/StyleContext.cxx; sourceTree = ""; }; - 28BA72A924E34D5B00272C2D /* CharacterCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategory.h; path = ../../lexlib/CharacterCategory.h; sourceTree = ""; }; - 28BA72AA24E34D5B00272C2D /* Accessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Accessor.cxx; path = ../../lexlib/Accessor.cxx; sourceTree = ""; }; - 28BA72C724E34D9100272C2D /* LexBasic.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBasic.cxx; path = ../../lexers/LexBasic.cxx; sourceTree = ""; }; - 28BA72C824E34D9100272C2D /* LexCIL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCIL.cxx; path = ../../lexers/LexCIL.cxx; sourceTree = ""; }; - 28BA72C924E34D9100272C2D /* LexTCL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCL.cxx; path = ../../lexers/LexTCL.cxx; sourceTree = ""; }; - 28BA72CA24E34D9100272C2D /* LexMetapost.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMetapost.cxx; path = ../../lexers/LexMetapost.cxx; sourceTree = ""; }; - 28BA72CB24E34D9100272C2D /* LexForth.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexForth.cxx; path = ../../lexers/LexForth.cxx; sourceTree = ""; }; - 28BA72CC24E34D9100272C2D /* LexSML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSML.cxx; path = ../../lexers/LexSML.cxx; sourceTree = ""; }; - 28BA72CD24E34D9100272C2D /* LexOScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOScript.cxx; path = ../../lexers/LexOScript.cxx; sourceTree = ""; }; - 28BA72CE24E34D9100272C2D /* LexTACL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTACL.cxx; path = ../../lexers/LexTACL.cxx; sourceTree = ""; }; - 28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGui4Cli.cxx; path = ../../lexers/LexGui4Cli.cxx; sourceTree = ""; }; - 28BA72D024E34D9200272C2D /* LexCLW.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCLW.cxx; path = ../../lexers/LexCLW.cxx; sourceTree = ""; }; - 28BA72D124E34D9200272C2D /* LexRebol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRebol.cxx; path = ../../lexers/LexRebol.cxx; sourceTree = ""; }; - 28BA72D224E34D9200272C2D /* LexSAS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSAS.cxx; path = ../../lexers/LexSAS.cxx; sourceTree = ""; }; - 28BA72D324E34D9200272C2D /* LexNim.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNim.cxx; path = ../../lexers/LexNim.cxx; sourceTree = ""; }; - 28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSmalltalk.cxx; path = ../../lexers/LexSmalltalk.cxx; sourceTree = ""; }; - 28BA72D524E34D9200272C2D /* LexModula.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexModula.cxx; path = ../../lexers/LexModula.cxx; sourceTree = ""; }; - 28BA72D624E34D9200272C2D /* LexBullant.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBullant.cxx; path = ../../lexers/LexBullant.cxx; sourceTree = ""; }; - 28BA72D724E34D9200272C2D /* LexASY.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexASY.cxx; path = ../../lexers/LexASY.cxx; sourceTree = ""; }; - 28BA72D824E34D9200272C2D /* LexBash.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBash.cxx; path = ../../lexers/LexBash.cxx; sourceTree = ""; }; - 28BA72D924E34D9200272C2D /* LexEiffel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEiffel.cxx; path = ../../lexers/LexEiffel.cxx; sourceTree = ""; }; - 28BA72DA24E34D9200272C2D /* LexVHDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVHDL.cxx; path = ../../lexers/LexVHDL.cxx; sourceTree = ""; }; - 28BA72DB24E34D9200272C2D /* LexAsn1.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsn1.cxx; path = ../../lexers/LexAsn1.cxx; sourceTree = ""; }; - 28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCoffeeScript.cxx; path = ../../lexers/LexCoffeeScript.cxx; sourceTree = ""; }; - 28BA72DD24E34D9200272C2D /* LexDiff.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDiff.cxx; path = ../../lexers/LexDiff.cxx; sourceTree = ""; }; - 28BA72DE24E34D9200272C2D /* LexSorcus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSorcus.cxx; path = ../../lexers/LexSorcus.cxx; sourceTree = ""; }; - 28BA72DF24E34D9200272C2D /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../lexers/LexAPDL.cxx; sourceTree = ""; }; - 28BA72E024E34D9200272C2D /* LexD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexD.cxx; path = ../../lexers/LexD.cxx; sourceTree = ""; }; - 28BA72E124E34D9200272C2D /* LexMySQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMySQL.cxx; path = ../../lexers/LexMySQL.cxx; sourceTree = ""; }; - 28BA72E224E34D9200272C2D /* LexHollywood.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHollywood.cxx; path = ../../lexers/LexHollywood.cxx; sourceTree = ""; }; - 28BA72E324E34D9200272C2D /* LexProgress.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProgress.cxx; path = ../../lexers/LexProgress.cxx; sourceTree = ""; }; - 28BA72E424E34D9200272C2D /* LexLisp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLisp.cxx; path = ../../lexers/LexLisp.cxx; sourceTree = ""; }; - 28BA72E524E34D9200272C2D /* LexPowerShell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerShell.cxx; path = ../../lexers/LexPowerShell.cxx; sourceTree = ""; }; - 28BA72E624E34D9200272C2D /* LexPS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPS.cxx; path = ../../lexers/LexPS.cxx; sourceTree = ""; }; - 28BA72E724E34D9200272C2D /* LexYAML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexYAML.cxx; path = ../../lexers/LexYAML.cxx; sourceTree = ""; }; - 28BA72E824E34D9200272C2D /* LexErlang.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../lexers/LexErlang.cxx; sourceTree = ""; }; - 28BA72E924E34D9300272C2D /* LexRuby.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRuby.cxx; path = ../../lexers/LexRuby.cxx; sourceTree = ""; }; - 28BA72EA24E34D9300272C2D /* LexIndent.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexIndent.cxx; path = ../../lexers/LexIndent.cxx; sourceTree = ""; }; - 28BA72EB24E34D9300272C2D /* LexErrorList.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErrorList.cxx; path = ../../lexers/LexErrorList.cxx; sourceTree = ""; }; - 28BA72EC24E34D9300272C2D /* LexFlagship.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFlagship.cxx; path = ../../lexers/LexFlagship.cxx; sourceTree = ""; }; - 28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLaTeX.cxx; path = ../../lexers/LexLaTeX.cxx; sourceTree = ""; }; - 28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../lexers/LexAbaqus.cxx; sourceTree = ""; }; - 28BA72EF24E34D9300272C2D /* LexBatch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBatch.cxx; path = ../../lexers/LexBatch.cxx; sourceTree = ""; }; - 28BA72F024E34D9300272C2D /* LexCPP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCPP.cxx; path = ../../lexers/LexCPP.cxx; sourceTree = ""; }; - 28BA72F124E34D9300272C2D /* LexRaku.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRaku.cxx; path = ../../lexers/LexRaku.cxx; sourceTree = ""; }; - 28BA72F224E34D9300272C2D /* LexGAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGAP.cxx; path = ../../lexers/LexGAP.cxx; sourceTree = ""; }; - 28BA72F324E34D9300272C2D /* LexSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSQL.cxx; path = ../../lexers/LexSQL.cxx; sourceTree = ""; }; - 28BA72F424E34D9300272C2D /* LexNsis.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNsis.cxx; path = ../../lexers/LexNsis.cxx; sourceTree = ""; }; - 28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEDIFACT.cxx; path = ../../lexers/LexEDIFACT.cxx; sourceTree = ""; }; - 28BA72F624E34D9300272C2D /* LexEScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEScript.cxx; path = ../../lexers/LexEScript.cxx; sourceTree = ""; }; - 28BA72F724E34D9300272C2D /* LexPOV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPOV.cxx; path = ../../lexers/LexPOV.cxx; sourceTree = ""; }; - 28BA72F824E34D9300272C2D /* LexKVIrc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKVIrc.cxx; path = ../../lexers/LexKVIrc.cxx; sourceTree = ""; }; - 28BA72F924E34D9300272C2D /* LexSpecman.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../lexers/LexSpecman.cxx; sourceTree = ""; }; - 28BA72FA24E34D9300272C2D /* LexHTML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHTML.cxx; path = ../../lexers/LexHTML.cxx; sourceTree = ""; }; - 28BA72FB24E34D9400272C2D /* LexFortran.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFortran.cxx; path = ../../lexers/LexFortran.cxx; sourceTree = ""; }; - 28BA72FC24E34D9400272C2D /* LexRegistry.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRegistry.cxx; path = ../../lexers/LexRegistry.cxx; sourceTree = ""; }; - 28BA72FD24E34D9400272C2D /* LexPython.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPython.cxx; path = ../../lexers/LexPython.cxx; sourceTree = ""; }; - 28BA72FE24E34D9400272C2D /* LexCmake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCmake.cxx; path = ../../lexers/LexCmake.cxx; sourceTree = ""; }; - 28BA72FF24E34D9400272C2D /* LexAsm.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsm.cxx; path = ../../lexers/LexAsm.cxx; sourceTree = ""; }; - 28BA730024E34D9400272C2D /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../lexers/LexAda.cxx; sourceTree = ""; }; - 28BA730124E34D9400272C2D /* LexCrontab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCrontab.cxx; path = ../../lexers/LexCrontab.cxx; sourceTree = ""; }; - 28BA730224E34D9400272C2D /* LexDMIS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMIS.cxx; path = ../../lexers/LexDMIS.cxx; sourceTree = ""; }; - 28BA730324E34D9400272C2D /* LexTCMD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCMD.cxx; path = ../../lexers/LexTCMD.cxx; sourceTree = ""; }; - 28BA730424E34D9400272C2D /* LexConf.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexConf.cxx; path = ../../lexers/LexConf.cxx; sourceTree = ""; }; - 28BA730524E34D9400272C2D /* LexInno.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexInno.cxx; path = ../../lexers/LexInno.cxx; sourceTree = ""; }; - 28BA730624E34D9400272C2D /* LexA68k.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexA68k.cxx; path = ../../lexers/LexA68k.cxx; sourceTree = ""; }; - 28BA730724E34D9400272C2D /* LexMake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMake.cxx; path = ../../lexers/LexMake.cxx; sourceTree = ""; }; - 28BA730824E34D9400272C2D /* LexTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTeX.cxx; path = ../../lexers/LexTeX.cxx; sourceTree = ""; }; - 28BA730924E34D9400272C2D /* LexSpice.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpice.cxx; path = ../../lexers/LexSpice.cxx; sourceTree = ""; }; - 28BA730A24E34D9400272C2D /* LexX12.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexX12.cxx; path = ../../lexers/LexX12.cxx; sourceTree = ""; }; - 28BA730B24E34D9400272C2D /* LexAU3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAU3.cxx; path = ../../lexers/LexAU3.cxx; sourceTree = ""; }; - 28BA730C24E34D9400272C2D /* LexBaan.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBaan.cxx; path = ../../lexers/LexBaan.cxx; sourceTree = ""; }; - 28BA730D24E34D9500272C2D /* LexMPT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMPT.cxx; path = ../../lexers/LexMPT.cxx; sourceTree = ""; }; - 28BA730E24E34D9500272C2D /* LexTADS3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../lexers/LexTADS3.cxx; sourceTree = ""; }; - 28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTxt2tags.cxx; path = ../../lexers/LexTxt2tags.cxx; sourceTree = ""; }; - 28BA731024E34D9500272C2D /* LexMMIXAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMMIXAL.cxx; path = ../../lexers/LexMMIXAL.cxx; sourceTree = ""; }; - 28BA731124E34D9500272C2D /* LexKix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKix.cxx; path = ../../lexers/LexKix.cxx; sourceTree = ""; }; - 28BA731224E34D9500272C2D /* LexSTTXT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSTTXT.cxx; path = ../../lexers/LexSTTXT.cxx; sourceTree = ""; }; - 28BA731324E34D9500272C2D /* LexMagik.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMagik.cxx; path = ../../lexers/LexMagik.cxx; sourceTree = ""; }; - 28BA731424E34D9500272C2D /* LexNull.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNull.cxx; path = ../../lexers/LexNull.cxx; sourceTree = ""; }; - 28BA731524E34D9500272C2D /* LexCsound.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCsound.cxx; path = ../../lexers/LexCsound.cxx; sourceTree = ""; }; - 28BA731624E34D9500272C2D /* LexLua.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../lexers/LexLua.cxx; sourceTree = ""; }; - 28BA731724E34D9500272C2D /* LexStata.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexStata.cxx; path = ../../lexers/LexStata.cxx; sourceTree = ""; }; - 28BA731824E34D9500272C2D /* LexOpal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOpal.cxx; path = ../../lexers/LexOpal.cxx; sourceTree = ""; }; - 28BA731924E34D9500272C2D /* LexHex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHex.cxx; path = ../../lexers/LexHex.cxx; sourceTree = ""; }; - 28BA731A24E34D9500272C2D /* LexVerilog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVerilog.cxx; path = ../../lexers/LexVerilog.cxx; sourceTree = ""; }; - 28BA731B24E34D9500272C2D /* LexHaskell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHaskell.cxx; path = ../../lexers/LexHaskell.cxx; sourceTree = ""; }; - 28BA731C24E34D9500272C2D /* LexR.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexR.cxx; path = ../../lexers/LexR.cxx; sourceTree = ""; }; - 28BA731D24E34D9500272C2D /* LexScriptol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexScriptol.cxx; path = ../../lexers/LexScriptol.cxx; sourceTree = ""; }; - 28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVisualProlog.cxx; path = ../../lexers/LexVisualProlog.cxx; sourceTree = ""; }; - 28BA731F24E34D9600272C2D /* LexVB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVB.cxx; path = ../../lexers/LexVB.cxx; sourceTree = ""; }; - 28BA732024E34D9600272C2D /* LexDMAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDMAP.cxx; path = ../../lexers/LexDMAP.cxx; sourceTree = ""; }; - 28BA732124E34D9600272C2D /* LexAVS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVS.cxx; path = ../../lexers/LexAVS.cxx; sourceTree = ""; }; - 28BA732224E34D9600272C2D /* LexPB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPB.cxx; path = ../../lexers/LexPB.cxx; sourceTree = ""; }; - 28BA732324E34D9600272C2D /* LexPO.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPO.cxx; path = ../../lexers/LexPO.cxx; sourceTree = ""; }; - 28BA732424E34D9600272C2D /* LexPowerPro.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerPro.cxx; path = ../../lexers/LexPowerPro.cxx; sourceTree = ""; }; - 28BA732524E34D9600272C2D /* LexProps.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProps.cxx; path = ../../lexers/LexProps.cxx; sourceTree = ""; }; - 28BA732624E34D9600272C2D /* LexCOBOL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCOBOL.cxx; path = ../../lexers/LexCOBOL.cxx; sourceTree = ""; }; - 28BA732724E34D9600272C2D /* LexPLM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPLM.cxx; path = ../../lexers/LexPLM.cxx; sourceTree = ""; }; - 28BA732824E34D9600272C2D /* LexMSSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMSSQL.cxx; path = ../../lexers/LexMSSQL.cxx; sourceTree = ""; }; - 28BA732924E34D9600272C2D /* LexCSS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSS.cxx; path = ../../lexers/LexCSS.cxx; sourceTree = ""; }; - 28BA732A24E34D9600272C2D /* LexMaxima.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMaxima.cxx; path = ../../lexers/LexMaxima.cxx; sourceTree = ""; }; - 28BA732B24E34D9600272C2D /* LexCaml.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCaml.cxx; path = ../../lexers/LexCaml.cxx; sourceTree = ""; }; - 28BA732C24E34D9600272C2D /* LexDataflex.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexDataflex.cxx; path = ../../lexers/LexDataflex.cxx; sourceTree = ""; }; - 28BA732D24E34D9600272C2D /* LexLout.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLout.cxx; path = ../../lexers/LexLout.cxx; sourceTree = ""; }; - 28BA732E24E34D9600272C2D /* LexTAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTAL.cxx; path = ../../lexers/LexTAL.cxx; sourceTree = ""; }; - 28BA732F24E34D9600272C2D /* LexMarkdown.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMarkdown.cxx; path = ../../lexers/LexMarkdown.cxx; sourceTree = ""; }; - 28BA733024E34D9600272C2D /* LexJSON.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexJSON.cxx; path = ../../lexers/LexJSON.cxx; sourceTree = ""; }; - 28BA733124E34D9700272C2D /* LexPascal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPascal.cxx; path = ../../lexers/LexPascal.cxx; sourceTree = ""; }; - 28BA733224E34D9700272C2D /* LexAVE.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVE.cxx; path = ../../lexers/LexAVE.cxx; sourceTree = ""; }; - 28BA733324E34D9700272C2D /* LexECL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexECL.cxx; path = ../../lexers/LexECL.cxx; sourceTree = ""; }; - 28BA733424E34D9700272C2D /* LexMatlab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMatlab.cxx; path = ../../lexers/LexMatlab.cxx; sourceTree = ""; }; - 28BA733524E34D9700272C2D /* LexBibTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBibTeX.cxx; path = ../../lexers/LexBibTeX.cxx; sourceTree = ""; }; - 28BA733624E34D9700272C2D /* LexNimrod.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNimrod.cxx; path = ../../lexers/LexNimrod.cxx; sourceTree = ""; }; - 28BA733724E34D9700272C2D /* LexPerl.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPerl.cxx; path = ../../lexers/LexPerl.cxx; sourceTree = ""; }; - 28BA733824E34D9700272C2D /* LexRust.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRust.cxx; path = ../../lexers/LexRust.cxx; sourceTree = ""; }; - 28BA73AB24E34DBC00272C2D /* Lexilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Lexilla.h; path = ../../include/Lexilla.h; sourceTree = ""; }; - 28BA73AC24E34DBC00272C2D /* Lexilla.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Lexilla.cxx; path = ../Lexilla.cxx; sourceTree = ""; }; - 28BA73B024E3510900272C2D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 315E4E969868C52C125686B2 /* LexJulia.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexJulia.cxx; path = ../../lexers/LexJulia.cxx; sourceTree = SOURCE_ROOT; }; - F8E54626B22BD9493090F40B /* LexFSharp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFSharp.cxx; path = ../../lexers/LexFSharp.cxx; sourceTree = SOURCE_ROOT; }; - 3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsciidoc.cxx; path = ../../lexers/LexAsciidoc.cxx; sourceTree = SOURCE_ROOT; }; - A383409E9A994F461550FEC1 /* LexGDScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGDScript.cxx; path = ../../lexers/LexGDScript.cxx; sourceTree = SOURCE_ROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 280262A3246DF655000DF3B8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2802629C246DF655000DF3B8 = { - isa = PBXGroup; - children = ( - 28BA73B024E3510900272C2D /* Info.plist */, - 280262B8246DF776000DF3B8 /* LexLib */, - 280262B7246DF765000DF3B8 /* Lexers */, - 280262A7246DF655000DF3B8 /* Lexilla */, - 280262A6246DF655000DF3B8 /* Products */, - ); - sourceTree = ""; - }; - 280262A6246DF655000DF3B8 /* Products */ = { - isa = PBXGroup; - children = ( - 280262A5246DF655000DF3B8 /* liblexilla.dylib */, - ); - name = Products; - sourceTree = ""; - }; - 280262A7246DF655000DF3B8 /* Lexilla */ = { - isa = PBXGroup; - children = ( - 28BA73AC24E34DBC00272C2D /* Lexilla.cxx */, - 28BA73AB24E34DBC00272C2D /* Lexilla.h */, - ); - name = Lexilla; - sourceTree = ""; - }; - 280262B7246DF765000DF3B8 /* Lexers */ = { - isa = PBXGroup; - children = ( - 28BA730624E34D9400272C2D /* LexA68k.cxx */, - 28BA72EE24E34D9300272C2D /* LexAbaqus.cxx */, - 28BA730024E34D9400272C2D /* LexAda.cxx */, - 28BA72DF24E34D9200272C2D /* LexAPDL.cxx */, - 3AF14420BFC43876F16C5995 /* LexAsciidoc.cxx */, - 28BA72FF24E34D9400272C2D /* LexAsm.cxx */, - 28BA72DB24E34D9200272C2D /* LexAsn1.cxx */, - 28BA72D724E34D9200272C2D /* LexASY.cxx */, - 28BA730B24E34D9400272C2D /* LexAU3.cxx */, - 28BA733224E34D9700272C2D /* LexAVE.cxx */, - 28BA732124E34D9600272C2D /* LexAVS.cxx */, - 28BA730C24E34D9400272C2D /* LexBaan.cxx */, - 28BA72D824E34D9200272C2D /* LexBash.cxx */, - 28BA72C724E34D9100272C2D /* LexBasic.cxx */, - 28BA72EF24E34D9300272C2D /* LexBatch.cxx */, - 28BA733524E34D9700272C2D /* LexBibTeX.cxx */, - 28BA72D624E34D9200272C2D /* LexBullant.cxx */, - 28BA732B24E34D9600272C2D /* LexCaml.cxx */, - 28BA72C824E34D9100272C2D /* LexCIL.cxx */, - 28BA72D024E34D9200272C2D /* LexCLW.cxx */, - 28BA72FE24E34D9400272C2D /* LexCmake.cxx */, - 28BA732624E34D9600272C2D /* LexCOBOL.cxx */, - 28BA72DC24E34D9200272C2D /* LexCoffeeScript.cxx */, - 28BA730424E34D9400272C2D /* LexConf.cxx */, - 28BA72F024E34D9300272C2D /* LexCPP.cxx */, - 28BA730124E34D9400272C2D /* LexCrontab.cxx */, - 28BA731524E34D9500272C2D /* LexCsound.cxx */, - 28BA732924E34D9600272C2D /* LexCSS.cxx */, - 28BA72E024E34D9200272C2D /* LexD.cxx */, - 28BA732C24E34D9600272C2D /* LexDataflex.cxx */, - 28BA72DD24E34D9200272C2D /* LexDiff.cxx */, - 28BA732024E34D9600272C2D /* LexDMAP.cxx */, - 28BA730224E34D9400272C2D /* LexDMIS.cxx */, - 28BA733324E34D9700272C2D /* LexECL.cxx */, - 28BA72F524E34D9300272C2D /* LexEDIFACT.cxx */, - 28BA72D924E34D9200272C2D /* LexEiffel.cxx */, - 28BA72E824E34D9200272C2D /* LexErlang.cxx */, - 28BA72EB24E34D9300272C2D /* LexErrorList.cxx */, - 28BA72F624E34D9300272C2D /* LexEScript.cxx */, - 28BA72EC24E34D9300272C2D /* LexFlagship.cxx */, - 28BA72CB24E34D9100272C2D /* LexForth.cxx */, - 28BA72FB24E34D9400272C2D /* LexFortran.cxx */, - F8E54626B22BD9493090F40B /* LexFSharp.cxx */, - 28BA72F224E34D9300272C2D /* LexGAP.cxx */, - A383409E9A994F461550FEC1 /* LexGDScript.cxx */, - 28BA72CF24E34D9100272C2D /* LexGui4Cli.cxx */, - 28BA731B24E34D9500272C2D /* LexHaskell.cxx */, - 28BA731924E34D9500272C2D /* LexHex.cxx */, - 28BA72E224E34D9200272C2D /* LexHollywood.cxx */, - 28BA72FA24E34D9300272C2D /* LexHTML.cxx */, - 28BA72EA24E34D9300272C2D /* LexIndent.cxx */, - 28BA730524E34D9400272C2D /* LexInno.cxx */, - 28BA733024E34D9600272C2D /* LexJSON.cxx */, - 315E4E969868C52C125686B2 /* LexJulia.cxx */, - 28BA731124E34D9500272C2D /* LexKix.cxx */, - 28BA72F824E34D9300272C2D /* LexKVIrc.cxx */, - 28BA72ED24E34D9300272C2D /* LexLaTeX.cxx */, - 28BA72E424E34D9200272C2D /* LexLisp.cxx */, - 28BA732D24E34D9600272C2D /* LexLout.cxx */, - 28BA731624E34D9500272C2D /* LexLua.cxx */, - 28BA731324E34D9500272C2D /* LexMagik.cxx */, - 28BA730724E34D9400272C2D /* LexMake.cxx */, - 28BA732F24E34D9600272C2D /* LexMarkdown.cxx */, - 28BA733424E34D9700272C2D /* LexMatlab.cxx */, - 28BA732A24E34D9600272C2D /* LexMaxima.cxx */, - 28BA72CA24E34D9100272C2D /* LexMetapost.cxx */, - 28BA731024E34D9500272C2D /* LexMMIXAL.cxx */, - 28BA72D524E34D9200272C2D /* LexModula.cxx */, - 28BA730D24E34D9500272C2D /* LexMPT.cxx */, - 28BA732824E34D9600272C2D /* LexMSSQL.cxx */, - 28BA72E124E34D9200272C2D /* LexMySQL.cxx */, - 28BA72D324E34D9200272C2D /* LexNim.cxx */, - 28BA733624E34D9700272C2D /* LexNimrod.cxx */, - 28BA72F424E34D9300272C2D /* LexNsis.cxx */, - 28BA731424E34D9500272C2D /* LexNull.cxx */, - 28BA731824E34D9500272C2D /* LexOpal.cxx */, - 28BA72CD24E34D9100272C2D /* LexOScript.cxx */, - 28BA733124E34D9700272C2D /* LexPascal.cxx */, - 28BA732224E34D9600272C2D /* LexPB.cxx */, - 28BA733724E34D9700272C2D /* LexPerl.cxx */, - 28BA732724E34D9600272C2D /* LexPLM.cxx */, - 28BA732324E34D9600272C2D /* LexPO.cxx */, - 28BA72F724E34D9300272C2D /* LexPOV.cxx */, - 28BA732424E34D9600272C2D /* LexPowerPro.cxx */, - 28BA72E524E34D9200272C2D /* LexPowerShell.cxx */, - 28BA72E324E34D9200272C2D /* LexProgress.cxx */, - 28BA732524E34D9600272C2D /* LexProps.cxx */, - 28BA72E624E34D9200272C2D /* LexPS.cxx */, - 28BA72FD24E34D9400272C2D /* LexPython.cxx */, - 28BA731C24E34D9500272C2D /* LexR.cxx */, - 28BA72F124E34D9300272C2D /* LexRaku.cxx */, - 28BA72D124E34D9200272C2D /* LexRebol.cxx */, - 28BA72FC24E34D9400272C2D /* LexRegistry.cxx */, - 28BA72E924E34D9300272C2D /* LexRuby.cxx */, - 28BA733824E34D9700272C2D /* LexRust.cxx */, - 28BA72D224E34D9200272C2D /* LexSAS.cxx */, - 28BA731D24E34D9500272C2D /* LexScriptol.cxx */, - 28BA72D424E34D9200272C2D /* LexSmalltalk.cxx */, - 28BA72CC24E34D9100272C2D /* LexSML.cxx */, - 28BA72DE24E34D9200272C2D /* LexSorcus.cxx */, - 28BA72F924E34D9300272C2D /* LexSpecman.cxx */, - 28BA730924E34D9400272C2D /* LexSpice.cxx */, - 28BA72F324E34D9300272C2D /* LexSQL.cxx */, - 28BA731724E34D9500272C2D /* LexStata.cxx */, - 28BA731224E34D9500272C2D /* LexSTTXT.cxx */, - 28BA72CE24E34D9100272C2D /* LexTACL.cxx */, - 28BA730E24E34D9500272C2D /* LexTADS3.cxx */, - 28BA732E24E34D9600272C2D /* LexTAL.cxx */, - 28BA72C924E34D9100272C2D /* LexTCL.cxx */, - 28BA730324E34D9400272C2D /* LexTCMD.cxx */, - 28BA730824E34D9400272C2D /* LexTeX.cxx */, - 28BA730F24E34D9500272C2D /* LexTxt2tags.cxx */, - 28BA731F24E34D9600272C2D /* LexVB.cxx */, - 28BA731A24E34D9500272C2D /* LexVerilog.cxx */, - 28BA72DA24E34D9200272C2D /* LexVHDL.cxx */, - 28BA731E24E34D9500272C2D /* LexVisualProlog.cxx */, - 28BA730A24E34D9400272C2D /* LexX12.cxx */, - 28BA72E724E34D9200272C2D /* LexYAML.cxx */, - ); - name = Lexers; - sourceTree = ""; - }; - 280262B8246DF776000DF3B8 /* LexLib */ = { - isa = PBXGroup; - children = ( - 28BA72AA24E34D5B00272C2D /* Accessor.cxx */, - 28BA729724E34D5A00272C2D /* Accessor.h */, - 28BA72A024E34D5B00272C2D /* CatalogueModules.h */, - 28BA729524E34D5A00272C2D /* CharacterCategory.cxx */, - 28BA72A924E34D5B00272C2D /* CharacterCategory.h */, - 28BA729924E34D5A00272C2D /* CharacterSet.cxx */, - 28BA72A124E34D5B00272C2D /* CharacterSet.h */, - 28BA729C24E34D5A00272C2D /* DefaultLexer.cxx */, - 28BA729124E34D5A00272C2D /* DefaultLexer.h */, - 283639BB268FD4EA009D58A1 /* LexAccessor.cxx */, - 28BA729024E34D5A00272C2D /* LexAccessor.h */, - 28BA728F24E34D5A00272C2D /* LexerBase.cxx */, - 28BA72A624E34D5B00272C2D /* LexerBase.h */, - 28BA72A524E34D5B00272C2D /* LexerModule.cxx */, - 28BA729424E34D5A00272C2D /* LexerModule.h */, - 28BA729D24E34D5A00272C2D /* LexerNoExceptions.cxx */, - 28BA729324E34D5A00272C2D /* LexerNoExceptions.h */, - 28BA72A724E34D5B00272C2D /* LexerSimple.cxx */, - 28BA729624E34D5A00272C2D /* LexerSimple.h */, - 28BA729F24E34D5A00272C2D /* OptionSet.h */, - 28BA729824E34D5A00272C2D /* PropSetSimple.cxx */, - 28BA72A324E34D5B00272C2D /* PropSetSimple.h */, - 28BA729A24E34D5A00272C2D /* SparseState.h */, - 28BA72A424E34D5B00272C2D /* StringCopy.h */, - 28BA72A824E34D5B00272C2D /* StyleContext.cxx */, - 28BA72A224E34D5B00272C2D /* StyleContext.h */, - 28BA729224E34D5A00272C2D /* SubStyles.h */, - 28BA729E24E34D5A00272C2D /* WordList.cxx */, - 28BA729B24E34D5A00272C2D /* WordList.h */, - ); - name = LexLib; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 280262A1246DF655000DF3B8 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 28BA73AD24E34DBC00272C2D /* Lexilla.h in Headers */, - 28BA72BF24E34D5B00272C2D /* PropSetSimple.h in Headers */, - 28BA72B224E34D5B00272C2D /* LexerSimple.h in Headers */, - 28BA72AF24E34D5B00272C2D /* LexerNoExceptions.h in Headers */, - 28BA72B724E34D5B00272C2D /* WordList.h in Headers */, - 28BA72C024E34D5B00272C2D /* StringCopy.h in Headers */, - 28BA72AD24E34D5B00272C2D /* DefaultLexer.h in Headers */, - 28BA72B324E34D5B00272C2D /* Accessor.h in Headers */, - 28BA72BE24E34D5B00272C2D /* StyleContext.h in Headers */, - 28BA72BB24E34D5B00272C2D /* OptionSet.h in Headers */, - 28BA72B024E34D5B00272C2D /* LexerModule.h in Headers */, - 28BA72AC24E34D5B00272C2D /* LexAccessor.h in Headers */, - 28BA72C524E34D5B00272C2D /* CharacterCategory.h in Headers */, - 28BA72BD24E34D5B00272C2D /* CharacterSet.h in Headers */, - 28BA72AE24E34D5B00272C2D /* SubStyles.h in Headers */, - 28BA72BC24E34D5B00272C2D /* CatalogueModules.h in Headers */, - 28BA72C224E34D5B00272C2D /* LexerBase.h in Headers */, - 28BA72B624E34D5B00272C2D /* SparseState.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 280262A4246DF655000DF3B8 /* lexilla */ = { - isa = PBXNativeTarget; - buildConfigurationList = 280262B0246DF655000DF3B8 /* Build configuration list for PBXNativeTarget "lexilla" */; - buildPhases = ( - 280262A1246DF655000DF3B8 /* Headers */, - 280262A2246DF655000DF3B8 /* Sources */, - 280262A3246DF655000DF3B8 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = lexilla; - productName = lexilla; - productReference = 280262A5246DF655000DF3B8 /* liblexilla.dylib */; - productType = "com.apple.product-type.library.dynamic"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2802629D246DF655000DF3B8 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1200; - ORGANIZATIONNAME = "Neil Hodgson"; - TargetAttributes = { - 280262A4246DF655000DF3B8 = { - CreatedOnToolsVersion = 11.4.1; - }; - }; - }; - buildConfigurationList = 280262A0246DF655000DF3B8 /* Build configuration list for PBXProject "Lexilla" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2802629C246DF655000DF3B8; - productRefGroup = 280262A6246DF655000DF3B8 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 280262A4246DF655000DF3B8 /* lexilla */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 280262A2246DF655000DF3B8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 28BA739A24E34D9700272C2D /* LexMSSQL.cxx in Sources */, - 28BA735324E34D9700272C2D /* LexMySQL.cxx in Sources */, - 28BA738024E34D9700272C2D /* LexTADS3.cxx in Sources */, - 28BA73A924E34D9700272C2D /* LexPerl.cxx in Sources */, - 28BA733D24E34D9700272C2D /* LexForth.cxx in Sources */, - 28BA736824E34D9700272C2D /* LexEScript.cxx in Sources */, - 283639BC268FD4EA009D58A1 /* LexAccessor.cxx in Sources */, - 28BA737124E34D9700272C2D /* LexAsm.cxx in Sources */, - 28BA737B24E34D9700272C2D /* LexSpice.cxx in Sources */, - 28BA737024E34D9700272C2D /* LexCmake.cxx in Sources */, - 28BA734624E34D9700272C2D /* LexSmalltalk.cxx in Sources */, - 28BA72C424E34D5B00272C2D /* StyleContext.cxx in Sources */, - 28BA734C24E34D9700272C2D /* LexVHDL.cxx in Sources */, - 28BA737724E34D9700272C2D /* LexInno.cxx in Sources */, - 28BA739B24E34D9700272C2D /* LexCSS.cxx in Sources */, - 28BA734A24E34D9700272C2D /* LexBash.cxx in Sources */, - 28BA734224E34D9700272C2D /* LexCLW.cxx in Sources */, - 28BA734424E34D9700272C2D /* LexSAS.cxx in Sources */, - 28BA738E24E34D9700272C2D /* LexR.cxx in Sources */, - 28BA72C124E34D5B00272C2D /* LexerModule.cxx in Sources */, - 28BA735C24E34D9700272C2D /* LexIndent.cxx in Sources */, - 28BA736624E34D9700272C2D /* LexNsis.cxx in Sources */, - 28BA734724E34D9700272C2D /* LexModula.cxx in Sources */, - 28BA734924E34D9700272C2D /* LexASY.cxx in Sources */, - 28BA739024E34D9700272C2D /* LexVisualProlog.cxx in Sources */, - 28BA739524E34D9700272C2D /* LexPO.cxx in Sources */, - 28BA72BA24E34D5B00272C2D /* WordList.cxx in Sources */, - 28BA739624E34D9700272C2D /* LexPowerPro.cxx in Sources */, - 28BA733924E34D9700272C2D /* LexBasic.cxx in Sources */, - 28BA739D24E34D9700272C2D /* LexCaml.cxx in Sources */, - 28BA739724E34D9700272C2D /* LexProps.cxx in Sources */, - 28BA737424E34D9700272C2D /* LexDMIS.cxx in Sources */, - 28BA73A524E34D9700272C2D /* LexECL.cxx in Sources */, - 28BA736524E34D9700272C2D /* LexSQL.cxx in Sources */, - 28BA72AB24E34D5B00272C2D /* LexerBase.cxx in Sources */, - 28BA72B824E34D5B00272C2D /* DefaultLexer.cxx in Sources */, - 28BA73A024E34D9700272C2D /* LexTAL.cxx in Sources */, - 28BA733C24E34D9700272C2D /* LexMetapost.cxx in Sources */, - 28BA733A24E34D9700272C2D /* LexCIL.cxx in Sources */, - 28BA735D24E34D9700272C2D /* LexErrorList.cxx in Sources */, - 28BA737224E34D9700272C2D /* LexAda.cxx in Sources */, - 28BA737D24E34D9700272C2D /* LexAU3.cxx in Sources */, - 28BA734024E34D9700272C2D /* LexTACL.cxx in Sources */, - 28BA736724E34D9700272C2D /* LexEDIFACT.cxx in Sources */, - 28BA736024E34D9700272C2D /* LexAbaqus.cxx in Sources */, - 28BA734D24E34D9700272C2D /* LexAsn1.cxx in Sources */, - 28BA737A24E34D9700272C2D /* LexTeX.cxx in Sources */, - 28BA739124E34D9700272C2D /* LexVB.cxx in Sources */, - 28BA735E24E34D9700272C2D /* LexFlagship.cxx in Sources */, - 28BA735B24E34D9700272C2D /* LexRuby.cxx in Sources */, - 28BA735424E34D9700272C2D /* LexHollywood.cxx in Sources */, - 28BA72B924E34D5B00272C2D /* LexerNoExceptions.cxx in Sources */, - 28BA736D24E34D9700272C2D /* LexFortran.cxx in Sources */, - 28BA738924E34D9700272C2D /* LexStata.cxx in Sources */, - 28BA737524E34D9700272C2D /* LexTCMD.cxx in Sources */, - 28BA72C624E34D5B00272C2D /* Accessor.cxx in Sources */, - 28BA733B24E34D9700272C2D /* LexTCL.cxx in Sources */, - 28BA739C24E34D9700272C2D /* LexMaxima.cxx in Sources */, - 28BA73AA24E34D9700272C2D /* LexRust.cxx in Sources */, - 28BA733F24E34D9700272C2D /* LexOScript.cxx in Sources */, - 28BA737324E34D9700272C2D /* LexCrontab.cxx in Sources */, - 28BA734E24E34D9700272C2D /* LexCoffeeScript.cxx in Sources */, - 28BA735624E34D9700272C2D /* LexLisp.cxx in Sources */, - 28BA735824E34D9700272C2D /* LexPS.cxx in Sources */, - 28BA735F24E34D9700272C2D /* LexLaTeX.cxx in Sources */, - 28BA736B24E34D9700272C2D /* LexSpecman.cxx in Sources */, - 28BA73A724E34D9700272C2D /* LexBibTeX.cxx in Sources */, - 28BA737E24E34D9700272C2D /* LexBaan.cxx in Sources */, - 28BA738124E34D9700272C2D /* LexTxt2tags.cxx in Sources */, - 28BA737F24E34D9700272C2D /* LexMPT.cxx in Sources */, - 28BA738424E34D9700272C2D /* LexSTTXT.cxx in Sources */, - 28BA734F24E34D9700272C2D /* LexDiff.cxx in Sources */, - 28BA735924E34D9700272C2D /* LexYAML.cxx in Sources */, - 28BA735524E34D9700272C2D /* LexProgress.cxx in Sources */, - 28BA736F24E34D9700272C2D /* LexPython.cxx in Sources */, - 28BA72B524E34D5B00272C2D /* CharacterSet.cxx in Sources */, - 28BA739E24E34D9700272C2D /* LexDataflex.cxx in Sources */, - 28BA738F24E34D9700272C2D /* LexScriptol.cxx in Sources */, - 28BA736C24E34D9700272C2D /* LexHTML.cxx in Sources */, - 28BA737924E34D9700272C2D /* LexMake.cxx in Sources */, - 28BA738524E34D9700272C2D /* LexMagik.cxx in Sources */, - 28BA72B124E34D5B00272C2D /* CharacterCategory.cxx in Sources */, - 28BA739424E34D9700272C2D /* LexPB.cxx in Sources */, - 28BA73A624E34D9700272C2D /* LexMatlab.cxx in Sources */, - 28BA736324E34D9700272C2D /* LexRaku.cxx in Sources */, - 28BA736224E34D9700272C2D /* LexCPP.cxx in Sources */, - 28BA738A24E34D9700272C2D /* LexOpal.cxx in Sources */, - 28BA736E24E34D9700272C2D /* LexRegistry.cxx in Sources */, - 28BA738224E34D9700272C2D /* LexMMIXAL.cxx in Sources */, - 28BA736A24E34D9700272C2D /* LexKVIrc.cxx in Sources */, - 28BA73A224E34D9700272C2D /* LexJSON.cxx in Sources */, - 28BA738724E34D9700272C2D /* LexCsound.cxx in Sources */, - 28BA738824E34D9700272C2D /* LexLua.cxx in Sources */, - 28BA739824E34D9700272C2D /* LexCOBOL.cxx in Sources */, - 28BA73A824E34D9700272C2D /* LexNimrod.cxx in Sources */, - 28BA739324E34D9700272C2D /* LexAVS.cxx in Sources */, - 28BA737624E34D9700272C2D /* LexConf.cxx in Sources */, - 28BA734524E34D9700272C2D /* LexNim.cxx in Sources */, - 28BA73AE24E34DBC00272C2D /* Lexilla.cxx in Sources */, - 28BA72C324E34D5B00272C2D /* LexerSimple.cxx in Sources */, - 28BA735124E34D9700272C2D /* LexAPDL.cxx in Sources */, - 28BA736424E34D9700272C2D /* LexGAP.cxx in Sources */, - 28BA734324E34D9700272C2D /* LexRebol.cxx in Sources */, - 28BA733E24E34D9700272C2D /* LexSML.cxx in Sources */, - 28BA738C24E34D9700272C2D /* LexVerilog.cxx in Sources */, - 28BA738624E34D9700272C2D /* LexNull.cxx in Sources */, - 28BA736124E34D9700272C2D /* LexBatch.cxx in Sources */, - 28BA736924E34D9700272C2D /* LexPOV.cxx in Sources */, - 28BA734124E34D9700272C2D /* LexGui4Cli.cxx in Sources */, - 28BA734824E34D9700272C2D /* LexBullant.cxx in Sources */, - 28BA734B24E34D9700272C2D /* LexEiffel.cxx in Sources */, - 28BA73A424E34D9700272C2D /* LexAVE.cxx in Sources */, - 28BA738D24E34D9700272C2D /* LexHaskell.cxx in Sources */, - 28BA735024E34D9700272C2D /* LexSorcus.cxx in Sources */, - 28BA739F24E34D9700272C2D /* LexLout.cxx in Sources */, - 28BA73A124E34D9700272C2D /* LexMarkdown.cxx in Sources */, - 28BA739224E34D9700272C2D /* LexDMAP.cxx in Sources */, - 28BA737824E34D9700272C2D /* LexA68k.cxx in Sources */, - 28BA735A24E34D9700272C2D /* LexErlang.cxx in Sources */, - 28BA738B24E34D9700272C2D /* LexHex.cxx in Sources */, - 28BA735224E34D9700272C2D /* LexD.cxx in Sources */, - 28BA73A324E34D9700272C2D /* LexPascal.cxx in Sources */, - 28BA739924E34D9700272C2D /* LexPLM.cxx in Sources */, - 28BA735724E34D9700272C2D /* LexPowerShell.cxx in Sources */, - 28BA738324E34D9700272C2D /* LexKix.cxx in Sources */, - 28BA72B424E34D5B00272C2D /* PropSetSimple.cxx in Sources */, - 28BA737C24E34D9700272C2D /* LexX12.cxx in Sources */, - B32D4A2A9CEC222A5140E99F /* LexFSharp.cxx in Sources */, - 70BF497C8D265026B77C97DA /* LexJulia.cxx in Sources */, - 510D44AFB91EE873E86ABDD4 /* LexAsciidoc.cxx in Sources */, - 00D544CC992062D2E3CD4BF6 /* LexGDScript.cxx in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 280262AE246DF655000DF3B8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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; - 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, - "$(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.9; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 280262AF246DF655000DF3B8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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; - 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_PREPROCESSOR_DEFINITIONS = NDEBUG; - 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.9; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = macosx; - }; - name = Release; - }; - 280262B1246DF655000DF3B8 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5.1.4; - DEVELOPMENT_TEAM = 4F446KW87E; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_PREFIX = lib; - GCC_ENABLE_CPP_EXCEPTIONS = YES; - GCC_ENABLE_CPP_RTTI = YES; - GCC_SYMBOLS_PRIVATE_EXTERN = YES; - HEADER_SEARCH_PATHS = ( - ../../include, - ../../../scintilla/include, - ../../lexlib, - ); - INFOPLIST_FILE = "$(SRCROOT)/Lexilla/Info.plist"; - INSTALL_PATH = "@rpath"; - PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Lexilla; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 280262B2246DF655000DF3B8 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5.1.4; - DEVELOPMENT_TEAM = 4F446KW87E; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - EXECUTABLE_PREFIX = lib; - GCC_ENABLE_CPP_EXCEPTIONS = YES; - GCC_ENABLE_CPP_RTTI = YES; - GCC_SYMBOLS_PRIVATE_EXTERN = YES; - HEADER_SEARCH_PATHS = ( - ../../include, - ../../../scintilla/include, - ../../lexlib, - ); - INFOPLIST_FILE = "$(SRCROOT)/Lexilla/Info.plist"; - INSTALL_PATH = "@rpath"; - PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Lexilla; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 280262A0246DF655000DF3B8 /* Build configuration list for PBXProject "Lexilla" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 280262AE246DF655000DF3B8 /* Debug */, - 280262AF246DF655000DF3B8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 280262B0246DF655000DF3B8 /* Build configuration list for PBXNativeTarget "lexilla" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 280262B1246DF655000DF3B8 /* Debug */, - 280262B2246DF655000DF3B8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 2802629D246DF655000DF3B8 /* Project object */; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 3a367d953..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/LexillaVersion.rc b/3rdparty/unioncode-scintilla515/lexilla/src/LexillaVersion.rc deleted file mode 100644 index 2d3a0c1b2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/LexillaVersion.rc +++ /dev/null @@ -1,37 +0,0 @@ -// Resource file for Lexilla - provides a version number -// Copyright 2020 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#include - -#define VERSION_LEXILLA "5.1.4" -#define VERSION_WORDS 5, 1, 4, 0 - -VS_VERSION_INFO VERSIONINFO -FILEVERSION VERSION_WORDS -PRODUCTVERSION VERSION_WORDS -FILEFLAGSMASK 0x3fL -FILEFLAGS 0 -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0" - VALUE "FileDescription", "Lexilla.DLL - a Lexical Analysis Component\0" - VALUE "FileVersion", VERSION_LEXILLA "\0" - VALUE "InternalName", "Lexilla\0" - VALUE "LegalCopyright", "Copyright 2019 by Neil Hodgson\0" - VALUE "OriginalFilename", "Lexilla.DLL\0" - VALUE "ProductName", "Lexilla\0" - VALUE "ProductVersion", VERSION_LEXILLA "\0" - END - END -END diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/deps.mak b/3rdparty/unioncode-scintilla515/lexilla/src/deps.mak deleted file mode 100644 index 10c3976de..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/deps.mak +++ /dev/null @@ -1,1582 +0,0 @@ -# Created by DepGen.py. To recreate, run DepGen.py. -Lexilla.o: \ - ../src/Lexilla.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexerModule.h \ - ../lexlib/CatalogueModules.h -Accessor.o: \ - ../lexlib/Accessor.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h -CharacterCategory.o: \ - ../lexlib/CharacterCategory.cxx \ - ../lexlib/CharacterCategory.h -CharacterSet.o: \ - ../lexlib/CharacterSet.cxx \ - ../lexlib/CharacterSet.h -DefaultLexer.o: \ - ../lexlib/DefaultLexer.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -LexAccessor.o: \ - ../lexlib/LexAccessor.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/CharacterSet.h -LexerBase.o: \ - ../lexlib/LexerBase.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h -LexerModule.o: \ - ../lexlib/LexerModule.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerSimple.h -LexerNoExceptions.o: \ - ../lexlib/LexerNoExceptions.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerNoExceptions.h -LexerSimple.o: \ - ../lexlib/LexerSimple.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerSimple.h -PropSetSimple.o: \ - ../lexlib/PropSetSimple.cxx \ - ../lexlib/PropSetSimple.h -StyleContext.o: \ - ../lexlib/StyleContext.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h -WordList.o: \ - ../lexlib/WordList.cxx \ - ../lexlib/WordList.h -LexA68k.o: \ - ../lexers/LexA68k.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAbaqus.o: \ - ../lexers/LexAbaqus.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAda.o: \ - ../lexers/LexAda.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAPDL.o: \ - ../lexers/LexAPDL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAsciidoc.o: \ - ../lexers/LexAsciidoc.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAsm.o: \ - ../lexers/LexAsm.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexAsn1.o: \ - ../lexers/LexAsn1.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexASY.o: \ - ../lexers/LexASY.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAU3.o: \ - ../lexers/LexAU3.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAVE.o: \ - ../lexers/LexAVE.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexAVS.o: \ - ../lexers/LexAVS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexBaan.o: \ - ../lexers/LexBaan.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexBash.o: \ - ../lexers/LexBash.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -LexBasic.o: \ - ../lexers/LexBasic.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexBatch.o: \ - ../lexers/LexBatch.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexBibTeX.o: \ - ../lexers/LexBibTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexBullant.o: \ - ../lexers/LexBullant.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCaml.o: \ - ../lexers/LexCaml.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCIL.o: \ - ../lexers/LexCIL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexCLW.o: \ - ../lexers/LexCLW.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCmake.o: \ - ../lexers/LexCmake.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCOBOL.o: \ - ../lexers/LexCOBOL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCoffeeScript.o: \ - ../lexers/LexCoffeeScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexConf.o: \ - ../lexers/LexConf.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCPP.o: \ - ../lexers/LexCPP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SparseState.h \ - ../lexlib/SubStyles.h -LexCrontab.o: \ - ../lexers/LexCrontab.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCsound.o: \ - ../lexers/LexCsound.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexCSS.o: \ - ../lexers/LexCSS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexD.o: \ - ../lexers/LexD.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexDataflex.o: \ - ../lexers/LexDataflex.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexDiff.o: \ - ../lexers/LexDiff.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexDMAP.o: \ - ../lexers/LexDMAP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexDMIS.o: \ - ../lexers/LexDMIS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -LexECL.o: \ - ../lexers/LexECL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h -LexEDIFACT.o: \ - ../lexers/LexEDIFACT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -LexEiffel.o: \ - ../lexers/LexEiffel.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexErlang.o: \ - ../lexers/LexErlang.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexErrorList.o: \ - ../lexers/LexErrorList.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexEScript.o: \ - ../lexers/LexEScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexFlagship.o: \ - ../lexers/LexFlagship.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexForth.o: \ - ../lexers/LexForth.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexFortran.o: \ - ../lexers/LexFortran.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexFSharp.o: \ - ../lexers/LexFSharp.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexGAP.o: \ - ../lexers/LexGAP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexGDScript.o: \ - ../lexers/LexGDScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -LexGui4Cli.o: \ - ../lexers/LexGui4Cli.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexHaskell.o: \ - ../lexers/LexHaskell.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexHex.o: \ - ../lexers/LexHex.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexHollywood.o: \ - ../lexers/LexHollywood.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexIndent.o: \ - ../lexers/LexIndent.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexInno.o: \ - ../lexers/LexInno.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexJSON.o: \ - ../lexers/LexJSON.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexJulia.o: \ - ../lexers/LexJulia.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexKix.o: \ - ../lexers/LexKix.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexKVIrc.o: \ - ../lexers/LexKVIrc.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexLaTeX.o: \ - ../lexers/LexLaTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h \ - ../lexlib/LexerBase.h -LexLisp.o: \ - ../lexers/LexLisp.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexLout.o: \ - ../lexers/LexLout.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexLua.o: \ - ../lexers/LexLua.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMagik.o: \ - ../lexers/LexMagik.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMake.o: \ - ../lexers/LexMake.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMarkdown.o: \ - ../lexers/LexMarkdown.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMatlab.o: \ - ../lexers/LexMatlab.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMaxima.o: \ - ../lexers/LexMaxima.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMetapost.o: \ - ../lexers/LexMetapost.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMMIXAL.o: \ - ../lexers/LexMMIXAL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexModula.o: \ - ../lexers/LexModula.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMPT.o: \ - ../lexers/LexMPT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMSSQL.o: \ - ../lexers/LexMSSQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexMySQL.o: \ - ../lexers/LexMySQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexNim.o: \ - ../lexers/LexNim.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexNimrod.o: \ - ../lexers/LexNimrod.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexNsis.o: \ - ../lexers/LexNsis.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexNull.o: \ - ../lexers/LexNull.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexOpal.o: \ - ../lexers/LexOpal.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexOScript.o: \ - ../lexers/LexOScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPascal.o: \ - ../lexers/LexPascal.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPB.o: \ - ../lexers/LexPB.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPerl.o: \ - ../lexers/LexPerl.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexPLM.o: \ - ../lexers/LexPLM.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPO.o: \ - ../lexers/LexPO.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPOV.o: \ - ../lexers/LexPOV.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPowerPro.o: \ - ../lexers/LexPowerPro.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPowerShell.o: \ - ../lexers/LexPowerShell.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexProgress.o: \ - ../lexers/LexProgress.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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/SparseState.h \ - ../lexlib/DefaultLexer.h -LexProps.o: \ - ../lexers/LexProps.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPS.o: \ - ../lexers/LexPS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexPython.o: \ - ../lexers/LexPython.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -LexR.o: \ - ../lexers/LexR.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexRaku.o: \ - ../lexers/LexRaku.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexRegistry.o: \ - ../lexers/LexRegistry.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -LexRuby.o: \ - ../lexers/LexRuby.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexRust.o: \ - ../lexers/LexRust.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexSAS.o: \ - ../lexers/LexSAS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexScriptol.o: \ - ../lexers/LexScriptol.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSmalltalk.o: \ - ../lexers/LexSmalltalk.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSML.o: \ - ../lexers/LexSML.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSorcus.o: \ - ../lexers/LexSorcus.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSpecman.o: \ - ../lexers/LexSpecman.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSpice.o: \ - ../lexers/LexSpice.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSQL.o: \ - ../lexers/LexSQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SparseState.h \ - ../lexlib/DefaultLexer.h -LexStata.o: \ - ../lexers/LexStata.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexSTTXT.o: \ - ../lexers/LexSTTXT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTACL.o: \ - ../lexers/LexTACL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTADS3.o: \ - ../lexers/LexTADS3.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTAL.o: \ - ../lexers/LexTAL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTCL.o: \ - ../lexers/LexTCL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTCMD.o: \ - ../lexers/LexTCMD.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTeX.o: \ - ../lexers/LexTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexTxt2tags.o: \ - ../lexers/LexTxt2tags.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexVB.o: \ - ../lexers/LexVB.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexVerilog.o: \ - ../lexers/LexVerilog.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -LexVHDL.o: \ - ../lexers/LexVHDL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -LexVisualProlog.o: \ - ../lexers/LexVisualProlog.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -LexX12.o: \ - ../lexers/LexX12.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -LexYAML.o: \ - ../lexers/LexYAML.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/lexilla.mak b/3rdparty/unioncode-scintilla515/lexilla/src/lexilla.mak deleted file mode 100644 index 75d76ea16..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/lexilla.mak +++ /dev/null @@ -1,249 +0,0 @@ -# Make file for Lexilla on Windows Visual C++ version -# Copyright 2019 by Neil Hodgson -# The License.txt file describes the conditions under which this software may be distributed. -# This makefile is for using Visual C++ with nmake. -# Usage for Microsoft: -# nmake -f lexilla.mak -# For debug versions define DEBUG on the command line: -# nmake DEBUG=1 -f lexilla.mak -# To build with GCC or Clang, run makefile - -.SUFFIXES: .cxx - -DIR_O=. -DIR_BIN=..\bin - -LEXILLA=$(DIR_BIN)\lexilla.dll -LIBLEXILLA=$(DIR_BIN)\liblexilla.lib - -LD=link - -!IFDEF SUPPORT_XP -ADD_DEFINE=-D_USING_V110_SDK71_ -# Different subsystems for 32-bit and 64-bit Windows XP so detect based on Platform -# environment vairable set by vcvars*.bat to be either x86 or x64 -!IF "$(PLATFORM)" == "x64" -SUBSYSTEM=-SUBSYSTEM:WINDOWS,5.02 -!ELSE -SUBSYSTEM=-SUBSYSTEM:WINDOWS,5.01 -!ENDIF -!ELSE -CETCOMPAT=-CETCOMPAT -!IFDEF ARM64 -ADD_DEFINE=-D_ARM64_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 -SUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00 -!ENDIF -!ENDIF - -CRTFLAGS=-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_DEPRECATE=1 -D_SCL_SECURE_NO_WARNINGS=1 $(ADD_DEFINE) -CXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 $(CRTFLAGS) -CXXDEBUG=-Od -MTd -DDEBUG -CXXNDEBUG=-O1 -MT -DNDEBUG -GL -NAME=-Fo -LDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(SUBSYSTEM) $(CETCOMPAT) -LDDEBUG= -LIBS= -NOLOGO=-nologo - -!IFDEF QUIET -CXX=@$(CXX) -CXXFLAGS=$(CXXFLAGS) $(NOLOGO) -LDFLAGS=$(LDFLAGS) $(NOLOGO) -!ENDIF - -!IFDEF DEBUG -CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG) -LDFLAGS=$(LDDEBUG) $(LDFLAGS) -!ELSE -CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG) -!ENDIF - -SCINTILLA_INCLUDE = ../../scintilla/include - -INCLUDEDIRS=-I../include -I$(SCINTILLA_INCLUDE) -I../src -I../lexlib -CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS) - -all: $(SCINTILLA_INCLUDE) $(LEXILLA) $(LIBLEXILLA) - -clean: - -del /q $(DIR_O)\*.obj $(DIR_O)\*.o $(DIR_O)\*.pdb \ - $(DIR_O)\*.res $(DIR_BIN)\*.map $(DIR_BIN)\*.exp $(DIR_BIN)\*.pdb $(DIR_BIN)\lexilla.lib \ - $(LEXILLA) $(LIBLEXILLA) - -depend: - pyw DepGen.py - -$(SCINTILLA_INCLUDE): - @echo Scintilla must be installed at ../../scintilla to provide access to Scintilla headers. - -#++Autogenerated -- run scripts/LexGen.py to regenerate -#**LEX_OBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\) -LEX_OBJS=\ - $(DIR_O)\LexA68k.obj \ - $(DIR_O)\LexAbaqus.obj \ - $(DIR_O)\LexAda.obj \ - $(DIR_O)\LexAPDL.obj \ - $(DIR_O)\LexAsciidoc.obj \ - $(DIR_O)\LexAsm.obj \ - $(DIR_O)\LexAsn1.obj \ - $(DIR_O)\LexASY.obj \ - $(DIR_O)\LexAU3.obj \ - $(DIR_O)\LexAVE.obj \ - $(DIR_O)\LexAVS.obj \ - $(DIR_O)\LexBaan.obj \ - $(DIR_O)\LexBash.obj \ - $(DIR_O)\LexBasic.obj \ - $(DIR_O)\LexBatch.obj \ - $(DIR_O)\LexBibTeX.obj \ - $(DIR_O)\LexBullant.obj \ - $(DIR_O)\LexCaml.obj \ - $(DIR_O)\LexCIL.obj \ - $(DIR_O)\LexCLW.obj \ - $(DIR_O)\LexCmake.obj \ - $(DIR_O)\LexCOBOL.obj \ - $(DIR_O)\LexCoffeeScript.obj \ - $(DIR_O)\LexConf.obj \ - $(DIR_O)\LexCPP.obj \ - $(DIR_O)\LexCrontab.obj \ - $(DIR_O)\LexCsound.obj \ - $(DIR_O)\LexCSS.obj \ - $(DIR_O)\LexD.obj \ - $(DIR_O)\LexDataflex.obj \ - $(DIR_O)\LexDiff.obj \ - $(DIR_O)\LexDMAP.obj \ - $(DIR_O)\LexDMIS.obj \ - $(DIR_O)\LexECL.obj \ - $(DIR_O)\LexEDIFACT.obj \ - $(DIR_O)\LexEiffel.obj \ - $(DIR_O)\LexErlang.obj \ - $(DIR_O)\LexErrorList.obj \ - $(DIR_O)\LexEScript.obj \ - $(DIR_O)\LexFlagship.obj \ - $(DIR_O)\LexForth.obj \ - $(DIR_O)\LexFortran.obj \ - $(DIR_O)\LexFSharp.obj \ - $(DIR_O)\LexGAP.obj \ - $(DIR_O)\LexGDScript.obj \ - $(DIR_O)\LexGui4Cli.obj \ - $(DIR_O)\LexHaskell.obj \ - $(DIR_O)\LexHex.obj \ - $(DIR_O)\LexHollywood.obj \ - $(DIR_O)\LexHTML.obj \ - $(DIR_O)\LexIndent.obj \ - $(DIR_O)\LexInno.obj \ - $(DIR_O)\LexJSON.obj \ - $(DIR_O)\LexJulia.obj \ - $(DIR_O)\LexKix.obj \ - $(DIR_O)\LexKVIrc.obj \ - $(DIR_O)\LexLaTeX.obj \ - $(DIR_O)\LexLisp.obj \ - $(DIR_O)\LexLout.obj \ - $(DIR_O)\LexLua.obj \ - $(DIR_O)\LexMagik.obj \ - $(DIR_O)\LexMake.obj \ - $(DIR_O)\LexMarkdown.obj \ - $(DIR_O)\LexMatlab.obj \ - $(DIR_O)\LexMaxima.obj \ - $(DIR_O)\LexMetapost.obj \ - $(DIR_O)\LexMMIXAL.obj \ - $(DIR_O)\LexModula.obj \ - $(DIR_O)\LexMPT.obj \ - $(DIR_O)\LexMSSQL.obj \ - $(DIR_O)\LexMySQL.obj \ - $(DIR_O)\LexNim.obj \ - $(DIR_O)\LexNimrod.obj \ - $(DIR_O)\LexNsis.obj \ - $(DIR_O)\LexNull.obj \ - $(DIR_O)\LexOpal.obj \ - $(DIR_O)\LexOScript.obj \ - $(DIR_O)\LexPascal.obj \ - $(DIR_O)\LexPB.obj \ - $(DIR_O)\LexPerl.obj \ - $(DIR_O)\LexPLM.obj \ - $(DIR_O)\LexPO.obj \ - $(DIR_O)\LexPOV.obj \ - $(DIR_O)\LexPowerPro.obj \ - $(DIR_O)\LexPowerShell.obj \ - $(DIR_O)\LexProgress.obj \ - $(DIR_O)\LexProps.obj \ - $(DIR_O)\LexPS.obj \ - $(DIR_O)\LexPython.obj \ - $(DIR_O)\LexR.obj \ - $(DIR_O)\LexRaku.obj \ - $(DIR_O)\LexRebol.obj \ - $(DIR_O)\LexRegistry.obj \ - $(DIR_O)\LexRuby.obj \ - $(DIR_O)\LexRust.obj \ - $(DIR_O)\LexSAS.obj \ - $(DIR_O)\LexScriptol.obj \ - $(DIR_O)\LexSmalltalk.obj \ - $(DIR_O)\LexSML.obj \ - $(DIR_O)\LexSorcus.obj \ - $(DIR_O)\LexSpecman.obj \ - $(DIR_O)\LexSpice.obj \ - $(DIR_O)\LexSQL.obj \ - $(DIR_O)\LexStata.obj \ - $(DIR_O)\LexSTTXT.obj \ - $(DIR_O)\LexTACL.obj \ - $(DIR_O)\LexTADS3.obj \ - $(DIR_O)\LexTAL.obj \ - $(DIR_O)\LexTCL.obj \ - $(DIR_O)\LexTCMD.obj \ - $(DIR_O)\LexTeX.obj \ - $(DIR_O)\LexTxt2tags.obj \ - $(DIR_O)\LexVB.obj \ - $(DIR_O)\LexVerilog.obj \ - $(DIR_O)\LexVHDL.obj \ - $(DIR_O)\LexVisualProlog.obj \ - $(DIR_O)\LexX12.obj \ - $(DIR_O)\LexYAML.obj \ - -#--Autogenerated -- end of automatically generated section - -# Required by lexers -LEXLIB_OBJS=\ - $(DIR_O)\Accessor.obj \ - $(DIR_O)\CharacterCategory.obj \ - $(DIR_O)\CharacterSet.obj \ - $(DIR_O)\DefaultLexer.obj \ - $(DIR_O)\LexAccessor.obj \ - $(DIR_O)\LexerBase.obj \ - $(DIR_O)\LexerModule.obj \ - $(DIR_O)\LexerSimple.obj \ - $(DIR_O)\PropSetSimple.obj \ - $(DIR_O)\StyleContext.obj \ - $(DIR_O)\WordList.obj - -# Required by libraries and DLLs that include lexing -LEXILLA_OBJS=\ - $(DIR_O)\Lexilla.obj \ - $(LEXLIB_OBJS) \ - $(LEX_OBJS) - -$(LEXILLA): $(LEXILLA_OBJS) LexillaVersion.res - $(LD) $(LDFLAGS) -DEF:Lexilla.def -DLL -OUT:$@ $** $(LIBS) - -$(LIBLEXILLA): $(LEXILLA_OBJS) - LIB -OUT:$@ $** - -# Define how to build all the objects and what they depend on - -{..\lexlib}.cxx{$(DIR_O)}.obj:: - $(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $< -{..\lexers}.cxx{$(DIR_O)}.obj:: - $(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $< -{.}.cxx{$(DIR_O)}.obj:: - $(CXX) $(CXXFLAGS) -c $(NAME)$(DIR_O)\ $< - -.rc.res: - $(RC) -fo$@ $** - -# Dependencies - -!IF EXISTS(nmdeps.mak) - -# Protect with !IF EXISTS to handle accidental deletion - just 'nmake -f lexilla.mak deps' - -!INCLUDE nmdeps.mak - -!ENDIF diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/makefile b/3rdparty/unioncode-scintilla515/lexilla/src/makefile deleted file mode 100644 index 8afa3cec4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/makefile +++ /dev/null @@ -1,140 +0,0 @@ -# Make file for Lexilla -# @file makefile -# Copyright 2019 by Neil Hodgson -# The License.txt file describes the conditions under which this software may be distributed. -# This works on Windows or Linux using GCC 9.0+ -# This works on Windows, Linux, or macOS using Clang 9.0+ -# On Windows, it is tested with Mingw-w64 GCC and Clang. -# on macOS, it always uses Clang -# For debug versions define DEBUG on the command line: -# make DEBUG=1 -# On Windows, to build with MSVC, run lexilla.mak - -.PHONY: all clean analyze depend - -.SUFFIXES: .cxx - -DIR_BIN=../bin - -WARNINGS = -Wpedantic -Wall -Wextra - -ifdef windir - SHARED_NAME = lexilla - SHAREDEXTENSION = dll - WINDRES ?= windres - VERSION_RESOURCE = LexillaVersion.o -else - SHARED_NAME = liblexilla - ifeq ($(shell uname),Darwin) - CLANG := 1 - LDFLAGS += -dynamiclib - SHAREDEXTENSION = dylib - BASE_FLAGS += -arch arm64 -arch x86_64 - LDFLAGS += -arch arm64 -arch x86_64 - else - SHAREDEXTENSION = so - endif - BASE_FLAGS += -fvisibility=hidden -endif - -LEXILLA=$(DIR_BIN)/$(SHARED_NAME).$(SHAREDEXTENSION) -LIBLEXILLA=$(DIR_BIN)/liblexilla.a - -BASE_FLAGS += --std=c++17 - -ifdef CLANG -CXX = clang++ -ifdef windir -# Clang on Win32 uses MSVC headers so will complain about strcpy without this -DEFINES += -D_CRT_SECURE_NO_DEPRECATE=1 -endif -endif - -ifdef windir - LDFLAGS += -mwindows - ifndef CLANG - LDFLAGS += -Wl,--kill-at - endif -else - BASE_FLAGS += -fPIC -endif - -# Take care of changing Unix style '/' directory separator to '\' on Windows -normalize = $(if $(windir),$(subst /,\,$1),$1) - -PYTHON = $(if $(windir),pyw,python3) - -ifdef windir - DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q) -else - DEL = rm -f -endif - -RANLIB ?= ranlib - -SCINTILLA_INCLUDE = ../../scintilla/include - -vpath %.h ../src ../include ../../scintilla/include ../lexlib -vpath %.cxx ../src ../lexlib ../lexers - -DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG) -BASE_FLAGS += $(if $(DEBUG),-g,-Os) - -INCLUDES = -I ../include -I $(SCINTILLA_INCLUDE) -I ../src -I ../lexlib -LDFLAGS += -shared - -BASE_FLAGS += $(WARNINGS) - -all: $(SCINTILLA_INCLUDE) $(LEXILLA) $(LIBLEXILLA) - -clean: - $(DEL) *.o *.obj *.a *.res *.map *.plist $(call normalize,$(LEXILLA) $(LIBLEXILLA)) - -%.o: %.cxx - $(CXX) $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ - -%.o: %.rc - $(WINDRES) $< $@ - -analyze: - $(CXX) --analyze $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CXXFLAGS) *.cxx ../lexlib/*.cxx ../lexers/*.cxx - -depend deps.mak: - $(PYTHON) DepGen.py - -$(SCINTILLA_INCLUDE): - @echo Scintilla must be installed at ../../scintilla to provide access to Scintilla headers. - -LEXERS:=$(sort $(notdir $(wildcard ../lexers/Lex*.cxx))) - -OBJS = Lexilla.o - -# Required by lexers -LEXLIB_OBJS=\ - Accessor.o \ - CharacterCategory.o \ - CharacterSet.o \ - DefaultLexer.o \ - LexAccessor.o \ - LexerBase.o \ - LexerModule.o \ - LexerSimple.o \ - PropSetSimple.o \ - StyleContext.o \ - WordList.o - -# Required by libraries and DLLs that include lexing -LEXILLA_OBJS=\ - $(OBJS) \ - $(LEXLIB_OBJS) \ - $(LEXERS:.cxx=.o) - -$(LEXILLA): $(LEXILLA_OBJS) $(VERSION_RESOURCE) - $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ -o $@ - -$(LIBLEXILLA): $(LEXILLA_OBJS) - $(AR) rc $@ $^ - $(RANLIB) $@ - -# Automatically generate dependencies for most files with "make deps" -include deps.mak diff --git a/3rdparty/unioncode-scintilla515/lexilla/src/nmdeps.mak b/3rdparty/unioncode-scintilla515/lexilla/src/nmdeps.mak deleted file mode 100644 index 8fc5b7524..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/src/nmdeps.mak +++ /dev/null @@ -1,1582 +0,0 @@ -# Created by DepGen.py. To recreate, run DepGen.py. -$(DIR_O)/Lexilla.obj: \ - ../src/Lexilla.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexerModule.h \ - ../lexlib/CatalogueModules.h -$(DIR_O)/Accessor.obj: \ - ../lexlib/Accessor.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h -$(DIR_O)/CharacterCategory.obj: \ - ../lexlib/CharacterCategory.cxx \ - ../lexlib/CharacterCategory.h -$(DIR_O)/CharacterSet.obj: \ - ../lexlib/CharacterSet.cxx \ - ../lexlib/CharacterSet.h -$(DIR_O)/DefaultLexer.obj: \ - ../lexlib/DefaultLexer.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexAccessor.obj: \ - ../lexlib/LexAccessor.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/CharacterSet.h -$(DIR_O)/LexerBase.obj: \ - ../lexlib/LexerBase.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h -$(DIR_O)/LexerModule.obj: \ - ../lexlib/LexerModule.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerSimple.h -$(DIR_O)/LexerNoExceptions.obj: \ - ../lexlib/LexerNoExceptions.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerNoExceptions.h -$(DIR_O)/LexerSimple.obj: \ - ../lexlib/LexerSimple.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/LexerBase.h \ - ../lexlib/LexerSimple.h -$(DIR_O)/PropSetSimple.obj: \ - ../lexlib/PropSetSimple.cxx \ - ../lexlib/PropSetSimple.h -$(DIR_O)/StyleContext.obj: \ - ../lexlib/StyleContext.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h -$(DIR_O)/WordList.obj: \ - ../lexlib/WordList.cxx \ - ../lexlib/WordList.h -$(DIR_O)/LexA68k.obj: \ - ../lexers/LexA68k.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAbaqus.obj: \ - ../lexers/LexAbaqus.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAda.obj: \ - ../lexers/LexAda.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAPDL.obj: \ - ../lexers/LexAPDL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAsciidoc.obj: \ - ../lexers/LexAsciidoc.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAsm.obj: \ - ../lexers/LexAsm.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexAsn1.obj: \ - ../lexers/LexAsn1.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexASY.obj: \ - ../lexers/LexASY.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAU3.obj: \ - ../lexers/LexAU3.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAVE.obj: \ - ../lexers/LexAVE.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexAVS.obj: \ - ../lexers/LexAVS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexBaan.obj: \ - ../lexers/LexBaan.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexBash.obj: \ - ../lexers/LexBash.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexBasic.obj: \ - ../lexers/LexBasic.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexBatch.obj: \ - ../lexers/LexBatch.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexBibTeX.obj: \ - ../lexers/LexBibTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexBullant.obj: \ - ../lexers/LexBullant.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCaml.obj: \ - ../lexers/LexCaml.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCIL.obj: \ - ../lexers/LexCIL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexCLW.obj: \ - ../lexers/LexCLW.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCmake.obj: \ - ../lexers/LexCmake.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCOBOL.obj: \ - ../lexers/LexCOBOL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCoffeeScript.obj: \ - ../lexers/LexCoffeeScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexConf.obj: \ - ../lexers/LexConf.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCPP.obj: \ - ../lexers/LexCPP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SparseState.h \ - ../lexlib/SubStyles.h -$(DIR_O)/LexCrontab.obj: \ - ../lexers/LexCrontab.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCsound.obj: \ - ../lexers/LexCsound.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexCSS.obj: \ - ../lexers/LexCSS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexD.obj: \ - ../lexers/LexD.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexDataflex.obj: \ - ../lexers/LexDataflex.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexDiff.obj: \ - ../lexers/LexDiff.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexDMAP.obj: \ - ../lexers/LexDMAP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexDMIS.obj: \ - ../lexers/LexDMIS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexECL.obj: \ - ../lexers/LexECL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h -$(DIR_O)/LexEDIFACT.obj: \ - ../lexers/LexEDIFACT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexEiffel.obj: \ - ../lexers/LexEiffel.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexErlang.obj: \ - ../lexers/LexErlang.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexErrorList.obj: \ - ../lexers/LexErrorList.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexEScript.obj: \ - ../lexers/LexEScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexFlagship.obj: \ - ../lexers/LexFlagship.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexForth.obj: \ - ../lexers/LexForth.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexFortran.obj: \ - ../lexers/LexFortran.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexFSharp.obj: \ - ../lexers/LexFSharp.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexGAP.obj: \ - ../lexers/LexGAP.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexGDScript.obj: \ - ../lexers/LexGDScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexGui4Cli.obj: \ - ../lexers/LexGui4Cli.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexHaskell.obj: \ - ../lexers/LexHaskell.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexHex.obj: \ - ../lexers/LexHex.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexHollywood.obj: \ - ../lexers/LexHollywood.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexHTML.obj: \ - ../lexers/LexHTML.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexIndent.obj: \ - ../lexers/LexIndent.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexInno.obj: \ - ../lexers/LexInno.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexJSON.obj: \ - ../lexers/LexJSON.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexJulia.obj: \ - ../lexers/LexJulia.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexKix.obj: \ - ../lexers/LexKix.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexKVIrc.obj: \ - ../lexers/LexKVIrc.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexLaTeX.obj: \ - ../lexers/LexLaTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h \ - ../lexlib/LexerBase.h -$(DIR_O)/LexLisp.obj: \ - ../lexers/LexLisp.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexLout.obj: \ - ../lexers/LexLout.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexLua.obj: \ - ../lexers/LexLua.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMagik.obj: \ - ../lexers/LexMagik.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMake.obj: \ - ../lexers/LexMake.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMarkdown.obj: \ - ../lexers/LexMarkdown.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMatlab.obj: \ - ../lexers/LexMatlab.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMaxima.obj: \ - ../lexers/LexMaxima.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMetapost.obj: \ - ../lexers/LexMetapost.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMMIXAL.obj: \ - ../lexers/LexMMIXAL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexModula.obj: \ - ../lexers/LexModula.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMPT.obj: \ - ../lexers/LexMPT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMSSQL.obj: \ - ../lexers/LexMSSQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexMySQL.obj: \ - ../lexers/LexMySQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexNim.obj: \ - ../lexers/LexNim.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexNimrod.obj: \ - ../lexers/LexNimrod.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexNsis.obj: \ - ../lexers/LexNsis.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexNull.obj: \ - ../lexers/LexNull.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexOpal.obj: \ - ../lexers/LexOpal.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexOScript.obj: \ - ../lexers/LexOScript.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPascal.obj: \ - ../lexers/LexPascal.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPB.obj: \ - ../lexers/LexPB.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPerl.obj: \ - ../lexers/LexPerl.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexPLM.obj: \ - ../lexers/LexPLM.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPO.obj: \ - ../lexers/LexPO.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPOV.obj: \ - ../lexers/LexPOV.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPowerPro.obj: \ - ../lexers/LexPowerPro.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPowerShell.obj: \ - ../lexers/LexPowerShell.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexProgress.obj: \ - ../lexers/LexProgress.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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/SparseState.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexProps.obj: \ - ../lexers/LexProps.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPS.obj: \ - ../lexers/LexPS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexPython.obj: \ - ../lexers/LexPython.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/StringCopy.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexR.obj: \ - ../lexers/LexR.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexRaku.obj: \ - ../lexers/LexRaku.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexRebol.obj: \ - ../lexers/LexRebol.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexRegistry.obj: \ - ../lexers/LexRegistry.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/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 -$(DIR_O)/LexRuby.obj: \ - ../lexers/LexRuby.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexRust.obj: \ - ../lexers/LexRust.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/PropSetSimple.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexSAS.obj: \ - ../lexers/LexSAS.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexScriptol.obj: \ - ../lexers/LexScriptol.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSmalltalk.obj: \ - ../lexers/LexSmalltalk.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSML.obj: \ - ../lexers/LexSML.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSorcus.obj: \ - ../lexers/LexSorcus.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSpecman.obj: \ - ../lexers/LexSpecman.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSpice.obj: \ - ../lexers/LexSpice.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSQL.obj: \ - ../lexers/LexSQL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SparseState.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexStata.obj: \ - ../lexers/LexStata.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexSTTXT.obj: \ - ../lexers/LexSTTXT.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTACL.obj: \ - ../lexers/LexTACL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTADS3.obj: \ - ../lexers/LexTADS3.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTAL.obj: \ - ../lexers/LexTAL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTCL.obj: \ - ../lexers/LexTCL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTCMD.obj: \ - ../lexers/LexTCMD.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTeX.obj: \ - ../lexers/LexTeX.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexTxt2tags.obj: \ - ../lexers/LexTxt2tags.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexVB.obj: \ - ../lexers/LexVB.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexVerilog.obj: \ - ../lexers/LexVerilog.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/SubStyles.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexVHDL.obj: \ - ../lexers/LexVHDL.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h -$(DIR_O)/LexVisualProlog.obj: \ - ../lexers/LexVisualProlog.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/CharacterCategory.h \ - ../lexlib/LexerModule.h \ - ../lexlib/OptionSet.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexX12.obj: \ - ../lexers/LexX12.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/LexerModule.h \ - ../lexlib/DefaultLexer.h -$(DIR_O)/LexYAML.obj: \ - ../lexers/LexYAML.cxx \ - ../../scintilla/include/ILexer.h \ - ../../scintilla/include/Sci_Position.h \ - ../../scintilla/include/Scintilla.h \ - ../include/SciLexer.h \ - ../lexlib/WordList.h \ - ../lexlib/LexAccessor.h \ - ../lexlib/Accessor.h \ - ../lexlib/StyleContext.h \ - ../lexlib/CharacterSet.h \ - ../lexlib/LexerModule.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/README b/3rdparty/unioncode-scintilla515/lexilla/test/README deleted file mode 100644 index ef64889d2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/README +++ /dev/null @@ -1,109 +0,0 @@ -README for testing lexers with lexilla/test. - -The TestLexers application is run to test the lexing and folding of a set of example -files and thus ensure that the lexers are working correctly. - -Lexers are accessed through the Lexilla shared library which must be built first -in the lexilla/src directory. - -TestLexers works on Windows, Linux, or macOS and requires a C++20 compiler. -MSVC 2019.4, GCC 9.0, Clang 9.0, and Apple Clang 11.0 are known to work. - -MSVC is only available on Windows. - -GCC and Clang work on Windows and Linux. - -On macOS, only Apple Clang is available. - -Lexilla requires some headers from Scintilla to build and expects a directory named -"scintilla" containing a copy of Scintilla 5+ to be a peer of the Lexilla top level -directory conventionally called "lexilla". - -To use GCC run lexilla/test/makefile: - make test - -To use Clang run lexilla/test/makefile: - make CLANG=1 test -On macOS, CLANG is set automatically so this can just be - make test - -To use MSVC: - nmake -f testlexers.mak test -There is also a project file TestLexers.vcxproj that can be loaded into the Visual -C++ IDE. - - - -Adding or Changing Tests - -The lexilla/test/examples directory contains a set of tests located in a tree of -subdirectories. - -Each directory contains example files along with control files called -SciTE.properties and expected result files with .styled and .folded suffixes. -If an unexpected result occurs then files with the additional suffix .new -(that is .styled.new or .folded.new) may be created. - -Each file in the examples tree that does not have an extension of .properties, .styled, -.folded or .new is an example file that will be lexed and folded according to settings -found in SciTE.properties. - -The results of the lex will be compared to the corresponding .styled file and if different -the result will be saved to a .styled.new file for checking. -So, if x.cxx is the example, its lexed form will be checked against x.cxx.styled and a -x.cxx.styled.new file may be created. The .styled.new and .styled files contain the text -of the original file along with style number changes in {} like: - {5}function{0} {11}first{10}(){0} -After checking that the .styled.new file is correct, it can be promoted to .styled and -committed to the repository. - -The results of the fold will be compared to the corresponding .folded file and if different -the result will be saved to a .folded.new file for checking. -So, if x.cxx is the example, its folded form will be checked against x.cxx.folded and a -x.cxx.folded.new file may be created. The folded.new and .folded files contain the text -of the original file along with fold information to the left like: - - 2 400 0 + --[[ coding:UTF-8 - 0 402 0 | comment ]] - -There are 4 columns before the file text representing the bits of the fold level: -[flags (0xF000), level (0x0FFF), other (0xFFFF0000), picture]. -flags: may be 2 for header or 1 for whitespace. -level: hexadecimal level number starting at 0x400. 'negative' level numbers like 0x3FF -indicate errors in either the folder or in the input file, such as a C file that starts with #endif. -other: can be used as the folder wants. Often used to hold the level of the next line. -picture: gives a rough idea of the fold structure: '|' for level greater than 0x400, -'+' for header, ' ' otherwise. -After checking that the .folded.new file is correct, it can be promoted to .folded and -committed to the repository. - -Styling and folding tests are first performed on the file as a whole, then the file is lexed -and folded line-by-line. If there are differences between the whole file and line-by-line -then a message with 'per-line is different' for styling or 'per-line has different folds' will be -printed. Problems with line-by-line processing are often caused by local variables in the -lexer or folder that are incorrectly initialised. Sometimes extra state can be inferred, but it -may have to be stored between runs (possibly with SetLineState) or the code may have to -backtrack to a previous safe line - often something like a line that starts with a character -in the default style. - -The SciTE.properties file is similar to properties files used for SciTE but are simpler. -The lexer to be run is defined with a lexer.{filepattern} statement like: - lexer.*.d=d - -Keywords may be defined with keywords settings like: - keywords.*.cxx=int char - keywords2.*.cxx=open - -Other settings are treated as lexer or folder properties and forwarded to the lexer/folder: - lexer.cpp.track.preprocessor=1 - fold=1 - -It is often necessary to set 'fold' in SciTE.properties to cause folding. - -If there is a need to test additional configurations of keywords or properties then -create another subdirectory with the different settings in a new SciTE.properties. - -There is some support for running benchmarks on lexers and folders. The properties -testlexers.repeat.lex and testlexers.repeat.fold specify the number of times example -documents are lexed or folded. Set to a large number like testlexers.repeat.lex=10000 -then run with a profiler. diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.cxx b/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.cxx deleted file mode 100644 index 3a0972a53..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.cxx +++ /dev/null @@ -1,262 +0,0 @@ -// Lexilla lexer library -/** @file TestDocument.cxx - ** Lexer testing. - **/ - // Copyright 2019 by Neil Hodgson - // The License.txt file describes the conditions under which this software may be distributed. - -#include - -#include -#include -#include -#include - -#include - -#include "ILexer.h" - -#include "TestDocument.h" - -namespace { - - const unsigned char UTF8BytesOfLead[256] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 00 - 0F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 10 - 1F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 20 - 2F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 30 - 3F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 40 - 4F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 50 - 5F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 60 - 6F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 70 - 7F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 80 - 8F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 90 - 9F - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A0 - AF - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B0 - BF - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0 - CF - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // D0 - DF - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // E0 - EF - 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // F0 - FF - }; - - int UnicodeFromUTF8(const unsigned char *us) noexcept { - switch (UTF8BytesOfLead[us[0]]) { - case 1: - return us[0]; - case 2: - return ((us[0] & 0x1F) << 6) + (us[1] & 0x3F); - case 3: - return ((us[0] & 0xF) << 12) + ((us[1] & 0x3F) << 6) + (us[2] & 0x3F); - default: - return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F); - } - } - - inline constexpr bool UTF8IsTrailByte(unsigned char ch) noexcept { - return (ch >= 0x80) && (ch < 0xc0); - } - -} - -void TestDocument::Set(std::string_view sv) { - text = sv; - textStyles.resize(text.size() + 1); - lineStarts.clear(); - endStyled = 0; - lineStarts.push_back(0); - for (size_t pos = 0; pos < text.length(); pos++) { - if (text[pos] == '\n') { - lineStarts.push_back(pos + 1); - } - } - lineStarts.push_back(text.length()); - lineStates.resize(lineStarts.size()); - lineLevels.resize(lineStarts.size(), 0x400); -} - -#if _MSC_VER -// IDocument interface does not specify noexcept so best to not add it to implementation -#pragma warning(disable: 26440) -#endif - -int SCI_METHOD TestDocument::Version() const { - return Scintilla::dvRelease4; -} - -void SCI_METHOD TestDocument::SetErrorStatus(int) { -} - -Sci_Position SCI_METHOD TestDocument::Length() const { - return text.length(); -} - -void SCI_METHOD TestDocument::GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const { - text.copy(buffer, lengthRetrieve, position); -} - -char SCI_METHOD TestDocument::StyleAt(Sci_Position position) const { - if (position < 0) { - return 0; - } - return textStyles.at(position); -} - -Sci_Position SCI_METHOD TestDocument::LineFromPosition(Sci_Position position) const { - if (position >= static_cast(text.length())) { - return lineStarts.size() - 1 - 1; - } - - const std::vector::const_iterator it = std::lower_bound(lineStarts.begin(), lineStarts.end(), position); - Sci_Position line = it - lineStarts.begin(); - if (*it > position) - line--; - return line; -} - -Sci_Position SCI_METHOD TestDocument::LineStart(Sci_Position line) const { - if (line < 0) { - return 0; - } - if (line >= static_cast(lineStarts.size())) { - return text.length(); - } - return lineStarts.at(line); -} - -int SCI_METHOD TestDocument::GetLevel(Sci_Position line) const { - return lineLevels.at(line); -} - -int SCI_METHOD TestDocument::SetLevel(Sci_Position line, int level) { - return lineLevels.at(line) = level; -} - -int SCI_METHOD TestDocument::GetLineState(Sci_Position line) const { - return lineStates.at(line); -} - -int SCI_METHOD TestDocument::SetLineState(Sci_Position line, int state) { - return lineStates.at(line) = state; -} - -void SCI_METHOD TestDocument::StartStyling(Sci_Position position) { - endStyled = position; -} - -bool SCI_METHOD TestDocument::SetStyleFor(Sci_Position length, char style) { - for (Sci_Position i = 0; i < length; i++) { - textStyles[endStyled] = style; - endStyled++; - } - return true; -} - -bool SCI_METHOD TestDocument::SetStyles(Sci_Position length, const char *styles) { - for (Sci_Position i = 0; i < length; i++) { - textStyles[endStyled] = styles[i]; - endStyled++; - } - return true; -} - -void SCI_METHOD TestDocument::DecorationSetCurrentIndicator(int) { - // Not implemented as no way to read decorations -} - -void SCI_METHOD TestDocument::DecorationFillRange(Sci_Position, int, Sci_Position) { - // Not implemented as no way to read decorations -} - -void SCI_METHOD TestDocument::ChangeLexerState(Sci_Position, Sci_Position) { - // Not implemented as no watcher to trigger -} - -int SCI_METHOD TestDocument::CodePage() const { - // Always UTF-8 for now - return 65001; -} - -bool SCI_METHOD TestDocument::IsDBCSLeadByte(char) const { - // Always UTF-8 for now - return false; -} - -const char *SCI_METHOD TestDocument::BufferPointer() { - return text.c_str(); -} - -int SCI_METHOD TestDocument::GetLineIndentation(Sci_Position) { - // Never actually called - lexers use Accessor::IndentAmount - return 0; -} - -Sci_Position SCI_METHOD TestDocument::LineEnd(Sci_Position line) const { - Sci_Position position = LineStart(line + 1); - position--; // Back over CR or LF - // When line terminator is CR+LF, may need to go back one more - if ((position > LineStart(line)) && (text.at(position - 1) == '\r')) { - position--; - } - return position; -} - -Sci_Position SCI_METHOD TestDocument::GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const { - Sci_Position pos = positionStart; - if (characterOffset < 0) { - while (characterOffset < 0) { - if (pos <= 0) { - return 0; - } - unsigned char previousByte = text.at(pos - 1); - if (previousByte < 0x80) { - pos--; - characterOffset++; - } else { - while ((pos > 1) && UTF8IsTrailByte(previousByte)) { - pos--; - previousByte = text.at(pos - 1); - } - pos--; - // text[pos] is now a character start - characterOffset++; - } - } - return pos; - } - assert(characterOffset >= 0); - // TODO: invalid UTF-8 - while (characterOffset > 0) { - Sci_Position width = 0; - GetCharacterAndWidth(pos, &width); - pos += width; - characterOffset--; - } - return pos; -} - -int SCI_METHOD TestDocument::GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const { - // TODO: invalid UTF-8 - if (position >= static_cast(text.length())) { - // Return NULs after document end - if (pWidth) { - *pWidth = 1; - } - return '\0'; - } - const unsigned char leadByte = text.at(position); - if (leadByte < 0x80) { - if (pWidth) { - *pWidth = 1; - } - return leadByte; - } - const int widthCharBytes = UTF8BytesOfLead[leadByte]; - unsigned char charBytes[] = { leadByte,0,0,0 }; - for (int b = 1; b < widthCharBytes; b++) - charBytes[b] = text[position + b]; - - if (pWidth) { - *pWidth = widthCharBytes; - } - return UnicodeFromUTF8(charBytes); -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.h b/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.h deleted file mode 100644 index 9faf0ec98..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/TestDocument.h +++ /dev/null @@ -1,54 +0,0 @@ -// Lexilla lexer library -/** @file TestDocument.h - ** Lexer testing. - **/ -// Copyright 2019 by Neil Hodgson -// The License.txt file describes the conditions under which this software may be distributed. - -#ifndef TESTDOCUMENT_H -#define TESTDOCUMENT_H - -class TestDocument : public Scintilla::IDocument { - std::string text; - std::string textStyles; - std::vector lineStarts; - std::vector lineStates; - std::vector lineLevels; - Sci_Position endStyled=0; -public: - void Set(std::string_view sv); - TestDocument() = default; - // Deleted so TestDocument objects can not be copied. - TestDocument(const TestDocument&) = delete; - TestDocument(TestDocument&&) = delete; - TestDocument &operator=(const TestDocument&) = delete; - TestDocument &operator=(TestDocument&&) = delete; - virtual ~TestDocument() = default; - - int SCI_METHOD Version() const override; - void SCI_METHOD SetErrorStatus(int status) override; - Sci_Position SCI_METHOD Length() const override; - void SCI_METHOD GetCharRange(char *buffer, Sci_Position position, Sci_Position lengthRetrieve) const override; - char SCI_METHOD StyleAt(Sci_Position position) const override; - Sci_Position SCI_METHOD LineFromPosition(Sci_Position position) const override; - Sci_Position SCI_METHOD LineStart(Sci_Position line) const override; - int SCI_METHOD GetLevel(Sci_Position line) const override; - int SCI_METHOD SetLevel(Sci_Position line, int level) override; - int SCI_METHOD GetLineState(Sci_Position line) const override; - int SCI_METHOD SetLineState(Sci_Position line, int state) override; - void SCI_METHOD StartStyling(Sci_Position position) override; - bool SCI_METHOD SetStyleFor(Sci_Position length, char style) override; - bool SCI_METHOD SetStyles(Sci_Position length, const char *styles) override; - void SCI_METHOD DecorationSetCurrentIndicator(int indicator) override; - void SCI_METHOD DecorationFillRange(Sci_Position position, int value, Sci_Position fillLength) override; - void SCI_METHOD ChangeLexerState(Sci_Position start, Sci_Position end) override; - int SCI_METHOD CodePage() const override; - bool SCI_METHOD IsDBCSLeadByte(char ch) const override; - const char *SCI_METHOD BufferPointer() override; - int SCI_METHOD GetLineIndentation(Sci_Position line) override; - Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override; - Sci_Position SCI_METHOD GetRelativePosition(Sci_Position positionStart, Sci_Position characterOffset) const override; - int SCI_METHOD GetCharacterAndWidth(Sci_Position position, Sci_Position *pWidth) const override; -}; - -#endif diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.cxx b/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.cxx deleted file mode 100644 index 08689e2d4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.cxx +++ /dev/null @@ -1,534 +0,0 @@ -// Lexilla lexer library -/** @file TestLexers.cxx - ** Test lexers through Lexilla. - **/ - // Copyright 2019 by Neil Hodgson - // The License.txt file describes the conditions under which this software may be distributed. - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "ILexer.h" - -#include "Lexilla.h" -#include "LexillaAccess.h" - -#include "TestDocument.h" - -namespace { - -std::string ReadFile(std::filesystem::path path) { - std::ifstream ifs(path, std::ios::binary); - std::string content((std::istreambuf_iterator(ifs)), - (std::istreambuf_iterator())); - return content; -} - -std::string MarkedDocument(const Scintilla::IDocument *pdoc) { - std::ostringstream os(std::ios::binary); - char prevStyle = -1; - for (Sci_Position pos = 0; pos < pdoc->Length(); pos++) { - const char styleNow = pdoc->StyleAt(pos); - if (styleNow != prevStyle) { - os << "{" << static_cast(styleNow) << "}"; - prevStyle = styleNow; - } - char ch = '\0'; - pdoc->GetCharRange(&ch, pos, 1); - os << ch; - } - return os.str(); -} - -void PrintLevel(std::ostringstream &os, int level) { - const int levelNow = level & 0xFFF; - const int levelNext = level >> 16; - const int levelFlags = (level >> 12) & 0xF; - char foldSymbol = ' '; - if (level & 0x2000) - foldSymbol = '+'; - else if (levelNow > 0x400) - foldSymbol = '|'; - os << std::hex << " " << levelFlags << " " - << std::setw(3) << levelNow << " " - << std::setw(3) << levelNext << " " - << foldSymbol << " "; -} - -std::string FoldedDocument(const Scintilla::IDocument *pdoc) { - std::ostringstream os(std::ios::binary); - Sci_Position linePrev = -1; - char ch = '\0'; - for (Sci_Position pos = 0; pos < pdoc->Length(); pos++) { - const Sci_Position lineNow = pdoc->LineFromPosition(pos); - if (linePrev < lineNow) { - PrintLevel(os, pdoc->GetLevel(lineNow)); - linePrev = lineNow; - } - pdoc->GetCharRange(&ch, pos, 1); - os << ch; - } - if (ch == '\n') { - // Extra empty line - PrintLevel(os, pdoc->GetLevel(linePrev + 1)); - } - return os.str(); -} - -class PropertyMap { -public: - using PropMap = std::map; - PropMap properties; - - void ReadFromFile(std::filesystem::path path) { - std::ifstream ifs(path); - std::string line; - std::string logicalLine; - while (std::getline(ifs, line)) { - if (line.ends_with("\r")) { - // Accidentally have \r\n line ends on Unix system - line.pop_back(); - } - logicalLine += line; - if (logicalLine.ends_with("\\")) { - logicalLine.pop_back(); - } else { - const size_t positionEquals = logicalLine.find("="); - if (positionEquals != std::string::npos) { - const std::string key = logicalLine.substr(0, positionEquals); - const std::string value = logicalLine.substr(positionEquals + 1); - properties[key] = value; - } - logicalLine.clear(); - } - } - } - - std::optional GetProperty(std::string_view key) const { - const PropMap::const_iterator prop = properties.find(std::string(key)); - if (prop == properties.end()) - return std::nullopt; - else - return prop->second; - } - - std::optional GetPropertyForFile(std::string_view keyPrefix, std::string_view fileName) const { - for (auto const &[key, val] : properties) { - if (key.starts_with(keyPrefix)) { - const std::string keySuffix = key.substr(keyPrefix.length()); - if (fileName.ends_with(keySuffix)) { - return val; - } - } - } - return std::nullopt; - } - - std::optional GetPropertyValue(std::string_view key) const { - std::optional value = GetProperty(key); - try { - if (value) - return std::stoi(value->c_str()); - } - catch (std::invalid_argument &) { - // Just return empty - } - return {}; - } - -}; - -int Substitute(std::string &s, const std::string &sFind, const std::string &sReplace) { - int c = 0; - const size_t lenFind = sFind.size(); - const size_t lenReplace = sReplace.size(); - size_t posFound = s.find(sFind); - while (posFound != std::string::npos) { - s.replace(posFound, lenFind, sReplace); - posFound = s.find(sFind, posFound + lenReplace); - c++; - } - return c; -} - -int WindowsToUnix(std::string &s) { - return Substitute(s, "\r\n", "\n"); -} - -int UnixToWindows(std::string &s) { - return Substitute(s, "\n", "\r\n"); -} - -const std::string BOM = "\xEF\xBB\xBF"; - -void TestCRLF(std::filesystem::path path, const std::string s, Scintilla::ILexer5 *plex) { - // Convert all line ends to \r\n to check if styles change between \r and \n which makes - // it difficult to test on different platforms when files may have line ends changed. - std::string text = s; - WindowsToUnix(text); - std::string textUnix = text; - UnixToWindows(text); - TestDocument doc; - doc.Set(text); - Scintilla::IDocument *pdoc = &doc; - plex->Lex(0, pdoc->Length(), 0, pdoc); - plex->Fold(0, pdoc->Length(), 0, pdoc); - const std::string styledText = MarkedDocument(pdoc); - const std::string foldedText = FoldedDocument(pdoc); - - int prevStyle = -1; - Sci_Position line = 1; - for (Sci_Position pos = 0; pos < pdoc->Length(); pos++) { - const int styleNow = pdoc->StyleAt(pos); - char ch = '\0'; - pdoc->GetCharRange(&ch, pos, 1); - if (ch == '\n') { - if (styleNow != prevStyle) { - std::cout << path.string() << ":" << line << ":" << - " different styles between \\r and \\n at " << - pos << ": " << prevStyle << ", " << styleNow << "\n"; - } - line++; - } - prevStyle = styleNow; - } - - // Lex and fold with \n line ends then check result is same - - TestDocument docUnix; - docUnix.Set(textUnix); - Scintilla::IDocument *pdocUnix = &docUnix; - plex->Lex(0, pdocUnix->Length(), 0, pdocUnix); - plex->Fold(0, pdocUnix->Length(), 0, pdocUnix); - std::string styledTextUnix = MarkedDocument(pdocUnix); - std::string foldedTextUnix = FoldedDocument(pdocUnix); - - // Convert results from \n to \r\n run - UnixToWindows(styledTextUnix); - UnixToWindows(foldedTextUnix); - - if (styledText != styledTextUnix) { - std::cout << "\n" << path.string() << ":1: has different styles with \\n versus \\r\\n line ends\n\n"; - } - if (foldedText != foldedTextUnix) { - std::cout << "\n" << path.string() << ":1: has different folds with \\n versus \\r\\n line ends\n\n"; - } - - plex->Release(); -} - -void TestILexer(Scintilla::ILexer5 *plex) { - // Test each method of the ILexer interface. - // Mostly ensures there are no crashes when calling methods. - // Some methods are tested later (Release, Lex, Fold). - // PrivateCall performs arbitrary actions so is not safe to call. - - [[maybe_unused]] const int version = plex->Version(); - assert(version == Scintilla::lvRelease5); - - [[maybe_unused]] const char *language = plex->GetName(); - assert(language); - - [[maybe_unused]] const int ident = plex->GetIdentifier(); - assert(ident >= 0); - - [[maybe_unused]] const char *propertyNames = plex->PropertyNames(); - assert(propertyNames); - - [[maybe_unused]] const int propertyType = plex->PropertyType("unknown"); - assert(propertyType >= 0 && propertyType <= 2); - - [[maybe_unused]] const char *propertyDescription = plex->DescribeProperty("unknown"); - assert(propertyDescription); - - [[maybe_unused]] const Sci_Position invalidation = plex->PropertySet("unknown", "unknown"); - assert(invalidation == 0 || invalidation == -1); - - [[maybe_unused]] const char *wordListDescription = plex->DescribeWordListSets(); - assert(wordListDescription); - - [[maybe_unused]] const Sci_Position invalidationWordList = plex->WordListSet(9, "unknown"); - assert(invalidationWordList == 0 || invalidationWordList == -1); - - [[maybe_unused]] const int lineEndTypes = plex->LineEndTypesSupported(); - assert(lineEndTypes == 0 || lineEndTypes == 1); - - if (const char *bases = plex->GetSubStyleBases()) { - // Allocate a substyle for each possible style - while (*bases) { - constexpr int newStyles = 3; - const int base = *bases; - const int baseStyle = plex->AllocateSubStyles(base, newStyles); - [[maybe_unused]] const int styleBack = plex->StyleFromSubStyle(baseStyle); - assert(styleBack == base); - plex->SetIdentifiers(baseStyle, "int nullptr"); - [[maybe_unused]] const int start = plex->SubStylesStart(base); - assert(start == baseStyle); - [[maybe_unused]] const int len = plex->SubStylesLength(base); - assert(len == newStyles); - bases++; - } - plex->FreeSubStyles(); - } - - [[maybe_unused]] const int primary = plex->PrimaryStyleFromStyle(2); - assert(primary == 2); - - [[maybe_unused]] const int distance = plex->DistanceToSecondaryStyles(); - assert(distance >= 0); - - // Just see if crashes - nullptr is valid return to indicate not present. - [[maybe_unused]] const char *propertyUnknownValue = plex->PropertyGet("unknown"); - - const int styles = plex->NamedStyles(); - for (int style = 0; style < styles; style++) { - [[maybe_unused]] const char *name = plex->NameOfStyle(style); - assert(name); - [[maybe_unused]] const char *tags = plex->TagsOfStyle(style); - assert(tags); - [[maybe_unused]] const char *description = plex->DescriptionOfStyle(style); - assert(description); - } -} - -void SetProperties(Scintilla::ILexer5 *plex, const PropertyMap &propertyMap, std::string_view fileName) { - // Set keywords, keywords2, ... keywords9, for this file - for (int kw = 0; kw < 10; kw++) { - std::string kwChoice("keywords"); - if (kw > 0) { - kwChoice.push_back('1' + kw); - } - kwChoice.append(".*"); - std::optional keywordN = propertyMap.GetPropertyForFile(kwChoice, fileName); - if (keywordN) { - plex->WordListSet(kw, keywordN->c_str()); - } - } - - // Set parameters of lexer - for (auto const &[key, val] : propertyMap.properties) { - if (key.starts_with("#")) { - // Ignore comments - } else if (key.starts_with("lexer.*")) { - // Ignore as processed earlier - } else if (key.starts_with("keywords")) { - // Ignore as processed earlier - } else { - plex->PropertySet(key.c_str(), val.c_str()); - } - } -} - -const char *lexerPrefix = "lexer.*"; - -bool TestFile(const std::filesystem::path &path, const PropertyMap &propertyMap) { - // Find and create correct lexer - std::optional language = propertyMap.GetPropertyForFile(lexerPrefix, path.filename().string()); - if (!language) { - std::cout << "\n" << path.string() << ":1: has no language\n\n"; - return false; - } - Scintilla::ILexer5 *plex = Lexilla::MakeLexer(*language); - if (!plex) { - std::cout << "\n" << path.string() << ":1: has no lexer for " << *language << "\n\n"; - return false; - } - - SetProperties(plex, propertyMap, path.filename().string()); - - TestILexer(plex); - - std::string text = ReadFile(path); - if (text.starts_with(BOM)) { - text.erase(0, BOM.length()); - } - - std::filesystem::path pathStyled = path; - pathStyled += ".styled"; - const std::string styledText = ReadFile(pathStyled); - - std::filesystem::path pathFolded = path; - pathFolded += ".folded"; - const std::string foldedText = ReadFile(pathFolded); - - const int repeatLex = propertyMap.GetPropertyValue("testlexers.repeat.lex").value_or(1); - const int repeatFold = propertyMap.GetPropertyValue("testlexers.repeat.fold").value_or(1); - - TestDocument doc; - doc.Set(text); - Scintilla::IDocument *pdoc = &doc; - for (int i = 0; i < repeatLex; i++) { - plex->Lex(0, pdoc->Length(), 0, pdoc); - } - for (int i = 0; i < repeatFold; i++) { - plex->Fold(0, pdoc->Length(), 0, pdoc); - } - - bool success = true; - - const std::string styledTextNew = MarkedDocument(pdoc); - if (styledTextNew != styledText) { - success = false; - std::cout << "\n" << path.string() << ":1: is different\n\n"; - std::filesystem::path pathNew = path; - pathNew += ".styled.new"; - std::ofstream ofs(pathNew, std::ios::binary); - ofs << styledTextNew; - } - - const std::string foldedTextNew = FoldedDocument(pdoc); - if (foldedTextNew != foldedText) { - success = false; - std::cout << "\n" << path.string() << ":1: has different folds\n\n"; - std::filesystem::path pathNew = path; - pathNew += ".folded.new"; - std::ofstream ofs(pathNew, std::ios::binary); - ofs << foldedTextNew; - } - - const std::optional perLineDisable = propertyMap.GetPropertyValue("testlexers.per.line.disable"); - const bool disablePerLineTests = perLineDisable.value_or(false); - - if (success && !disablePerLineTests) { - // Test line by line lexing/folding - doc.Set(text); - const Sci_Position lines = doc.LineFromPosition(doc.Length()); - Sci_Position startLine = 0; - for (Sci_Position line = 0; line <= lines; line++) { - const Sci_Position endLine = doc.LineStart(line+1); - int styleStart = 0; - if (startLine > 0) - styleStart = doc.StyleAt(startLine - 1); - plex->Lex(startLine, endLine - startLine, styleStart, pdoc); - plex->Fold(startLine, endLine - startLine, styleStart, pdoc); - startLine = endLine; - } - - const std::string styledTextNewPerLine = MarkedDocument(pdoc); - if (styledTextNewPerLine != styledText) { - success = false; - std::cout << "\n" << path.string() << ":1: per-line is different\n\n"; - std::filesystem::path pathNew = path; - pathNew += ".styled.new"; - std::ofstream ofs(pathNew, std::ios::binary); - ofs << styledTextNewPerLine; - } - - const std::string foldedTextNewPerLine = FoldedDocument(pdoc); - if (foldedTextNewPerLine != foldedText) { - success = false; - std::cout << "\n" << path.string() << ":1: per-line has different folds\n\n"; - std::filesystem::path pathNew = path; - pathNew += ".folded.new"; - std::ofstream ofs(pathNew, std::ios::binary); - ofs << foldedTextNewPerLine; - } - } - - plex->Release(); - - Scintilla::ILexer5 *plexCRLF = Lexilla::MakeLexer(*language); - SetProperties(plexCRLF, propertyMap, path.filename().string()); - TestCRLF(path, text, plexCRLF); - - return success; -} - -bool TestDirectory(std::filesystem::path directory, std::filesystem::path basePath) { - PropertyMap properties; - properties.ReadFromFile(directory / "SciTE.properties"); - bool success = true; - for (auto &p : std::filesystem::directory_iterator(directory)) { - if (!p.is_directory()) { - const std::string extension = p.path().extension().string(); - if (extension != ".properties" && extension != ".styled" && extension != ".new" && - extension != ".folded") { - const std::filesystem::path relativePath = p.path().lexically_relative(basePath); - std::cout << "Lexing " << relativePath.string() << '\n'; - if (!TestFile(p, properties)) { - success = false; - } - } - } - } - return success; -} - -bool AccessLexilla(std::filesystem::path basePath) { - if (!std::filesystem::exists(basePath)) { - std::cout << "No examples at " << basePath.string() << "\n"; - return false; - } - - bool success = true; - for (auto &p : std::filesystem::recursive_directory_iterator(basePath)) { - if (p.is_directory()) { - //std::cout << p.path().string() << '\n'; - if (!TestDirectory(p, basePath)) { - success = false; - } - } - } - return success; -} - -std::filesystem::path FindLexillaDirectory(std::filesystem::path startDirectory) { - // Search up from startDirectory for a directory named "lexilla" or containing a "bin" subdirectory - std::filesystem::path directory = startDirectory; - while (!directory.empty()) { - //std::cout << "Searching " << directory.string() << "\n"; - const std::filesystem::path parent = directory.parent_path(); - const std::filesystem::path localLexilla = directory / "lexilla"; - const std::filesystem::directory_entry entry(localLexilla); - if (entry.is_directory()) { - std::cout << "Found Lexilla at " << entry.path().string() << "\n"; - return localLexilla; - } - const std::filesystem::path localBin = directory / "bin"; - const std::filesystem::directory_entry entryBin(localBin); - if (entryBin.is_directory()) { - std::cout << "Found Lexilla at " << directory.string() << "\n"; - return directory; - } - if (parent == directory) { - std::cout << "Reached root at " << directory.string() << "\n"; - return std::filesystem::path(); - } - directory = parent; - } - return std::filesystem::path(); -} - -} - - - -int main() { - bool success = false; - // TODO: Allow specifying the base directory through a command line argument - const std::filesystem::path baseDirectory = FindLexillaDirectory(std::filesystem::current_path()); - if (!baseDirectory.empty()) { - const std::filesystem::path examplesDirectory = baseDirectory / "test" / "examples"; -#ifdef LEXILLA_STATIC - success = AccessLexilla(examplesDirectory); -#else - const std::filesystem::path sharedLibrary = baseDirectory / "bin" / LEXILLA_LIB; - if (Lexilla::Load(sharedLibrary.string())) { - success = AccessLexilla(examplesDirectory); - } else { - std::cout << "Failed to load " << sharedLibrary << "\n"; - } -#endif - } - return success ? 0 : 1; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.vcxproj b/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.vcxproj deleted file mode 100644 index 45be22682..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/TestLexers.vcxproj +++ /dev/null @@ -1,177 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {2E0BBD6B-4BC8-4A6C-9DDA-199C27899335} - Win32Proj - lexillatest - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - ..\..\..\..\..\..\..\Users\Neil\NeilRules.ruleset - - - true - AllRules.ruleset - true - - - false - ..\..\..\..\..\..\..\Users\Neil\NeilRules.ruleset - - - false - ..\..\..\..\..\..\..\Users\Neil\NeilRules.ruleset - - - - - - Level3 - Disabled - true - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\scintilla\include;..\include;..\access;%(AdditionalIncludeDirectories) - stdcpplatest - - - Console - true - - - - - - - Level3 - Disabled - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\scintilla\include;..\include;..\access;%(AdditionalIncludeDirectories) - stdcpplatest - - - Console - true - - - - - - - Level3 - MaxSpeed - true - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\scintilla\include;..\include;..\access;%(AdditionalIncludeDirectories) - stdcpplatest - - - Console - true - true - true - - - - - - - Level3 - MaxSpeed - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\scintilla\include;..\include;..\access;%(AdditionalIncludeDirectories) - stdcpplatest - - - Console - true - true - true - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc b/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc deleted file mode 100644 index 716cc237a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc +++ /dev/null @@ -1,54 +0,0 @@ -Text=0 -*Strong Emphasis (bold) 1=1* -**Strong Emphasis (bold) 2=2** -_Emphasis (italic) 1=3_ -__Emphasis (italic) 2=4__ -= Heading level 1=5 -== Heading level 2=6 -=== Heading level 3=7 -==== Heading level 4=8 -===== Heading level 5=9 -====== Heading level 6=10 -* Unordered list item=11 -. Ordered list item=12 -> Block quote=13 -https://14.com[Link=14] ----- -Code block=15 ----- -++++ -Passthrough block=16 -++++ -// Comment=17 -//// -Comment Block=18 -//// -+Literal=19+ -.... -Literal Block=20 -.... -:Attrib=21: Attrib Value=22 -ifdef::Macro=23 -ifeval::Macro=23 -ifndef::Macro=23 -endif::Macro=23 -audio::Macro=23 -include::Macro=23 -image::Macro=23 -video::Macro=23 -asciimath:Macro=23 -btn:Macro=23 -image:Macro=23 -kbd:Macro=23 -latexmath:Macro=23 -link:Macro=23 -mailto:Macro=23 -menu:Macro=23 -pass:Macro=23 -stem:Macro=23 -xref:Macro=23 -CAUTION:Macro=23 -IMPORTANT:Macro=23 -NOTE:Macro=23 -TIP:Macro=23 -WARNING:Macro=23 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.folded deleted file mode 100644 index 7dab7083f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.folded +++ /dev/null @@ -1,55 +0,0 @@ - 0 400 0 Text=0 - 0 400 0 *Strong Emphasis (bold) 1=1* - 0 400 0 **Strong Emphasis (bold) 2=2** - 0 400 0 _Emphasis (italic) 1=3_ - 0 400 0 __Emphasis (italic) 2=4__ - 0 400 0 = Heading level 1=5 - 0 400 0 == Heading level 2=6 - 0 400 0 === Heading level 3=7 - 0 400 0 ==== Heading level 4=8 - 0 400 0 ===== Heading level 5=9 - 0 400 0 ====== Heading level 6=10 - 0 400 0 * Unordered list item=11 - 0 400 0 . Ordered list item=12 - 0 400 0 > Block quote=13 - 0 400 0 https://14.com[Link=14] - 0 400 0 ---- - 0 400 0 Code block=15 - 0 400 0 ---- - 0 400 0 ++++ - 0 400 0 Passthrough block=16 - 0 400 0 ++++ - 0 400 0 // Comment=17 - 0 400 0 //// - 0 400 0 Comment Block=18 - 0 400 0 //// - 0 400 0 +Literal=19+ - 0 400 0 .... - 0 400 0 Literal Block=20 - 0 400 0 .... - 0 400 0 :Attrib=21: Attrib Value=22 - 0 400 0 ifdef::Macro=23 - 0 400 0 ifeval::Macro=23 - 0 400 0 ifndef::Macro=23 - 0 400 0 endif::Macro=23 - 0 400 0 audio::Macro=23 - 0 400 0 include::Macro=23 - 0 400 0 image::Macro=23 - 0 400 0 video::Macro=23 - 0 400 0 asciimath:Macro=23 - 0 400 0 btn:Macro=23 - 0 400 0 image:Macro=23 - 0 400 0 kbd:Macro=23 - 0 400 0 latexmath:Macro=23 - 0 400 0 link:Macro=23 - 0 400 0 mailto:Macro=23 - 0 400 0 menu:Macro=23 - 0 400 0 pass:Macro=23 - 0 400 0 stem:Macro=23 - 0 400 0 xref:Macro=23 - 0 400 0 CAUTION:Macro=23 - 0 400 0 IMPORTANT:Macro=23 - 0 400 0 NOTE:Macro=23 - 0 400 0 TIP:Macro=23 - 0 400 0 WARNING:Macro=23 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.styled deleted file mode 100644 index 3e3df8190..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/AllStyles.adoc.styled +++ /dev/null @@ -1,54 +0,0 @@ -{0}Text=0 -{1}*Strong Emphasis (bold) 1=1*{0} -{2}**Strong Emphasis (bold) 2=2**{0} -{3}_Emphasis (italic) 1=3_{0} -{4}__Emphasis (italic) 2=4__{0} -{5}= Heading level 1=5{0} -{6}== Heading level 2=6{0} -{7}=== Heading level 3=7{0} -{8}==== Heading level 4=8{0} -{9}===== Heading level 5=9{0} -{10}====== Heading level 6=10{0} -{11}*{0} Unordered list item=11 -{12}.{0} Ordered list item=12 -{13}> Block quote=13{0} -https://14.com[{14}Link=14{0}] -{15}---- -Code block=15 -----{0} -{16}++++ -Passthrough block=16 -++++{0} -{17}// Comment=17{0} -{18}//// -Comment Block=18 -////{0} -+{19}Literal=19{0}+ -{20}.... -Literal Block=20 -....{0} -{21}:Attrib=21:{22} Attrib Value=22{0} -{23}ifdef{0}::Macro=23 -{23}ifeval{0}::Macro=23 -{23}ifndef{0}::Macro=23 -{23}endif{0}::Macro=23 -{23}audio{0}::Macro=23 -{23}include{0}::Macro=23 -{23}image{0}::Macro=23 -{23}video{0}::Macro=23 -{23}asciimat{0}h:Macro=23 -{23}btn{0}:Macro=23 -{23}image{0}:Macro=23 -{23}kbd{0}:Macro=23 -{23}latexmath{0}:Macro=23 -{23}link{0}:Macro=23 -{23}mailto{0}:Macro=23 -{23}menu{0}:Macro=23 -{23}pass{0}:Macro=23 -{23}stem{0}:Macro=23 -{23}xref{0}:Macro=23 -{23}CAUTION{0}:Macro=23 -{23}IMPORTANT{0}:Macro=23 -{23}NOTE{0}:Macro=23 -{23}TIP{0}:Macro=23 -{23}WARNING{0}:Macro=23 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/SciTE.properties deleted file mode 100644 index 55904f764..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/asciidoc/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -code.page=65001 -lexer.*.adoc=asciidoc -fold=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/SciTE.properties deleted file mode 100644 index c3963bd1e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -lexer.*.bat=batch -keywords.*.bat=call defined do echo else errorlevel exist exit for goto if in not set - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat b/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat deleted file mode 100644 index cb01645d7..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat +++ /dev/null @@ -1,57 +0,0 @@ -rem comment=1 -rem 'echo' is word=2, 'a' is default=0 -echo a -rem label=3 -:START -rem '@' is hide=4 -@echo b -rem 'gcc' is external command=5 -gcc --version -rem '%PATH%' is variable=6 -echo %PATH% -echo %ProgramFiles(x86)% -rem operator=7 '=' -@set Q=A - -::comment=1 - -:: Bug 1624: this construct produced inconsistent brackets in the past -if ERRORLEVEL 2 goto END -@if exist a ( -echo exists -) else ( -echo not -) - -FOR /L %%G IN (2,1,4) DO (echo %%G) - -:: Bug 1997: keywords not recognized when preceded by '(' -IF NOT DEFINED var (SET var=1) - -:: Bug 2065: keywords not recognized when followed by ')' -@if exist a ( exit) - -:: Bug: with \r or \n, 'command' is seen as continuation -echo word ^ -1 -command - -:: Bug argument and variable expansion -echo %~dp0123 -echo %%-~012 -echo %%~%%~-abcd -FOR /F %%I in ("C:\Test\temp.txt") do echo %%~dI - -:: Bug ending of argument and variable expansion -echo %~dp0\123 -echo "%~dp0123" -echo "%%-~012" -echo "%%~%%~-abcd" -FOR /F %%I in ("C:\Test\temp.txt") do echo "%%~dI" - -:: Bug escaped % -echo %%0 -echo %%%0 -echo %%%%~-abcd - -:END diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.folded deleted file mode 100644 index eb2db8985..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.folded +++ /dev/null @@ -1,58 +0,0 @@ - 0 400 0 rem comment=1 - 0 400 0 rem 'echo' is word=2, 'a' is default=0 - 0 400 0 echo a - 0 400 0 rem label=3 - 0 400 0 :START - 0 400 0 rem '@' is hide=4 - 0 400 0 @echo b - 0 400 0 rem 'gcc' is external command=5 - 0 400 0 gcc --version - 0 400 0 rem '%PATH%' is variable=6 - 0 400 0 echo %PATH% - 0 400 0 echo %ProgramFiles(x86)% - 0 400 0 rem operator=7 '=' - 0 400 0 @set Q=A - 0 400 0 - 0 400 0 ::comment=1 - 0 400 0 - 0 400 0 :: Bug 1624: this construct produced inconsistent brackets in the past - 0 400 0 if ERRORLEVEL 2 goto END - 0 400 0 @if exist a ( - 0 400 0 echo exists - 0 400 0 ) else ( - 0 400 0 echo not - 0 400 0 ) - 0 400 0 - 0 400 0 FOR /L %%G IN (2,1,4) DO (echo %%G) - 0 400 0 - 0 400 0 :: Bug 1997: keywords not recognized when preceded by '(' - 0 400 0 IF NOT DEFINED var (SET var=1) - 0 400 0 - 0 400 0 :: Bug 2065: keywords not recognized when followed by ')' - 0 400 0 @if exist a ( exit) - 0 400 0 - 0 400 0 :: Bug: with \r or \n, 'command' is seen as continuation - 0 400 0 echo word ^ - 0 400 0 1 - 0 400 0 command - 0 400 0 - 0 400 0 :: Bug argument and variable expansion - 0 400 0 echo %~dp0123 - 0 400 0 echo %%-~012 - 0 400 0 echo %%~%%~-abcd - 0 400 0 FOR /F %%I in ("C:\Test\temp.txt") do echo %%~dI - 0 400 0 - 0 400 0 :: Bug ending of argument and variable expansion - 0 400 0 echo %~dp0\123 - 0 400 0 echo "%~dp0123" - 0 400 0 echo "%%-~012" - 0 400 0 echo "%%~%%~-abcd" - 0 400 0 FOR /F %%I in ("C:\Test\temp.txt") do echo "%%~dI" - 0 400 0 - 0 400 0 :: Bug escaped % - 0 400 0 echo %%0 - 0 400 0 echo %%%0 - 0 400 0 echo %%%%~-abcd - 0 400 0 - 0 400 0 :END - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.styled deleted file mode 100644 index fe06cd5d4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/batch/x.bat.styled +++ /dev/null @@ -1,57 +0,0 @@ -{1}rem comment=1 -rem 'echo' is word=2, 'a' is default=0 -{2}echo{0} a -{1}rem label=3 -{3}:START -{1}rem '@' is hide=4 -{4}@{2}echo{0} b -{1}rem 'gcc' is external command=5 -{5}gcc{0} --version -{1}rem '%PATH%' is variable=6 -{2}echo{0} {6}%PATH%{0} -{2}echo{0} {6}%ProgramFiles(x86)%{0} -{1}rem operator=7 '=' -{4}@{2}set{0} Q{7}={0}A - -{1}::comment=1 -{0} -{1}:: Bug 1624: this construct produced inconsistent brackets in the past -{2}if ERRORLEVEL{0} 2{2} goto{0} END -{4}@{2}if exist{0} a ( -{2}echo{0} exists -){2} else{0} ( -{2}echo{0} not -) - -{2}FOR{0} /L {6}%%G{2} IN{0} (2,1,4){2} DO{0} ({2}echo{0} {6}%%G{0}) - -{1}:: Bug 1997: keywords not recognized when preceded by '(' -{2}IF NOT DEFINED{0} var ({2}SET{0} var{7}={0}1) - -{1}:: Bug 2065: keywords not recognized when followed by ')' -{4}@{2}if exist{0} a ({2} exit{0}) - -{1}:: Bug: with \r or \n, 'command' is seen as continuation -{2}echo{0} word ^ -1 -{5}command{0} - -{1}:: Bug argument and variable expansion -{2}echo{0} {6}%~dp0{0}123 -{2}echo{0} {6}%%-{0}~012 -{2}echo{0} %%~{6}%%~-abcd{0} -{2}FOR{0} /F {6}%%I{2} in{0} ("C:\Test\temp.txt"){2} do echo{0} {6}%%~dI{0} - -{1}:: Bug ending of argument and variable expansion -{2}echo{0} {6}%~dp0{0}\123 -{2}echo{0} "{6}%~dp0{0}123" -{2}echo{0} "{6}%%-{0}~012" -{2}echo{0} "%%~{6}%%~-abcd{0}" -{2}FOR{0} /F {6}%%I{2} in{0} ("C:\Test\temp.txt"){2} do echo{0} "{6}%%~dI{0}" - -{1}:: Bug escaped % -{2}echo{0} {6}%%0{0} -{2}echo{0} %%{6}%0{0} -{2}echo{0} %%{6}%%~-abcd{0} - -{3}:END diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml b/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml deleted file mode 100644 index f8a9dc511..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml +++ /dev/null @@ -1,49 +0,0 @@ -(* Enumerate all styles: 0 to 15 *) -(* comment=12 *) - -(* whitespace=0 *) - (* w *) - -(* identifier=1 *) -ident - -(* tagname=2 *) -`ident - -(* keyword=3 *) -and - -(* keyword2=4 *) -None - -(* keyword3=5 *) -char - -(* linenum=6 *) -#12 - -(* operator=7 *) -* - -(* number=8 *) -12 - -(* char=9 *) -'a' - -(* white=10 *) -(* this state can not be reached in caml mode, only SML mode but that stops other states *) -(* SML mode is triggered by "andalso" being in the keywords *) -"\ \x" - -(* string=11 *) -"string" - -(* comment1=13 *) -(* (* comment 1 *) *) - -(* comment2=14 *) -(* (* (* comment 2 *) *) *) - -(* comment3=15 *) -(* (* (* (* comment 1 *) *) *) *) diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.folded deleted file mode 100644 index 3e0299c06..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.folded +++ /dev/null @@ -1,50 +0,0 @@ - 0 400 0 (* Enumerate all styles: 0 to 15 *) - 0 400 0 (* comment=12 *) - 0 400 0 - 0 400 0 (* whitespace=0 *) - 0 400 0 (* w *) - 0 400 0 - 0 400 0 (* identifier=1 *) - 0 400 0 ident - 0 400 0 - 0 400 0 (* tagname=2 *) - 0 400 0 `ident - 0 400 0 - 0 400 0 (* keyword=3 *) - 0 400 0 and - 0 400 0 - 0 400 0 (* keyword2=4 *) - 0 400 0 None - 0 400 0 - 0 400 0 (* keyword3=5 *) - 0 400 0 char - 0 400 0 - 0 400 0 (* linenum=6 *) - 0 400 0 #12 - 0 400 0 - 0 400 0 (* operator=7 *) - 0 400 0 * - 0 400 0 - 0 400 0 (* number=8 *) - 0 400 0 12 - 0 400 0 - 0 400 0 (* char=9 *) - 0 400 0 'a' - 0 400 0 - 0 400 0 (* white=10 *) - 0 400 0 (* this state can not be reached in caml mode, only SML mode but that stops other states *) - 0 400 0 (* SML mode is triggered by "andalso" being in the keywords *) - 0 400 0 "\ \x" - 0 400 0 - 0 400 0 (* string=11 *) - 0 400 0 "string" - 0 400 0 - 0 400 0 (* comment1=13 *) - 0 400 0 (* (* comment 1 *) *) - 0 400 0 - 0 400 0 (* comment2=14 *) - 0 400 0 (* (* (* comment 2 *) *) *) - 0 400 0 - 0 400 0 (* comment3=15 *) - 0 400 0 (* (* (* (* comment 1 *) *) *) *) - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.styled deleted file mode 100644 index 1ed93073e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/AllStyles.ml.styled +++ /dev/null @@ -1,49 +0,0 @@ -{12}(* Enumerate all styles: 0 to 15 *){0} -{12}(* comment=12 *){0} - -{12}(* whitespace=0 *){0} - {12}(* w *){0} - -{12}(* identifier=1 *){0} -{1}ident{0} - -{12}(* tagname=2 *){0} -{2}`ident{0} - -{12}(* keyword=3 *){0} -{3}and{0} - -{12}(* keyword2=4 *){0} -{4}None{0} - -{12}(* keyword3=5 *){0} -{5}char{0} - -{12}(* linenum=6 *){0} -{6}#12{0} - -{12}(* operator=7 *){0} -{7}*{0} - -{12}(* number=8 *){0} -{8}12{0} - -{12}(* char=9 *){0} -{9}'a'{0} - -{12}(* white=10 *){0} -{12}(* this state can not be reached in caml mode, only SML mode but that stops other states *){0} -{12}(* SML mode is triggered by "andalso" being in the keywords *){0} -{11}"\ \x"{0} - -{12}(* string=11 *){0} -{11}"string"{0} - -{12}(* comment1=13 *){0} -{12}(* {13}(* comment 1 *){12} *){0} - -{12}(* comment2=14 *){0} -{12}(* {13}(* {14}(* comment 2 *){13} *){12} *){0} - -{12}(* comment3=15 *){0} -{12}(* {13}(* {14}(* {15}(* comment 1 *){14} *){13} *){12} *){0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/SciTE.properties deleted file mode 100644 index 1c769e054..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/caml/SciTE.properties +++ /dev/null @@ -1,4 +0,0 @@ -lexer.*.ml=caml -keywords.*.ml=and xandalso -keywords2.*.ml=None -keywords3.*.ml=char diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx deleted file mode 100644 index e3761c85c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx +++ /dev/null @@ -1,13 +0,0 @@ -int i; -#if 1 -i=1; -# -i=2; -#else -i=3; -#endif -i=4; -#elif 1 -i=5; -#else -i=6; diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.folded deleted file mode 100644 index 8e075c814..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.folded +++ /dev/null @@ -1,14 +0,0 @@ - 0 400 400 int i; - 2 400 401 + #if 1 - 0 401 401 | i=1; - 0 401 401 | # - 0 401 401 | i=2; - 0 401 401 | #else - 0 401 401 | i=3; - 0 401 400 | #endif - 0 400 400 i=4; - 0 400 400 #elif 1 - 0 400 400 i=5; - 0 400 400 #else - 0 400 400 i=6; - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.styled deleted file mode 100644 index ddf1337b4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/Bug2245.cxx.styled +++ /dev/null @@ -1,13 +0,0 @@ -{5}int{0} {11}i{10};{0} -{9}#if 1 -{11}i{10}={4}1{10};{0} -{9}# -{11}i{10}={4}2{10};{0} -{9}#else -{75}i{74}={68}3{74};{64} -{9}#endif -{11}i{10}={4}4{10};{0} -{9}#elif 1 -{11}i{10}={4}5{10};{0} -{9}#else -{11}i{10}={4}6{10};{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/SciTE.properties deleted file mode 100644 index 53c6a60f5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/SciTE.properties +++ /dev/null @@ -1,10 +0,0 @@ -lexer.*.cxx=cpp -keywords.*.cxx=int let -keywords2.*.cxx= -keywords3.*.cxx=file -lexer.cpp.track.preprocessor=1 -lexer.cpp.escape.sequence=1 -fold=1 -fold.preprocessor=1 -fold.comment=1 -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx deleted file mode 100644 index 4bd02cb08..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// A demonstration program -#include -#if 0 /* */ -#define DUMMY() \ - if (1); -#endif - -/** @file LexCPP.cxx - - filename - LexCPP.cxx. - - **/ - -/** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR: - @wrong LexCPP.cxx - filename -**/ - -#define M\ - -\ - -int main() { - double x[] = {3.14159,6.02e23,1.6e-19,1.0+1}; - int y[] = {75,0113,0x4b}; - printf("hello world %d %g\n", y[0], x[0]); - - // JavaScript regular expression (14) tests - let a = /a/; - let b = /[a-z]+/gi; - - // Escape sequence (27) tests - printf("\'\"\?\\\a\b\f\n\r\t\v \P"); - printf("\0a \013a \019"); - printf("\x013ac \xdz"); - printf("\ua34df \uz"); - printf("\Ua34df7833 \Uz"); -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.folded deleted file mode 100644 index 89b6f49b5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.folded +++ /dev/null @@ -1,40 +0,0 @@ - 0 400 400 // A demonstration program - 0 400 400 #include - 2 400 401 + #if 0 /* */ - 0 401 401 | #define DUMMY() \ - 0 401 401 | if (1); - 0 401 400 | #endif - 1 400 400 - 2 400 401 + /** @file LexCPP.cxx - 0 401 401 | - 0 401 401 | filename - 0 401 401 | LexCPP.cxx. - 0 401 401 | - 0 401 400 | **/ - 1 400 400 - 2 400 401 + /** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR: - 0 401 401 | @wrong LexCPP.cxx - 0 401 401 | filename - 0 401 400 | **/ - 1 400 400 - 0 400 400 #define M\ - 1 400 400 - 0 400 400 \ - 1 400 400 - 2 400 401 + int main() { - 0 401 401 | double x[] = {3.14159,6.02e23,1.6e-19,1.0+1}; - 0 401 401 | int y[] = {75,0113,0x4b}; - 0 401 401 | printf("hello world %d %g\n", y[0], x[0]); - 1 401 401 | - 0 401 401 | // JavaScript regular expression (14) tests - 0 401 401 | let a = /a/; - 0 401 401 | let b = /[a-z]+/gi; - 1 401 401 | - 0 401 401 | // Escape sequence (27) tests - 0 401 401 | printf("\'\"\?\\\a\b\f\n\r\t\v \P"); - 0 401 401 | printf("\0a \013a \019"); - 0 401 401 | printf("\x013ac \xdz"); - 0 401 401 | printf("\ua34df \uz"); - 0 401 401 | printf("\Ua34df7833 \Uz"); - 0 401 400 | } - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.styled deleted file mode 100644 index 1b518ce71..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/cpp/x.cxx.styled +++ /dev/null @@ -1,39 +0,0 @@ -{2}// A demonstration program -{9}#include -#if 0 {23}/* */{9} -{73}#define DUMMY() \ - if (1); -{9}#endif -{0} -{3}/** {17}@file{3} LexCPP.cxx - <{17}file{3}> - <{17}file{3} >filename - LexCPP.cxx. - - **/{0} - -{3}/** Unknown doc keywords so in SCE_C_COMMENTDOCKEYWORDERROR: - {18}@wrong{3} LexCPP.cxx - <{18}wrong{3}>filename -**/{0} - -{9}#define M\ - -{0}\ - -{5}int{0} {11}main{10}(){0} {10}{{0} - {11}double{0} {11}x{10}[]{0} {10}={0} {10}{{4}3.14159{10},{4}6.02e23{10},{4}1.6e-19{10},{4}1.0{10}+{4}1{10}};{0} - {5}int{0} {11}y{10}[]{0} {10}={0} {10}{{4}75{10},{4}0113{10},{4}0x4b{10}};{0} - {11}printf{10}({6}"hello world %d %g{27}\n{6}"{10},{0} {11}y{10}[{4}0{10}],{0} {11}x{10}[{4}0{10}]);{0} - - {2}// JavaScript regular expression (14) tests -{0} {5}let{0} {11}a{0} {10}={0} {14}/a/{10};{0} - {5}let{0} {11}b{0} {10}={0} {14}/[a-z]+/gi{10};{0} - - {2}// Escape sequence (27) tests -{0} {11}printf{10}({6}"{27}\'\"\?\\\a\b\f\n\r\t\v{6} {27}\P{6}"{10});{0} - {11}printf{10}({6}"{27}\0{6}a {27}\013{6}a {27}\01{6}9"{10});{0} - {11}printf{10}({6}"{27}\x013a{6}c {27}\xd{6}z"{10});{0} - {11}printf{10}({6}"{27}\ua34d{6}f {27}\u{6}z"{10});{0} - {11}printf{10}({6}"{27}\Ua34df783{6}3 {27}\U{6}z"{10});{0} -{10}}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css b/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css deleted file mode 100644 index 6c89803e8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css +++ /dev/null @@ -1,89 +0,0 @@ -/* Enumerate all styles: 0 to 23 */ - -/* comment=9 */ - -/* whitespace=0 */ - /* */ - -/* tag=1 */ -html/**/ -{} - -/* class=2 */ -.hidden -{} - -/* pseudoclass=3 */ -:link -{} - -/* unknown pseudoclass=4 */ -:unknown -{} - -/* operator=5 */ -# -{} - -/* identifier=6 */ -*{margin:} - -/* unknown identifier=7 */ -*{unknown:} - -/* value=8 */ -*{:88} - -/* identifier=10 */ -#identifier -{} - -/* important=11 */ -* { margin: 0 ! important; } - -/* directive=12 */ -@directive -{ } - -/* doublestring=13 */ -* { font-family: "doublestring"; } - -/* singlestring=14 */ -* { font-family: 'singlestring'; } - -/* identifier2=15 */ -* { identifier2: 0} - -/* attribute=16 */ -[attribute] -{} - -/* identifier3=17 */ -* { identifier3: 0} - -/* pseudoelement=18 */ -::pseudoelement -{} - -/* extended_identifier=19 */ -* { extended_identifier: 0} - -/* extended_pseudoclass=20 */ -:extended_pseudoclass -{} - -/* extended_pseudoelement=21 */ -::extended_pseudo_element -{} - -/* media=22 */ -@media (orientation: portrait) -{ } - -/* group rule=22 */ -@supports ( display: flex ) { - body { display: flex; } -} - -/* variable=23 */ -$variable:#428bca; diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.folded deleted file mode 100644 index 644b6dd3c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.folded +++ /dev/null @@ -1,90 +0,0 @@ - 0 400 0 /* Enumerate all styles: 0 to 23 */ - 0 400 0 - 0 400 0 /* comment=9 */ - 0 400 0 - 0 400 0 /* whitespace=0 */ - 0 400 0 /* */ - 0 400 0 - 0 400 0 /* tag=1 */ - 0 400 0 html/**/ - 0 400 0 {} - 0 400 0 - 0 400 0 /* class=2 */ - 0 400 0 .hidden - 0 400 0 {} - 0 400 0 - 0 400 0 /* pseudoclass=3 */ - 0 400 0 :link - 0 400 0 {} - 0 400 0 - 0 400 0 /* unknown pseudoclass=4 */ - 0 400 0 :unknown - 0 400 0 {} - 0 400 0 - 0 400 0 /* operator=5 */ - 0 400 0 # - 0 400 0 {} - 0 400 0 - 0 400 0 /* identifier=6 */ - 0 400 0 *{margin:} - 0 400 0 - 0 400 0 /* unknown identifier=7 */ - 0 400 0 *{unknown:} - 0 400 0 - 0 400 0 /* value=8 */ - 0 400 0 *{:88} - 0 400 0 - 0 400 0 /* identifier=10 */ - 0 400 0 #identifier - 0 400 0 {} - 0 400 0 - 0 400 0 /* important=11 */ - 0 400 0 * { margin: 0 ! important; } - 0 400 0 - 0 400 0 /* directive=12 */ - 0 400 0 @directive - 0 400 0 { } - 0 400 0 - 0 400 0 /* doublestring=13 */ - 0 400 0 * { font-family: "doublestring"; } - 0 400 0 - 0 400 0 /* singlestring=14 */ - 0 400 0 * { font-family: 'singlestring'; } - 0 400 0 - 0 400 0 /* identifier2=15 */ - 0 400 0 * { identifier2: 0} - 0 400 0 - 0 400 0 /* attribute=16 */ - 0 400 0 [attribute] - 0 400 0 {} - 0 400 0 - 0 400 0 /* identifier3=17 */ - 0 400 0 * { identifier3: 0} - 0 400 0 - 0 400 0 /* pseudoelement=18 */ - 0 400 0 ::pseudoelement - 0 400 0 {} - 0 400 0 - 0 400 0 /* extended_identifier=19 */ - 0 400 0 * { extended_identifier: 0} - 0 400 0 - 0 400 0 /* extended_pseudoclass=20 */ - 0 400 0 :extended_pseudoclass - 0 400 0 {} - 0 400 0 - 0 400 0 /* extended_pseudoelement=21 */ - 0 400 0 ::extended_pseudo_element - 0 400 0 {} - 0 400 0 - 0 400 0 /* media=22 */ - 0 400 0 @media (orientation: portrait) - 0 400 0 { } - 0 400 0 - 0 400 0 /* group rule=22 */ - 0 400 0 @supports ( display: flex ) { - 0 400 0 body { display: flex; } - 0 400 0 } - 0 400 0 - 0 400 0 /* variable=23 */ - 0 400 0 $variable:#428bca; - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.styled deleted file mode 100644 index 7b244dd4c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/AllStyles.css.styled +++ /dev/null @@ -1,89 +0,0 @@ -{9}/* Enumerate all styles: 0 to 23 */{0} - -{9}/* comment=9 */{0} - -{9}/* whitespace=0 */{0} - {9}/* */{0} - -{9}/* tag=1 */{0} -{1}html{9}/**/{1} -{5}{}{0} - -{9}/* class=2 */{0} -{5}.{2}hidden{1} -{5}{}{0} - -{9}/* pseudoclass=3 */{0} -{5}:{3}link{1} -{5}{}{0} - -{9}/* unknown pseudoclass=4 */{0} -{5}:{4}unknown{1} -{5}{}{0} - -{9}/* operator=5 */{0} -{5}#{1} -{5}{}{0} - -{9}/* identifier=6 */{0} -{1}*{5}{{6}margin{5}:}{0} - -{9}/* unknown identifier=7 */{0} -{1}*{5}{{7}unknown{5}:}{0} - -{9}/* value=8 */{0} -{1}*{5}{:{8}88{5}}{0} - -{9}/* identifier=10 */{0} -{5}#{10}identifier{1} -{5}{}{0} - -{9}/* important=11 */{0} -{1}* {5}{{6} margin{5}:{8} 0 {5}!{11} important{5};{6} {5}}{0} - -{9}/* directive=12 */{0} -{5}@{12}directive -{5}{{6} {5}}{0} - -{9}/* doublestring=13 */{0} -{1}* {5}{{7} font-family{5}:{8} {13}"doublestring"{5};{6} {5}}{0} - -{9}/* singlestring=14 */{0} -{1}* {5}{{7} font-family{5}:{8} {14}'singlestring'{5};{6} {5}}{0} - -{9}/* identifier2=15 */{0} -{1}* {5}{{15} identifier2{5}:{8} 0{5}}{0} - -{9}/* attribute=16 */{0} -{5}[{16}attribute{5}]{1} -{5}{}{0} - -{9}/* identifier3=17 */{0} -{1}* {5}{{17} identifier3{5}:{8} 0{5}}{0} - -{9}/* pseudoelement=18 */{0} -{5}::{18}pseudoelement{1} -{5}{}{0} - -{9}/* extended_identifier=19 */{0} -{1}* {5}{{19} extended_identifier{5}:{8} 0{5}}{0} - -{9}/* extended_pseudoclass=20 */{0} -{5}:{20}extended_pseudoclass{1} -{5}{}{0} - -{9}/* extended_pseudoelement=21 */{0} -{5}::{21}extended_pseudo_element{1} -{5}{}{0} - -{9}/* media=22 */{0} -{5}@{22}media (orientation: portrait) -{5}{{0} {5}}{0} - -{9}/* group rule=22 */{0} -{5}@{22}supports ( display: flex ) {5}{{0} - {1}body {5}{{7} display{5}:{8} flex{5};{6} {5}}{6} -{5}}{0} - -{9}/* variable=23 */{0} -{23}$variable{5}:{8}#428bca{5};{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/SciTE.properties deleted file mode 100644 index 29d982a55..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/css/SciTE.properties +++ /dev/null @@ -1,28 +0,0 @@ -lexer.*.css=css - -# identifier -keywords.*.css=margin - -# pseudoclass -keywords2.*.css=link - -# identifier 2 -keywords3.*.css=identifier2 - -# identifier 3 -keywords4.*.css=identifier3 - -# pseudo elements -keywords5.*.css=pseudoelement - -# extended identifier -keywords6.*.css=extended_identifier - -# extended pseudoclass -keywords7.*.css=extended_pseudoclass - -# extended pseudo elements -keywords8.*.css=extended_pseudo_element - -# enable SCSS language so $variable is recognized -lexer.css.scss.language=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/SciTE.properties deleted file mode 100644 index c6849b0ed..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/SciTE.properties +++ /dev/null @@ -1,10 +0,0 @@ -lexer.*.d=d -keywords.*.d=keyword1 -keywords2.*.d=keyword2 -keywords3.*.d= -keywords4.*.d=keyword4 -keywords5.*.d=keyword5 -keywords6.*.d=keyword6 -keywords7.*.d=keyword7 - -fold=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d b/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d deleted file mode 100644 index 617aa38a1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d +++ /dev/null @@ -1,47 +0,0 @@ -$ -// /++ +/ doccomments are not yet supported -/* */ -/** */ -/// drdr -/+ /+ +/ +/ -//keyword test -keyword1 -keyword2 -keyword4 -keyword5 -keyword6 -keyword7 -//unicode identifier test -вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을 -//strings test -'s -' -w's'w -"multiline - string"w -e"zz"e -r"asd\"e -r"multiline - string"c -r`asd\`e -`multiline - string`d -x"023 abc"e -x"023 - abc"w -//numbers test -a[3..4]=3 -2.stringof -2.0.stringof -2. -2.2e+2 -2.2e-2 -.2e+2 -.2 -2e+2 -0x2e+2 -0x2ep+10 -,.2.stringof, - -end - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.folded deleted file mode 100644 index c7443acb9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.folded +++ /dev/null @@ -1,48 +0,0 @@ - 0 400 400 $ - 0 400 400 // /++ +/ doccomments are not yet supported - 0 400 400 /* */ - 0 400 400 /** */ - 0 400 400 /// drdr - 0 400 400 /+ /+ +/ +/ - 0 400 400 //keyword test - 0 400 400 keyword1 - 0 400 400 keyword2 - 0 400 400 keyword4 - 0 400 400 keyword5 - 0 400 400 keyword6 - 0 400 400 keyword7 - 0 400 400 //unicode identifier test - 0 400 400 вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을 - 0 400 400 //strings test - 0 400 400 's - 0 400 400 ' - 0 400 400 w's'w - 0 400 400 "multiline - 0 400 400 string"w - 0 400 400 e"zz"e - 0 400 400 r"asd\"e - 0 400 400 r"multiline - 0 400 400 string"c - 0 400 400 r`asd\`e - 0 400 400 `multiline - 0 400 400 string`d - 0 400 400 x"023 abc"e - 0 400 400 x"023 - 0 400 400 abc"w - 0 400 400 //numbers test - 0 400 400 a[3..4]=3 - 0 400 400 2.stringof - 0 400 400 2.0.stringof - 0 400 400 2. - 0 400 400 2.2e+2 - 0 400 400 2.2e-2 - 0 400 400 .2e+2 - 0 400 400 .2 - 0 400 400 2e+2 - 0 400 400 0x2e+2 - 0 400 400 0x2ep+10 - 0 400 400 ,.2.stringof, - 1 400 400 - 0 400 400 end - 1 400 400 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.styled deleted file mode 100644 index 32e4556dd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/d/x.d.styled +++ /dev/null @@ -1,47 +0,0 @@ -{14}${0} -{2}// /++ +/ doccomments are not yet supported -{1}/* */{0} -{3}/** */{0} -{15}/// drdr -{4}/+ /+ +/ +/{0} -{2}//keyword test -{6}keyword1{0} -{7}keyword2{0} -{9}keyword4{0} -{20}keyword5{0} -{21}keyword6{0} -{22}keyword7{0} -{2}//unicode identifier test -{14}вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을{0} -{2}//strings test -{11}'s -' -{14}w{12}'s'{14}w{0} -{10}"multiline - string"w{0} -{14}e{10}"zz"{14}e{0} -{19}r"asd\"{14}e{0} -{19}r"multiline - string"c{0} -{14}r{18}`asd\`{14}e{0} -{18}`multiline - string`d{0} -{19}x"023 abc"{14}e{0} -{19}x"023 - abc"w{0} -{2}//numbers test -{14}a{13}[{5}3{13}..{5}4{13}]={5}3{0} -{5}2.stringof{0} -{5}2.0{13}.{14}stringof{0} -{5}2.{0} -{5}2.2e+2{0} -{5}2.2e-2{0} -{5}.2e+2{0} -{5}.2{0} -{5}2e+2{0} -{5}0x2e{13}+{5}2{0} -{5}0x2ep+10{0} -{13},{5}.2{13}.{14}stringof{13},{0} - -{14}end{0} - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl deleted file mode 100644 index f76ab49dd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl +++ /dev/null @@ -1,78 +0,0 @@ -% Enumerate all styles: 0..24 31 - -% comment = 1 - -% whitespace = 0 - % 0 - -% variable = 2 -A - -% number = 3 -3 - -% keyword = 4 -let - -% string = 5 -"string" - -% operator = 6 -* - -% atom = 7 -atom - -% function_name = 8 -function() - -% character = 9 -$a - -% macro = 10 -?macro - -% record = 11 -#record - -% preproc = 12 --define - -% node_name = 13 -node@ - -% comment_function = 14 -%% function - -% comment_module = 15 -%%% module - -% comment_doc = 16 -%% @todo - -% comment_doc_macro = 17 -%% {@module} - -% atom_quoted = 18 (fails) -'fails' - -% macro_quoted = 19 -?'macro' - -% record_quoted = 20 -#'record' - -% node_name_quoted = 21 -'node@' - -% bifs = 22 -atom_to_binary - -% modules = 23 -io:x - -% modules_att = 24 --module(). - -% unknown = 31 (this is an internal state and should not be output) - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.folded deleted file mode 100644 index b39477537..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.folded +++ /dev/null @@ -1,79 +0,0 @@ - 0 400 0 % Enumerate all styles: 0..24 31 - 0 400 0 - 0 400 0 % comment = 1 - 0 400 0 - 0 400 0 % whitespace = 0 - 0 400 0 % 0 - 0 400 0 - 0 400 0 % variable = 2 - 0 400 0 A - 0 400 0 - 0 400 0 % number = 3 - 0 400 0 3 - 0 400 0 - 0 400 0 % keyword = 4 - 0 400 0 let - 0 400 0 - 0 400 0 % string = 5 - 0 400 0 "string" - 0 400 0 - 0 400 0 % operator = 6 - 0 400 0 * - 0 400 0 - 0 400 0 % atom = 7 - 0 400 0 atom - 0 400 0 - 0 400 0 % function_name = 8 - 0 400 0 function() - 0 400 0 - 0 400 0 % character = 9 - 0 400 0 $a - 0 400 0 - 0 400 0 % macro = 10 - 0 400 0 ?macro - 0 400 0 - 0 400 0 % record = 11 - 0 400 0 #record - 0 400 0 - 0 400 0 % preproc = 12 - 0 400 0 -define - 0 400 0 - 0 400 0 % node_name = 13 - 0 400 0 node@ - 0 400 0 - 0 400 0 % comment_function = 14 - 0 400 0 %% function - 0 400 0 - 0 400 0 % comment_module = 15 - 0 400 0 %%% module - 0 400 0 - 0 400 0 % comment_doc = 16 - 0 400 0 %% @todo - 0 400 0 - 0 400 0 % comment_doc_macro = 17 - 0 400 0 %% {@module} - 0 400 0 - 0 400 0 % atom_quoted = 18 (fails) - 0 400 0 'fails' - 0 400 0 - 0 400 0 % macro_quoted = 19 - 0 400 0 ?'macro' - 0 400 0 - 0 400 0 % record_quoted = 20 - 0 400 0 #'record' - 0 400 0 - 0 400 0 % node_name_quoted = 21 - 0 400 0 'node@' - 0 400 0 - 0 400 0 % bifs = 22 - 0 400 0 atom_to_binary - 0 400 0 - 0 400 0 % modules = 23 - 0 400 0 io:x - 0 400 0 - 0 400 0 % modules_att = 24 - 0 400 0 -module(). - 0 400 0 - 0 400 0 % unknown = 31 (this is an internal state and should not be output) - 0 400 0 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.styled deleted file mode 100644 index 9887580d0..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/AllStyles.erl.styled +++ /dev/null @@ -1,78 +0,0 @@ -{1}% Enumerate all styles: 0..24 31{0} - -{1}% comment = 1{0} - -{1}% whitespace = 0{0} - {1}% 0{0} - -{1}% variable = 2{0} -{2}A{0} - -{1}% number = 3{0} -{3}3{0} - -{1}% keyword = 4{0} -{4}let{0} - -{1}% string = 5{0} -{5}"string"{0} - -{1}% operator = 6{0} -{6}*{0} - -{1}% atom = 7{0} -{7}atom{0} - -{1}% function_name = 8{0} -{8}function{6}(){0} - -{1}% character = 9{0} -{9}$a{0} - -{1}% macro = 10{0} -{10}?macro{0} - -{1}% record = 11{0} -{11}#record{0} - -{1}% preproc = 12{0} -{12}-define{0} - -{1}% node_name = 13{0} -{13}node@{0} - -{1}% comment_function = 14{0} -{14}%% function{0} - -{1}% comment_module = 15{0} -{15}%%% module{0} - -{1}% comment_doc = 16{0} -{14}%% {16}@todo{0} - -{1}% comment_doc_macro = 17{0} -{14}%% {{17}@module{14}}{0} - -{1}% atom_quoted = 18 (fails){0} -{18}'fails'{0} - -{1}% macro_quoted = 19{0} -{19}?'macro'{0} - -{1}% record_quoted = 20{0} -{20}#'record'{0} - -{1}% node_name_quoted = 21{0} -{21}'node@'{0} - -{1}% bifs = 22{0} -{22}atom_to_binary{0} - -{1}% modules = 23{0} -{23}io:{7}x{0} - -{1}% modules_att = 24{0} -{24}-module{6}().{0} - -{1}% unknown = 31 (this is an internal state and should not be output){0} - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/SciTE.properties deleted file mode 100644 index 81be94384..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/erlang/SciTE.properties +++ /dev/null @@ -1,7 +0,0 @@ -lexer.*.erl=erlang -keywords.*.erl=let -keywords2.*.erl=atom_to_binary -keywords3.*.erl=-define -keywords4.*.erl=-module -keywords5.*.erl=@todo -keywords6.*.erl=@module diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err b/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err deleted file mode 100644 index 96c23b4e2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err +++ /dev/null @@ -1,111 +0,0 @@ -Default 0 -Some text in default - - -Python Error 1 - File "x.err", line 2 - - -Gcc Error 2, Find In Files Match 21 -ScintillaGTKAccessible.cxx:153:13: warning: Deprecated pre-processor symbol, replace with - - -Microsoft Error 3 -LexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory - -PlatQt.obj : error LNK2019: unresolved external symbol "class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function "public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z) - -NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\link.EXE"' : return code '0x460' - - -Command 4 ->pwd - - -Borland Error 5 -Error E2378 oddEven.c 16: For statement missing ; in function main() - - -Perl Error 6 -Bareword found where operator expected at LexMMIXAL.cxx line 1, near "// Scintilla" - - -DotNET Traceback 7 - at ExceptionTrace.Program.f4() in C:\Ivan\dev\exp\ExceptionTrace\Program.cs:line 18 - - -Lua Error 8 -last token read: `result' at line 40 in file `Test.lua' - - -Ctags 9 -IsAWordChar LexMMIXAL.cxx /^static inline bool IsAWordChar(const int ch) {$/;" f file: - - -Diff Changed ! 10 -! GdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF}; - - -Diff Addition + 11 -+ v142 - - -Diff Deletion - 12 -- v141 - - -Diff Message --- 13 ---- a/win32/SciTE.vcxproj Fri Jan 31 12:23:51 2020 +1100 - - -PHP error 14 -Fatal error: Call to undefined function: foo() in example.php on line 11 - - -Essential Lahey Fortran 90 Error 15 -Line 11, file c:\fortran90\codigo\demo.f90 - - -Intel Fortran Compiler Error 16 -Error 71 at (17:teste.f90) : The program unit has no name - - -Intel Fortran Compiler v8.0 Error 17 -fortcom: Error: shf.f90, line 5602: This name does not have ... - - -Absoft Pro Fortran 90 Error 18 -cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19 - - -HTML Tidy 19 -line 8 column 1 - Error: unexpected in - - -Java Runtime Stack Trace 20 - at MethodName>(FileName.java:33) - - -GCC Include Path 22 -In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37, - - -GCC Pointer 25 - 236 | void gtk_type_init (GTypeDebugFlags debug_flags); - | ^ - - -Escape Sequence 23 - - - -Escape Sequence Unknown 24 - - - -Escape Sequence Colour 40 -Colour 0 is 40 - - -Escape Sequence Colour 41 -Colour 1 is 41 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.folded deleted file mode 100644 index 3934c1182..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.folded +++ /dev/null @@ -1,112 +0,0 @@ - 0 400 0 Default 0 - 0 400 0 Some text in default - 0 400 0 - 0 400 0 - 0 400 0 Python Error 1 - 0 400 0 File "x.err", line 2 - 0 400 0 - 0 400 0 - 0 400 0 Gcc Error 2, Find In Files Match 21 - 0 400 0 ScintillaGTKAccessible.cxx:153:13: warning: Deprecated pre-processor symbol, replace with - 0 400 0 - 0 400 0 - 0 400 0 Microsoft Error 3 - 0 400 0 LexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory - 0 400 0 - 0 400 0 PlatQt.obj : error LNK2019: unresolved external symbol "class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function "public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z) - 0 400 0 - 0 400 0 NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\link.EXE"' : return code '0x460' - 0 400 0 - 0 400 0 - 0 400 0 Command 4 - 0 400 0 >pwd - 0 400 0 - 0 400 0 - 0 400 0 Borland Error 5 - 0 400 0 Error E2378 oddEven.c 16: For statement missing ; in function main() - 0 400 0 - 0 400 0 - 0 400 0 Perl Error 6 - 0 400 0 Bareword found where operator expected at LexMMIXAL.cxx line 1, near "// Scintilla" - 0 400 0 - 0 400 0 - 0 400 0 DotNET Traceback 7 - 0 400 0 at ExceptionTrace.Program.f4() in C:\Ivan\dev\exp\ExceptionTrace\Program.cs:line 18 - 0 400 0 - 0 400 0 - 0 400 0 Lua Error 8 - 0 400 0 last token read: `result' at line 40 in file `Test.lua' - 0 400 0 - 0 400 0 - 0 400 0 Ctags 9 - 0 400 0 IsAWordChar LexMMIXAL.cxx /^static inline bool IsAWordChar(const int ch) {$/;" f file: - 0 400 0 - 0 400 0 - 0 400 0 Diff Changed ! 10 - 0 400 0 ! GdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF}; - 0 400 0 - 0 400 0 - 0 400 0 Diff Addition + 11 - 0 400 0 + v142 - 0 400 0 - 0 400 0 - 0 400 0 Diff Deletion - 12 - 0 400 0 - v141 - 0 400 0 - 0 400 0 - 0 400 0 Diff Message --- 13 - 0 400 0 --- a/win32/SciTE.vcxproj Fri Jan 31 12:23:51 2020 +1100 - 0 400 0 - 0 400 0 - 0 400 0 PHP error 14 - 0 400 0 Fatal error: Call to undefined function: foo() in example.php on line 11 - 0 400 0 - 0 400 0 - 0 400 0 Essential Lahey Fortran 90 Error 15 - 0 400 0 Line 11, file c:\fortran90\codigo\demo.f90 - 0 400 0 - 0 400 0 - 0 400 0 Intel Fortran Compiler Error 16 - 0 400 0 Error 71 at (17:teste.f90) : The program unit has no name - 0 400 0 - 0 400 0 - 0 400 0 Intel Fortran Compiler v8.0 Error 17 - 0 400 0 fortcom: Error: shf.f90, line 5602: This name does not have ... - 0 400 0 - 0 400 0 - 0 400 0 Absoft Pro Fortran 90 Error 18 - 0 400 0 cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19 - 0 400 0 - 0 400 0 - 0 400 0 HTML Tidy 19 - 0 400 0 line 8 column 1 - Error: unexpected in - 0 400 0 - 0 400 0 - 0 400 0 Java Runtime Stack Trace 20 - 0 400 0 at MethodName>(FileName.java:33) - 0 400 0 - 0 400 0 - 0 400 0 GCC Include Path 22 - 0 400 0 In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37, - 0 400 0 - 0 400 0 - 0 400 0 GCC Pointer 25 - 0 400 0 236 | void gtk_type_init (GTypeDebugFlags debug_flags); - 0 400 0 | ^ - 0 400 0 - 0 400 0 - 0 400 0 Escape Sequence 23 - 0 400 0  - 0 400 0 - 0 400 0 - 0 400 0 Escape Sequence Unknown 24 - 0 400 0  - 0 400 0 - 0 400 0 - 0 400 0 Escape Sequence Colour 40 - 0 400 0 Colour 0 is 40 - 0 400 0 - 0 400 0 - 0 400 0 Escape Sequence Colour 41 - 0 400 0 Colour 1 is 41 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.styled deleted file mode 100644 index 4f12a6f3a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/AllStyles.err.styled +++ /dev/null @@ -1,111 +0,0 @@ -{0}Default 0 -Some text in default - - -Python Error 1 -{1} File "x.err", line 2 -{0} - -Gcc Error 2, Find In Files Match 21 -{2}ScintillaGTKAccessible.cxx:153:13:{21} warning: Deprecated pre-processor symbol, replace with -{0} - -Microsoft Error 3 -{3}LexErrorList.cxx(15): fatal error C1083: Cannot open include file: 'ILexer.h': No such file or directory -{0} -{3}PlatQt.obj : error LNK2019: unresolved external symbol "class Scintilla::PRectangle __cdecl Scintilla::PixelAlign(class Scintilla::PRectangle const &,int)" (?PixelAlign@Scintilla@@YA?AVPRectangle@1@AEBV21@H@Z) referenced in function "public: virtual void __cdecl Scintilla::SurfaceImpl::FillRectangleAligned(class Scintilla::PRectangle,class Scintilla::Fill)" (?FillRectangleAligned@SurfaceImpl@Scintilla@@UEAAXVPRectangle@2@VFill@2@@Z) -{0} -{3}NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX64\x64\link.EXE"' : return code '0x460' -{0} - -Command 4 -{4}>pwd -{0} - -Borland Error 5 -{5}Error E2378 oddEven.c 16: For statement missing ; in function main() -{0} - -Perl Error 6 -{6}Bareword found where operator expected at LexMMIXAL.cxx line 1, near "// Scintilla" -{0} - -DotNET Traceback 7 -{7} at ExceptionTrace.Program.f4() in C:\Ivan\dev\exp\ExceptionTrace\Program.cs:line 18 -{0} - -Lua Error 8 -{8}last token read: `result' at line 40 in file `Test.lua' -{0} - -Ctags 9 -{9}IsAWordChar LexMMIXAL.cxx /^static inline bool IsAWordChar(const int ch) {$/;" f file: -{0} - -Diff Changed ! 10 -{10}! GdkColor white = { 0, 0xFFFF, 0xFFFF, 0xFFFF}; -{0} - -Diff Addition + 11 -{11}+ v142 -{0} - -Diff Deletion - 12 -{12}- v141 -{0} - -Diff Message --- 13 -{13}--- a/win32/SciTE.vcxproj Fri Jan 31 12:23:51 2020 +1100 -{0} - -PHP error 14 -{14}Fatal error: Call to undefined function: foo() in example.php on line 11 -{0} - -Essential Lahey Fortran 90 Error 15 -{15}Line 11, file c:\fortran90\codigo\demo.f90 -{0} - -Intel Fortran Compiler Error 16 -{16}Error 71 at (17:teste.f90) : The program unit has no name -{0} - -Intel Fortran Compiler v8.0 Error 17 -{17}fortcom: Error: shf.f90, line 5602: This name does not have ... -{0} - -Absoft Pro Fortran 90 Error 18 -{18}cf90-113 f90fe: ERROR SHF3D, File = shf.f90, Line = 1101, Column = 19 -{0} - -HTML Tidy 19 -{19}line 8 column 1 - Error: unexpected in -{0} - -Java Runtime Stack Trace 20 -{20} at MethodName>(FileName.java:33) -{0} - -GCC Include Path 22 -{22}In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37, -{0} - -GCC Pointer 25 -{25} 236 | void gtk_type_init (GTypeDebugFlags debug_flags); - | ^ -{0} - -Escape Sequence 23 -{23}{0} - - -Escape Sequence Unknown 24 -{24}{0} - - -Escape Sequence Colour 40 -{23}{40}Colour 0 is 40 -{0} - -Escape Sequence Colour 41 -{23}{41}Colour 1 is 41 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/SciTE.properties deleted file mode 100644 index f9e4a20d3..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/errorlist/SciTE.properties +++ /dev/null @@ -1,5 +0,0 @@ -lexer.*.err=errorlist -lexer.errorlist.value.separate=1 -lexer.errorlist.escape.sequences=1 -style.errorlist.23=fore:#000000,back:#FFFFFF,$(error.background) -style.errorlist.25=fore:#CF008F,$(font.monospace.small) diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs deleted file mode 100644 index d0e1235a4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs +++ /dev/null @@ -1,26 +0,0 @@ -module FormatSpecifiersTest - -let x = List.fold (*) 24.5 [ 1.; 2.; 3. ] - -// expect "147.00" -printfn "Speed: %.2f m/s" x -printfn $"Speed: %.2f{x} m/s" - -// expect " 147%" -printfn """%% increase:% .0F%% over last year""" x -printfn $"""%% increase:% .0F{x}%% over last year""" - -// expect "1.5E+002" -// NB: units should look like text even without a space -printfn @"Time: %-0.1Esecs" x -printfn $"Time: %-0.1E{x}secs" - -// expect "\" +147\"" -printfn @"""Temp: %+12.3g K""" x -printfn $"""{'"'}Temp: %+12.3g{x} K{'"'}""" - -// These don't work -printfn ``%.2f`` x -printfn $"%.2f" x -printfn $"%.2f {x}" -printfn $"""%.2f {x}""" diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.folded deleted file mode 100644 index 8bf96ae24..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.folded +++ /dev/null @@ -1,27 +0,0 @@ - 0 400 400 module FormatSpecifiersTest - 1 400 400 - 0 400 400 let x = List.fold (*) 24.5 [ 1.; 2.; 3. ] - 1 400 400 - 0 400 400 // expect "147.00" - 0 400 400 printfn "Speed: %.2f m/s" x - 0 400 400 printfn $"Speed: %.2f{x} m/s" - 1 400 400 - 0 400 400 // expect " 147%" - 0 400 400 printfn """%% increase:% .0F%% over last year""" x - 0 400 400 printfn $"""%% increase:% .0F{x}%% over last year""" - 1 400 400 - 2 400 401 + // expect "1.5E+002" - 0 401 400 | // NB: units should look like text even without a space - 0 400 400 printfn @"Time: %-0.1Esecs" x - 0 400 400 printfn $"Time: %-0.1E{x}secs" - 1 400 400 - 0 400 400 // expect "\" +147\"" - 0 400 400 printfn @"""Temp: %+12.3g K""" x - 0 400 400 printfn $"""{'"'}Temp: %+12.3g{x} K{'"'}""" - 1 400 400 - 0 400 400 // These don't work - 0 400 400 printfn ``%.2f`` x - 0 400 400 printfn $"%.2f" x - 0 400 400 printfn $"%.2f {x}" - 0 400 400 printfn $"""%.2f {x}""" - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.styled deleted file mode 100644 index 5a4fcf5a7..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/FmtSpecs.fs.styled +++ /dev/null @@ -1,26 +0,0 @@ -{1}module{0} {6}FormatSpecifiersTest{0} - -{1}let{0} {6}x{0} {12}={0} {3}List{0}.{2}fold{0} {12}(*){0} {13}24.5{0} {12}[{0} {13}1.{12};{0} {13}2.{12};{0} {13}3.{0} {12}]{0} - -{9}// expect "147.00"{0} -{2}printfn{0} {15}"Speed: {19}%.2f{15} m/s"{0} {6}x{0} -{2}printfn{0} {15}$"Speed: {19}%.2f{15}{x} m/s"{0} - -{9}// expect " 147%"{0} -{2}printfn{0} {15}"""{19}%%{15} increase:{19}% .0F%%{15} over last year"""{0} {6}x{0} -{2}printfn{0} {15}$"""{19}%%{15} increase:{19}% .0F{15}{x}{19}%%{15} over last year"""{0} - -{9}// expect "1.5E+002"{0} -{9}// NB: units should look like text even without a space{0} -{2}printfn{0} {16}@"Time: {19}%-0.1E{16}secs"{0} {6}x{0} -{2}printfn{0} {15}$"Time: {19}%-0.1E{15}{x}secs"{0} - -{9}// expect "\" +147\""{0} -{2}printfn{0} {16}@"""Temp: {19}%+12.3g{16} K"""{0} {6}x{0} -{2}printfn{0} {15}$"""{'"'}Temp: {19}%+12.3g{15}{x} K{'"'}"""{0} - -{9}// These don't work{0} -{2}printfn{0} {7}``%.2f``{0} {6}x{0} -{2}printfn{0} {15}$"%.2f"{0} {6}x{0} -{2}printfn{0} {15}$"%.2f {x}"{0} -{2}printfn{0} {15}$"""%.2f {x}"""{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/SciTE.properties deleted file mode 100644 index 61556373f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/SciTE.properties +++ /dev/null @@ -1,42 +0,0 @@ -lexer.*.fs=fsharp - -keywords.*.fs= \ -abstract and as assert base begin class default delegate do done downcast \ -downto elif else end exception extern false finally fixed for fun function \ -global if in inherit inline interface internal lazy let let! match match! \ -member module mutable namespace new null of open or override private public \ -rec return return! select static struct then to true try type upcast use use! \ -val void when while with yield yield! atomic break checked component const \ -constraint constructor continue eager event external fixed functor global \ -include method mixin object parallel process protected pure sealed tailcall \ -trait virtual volatile - -keywords2.*.fs= \ -asr land lor lsl lsr lxor mod sig abs acos add allPairs append asin atan atan2 \ -average averageBy base1 base2 blit cache cast ceil choose \ -chunkBySize collect compareWith concat contains containsKey copy cos cosh count \ -countBy create createBased delay difference distinct distinctBy empty eprintf except \ -exists exists2 exactlyOne failwith fill filter find findBack findIndex findIndexBack \ -findKey floor fold fold2 foldBack foldBack2 forall forall2 fprintf fst get groupBy head ignore indexed \ -init initBased initInfinite intersect intersectMany invalidArg isEmpty isProperSubset \ -isProperSuperset isSubset isSuperset item iter iter2 iteri iteri2 last length \ -length1 length2 length3 length4 map map2 map3 mapFold mapFoldBack mapi mapi2 \ -max maxBy maxElement min minBy minElement nameof not ofArray ofList ofSeq pairwise partition \ -permute pick pown printf printfn raise readonly rebase reduce reduceBack remove replicate rev round scan \ -scanBack seq set sin sinh singleton skip skipWhile snd sort sortBy sortByDescending sortDescending \ -sortInPlace sortInPlaceBy sortInPlaceWith sortWith splitAt splitInto sprintf sqrt sub sum \ -sumBy tail take takeWhile tan tanh toArray toList toSeq transpose truncate \ -tryExactlyOne tryFind tryFindBack tryFindIndex tryFindIndexBack tryHead \ -tryItem tryFindKey tryLast tryPick typeof unfold union unionMany unzip unzip3 where \ -windowed zeroCreate zeroCreateBased zip zip3 - -keywords3.*.fs= \ -ArgumentException Array Array2D Array3D Array4D BigInteger Boolean Byte Char Collections Core CultureInfo DateTime Decimal Double \ -Environment Expr Float FSharp Globalization Int16 Int32 Int64 IntPtr IO Linq List Map Math Microsoft NumberStyles \ -Object Parallel Printf Random ResizeArray SByte Seq Set Single String System UInt16 UInt32 UInt64 UIntPtr \ -array bigint bool byte byref char comparison decimal double enum equality Error Exception exn float float32 inref int int8 int16 \ -int32 int64 list nativeint nativeptr None obj Ok option Option outref ref Result sbyte Some single string unmanaged unativeint \ -uint uint8 uint16 uint32 uint64 unit void voidptr voption - -fold.fsharp.preprocessor=1 -fold.comment=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs deleted file mode 100644 index 8189a371c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs +++ /dev/null @@ -1,53 +0,0 @@ -// x.fs -// Sample source file to test F# syntax highlighting - -[] -module Example - -#line 7 "A compiler directive" -#if DEBUG - open System - open System.IO - open System.Diagnostics -#endif - -# 14 @"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks" -// verbatim string -let xmlFragment1 = @"" - -// triple-quoted string -let xmlFragment2 = """""" - -(* you need .NET 5.0 to compile this: - https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation -*) -let interpolated = $"""C:\{System.DateTime.Now.ToString("yyyy-MM-dd")}\""" + $"{System.Random().Next(System.Int32.MaxValue)}.log" - -let ``a byte literal`` = '\209'B - -// quoted expression -let expr = - <@@ - let foo () = "bar" - foo () - @@> - -let bigNum (unused: 'a): float option = - Seq.init 10_000 (float >> (fun i -> i + 11.)) - |> (List.ofSeq - >> List.take 5 - >> List.fold (*) 1.0) - |> Some - -match bigNum () with -| Some num -> sprintf "%.2f > %u" num ``a byte literal`` -| None -> sprintf "%A" "Have a byte string!"B -|> printfn "%s" - -// GitHub Issue #38 -let unescapeWinPath (path: string) = - path.Replace("\\\\", "\\").Replace("\"", "") - -unescapeWinPath "\\\"Program Files (x86)\\Windows NT\\Accessories\\\"" -|> System.IO.Directory.GetFiles -|> printfn "%A" diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.folded deleted file mode 100644 index 65b9d1489..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.folded +++ /dev/null @@ -1,54 +0,0 @@ - 2 400 401 + // x.fs - 0 401 400 | // Sample source file to test F# syntax highlighting - 1 400 400 - 0 400 400 [] - 0 400 400 module Example - 1 400 400 - 0 400 400 #line 7 "A compiler directive" - 2 400 401 + #if DEBUG - 2 401 402 + open System - 0 402 402 | open System.IO - 0 402 401 | open System.Diagnostics - 0 401 400 | #endif - 1 400 400 - 0 400 400 # 14 @"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks" - 0 400 400 // verbatim string - 0 400 400 let xmlFragment1 = @"" - 1 400 400 - 0 400 400 // triple-quoted string - 0 400 400 let xmlFragment2 = """""" - 1 400 400 - 2 400 401 + (* you need .NET 5.0 to compile this: - 0 401 401 | https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation - 0 401 400 | *) - 0 400 400 let interpolated = $"""C:\{System.DateTime.Now.ToString("yyyy-MM-dd")}\""" + $"{System.Random().Next(System.Int32.MaxValue)}.log" - 1 400 400 - 0 400 400 let ``a byte literal`` = '\209'B - 1 400 400 - 0 400 400 // quoted expression - 0 400 400 let expr = - 0 400 400 <@@ - 0 400 400 let foo () = "bar" - 0 400 400 foo () - 0 400 400 @@> - 1 400 400 - 0 400 400 let bigNum (unused: 'a): float option = - 0 400 400 Seq.init 10_000 (float >> (fun i -> i + 11.)) - 0 400 400 |> (List.ofSeq - 0 400 400 >> List.take 5 - 0 400 400 >> List.fold (*) 1.0) - 0 400 400 |> Some - 1 400 400 - 0 400 400 match bigNum () with - 0 400 400 | Some num -> sprintf "%.2f > %u" num ``a byte literal`` - 0 400 400 | None -> sprintf "%A" "Have a byte string!"B - 0 400 400 |> printfn "%s" - 1 400 400 - 0 400 400 // GitHub Issue #38 - 0 400 400 let unescapeWinPath (path: string) = - 0 400 400 path.Replace("\\\\", "\\").Replace("\"", "") - 1 400 400 - 0 400 400 unescapeWinPath "\\\"Program Files (x86)\\Windows NT\\Accessories\\\"" - 0 400 400 |> System.IO.Directory.GetFiles - 0 400 400 |> printfn "%A" - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.styled deleted file mode 100644 index 8dbbddd26..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/fsharp/x.fs.styled +++ /dev/null @@ -1,53 +0,0 @@ -{9}// x.fs{0} -{9}// Sample source file to test F# syntax highlighting{0} - -{18}[]{0} -{1}module{0} {6}Example{0} - -{11}#line 7 "A compiler directive"{0} -{10}#if DEBUG{0} - {1}open{0} {3}System{0} - {1}open{0} {3}System{0}.{3}IO{0} - {1}open{0} {3}System{0}.{6}Diagnostics{0} -{10}#endif{0} - -{11}# 14 @"See: https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/strings#remarks"{0} -{9}// verbatim string{0} -{1}let{0} {6}xmlFragment1{0} {12}={0} {16}@""{0} - -{9}// triple-quoted string{0} -{1}let{0} {6}xmlFragment2{0} {12}={0} {15}""""""{0} - -{8}(* you need .NET 5.0 to compile this: - https://docs.microsoft.com/en-us/dotnet/fsharp/whats-new/fsharp-50#string-interpolation -*){0} -{1}let{0} {6}interpolated{0} {12}={0} {15}$"""C:\{System.DateTime.Now.ToString("yyyy-MM-dd")}\"""{0} {12}+{0} {15}$"{System.Random().Next(System.Int32.MaxValue)}.log"{0} - -{1}let{0} {7}``a byte literal``{0} {12}={0} {14}'\209'B{0} - -{9}// quoted expression{0} -{1}let{0} {6}expr{0} {12}={0} - {17}<@@ - let foo () = "bar" - foo () - @@>{0} - -{1}let{0} {6}bigNum{0} {12}({6}unused{12}:{0} {12}'{6}a{12}):{0} {3}float{0} {3}option{0} {12}={0} - {3}Seq{0}.{2}init{0} {13}10_000{0} {12}({3}float{0} {12}>>{0} {12}({1}fun{0} {6}i{0} {12}->{0} {6}i{0} {12}+{0} {13}11.{12})){0} - {12}|>{0} {12}({3}List{0}.{2}ofSeq{0} - {12}>>{0} {3}List{0}.{2}take{0} {13}5{0} - {12}>>{0} {3}List{0}.{2}fold{0} {12}(*){0} {13}1.0{12}){0} - {12}|>{0} {3}Some{0} - -{1}match{0} {6}bigNum{0} {1}(){0} {1}with{0} -{12}|{0} {3}Some{0} {6}num{0} {12}->{0} {2}sprintf{0} {15}"{19}%.2f{15} > {19}%u{15}"{0} {6}num{0} {7}``a byte literal``{0} -{12}|{0} {3}None{0} {12}->{0} {2}sprintf{0} {15}"{19}%A{15}"{0} {15}"Have a byte string!"B{0} -{12}|>{0} {2}printfn{0} {15}"{19}%s{15}"{0} - -{9}// GitHub Issue #38{0} -{1}let{0} {6}unescapeWinPath{0} {12}({6}path{12}:{0} {3}string{12}){0} {12}={0} - {6}path{0}.{6}Replace{12}({15}"\\\\"{12},{0} {15}"\\"{12}){0}.{6}Replace{12}({15}"\""{12},{0} {15}""{12}){0} - -{6}unescapeWinPath{0} {15}"\\\"Program Files (x86)\\Windows NT\\Accessories\\\""{0} -{12}|>{0} {3}System{0}.{3}IO{0}.{6}Directory{0}.{6}GetFiles{0} -{12}|>{0} {2}printfn{0} {15}"{19}%A{15}"{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd b/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd deleted file mode 100644 index 0a484a926..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd +++ /dev/null @@ -1,51 +0,0 @@ -# Enumerate all styles: 0 to 15 -# comment=1 - -# whitespace=0 - # w - -# number=2 -37 - -# double-quoted-string=3 -"str" - -# single-quoted-string=4 -'str' - -# keyword=5 -pass - -# triple-quoted-string=6 -'''str''' - -# triple-double-quoted-string=7 -"""str""" - -# class-name=8 -class ClassName: - pass - -# function-name=9 -func function_name(): - pass - -# operator=10 -1 + 3 - -# identifier=11 -var identifier = 2 - -# comment-block=12 -## block - -# unclosed-string=13 -" unclosed - -# highlighted-identifier=14 -var hilight = 2 - -# annotation=15 -@onready -var a = 3 -@onready var b = 3 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.folded deleted file mode 100644 index 0b818f3eb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.folded +++ /dev/null @@ -1,52 +0,0 @@ - 0 400 0 # Enumerate all styles: 0 to 15 - 0 400 0 # comment=1 - 1 400 0 - 0 400 0 # whitespace=0 - 0 400 0 # w - 1 400 0 - 0 400 0 # number=2 - 0 400 0 37 - 1 400 0 - 0 400 0 # double-quoted-string=3 - 0 400 0 "str" - 1 400 0 - 0 400 0 # single-quoted-string=4 - 0 400 0 'str' - 1 400 0 - 0 400 0 # keyword=5 - 0 400 0 pass - 1 400 0 - 0 400 0 # triple-quoted-string=6 - 0 400 0 '''str''' - 1 400 0 - 0 400 0 # triple-double-quoted-string=7 - 0 400 0 """str""" - 1 400 0 - 0 400 0 # class-name=8 - 2 400 0 + class ClassName: - 0 408 0 | pass - 1 400 0 - 0 400 0 # function-name=9 - 2 400 0 + func function_name(): - 0 408 0 | pass - 1 400 0 - 0 400 0 # operator=10 - 0 400 0 1 + 3 - 1 400 0 - 0 400 0 # identifier=11 - 0 400 0 var identifier = 2 - 1 400 0 - 0 400 0 # comment-block=12 - 0 400 0 ## block - 1 400 0 - 0 400 0 # unclosed-string=13 - 0 400 0 " unclosed - 1 400 0 - 0 400 0 # highlighted-identifier=14 - 0 400 0 var hilight = 2 - 1 400 0 - 0 400 0 # annotation=15 - 0 400 0 @onready - 0 400 0 var a = 3 - 0 400 0 @onready var b = 3 - 1 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.styled deleted file mode 100644 index 42f3a48cd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/AllStyles.gd.styled +++ /dev/null @@ -1,51 +0,0 @@ -{1}# Enumerate all styles: 0 to 15{0} -{1}# comment=1{0} - -{1}# whitespace=0{0} - {1}# w{0} - -{1}# number=2{0} -{2}37{0} - -{1}# double-quoted-string=3{0} -{3}"str"{0} - -{1}# single-quoted-string=4{0} -{4}'str'{0} - -{1}# keyword=5{0} -{5}pass{0} - -{1}# triple-quoted-string=6{0} -{6}'''str'''{0} - -{1}# triple-double-quoted-string=7{0} -{7}"""str"""{0} - -{1}# class-name=8{0} -{5}class{0} {8}ClassName{10}:{0} - {5}pass{0} - -{1}# function-name=9{0} -{5}func{0} {9}function_name{10}():{0} - {5}pass{0} - -{1}# operator=10{0} -{2}1{0} {10}+{0} {2}3{0} - -{1}# identifier=11{0} -{5}var{0} {11}identifier{0} {10}={0} {2}2{0} - -{1}# comment-block=12{0} -{12}## block{0} - -{1}# unclosed-string=13{0} -{13}" unclosed -{0} -{1}# highlighted-identifier=14{0} -{5}var{0} {14}hilight{0} {10}={0} {2}2{0} - -{1}# annotation=15{0} -{15}@onready{0} -{5}var{0} {11}a{0} {10}={0} {2}3{0} -{15}@onready{0} {5}var{0} {11}b{0} {10}={0} {2}3{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/SciTE.properties deleted file mode 100644 index 21a1ec492..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/gdscript/SciTE.properties +++ /dev/null @@ -1,5 +0,0 @@ -lexer.*.gd=gdscript -keywords.*.gd=class func else for if extends in pass print return while var -keywords2.*.gd=hilight -fold=1 -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html deleted file mode 100644 index b02ec072d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.folded deleted file mode 100644 index e245c0604..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.folded +++ /dev/null @@ -1,8 +0,0 @@ - 0 400 0 - 2 400 0 + - 2 401 0 + - 0 401 0 | - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.styled deleted file mode 100644 index f09ca6485..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Bug2207.html.styled +++ /dev/null @@ -1,7 +0,0 @@ -{21}{0} -{1}{0} -{1}{0} -{1}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php deleted file mode 100644 index 7b2f60b93..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.folded deleted file mode 100644 index 501f6cc35..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.folded +++ /dev/null @@ -1,31 +0,0 @@ - 2 400 0 + - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.styled deleted file mode 100644 index 5480268a2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue19.php.styled +++ /dev/null @@ -1,30 +0,0 @@ -{18}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php deleted file mode 100644 index e78aec4fe..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.folded deleted file mode 100644 index 23f69a433..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.folded +++ /dev/null @@ -1,31 +0,0 @@ - 2 400 0 + - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.styled deleted file mode 100644 index b8c4f2e2e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/Issue20Numbers.php.styled +++ /dev/null @@ -1,30 +0,0 @@ -{18}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/SciTE.properties deleted file mode 100644 index 8b2e4efa1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/SciTE.properties +++ /dev/null @@ -1,10 +0,0 @@ -lexer.*=hypertext -keywords.*=b body content head href html link meta \ -name rel script strong title type xmlns -keywords2.*=function var -keywords3.*=sub -keywords5.*=echo __file__ __line__ -fold=1 -fold.html=1 -fold.html.preprocessor=1 -fold.hypertext.comment=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php deleted file mode 100644 index ade729bfa..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php +++ /dev/null @@ -1,11 +0,0 @@ - - -
diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.folded deleted file mode 100644 index 474b1627c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.folded +++ /dev/null @@ -1,12 +0,0 @@ - 2 400 0 + - 1 400 0 - 0 400 0
- 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.styled deleted file mode 100644 index 45404e362..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/apostophe.php.styled +++ /dev/null @@ -1,11 +0,0 @@ -{18}{0} - -{2}
{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp deleted file mode 100644 index a78acdc34..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp +++ /dev/null @@ -1,12 +0,0 @@ -<%@language=javas%> -<% -#include -function x() { -} -%> -<%@language=vbscript%> -<% -sub x 'comment -%> - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.folded deleted file mode 100644 index 06cf4525f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.folded +++ /dev/null @@ -1,13 +0,0 @@ - 0 400 0 <%@language=javas%> - 2 400 0 + <% - 0 401 0 | #include - 2 401 0 + function x() { - 0 402 0 | } - 0 401 0 | %> - 0 400 0 <%@language=vbscript%> - 2 400 0 + <% - 0 401 0 | sub x 'comment - 0 401 0 | %> - 2 400 0 + - 0 401 0 | - 0 401 0 | \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.styled deleted file mode 100644 index 920c6380d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.asp.styled +++ /dev/null @@ -1,12 +0,0 @@ -{15}<%@{16}language=javas{15}%>{0} -{15}<%{56} -#{61}include{56} -{62}function{56} {61}x{65}(){56} {65}{{56} -{65}}{56} -{15}%>{0} -{15}<%@{16}language=vbscript{15}%>{0} -{15}<%{81} -{84}sub{81} {86}x{81} {82}'comment {81} -{15}%>{0} -{1}{0} -{1}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html deleted file mode 100644 index caebcf41a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SinkWorld - Portability - SinkWorld - Portability - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.folded deleted file mode 100644 index 0bf350cee..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.folded +++ /dev/null @@ -1,13 +0,0 @@ - 2 400 0 + - 2 401 0 + - 2 401 0 + - 0 402 0 | - 0 402 0 | SinkWorld - Portability - 0 402 0 | SinkWorld - Portability - 0 402 0 | - 0 402 0 | - 0 401 0 | \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.styled deleted file mode 100644 index 41b3d831a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.html.styled +++ /dev/null @@ -1,12 +0,0 @@ -{1}{0} -{1}{40} -{47}var{41} {46}b{41} {50}={41} {52}/abc/i{46}.test{50}({49}'abc'{50});{41} -{49}'x\ -'{41} -{1}{0} -{1}{0} - {1}{0} - {1}{0}SinkWorld - Portability{1}{0} - {2}{0}SinkWorld - Portability{2}{0} - {1}{0} -{1}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php deleted file mode 100644 index f180371bd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php +++ /dev/null @@ -1,17 +0,0 @@ - -\n"; -/* ?> */ -?> -forif - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.folded deleted file mode 100644 index 471ebe20a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.folded +++ /dev/null @@ -1,18 +0,0 @@ - 2 400 0 + - 2 401 0 + \n"; - 0 402 0 | /* ?> */ - 0 402 0 | ?> - 0 401 0 | forif - 2 401 0 + - 0 401 0 | \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.styled deleted file mode 100644 index 45e984bc2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/hypertext/x.php.styled +++ /dev/null @@ -1,17 +0,0 @@ -{1}{0} {9}{0} -{18}\n"{127};{118} -{124}/* ?> */{118} -{18}?>{0} -{1}{0}for{1}{0}if{1}{0} -{1}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/SciTE.properties deleted file mode 100644 index 3c95b5851..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/SciTE.properties +++ /dev/null @@ -1,11 +0,0 @@ -lexer.*.iss=inno -fold=1 -keywords.*.iss=code custommessages files ini messages registry setup -keywords2.*.iss=appname appcopyright onlybelowversion wizardsmallimagefile -keywords3.*.iss=destdir key onlybelowversion root source string valuetype -keywords4.*.iss=define -keywords5.*.iss=\ -and begin break case const continue do downto else end except exit \ -false finally for function if not of on or procedure repeat then to \ -true try type until uses var while with -keywords6.*.iss= diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss b/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss deleted file mode 100644 index 4abe737a1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss +++ /dev/null @@ -1,42 +0,0 @@ -#define app_copyright "Copyright 1999, app corporation" - -; comment -; comment - -[Setup] -AppName=MyApp -AppCopyright={#app_copyright} -WizardSmallImageFile=WizardSmallImageFile.bmp -OnlyBelowVersion=6.01 - -[Files] -Source: "app.exe"; DestDir: "{tmp}"; OnlyBelowVersion: 6.01 -Source: 'helper.exe'; DestDir: '{tmp}' - -[INI] -Key: "version"; String: "1.0"; "unterminated -Key: "version"; String: "1.0"; 'unterminated - -[Registry] -Root: HKLM; ValueType: string - -[CustomMessages] -keyname =Other tasks:'not string - -[Messages] -keyname="{#app_copyright}"not string - -[Code] - -// comment -// comment - -(* comment *) -(* comment *) - -function ShouldInstallComCtlUpdate: Boolean; -begin - Result := False; - Log('string'); - IsEscaped('''good''', ''bad'); -end; diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.folded deleted file mode 100644 index 4ba67ef81..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.folded +++ /dev/null @@ -1,43 +0,0 @@ - 0 400 0 #define app_copyright "Copyright 1999, app corporation" - 0 400 0 - 0 400 0 ; comment - 0 400 0 ; comment - 0 400 0 - 2 400 0 + [Setup] - 0 401 0 | AppName=MyApp - 0 401 0 | AppCopyright={#app_copyright} - 0 401 0 | WizardSmallImageFile=WizardSmallImageFile.bmp - 0 401 0 | OnlyBelowVersion=6.01 - 0 401 0 | - 2 400 0 + [Files] - 0 401 0 | Source: "app.exe"; DestDir: "{tmp}"; OnlyBelowVersion: 6.01 - 0 401 0 | Source: 'helper.exe'; DestDir: '{tmp}' - 0 401 0 | - 2 400 0 + [INI] - 0 401 0 | Key: "version"; String: "1.0"; "unterminated - 0 401 0 | Key: "version"; String: "1.0"; 'unterminated - 0 401 0 | - 2 400 0 + [Registry] - 0 401 0 | Root: HKLM; ValueType: string - 0 401 0 | - 2 400 0 + [CustomMessages] - 0 401 0 | keyname =Other tasks:'not string - 0 401 0 | - 2 400 0 + [Messages] - 0 401 0 | keyname="{#app_copyright}"not string - 0 401 0 | - 2 400 0 + [Code] - 0 401 0 | - 0 401 0 | // comment - 0 401 0 | // comment - 0 401 0 | - 0 401 0 | (* comment *) - 0 401 0 | (* comment *) - 0 401 0 | - 0 401 0 | function ShouldInstallComCtlUpdate: Boolean; - 0 401 0 | begin - 0 401 0 | Result := False; - 0 401 0 | Log('string'); - 0 401 0 | IsEscaped('''good''', ''bad'); - 0 401 0 | end; - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.styled deleted file mode 100644 index c3fcc05b1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/inno/x.iss.styled +++ /dev/null @@ -1,42 +0,0 @@ -{5}#define{0} app_copyright {10}"Copyright 1999, app corporation"{0} - -{1}; comment{0} -{1}; comment{0} - -{4}[Setup]{0} -{2}AppName{0}=MyApp -{2}AppCopyright{0}={6}{#app_copyright}{0} -{2}WizardSmallImageFile{0}=WizardSmallImageFile.bmp -{2}OnlyBelowVersion{0}=6.01 - -{4}[Files]{0} -{3}Source{0}: {10}"app.exe"{0}; {3}DestDir{0}: {10}"{tmp}"{0}; {3}OnlyBelowVersion{0}: 6.01 -{3}Source{0}: {11}'helper.exe'{0}; {3}DestDir{0}: {11}'{tmp}'{0} - -{4}[INI]{0} -{3}Key{0}: {10}"version"{0}; {3}String{0}: {10}"1.0"{0}; {10}"unterminated{0} -{3}Key{0}: {10}"version"{0}; {3}String{0}: {10}"1.0"{0}; {11}'unterminated{0} - -{4}[Registry]{0} -{3}Root{0}: HKLM; {3}ValueType{0}: string - -{4}[CustomMessages]{0} -keyname =Other tasks:'not string - -{4}[Messages]{0} -keyname="{6}{#app_copyright}{0}"not string - -{4}[Code]{0} - -{7}// comment{0} -{7}// comment{0} - -{7}(* comment *){0} -{7}(* comment *){0} - -{8}function{0} ShouldInstallComCtlUpdate: Boolean; -{8}begin{0} - Result := {8}False{0}; - Log({11}'string'{0}); - IsEscaped({11}'''good'''{0}, {11}''{0}bad{11}');{0} -{8}end{0}; diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/SciTE.properties deleted file mode 100644 index 06d95c39c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/SciTE.properties +++ /dev/null @@ -1,4 +0,0 @@ -lexer.*.jl=julia -keywords.*.jl=const end for function in where -keywords2.*.jl=Int Number -keywords3.*.jl=true diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl deleted file mode 100644 index 3462807ff..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl +++ /dev/null @@ -1,19 +0,0 @@ - -# Comment here -const bar = '\n' - -""" - test_fun(a::Int) -For test only -""" -function test_fun(a::Int, b::T) where T <: Number - println(a) - println("foo $(bar)") -end - -@enum Unicode α=1 β=2 - -res = [√i for i in 1:10] - -#= Dummy function =# -test_fun²(:sym, true, raw"test", `echo 1`) diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.folded deleted file mode 100644 index 2e0ebdfa9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.folded +++ /dev/null @@ -1,20 +0,0 @@ - 0 400 400 - 0 400 400 # Comment here - 0 400 400 const bar = '\n' - 0 400 400 - 2 400 401 + """ - 0 401 401 | test_fun(a::Int) - 0 401 401 | For test only - 0 401 400 | """ - 2 400 401 + function test_fun(a::Int, b::T) where T <: Number - 0 401 401 | println(a) - 0 401 401 | println("foo $(bar)") - 0 401 400 | end - 0 400 400 - 0 400 400 @enum Unicode α=1 β=2 - 0 400 400 - 0 400 400 res = [√i for i in 1:10] - 0 400 400 - 0 400 400 #= Dummy function =# - 0 400 400 test_fun²(:sym, true, raw"test", `echo 1`) - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.styled deleted file mode 100644 index 79b966ebb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/julia/x.jl.styled +++ /dev/null @@ -1,19 +0,0 @@ -{0} -{1}# Comment here{0} -{3}const{0} {9}bar{0} {7}={0} {6}'\n'{0} - -{14}""" - test_fun(a::Int) -For test only -"""{0} -{3}function{0} {9}test_fun{8}({9}a{21}::{4}Int{7},{0} {9}b{21}::{9}T{8}){0} {3}where{0} {9}T{0} {21}<:{0} {4}Number{0} - {9}println{8}({9}a{8}){0} - {9}println{8}({10}"foo {13}$(bar){10}"{8}){0} -{3}end{0} - -{12}@enum{0} {9}Unicode{0} {9}α{7}={2}1{0} {9}β{7}={2}2{0} - -{9}res{0} {7}={0} {8}[{7}√{9}i{0} {3}for{0} {9}i{0} {3}in{0} {2}1{7}:{2}10{8}]{0} - -{1}#= Dummy function =#{0} -{9}test_fun²{8}({11}:sym{7},{0} {5}true{7},{0} {15}raw{10}"test"{7},{0} {16}`echo 1`{8}){0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex deleted file mode 100644 index 066a308e5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex +++ /dev/null @@ -1,47 +0,0 @@ -% Enumerate all styles: 0 to 12 -% Not a valid laTeX file as entities are unbalanced and not semantically correct -% comment=4 - -% whitespace=0 -text % - -% command=1 -\documentclass - -% tag=2 -\begin{document} - -% tag closing=5 -\end{document} - -% math=3 -\begin{math} -E &= mc^2 -\end{math} - -% math block=6 -\begin{align} -E &= mc^2 -\end{align} - -% comment block=7 -\begin{comment} -A block comment -\end{comment} - -% verbatim=8 -\begin{verbatim} -puts $foo -\end{verbatim} - -% short command=9 -\(\) - -% special=10 -\# - -% command optional argument=11 -\x[12pt] - -% error=12 -\ diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.folded deleted file mode 100644 index d682a24cd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.folded +++ /dev/null @@ -1,48 +0,0 @@ - 0 400 0 % Enumerate all styles: 0 to 12 - 0 400 0 % Not a valid laTeX file as entities are unbalanced and not semantically correct - 0 400 0 % comment=4 - 0 400 0 - 0 400 0 % whitespace=0 - 0 400 0 text % - 0 400 0 - 0 400 0 % command=1 - 0 400 0 \documentclass - 0 400 0 - 0 400 0 % tag=2 - 2 400 0 + \begin{document} - 0 401 0 | - 0 401 0 | % tag closing=5 - 0 401 0 | \end{document} - 0 400 0 - 0 400 0 % math=3 - 2 400 0 + \begin{math} - 0 401 0 | E &= mc^2 - 0 401 0 | \end{math} - 0 400 0 - 0 400 0 % math block=6 - 2 400 0 + \begin{align} - 0 401 0 | E &= mc^2 - 0 401 0 | \end{align} - 0 400 0 - 0 400 0 % comment block=7 - 2 400 0 + \begin{comment} - 0 401 0 | A block comment - 0 401 0 | \end{comment} - 0 400 0 - 0 400 0 % verbatim=8 - 2 400 0 + \begin{verbatim} - 0 401 0 | puts $foo - 0 401 0 | \end{verbatim} - 0 400 0 - 0 400 0 % short command=9 - 0 400 0 \(\) - 0 400 0 - 0 400 0 % special=10 - 0 400 0 \# - 0 400 0 - 0 400 0 % command optional argument=11 - 0 400 0 \x[12pt] - 0 400 0 - 0 400 0 % error=12 - 0 400 0 \ - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.styled deleted file mode 100644 index bed7ff5df..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/AllStyles.tex.styled +++ /dev/null @@ -1,47 +0,0 @@ -{4}% Enumerate all styles: 0 to 12{0} -{4}% Not a valid laTeX file as entities are unbalanced and not semantically correct{0} -{4}% comment=4{0} - -{4}% whitespace=0{0} -text {4}%{0} - -{4}% command=1{0} -{1}\documentclass{0} - -{4}% tag=2{0} -{1}\begin{2}{document}{0} - -{4}% tag closing=5{0} -{1}\end{5}{document}{0} - -{4}% math=3{0} -{1}\begin{2}{math}{3} -E &= mc^2 -{1}\end{5}{math}{0} - -{4}% math block=6{0} -{1}\begin{2}{align}{6} -E &= mc^2 -{1}\end{5}{align}{0} - -{4}% comment block=7{0} -{1}\begin{2}{comment}{7} -A block comment -{1}\end{5}{comment}{0} - -{4}% verbatim=8{0} -{1}\begin{2}{verbatim}{8} -puts $foo -{1}\end{5}{verbatim}{0} - -{4}% short command=9{0} -{9}\(\){0} - -{4}% special=10{0} -{10}\#{0} - -{4}% command optional argument=11{0} -{1}\x{11}[12pt]{0} - -{4}% error=12{0} -{12}\{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex deleted file mode 100644 index 73f27b83c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex +++ /dev/null @@ -1,10 +0,0 @@ -\begin{lstlisting}[language=make] -# If no BOARD is found in the environment, use this default: -BOARD ?= bluepill - -# To use chinese st-link v2 and ch340 dongle with bluepill -ifeq ($(BOARD),bluepill) -STLINK_VERSION=2 -PORT_LINUX=/dev/ttyUSB0 -endif -\end{lstlisting} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.folded deleted file mode 100644 index 474240176..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.folded +++ /dev/null @@ -1,11 +0,0 @@ - 2 400 0 + \begin{lstlisting}[language=make] - 0 401 0 | # If no BOARD is found in the environment, use this default: - 0 401 0 | BOARD ?= bluepill - 0 401 0 | - 0 401 0 | # To use chinese st-link v2 and ch340 dongle with bluepill - 0 401 0 | ifeq ($(BOARD),bluepill) - 0 401 0 | STLINK_VERSION=2 - 0 401 0 | PORT_LINUX=/dev/ttyUSB0 - 0 401 0 | endif - 0 401 0 | \end{lstlisting} - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.styled deleted file mode 100644 index e753ea14d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/Feature1358.tex.styled +++ /dev/null @@ -1,10 +0,0 @@ -{1}\begin{2}{lstlisting}{8}[language=make] -# If no BOARD is found in the environment, use this default: -BOARD ?= bluepill - -# To use chinese st-link v2 and ch340 dongle with bluepill -ifeq ($(BOARD),bluepill) -STLINK_VERSION=2 -PORT_LINUX=/dev/ttyUSB0 -endif -{1}\end{5}{lstlisting}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/SciTE.properties deleted file mode 100644 index 0b81c1199..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/latex/SciTE.properties +++ /dev/null @@ -1 +0,0 @@ -lexer.*.tex=latex diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua deleted file mode 100644 index 062957d71..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua +++ /dev/null @@ -1,5 +0,0 @@ -print("First") ---[[ Block comment start -print("Second") ---[[ Another block comment ]] -print("Third. If run through an actual program, this will be executed.") diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.folded deleted file mode 100644 index 746ab58db..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.folded +++ /dev/null @@ -1,6 +0,0 @@ - 0 400 0 print("First") - 2 400 0 + --[[ Block comment start - 0 401 0 | print("Second") - 0 401 0 | --[[ Another block comment ]] - 0 400 0 print("Third. If run through an actual program, this will be executed.") - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.styled deleted file mode 100644 index 59a8de41f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/Bug2205.lua.styled +++ /dev/null @@ -1,5 +0,0 @@ -{13}print{10}({6}"First"{10}){0} -{1}--[[ Block comment start -print("Second") ---[[ Another block comment ]]{0} -{13}print{10}({6}"Third. If run through an actual program, this will be executed."{10}){0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/SciTE.properties deleted file mode 100644 index 7baf8cb19..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/SciTE.properties +++ /dev/null @@ -1,4 +0,0 @@ -lexer.*.lua=lua -keywords.*.lua=function end -keywords2.*.lua=print -fold=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua deleted file mode 100644 index cfa3537b5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua +++ /dev/null @@ -1,7 +0,0 @@ ---[[ coding:UTF-8 -comment ]] -function first() -::開:: - -- Comment - func(SCI_ANNOTATIONSETTEXT, 'a', 0, "LINE1") -end diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.folded deleted file mode 100644 index 0e5379a71..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.folded +++ /dev/null @@ -1,8 +0,0 @@ - 2 400 0 + --[[ coding:UTF-8 - 0 401 0 | comment ]] - 2 400 0 + function first() - 0 401 0 | ::開:: - 0 401 0 | -- Comment - 0 401 0 | func(SCI_ANNOTATIONSETTEXT, 'a', 0, "LINE1") - 0 401 0 | end - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.styled deleted file mode 100644 index 0c8f76fa4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/lua/x.lua.styled +++ /dev/null @@ -1,7 +0,0 @@ -{1}--[[ coding:UTF-8 -comment ]]{0} -{5}function{0} {11}first{10}(){0} -{20}::開::{0} - {2}-- Comment -{0} {11}func{10}({11}SCI_ANNOTATIONSETTEXT{10},{0} {7}'a'{10},{0} {4}0{10},{0} {6}"LINE1"{10}){0} -{5}end{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/SciTE.properties deleted file mode 100644 index ddc87920e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/SciTE.properties +++ /dev/null @@ -1 +0,0 @@ -lexer.*.mak=makefile diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak b/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak deleted file mode 100644 index d5bdb83e9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak +++ /dev/null @@ -1,16 +0,0 @@ -# '# comment' comment=1 -# comment - -# '.SUFFIXES' target=5, ':' operator=4 -.SUFFIXES: - -# 'LD' identifier=3, '=' operator=4, 'link' default=0 -LD=link - -# '!IFDEF DEBUG' preprocessor=2 -!IFDEF DEBUG - -# '$(' ID EOL=9 -X=$( - -# End of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.folded deleted file mode 100644 index 71cca1aef..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.folded +++ /dev/null @@ -1,17 +0,0 @@ - 0 400 0 # '# comment' comment=1 - 0 400 0 # comment - 0 400 0 - 0 400 0 # '.SUFFIXES' target=5, ':' operator=4 - 0 400 0 .SUFFIXES: - 0 400 0 - 0 400 0 # 'LD' identifier=3, '=' operator=4, 'link' default=0 - 0 400 0 LD=link - 0 400 0 - 0 400 0 # '!IFDEF DEBUG' preprocessor=2 - 0 400 0 !IFDEF DEBUG - 0 400 0 - 0 400 0 # '$(' ID EOL=9 - 0 400 0 X=$( - 0 400 0 - 0 400 0 # End of file - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.styled deleted file mode 100644 index 752ed5884..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/makefile/x.mak.styled +++ /dev/null @@ -1,16 +0,0 @@ -{1}# '# comment' comment=1 -# comment -{0} -{1}# '.SUFFIXES' target=5, ':' operator=4 -{5}.SUFFIXES{4}:{0} - -{1}# 'LD' identifier=3, '=' operator=4, 'link' default=0 -{3}LD{4}={0}link - -{1}# '!IFDEF DEBUG' preprocessor=2 -{2}!IFDEF DEBUG -{0} -{1}# '$(' ID EOL=9 -{3}X{4}={9}$( -{0} -{1}# End of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md deleted file mode 100644 index caf2be68d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md +++ /dev/null @@ -1,30 +0,0 @@ -Text=0 -Line end characters=1 -**Strong Emphasis (bold) 1=2** -__Strong Emphasis (bold) 2=3__ -*Emphasis (italic) 1=4* -_Emphasis (italic) 2=5_ -# Heading level 1=6 -## Heading level 2=7 -### Heading level 3=8 -#### Heading level 4=9 -##### Heading level 5=10 -###### Heading level 6=11 - PreChar=12 -* Unordered list item=13 -1. Ordered list item=14 ->Block Quote=15 -~~Strike-out=16~~ - -*** -Previous line was horizontal rule=17 -[Link=18](https://18.com) -`Inline Code=19` -``Inline Code=20`` - -~~~ -Block code=21 -~~~ - -## Issue 23 -` \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.folded deleted file mode 100644 index 4d16a6d10..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.folded +++ /dev/null @@ -1,30 +0,0 @@ - 0 400 0 Text=0 - 0 400 0 Line end characters=1 - 0 400 0 **Strong Emphasis (bold) 1=2** - 0 400 0 __Strong Emphasis (bold) 2=3__ - 0 400 0 *Emphasis (italic) 1=4* - 0 400 0 _Emphasis (italic) 2=5_ - 0 400 0 # Heading level 1=6 - 0 400 0 ## Heading level 2=7 - 0 400 0 ### Heading level 3=8 - 0 400 0 #### Heading level 4=9 - 0 400 0 ##### Heading level 5=10 - 0 400 0 ###### Heading level 6=11 - 0 400 0 PreChar=12 - 0 400 0 * Unordered list item=13 - 0 400 0 1. Ordered list item=14 - 0 400 0 >Block Quote=15 - 0 400 0 ~~Strike-out=16~~ - 0 400 0 - 0 400 0 *** - 0 400 0 Previous line was horizontal rule=17 - 0 400 0 [Link=18](https://18.com) - 0 400 0 `Inline Code=19` - 0 400 0 ``Inline Code=20`` - 0 400 0 - 0 400 0 ~~~ - 0 400 0 Block code=21 - 0 400 0 ~~~ - 0 400 0 - 0 400 0 ## Issue 23 - 0 400 0 ` \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.styled deleted file mode 100644 index ce39ec0ad..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/AllStyles.md.styled +++ /dev/null @@ -1,30 +0,0 @@ -{0}Text=0{1} -{0}Line end characters=1{1} -{2}**Strong Emphasis (bold) 1=2**{1} -{3}__Strong Emphasis (bold) 2=3__{1} -{4}*Emphasis (italic) 1=4*{1} -{5}_Emphasis (italic) 2=5_{1} -{6}#{0} Heading level 1=6{1} -{7}##{0} Heading level 2=7{1} -{8}###{0} Heading level 3=8{1} -{9}####{0} Heading level 4=9{1} -{10}#####{0} Heading level 5=10{1} -{11}######{0} Heading level 6=11{1} -{12} {0}PreChar=12{1} -{13}*{0} Unordered list item=13{1} -{14}1.{0} Ordered list item=14{1} -{15}>{0}Block Quote=15{1} -{16}~~Strike-out=16~~{1} - -{17}***{1} -{0}Previous line was horizontal rule=17{1} -{18}[Link=18](https://18.com){1} -{19}`Inline Code=19`{1} -{20}``Inline Code=20``{1} - -{21}~~~ -Block code=21 -~~~{1} - -{7}##{0} Issue 23{1} -{0}` \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md deleted file mode 100644 index 9cd16f392..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md +++ /dev/null @@ -1,27 +0,0 @@ -# Checking resolution of bug 1216 - -*This line is not emphasized - -This is plain text with *inline emphasis* - -_This, too, is not emphasized - -And this is plain text with _inline emphasis_ - -**This line is not in bold - -But this is plain text with some words **in bold** - -__This line is also not in bold - -And this is plain text with __some words in bold__ - -~~This line is not crossed out - -This is plain text with ~~some words crossed out~~ - -~~~ -this is a code block -~~~ - -This is a new paragraph diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.folded deleted file mode 100644 index c927a2cfc..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.folded +++ /dev/null @@ -1,28 +0,0 @@ - 0 400 0 # Checking resolution of bug 1216 - 0 400 0 - 0 400 0 *This line is not emphasized - 0 400 0 - 0 400 0 This is plain text with *inline emphasis* - 0 400 0 - 0 400 0 _This, too, is not emphasized - 0 400 0 - 0 400 0 And this is plain text with _inline emphasis_ - 0 400 0 - 0 400 0 **This line is not in bold - 0 400 0 - 0 400 0 But this is plain text with some words **in bold** - 0 400 0 - 0 400 0 __This line is also not in bold - 0 400 0 - 0 400 0 And this is plain text with __some words in bold__ - 0 400 0 - 0 400 0 ~~This line is not crossed out - 0 400 0 - 0 400 0 This is plain text with ~~some words crossed out~~ - 0 400 0 - 0 400 0 ~~~ - 0 400 0 this is a code block - 0 400 0 ~~~ - 0 400 0 - 0 400 0 This is a new paragraph - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.styled deleted file mode 100644 index 7f5f13a15..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug1216.md.styled +++ /dev/null @@ -1,27 +0,0 @@ -{6}#{0} Checking resolution of bug 1216{1} - -{0}*This line is not emphasized{1} - -{0}This is plain text with {4}*inline emphasis*{1} - -{0}_This, too, is not emphasized{1} - -{0}And this is plain text with {5}_inline emphasis_{1} - -{0}**This line is not in bold{1} - -{0}But this is plain text with some words {2}**in bold**{1} - -{0}__This line is also not in bold{1} - -{0}And this is plain text with {3}__some words in bold__{1} - -{0}~~This line is not crossed out{1} - -{0}This is plain text with {16}~~some words crossed out~~{1} - -{21}~~~ -this is a code block -~~~{1} - -{0}This is a new paragraph{1} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md deleted file mode 100644 index 2e93b8385..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md +++ /dev/null @@ -1,15 +0,0 @@ -Po spuštění modulu je zobrazen hlavní dialog modulu: - -![](media\image21.png)V tomto dialogu lze nastavit různé -parametry vykreslení výsledného schématu. Doporučujeme pro většinu -případů ponechat přednastavené hodnoty. - -Základní parametry ne nacházejí v záložce *Obecné*: - -![SciTE224.png][]V tomto dialogu lze nastavit různé -parametry vykreslení výsledného schématu. Doporučujeme pro většinu -případů ponechat přednastavené hodnoty. - -Základní parametry ne nacházejí v záložce _Obecné_ - -[SciTE224.png]: https://www.scintilla.org/SciTE224.png diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.folded deleted file mode 100644 index 502f1e2e9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.folded +++ /dev/null @@ -1,16 +0,0 @@ - 0 400 0 Po spuštění modulu je zobrazen hlavní dialog modulu: - 0 400 0 - 0 400 0 ![](media\image21.png)V tomto dialogu lze nastavit různé - 0 400 0 parametry vykreslení výsledného schématu. Doporučujeme pro většinu - 0 400 0 případů ponechat přednastavené hodnoty. - 0 400 0 - 0 400 0 Základní parametry ne nacházejí v záložce *Obecné*: - 0 400 0 - 0 400 0 ![SciTE224.png][]V tomto dialogu lze nastavit různé - 0 400 0 parametry vykreslení výsledného schématu. Doporučujeme pro většinu - 0 400 0 případů ponechat přednastavené hodnoty. - 0 400 0 - 0 400 0 Základní parametry ne nacházejí v záložce _Obecné_ - 0 400 0 - 0 400 0 [SciTE224.png]: https://www.scintilla.org/SciTE224.png - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.styled deleted file mode 100644 index 5cfa9185f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2235.md.styled +++ /dev/null @@ -1,15 +0,0 @@ -{0}Po spuštění modulu je zobrazen hlavní dialog modulu:{1} - -{18}![](media\image21.png){0}V tomto dialogu lze nastavit různé{1} -{0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1} -{0}případů ponechat přednastavené hodnoty.{1} - -{0}Základní parametry ne nacházejí v záložce {4}*Obecné*{0}:{1} - -{18}![SciTE224.png][]{0}V tomto dialogu lze nastavit různé{1} -{0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1} -{0}případů ponechat přednastavené hodnoty.{1} - -{0}Základní parametry ne nacházejí v záložce {5}_Obecné_{1} - -{18}[SciTE224.png]:{0} https://www.scintilla.org/SciTE224.png{1} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md deleted file mode 100644 index 63990cf57..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md +++ /dev/null @@ -1,30 +0,0 @@ -# Checking resolution of bug 2247 - -~~~sql -SELECT datetime() AS `date`; -~~~ - -```sql -SELECT datetime() AS `date`; -``` - -List of examples: - -- example *one* - -- example _two_ - -- example `inline code without end - - In case of **AAA**: - - ```sql - SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`; - ``` - - or, in case of __BBB__: - . . . - -- example *three* - -Last paragraph. diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.folded deleted file mode 100644 index 549d7a17c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.folded +++ /dev/null @@ -1,31 +0,0 @@ - 0 400 0 # Checking resolution of bug 2247 - 0 400 0 - 0 400 0 ~~~sql - 0 400 0 SELECT datetime() AS `date`; - 0 400 0 ~~~ - 0 400 0 - 0 400 0 ```sql - 0 400 0 SELECT datetime() AS `date`; - 0 400 0 ``` - 0 400 0 - 0 400 0 List of examples: - 0 400 0 - 0 400 0 - example *one* - 0 400 0 - 0 400 0 - example _two_ - 0 400 0 - 0 400 0 - example `inline code without end - 0 400 0 - 0 400 0 In case of **AAA**: - 0 400 0 - 0 400 0 ```sql - 0 400 0 SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`; - 0 400 0 ``` - 0 400 0 - 0 400 0 or, in case of __BBB__: - 0 400 0 . . . - 0 400 0 - 0 400 0 - example *three* - 0 400 0 - 0 400 0 Last paragraph. - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.styled deleted file mode 100644 index 77bc84d5a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/Bug2247.md.styled +++ /dev/null @@ -1,30 +0,0 @@ -{6}#{0} Checking resolution of bug 2247{1} - -{21}~~~sql -SELECT datetime() AS `date`; -~~~{1} - -{20}```sql -SELECT datetime() AS `date`; -```{1} - -{0}List of examples:{1} - -{13}-{0} example {4}*one*{1} - -{13}-{0} example {5}_two_{1} - -{13}-{0} example `inline code without end{1} - -{12} {0} In case of {2}**AAA**{0}:{1} -{12} {0} {1} -{12} {0} {20}```sql - SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`; - ```{1} -{12} {0} {1} -{12} {0} or, in case of {3}__BBB__{0}:{1} -{12} {0} . . .{1} - -{13}-{0} example {4}*three*{1} - -{0}Last paragraph.{1} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/SciTE.properties deleted file mode 100644 index cf85d439d..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/markdown/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -code.page=65001 -lexer.*.md=markdown -fold=1 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab deleted file mode 100644 index d393fcb72..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab +++ /dev/null @@ -1,44 +0,0 @@ -% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug - -% White space=0 - % - -% Comment=1 -% Line comment - -% Next line is comment in Ocatve but not Matlab -# Octave comment - -%{ -Block comment. -%} - -% Command=2 - -%{ -Omitted as this places a style transiton between \r and \n -!rmdir oldtests -%} - -% Number=3 -33.3 - -% Keyword=4 -global x - -% Single Quoted String=5 -'string' - -% Operator=6 -[X,Y] = meshgrid(-10:0.25:10,-10:0.25:10); - -% Identifier=7 -identifier = 2 - -% Double Quoted String=8 -"string" - -% This loop should fold -for i = 1:5 - x(i) = 3 * i; -end diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.folded deleted file mode 100644 index e305d66a9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.folded +++ /dev/null @@ -1,45 +0,0 @@ - 0 400 400 % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug - 1 400 400 - 0 400 400 % White space=0 - 0 400 400 % - 1 400 400 - 0 400 400 % Comment=1 - 0 400 400 % Line comment - 1 400 400 - 0 400 400 % Next line is comment in Ocatve but not Matlab - 0 400 400 # Octave comment - 1 400 400 - 0 400 400 %{ - 0 400 400 Block comment. - 0 400 400 %} - 1 400 400 - 0 400 400 % Command=2 - 1 400 400 - 0 400 400 %{ - 0 400 400 Omitted as this places a style transiton between \r and \n - 0 400 400 !rmdir oldtests - 0 400 400 %} - 1 400 400 - 0 400 400 % Number=3 - 0 400 400 33.3 - 1 400 400 - 0 400 400 % Keyword=4 - 0 400 400 global x - 1 400 400 - 0 400 400 % Single Quoted String=5 - 0 400 400 'string' - 1 400 400 - 0 400 400 % Operator=6 - 0 400 400 [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10); - 1 400 400 - 0 400 400 % Identifier=7 - 0 400 400 identifier = 2 - 1 400 400 - 0 400 400 % Double Quoted String=8 - 0 400 400 "string" - 1 400 400 - 0 400 400 % This loop should fold - 2 400 401 + for i = 1:5 - 0 401 401 | x(i) = 3 * i; - 0 401 400 | end - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.styled deleted file mode 100644 index df9e435e5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.matlab.styled +++ /dev/null @@ -1,44 +0,0 @@ -{1}% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug{0} - -{1}% White space=0{0} - {1}%{0} - -{1}% Comment=1{0} -{1}% Line comment{0} - -{1}% Next line is comment in Ocatve but not Matlab{0} -# {7}Octave{0} {7}comment{0} - -{1}%{ -Block comment. -%}{0} - -{1}% Command=2{0} - -{1}%{ -Omitted as this places a style transiton between \r and \n -!rmdir oldtests -%}{0} - -{1}% Number=3{0} -{3}33.3{0} - -{1}% Keyword=4{0} -{4}global{0} {7}x{0} - -{1}% Single Quoted String=5{0} -{5}'string'{0} - -{1}% Operator=6{0} -{6}[{7}X{6},{7}Y{6}]{0} {6}={0} {7}meshgrid{6}(-{3}10{6}:{3}0.25{6}:{3}10{6},-{3}10{6}:{3}0.25{6}:{3}10{6});{0} - -{1}% Identifier=7{0} -{7}identifier{0} {6}={0} {3}2{0} - -{1}% Double Quoted String=8{0} -{8}"string"{0} - -{1}% This loop should fold{0} -{4}for{0} {7}i{0} {6}={0} {3}1{6}:{3}5{0} - {7}x{6}({7}i{6}){0} {6}={0} {3}3{0} {6}*{0} {7}i{6};{0} -{4}end{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave deleted file mode 100644 index d393fcb72..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave +++ /dev/null @@ -1,44 +0,0 @@ -% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug - -% White space=0 - % - -% Comment=1 -% Line comment - -% Next line is comment in Ocatve but not Matlab -# Octave comment - -%{ -Block comment. -%} - -% Command=2 - -%{ -Omitted as this places a style transiton between \r and \n -!rmdir oldtests -%} - -% Number=3 -33.3 - -% Keyword=4 -global x - -% Single Quoted String=5 -'string' - -% Operator=6 -[X,Y] = meshgrid(-10:0.25:10,-10:0.25:10); - -% Identifier=7 -identifier = 2 - -% Double Quoted String=8 -"string" - -% This loop should fold -for i = 1:5 - x(i) = 3 * i; -end diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.folded deleted file mode 100644 index e305d66a9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.folded +++ /dev/null @@ -1,45 +0,0 @@ - 0 400 400 % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug - 1 400 400 - 0 400 400 % White space=0 - 0 400 400 % - 1 400 400 - 0 400 400 % Comment=1 - 0 400 400 % Line comment - 1 400 400 - 0 400 400 % Next line is comment in Ocatve but not Matlab - 0 400 400 # Octave comment - 1 400 400 - 0 400 400 %{ - 0 400 400 Block comment. - 0 400 400 %} - 1 400 400 - 0 400 400 % Command=2 - 1 400 400 - 0 400 400 %{ - 0 400 400 Omitted as this places a style transiton between \r and \n - 0 400 400 !rmdir oldtests - 0 400 400 %} - 1 400 400 - 0 400 400 % Number=3 - 0 400 400 33.3 - 1 400 400 - 0 400 400 % Keyword=4 - 0 400 400 global x - 1 400 400 - 0 400 400 % Single Quoted String=5 - 0 400 400 'string' - 1 400 400 - 0 400 400 % Operator=6 - 0 400 400 [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10); - 1 400 400 - 0 400 400 % Identifier=7 - 0 400 400 identifier = 2 - 1 400 400 - 0 400 400 % Double Quoted String=8 - 0 400 400 "string" - 1 400 400 - 0 400 400 % This loop should fold - 2 400 401 + for i = 1:5 - 0 401 401 | x(i) = 3 * i; - 0 401 400 | end - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.styled deleted file mode 100644 index 22ec88131..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/AllStyles.m.octave.styled +++ /dev/null @@ -1,44 +0,0 @@ -{1}% Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug{0} - -{1}% White space=0{0} - {1}%{0} - -{1}% Comment=1{0} -{1}% Line comment{0} - -{1}% Next line is comment in Ocatve but not Matlab{0} -{1}# Octave comment{0} - -{1}%{ -Block comment. -%}{0} - -{1}% Command=2{0} - -{1}%{ -Omitted as this places a style transiton between \r and \n -!rmdir oldtests -%}{0} - -{1}% Number=3{0} -{3}33.3{0} - -{1}% Keyword=4{0} -{4}global{0} {7}x{0} - -{1}% Single Quoted String=5{0} -{5}'string'{0} - -{1}% Operator=6{0} -{6}[{7}X{6},{7}Y{6}]{0} {6}={0} {7}meshgrid{6}(-{3}10{6}:{3}0.25{6}:{3}10{6},-{3}10{6}:{3}0.25{6}:{3}10{6});{0} - -{1}% Identifier=7{0} -{7}identifier{0} {6}={0} {3}2{0} - -{1}% Double Quoted String=8{0} -{8}"string"{0} - -{1}% This loop should fold{0} -{4}for{0} {7}i{0} {6}={0} {3}1{6}:{3}5{0} - {7}x{6}({7}i{6}){0} {6}={0} {3}3{0} {6}*{0} {7}i{6};{0} -{4}end{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab deleted file mode 100644 index 1d150be85..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab +++ /dev/null @@ -1,16 +0,0 @@ -a=""""; -b=1; -c='\'; -d=2; -e="\"; -f=3; -%" this should be a comment (colored as such), instead it closes the string -g=" -h=123; -%" this is a syntax error in Matlab (about 'g'), -% followed by a valid assignment (of 'h') -% Instead, 'h' is colored as part of the string - -% Octave terminates string at 3rd ", Matlab at 4th -i="\" "; % " % -% end diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded deleted file mode 100644 index 7dafc3f16..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded +++ /dev/null @@ -1,17 +0,0 @@ - 0 400 400 a=""""; - 0 400 400 b=1; - 0 400 400 c='\'; - 0 400 400 d=2; - 0 400 400 e="\"; - 0 400 400 f=3; - 0 400 400 %" this should be a comment (colored as such), instead it closes the string - 0 400 400 g=" - 0 400 400 h=123; - 0 400 400 %" this is a syntax error in Matlab (about 'g'), - 0 400 400 % followed by a valid assignment (of 'h') - 0 400 400 % Instead, 'h' is colored as part of the string - 1 400 400 - 0 400 400 % Octave terminates string at 3rd ", Matlab at 4th - 0 400 400 i="\" "; % " % - 0 400 400 % end - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled deleted file mode 100644 index 4221845ed..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled +++ /dev/null @@ -1,16 +0,0 @@ -{7}a{6}={8}""""{6};{0} -{7}b{6}={3}1{6};{0} -{7}c{6}={5}'\'{6};{0} -{7}d{6}={3}2{6};{0} -{7}e{6}={8}"\"{6};{0} -{7}f{6}={3}3{6};{0} -{1}%" this should be a comment (colored as such), instead it closes the string{0} -{7}g{6}={8}" -h=123; -%"{0} {7}this{0} {7}is{0} {7}a{0} {7}syntax{0} {7}error{0} {7}in{0} {7}Matlab{0} {6}({7}about{0} {5}'g'{6}),{0} -{1}% followed by a valid assignment (of 'h'){0} -{1}% Instead, 'h' is colored as part of the string{0} - -{1}% Octave terminates string at 3rd ", Matlab at 4th{0} -{7}i{6}={8}"\"{0} {8}"; % "{0} {1}%{0} -{1}% end{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave deleted file mode 100644 index c4f1cf7ba..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave +++ /dev/null @@ -1,4 +0,0 @@ -% Ensure escape sequences still work in octave -% Octave terminates string at 3rd ", Matlab at 4th -i="\" "; % " % -% end diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded deleted file mode 100644 index 0b34ea103..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded +++ /dev/null @@ -1,5 +0,0 @@ - 0 400 400 % Ensure escape sequences still work in octave - 0 400 400 % Octave terminates string at 3rd ", Matlab at 4th - 0 400 400 i="\" "; % " % - 0 400 400 % end - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled deleted file mode 100644 index 7c29accd7..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled +++ /dev/null @@ -1,4 +0,0 @@ -{1}% Ensure escape sequences still work in octave{0} -{1}% Octave terminates string at 3rd ", Matlab at 4th{0} -{7}i{6}={8}"\" "{6};{0} {1}% " %{0} -{1}% end{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/SciTE.properties deleted file mode 100644 index efe83e024..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/matlab/SciTE.properties +++ /dev/null @@ -1,8 +0,0 @@ -lexer.*.matlab=matlab -keywords.*.matlab=end for global if - -lexer.*.octave=octave -keywords.*.octave=end for global if - -fold=1 -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms deleted file mode 100644 index 54de34be4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms +++ /dev/null @@ -1,74 +0,0 @@ -% Demonstrate each possible style. Does not make sense as code. - -% A comment 1 -% Comment - - -% Whitespace 0 - - - -% Label 2 -label - - -% Not Validated Opcode 3 appears to always validate to either 5 or 6 -% so is never seen on screen. - - -% Division between Label and Opcode 4 -la - - -% Valid Opcode 5 - TRAP - - -% Invalid Opcode 6 - UNKNOWN - - -% Division between Opcode and Operands 7 - LOC - - -% Division of Operands 8 - LOC 0. - - -% Number 9 - BYTE 0 - - -% Reference 10 - JMP @label - - -% Char 11 - BYTE 'a' - - -% String 12 - BYTE "Hello, world!" - - -% Register 13 - BYTE rA - - -% Hexadecimal Number 14 - BYTE #FF - - -% Operator 15 - BYTE + - - -% Symbol 16 - TRAP Fputs - - -% Preprocessor 17 -@include a.mms - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.folded deleted file mode 100644 index 0fab9a35f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.folded +++ /dev/null @@ -1,75 +0,0 @@ - 0 400 0 % Demonstrate each possible style. Does not make sense as code. - 0 400 0 - 0 400 0 % A comment 1 - 0 400 0 % Comment - 0 400 0 - 0 400 0 - 0 400 0 % Whitespace 0 - 0 400 0 - 0 400 0 - 0 400 0 - 0 400 0 % Label 2 - 0 400 0 label - 0 400 0 - 0 400 0 - 0 400 0 % Not Validated Opcode 3 appears to always validate to either 5 or 6 - 0 400 0 % so is never seen on screen. - 0 400 0 - 0 400 0 - 0 400 0 % Division between Label and Opcode 4 - 0 400 0 la - 0 400 0 - 0 400 0 - 0 400 0 % Valid Opcode 5 - 0 400 0 TRAP - 0 400 0 - 0 400 0 - 0 400 0 % Invalid Opcode 6 - 0 400 0 UNKNOWN - 0 400 0 - 0 400 0 - 0 400 0 % Division between Opcode and Operands 7 - 0 400 0 LOC - 0 400 0 - 0 400 0 - 0 400 0 % Division of Operands 8 - 0 400 0 LOC 0. - 0 400 0 - 0 400 0 - 0 400 0 % Number 9 - 0 400 0 BYTE 0 - 0 400 0 - 0 400 0 - 0 400 0 % Reference 10 - 0 400 0 JMP @label - 0 400 0 - 0 400 0 - 0 400 0 % Char 11 - 0 400 0 BYTE 'a' - 0 400 0 - 0 400 0 - 0 400 0 % String 12 - 0 400 0 BYTE "Hello, world!" - 0 400 0 - 0 400 0 - 0 400 0 % Register 13 - 0 400 0 BYTE rA - 0 400 0 - 0 400 0 - 0 400 0 % Hexadecimal Number 14 - 0 400 0 BYTE #FF - 0 400 0 - 0 400 0 - 0 400 0 % Operator 15 - 0 400 0 BYTE + - 0 400 0 - 0 400 0 - 0 400 0 % Symbol 16 - 0 400 0 TRAP Fputs - 0 400 0 - 0 400 0 - 0 400 0 % Preprocessor 17 - 0 400 0 @include a.mms - 0 400 0 - 0 400 0 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.styled deleted file mode 100644 index b3f64d4f7..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/AllStyles.mms.styled +++ /dev/null @@ -1,74 +0,0 @@ -{1}% Demonstrate each possible style. Does not make sense as code. -{0} -{1}% A comment 1 -% Comment -{0} - -{1}% Whitespace 0 -{0} - - -{1}% Label 2 -{2}label{4} -{0} - -{1}% Not Validated Opcode 3 appears to always validate to either 5 or 6 -% so is never seen on screen. -{0} - -{1}% Division between Label and Opcode 4 -{2}la{4} -{0} - -{1}% Valid Opcode 5 -{0} {5}TRAP{7} -{0} - -{1}% Invalid Opcode 6 -{0} {6}UNKNOWN{7} -{0} - -{1}% Division between Opcode and Operands 7 -{0} {5}LOC{7} -{0} - -{1}% Division of Operands 8 -{0} {5}LOC{7} {9}0{8}.{1} -{0} - -{1}% Number 9 -{0} {5}BYTE{7} {9}0{1} -{0} - -{1}% Reference 10 -{0} {5}JMP{7} {10}@label{1} -{0} - -{1}% Char 11 -{0} {5}BYTE{7} {11}'a'{1} -{0} - -{1}% String 12 -{0} {5}BYTE{7} {12}"Hello, world!"{1} -{0} - -{1}% Register 13 -{0} {5}BYTE{7} {13}rA{1} -{0} - -{1}% Hexadecimal Number 14 -{0} {5}BYTE{7} {14}#FF{1} -{0} - -{1}% Operator 15 -{0} {5}BYTE{7} {15}+{1} -{0} - -{1}% Symbol 16 -{0} {5}TRAP{7} {16}Fputs{1} -{0} - -{1}% Preprocessor 17 -{17}@include a.mms -{0} - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/SciTE.properties deleted file mode 100644 index d458a19fd..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/SciTE.properties +++ /dev/null @@ -1,4 +0,0 @@ -lexer.*.mms=mmixal -keywords.*.mms=BYTE GETA JMP LOC PREFIX TRAP -keywords2.*.mms=rA -keywords3.*.mms=Fputs StdOut diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms deleted file mode 100644 index 82be6e8c9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms +++ /dev/null @@ -1,16 +0,0 @@ -# Bug #2019 Buffer over-read in MMIXAL lexer -label - PREFIX Foo: -% Relative reference (uses PREFIX) - JMP label -% - JMP @label -% Absolute reference (does not use PREFIX) - JMP :label -% In register list so treated as register - JMP :rA -% Too long for buffer so truncated - JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -% Too long for buffer so truncated then treated as absolute - JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 -% diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.folded deleted file mode 100644 index 1d0073b8c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.folded +++ /dev/null @@ -1,17 +0,0 @@ - 0 400 0 # Bug #2019 Buffer over-read in MMIXAL lexer - 0 400 0 label - 0 400 0 PREFIX Foo: - 0 400 0 % Relative reference (uses PREFIX) - 0 400 0 JMP label - 0 400 0 % - 0 400 0 JMP @label - 0 400 0 % Absolute reference (does not use PREFIX) - 0 400 0 JMP :label - 0 400 0 % In register list so treated as register - 0 400 0 JMP :rA - 0 400 0 % Too long for buffer so truncated - 0 400 0 JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - 0 400 0 % Too long for buffer so truncated then treated as absolute - 0 400 0 JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 - 0 400 0 % - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.styled deleted file mode 100644 index 78ae29a3a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/references.mms.styled +++ /dev/null @@ -1,16 +0,0 @@ -{1}# Bug #2019 Buffer over-read in MMIXAL lexer -{2}label{4} -{0} {5}PREFIX{7} {10}Foo:{1} -% Relative reference (uses PREFIX) -{0} {5}JMP{7} {10}label{1} -% -{0} {5}JMP{7} {10}@label{1} -% Absolute reference (does not use PREFIX) -{0} {5}JMP{7} {10}:label{1} -% In register list so treated as register -{0} {5}JMP{7} {13}:rA{1} -% Too long for buffer so truncated -{0} {5}JMP{7} {10}l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1} -% Too long for buffer so truncated then treated as absolute -{0} {5}JMP{7} {10}:l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1} -% diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms deleted file mode 100644 index 538d22163..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms +++ /dev/null @@ -1,12 +0,0 @@ -% Some example code - - % Set the address of the program initially to 0x100. - LOC #100 - -Main GETA $255,string - - TRAP 0,Fputs,StdOut - - TRAP 0,Halt,0 - -string BYTE "Hello, world!",#a,0 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.folded deleted file mode 100644 index 459bdf251..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.folded +++ /dev/null @@ -1,13 +0,0 @@ - 0 400 0 % Some example code - 0 400 0 - 0 400 0 % Set the address of the program initially to 0x100. - 0 400 0 LOC #100 - 0 400 0 - 0 400 0 Main GETA $255,string - 0 400 0 - 0 400 0 TRAP 0,Fputs,StdOut - 0 400 0 - 0 400 0 TRAP 0,Halt,0 - 0 400 0 - 0 400 0 string BYTE "Hello, world!",#a,0 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.styled deleted file mode 100644 index 7221e37f9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/mmixal/x.mms.styled +++ /dev/null @@ -1,12 +0,0 @@ -{1}% Some example code -{0} - {1}% Set the address of the program initially to 0x100. -{0} {5}LOC{7} {14}#100{1} -{0} -{2}Main{4} {5}GETA{7} {13}$255{15},{10}string{1} -{0} - {5}TRAP{7} {9}0{15},{16}Fputs{15},{16}StdOut{1} -{0} - {5}TRAP{7} {9}0{15},{10}Halt{15},{9}0{1} -{0} -{2}string{4} {5}BYTE{7} {12}"Hello, world!"{15},{14}#a{15},{9}0{1} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/SciTE.properties deleted file mode 100644 index 3a0214952..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/SciTE.properties +++ /dev/null @@ -1,2 +0,0 @@ -lexer.*.nim=nim -keywords.*.nim=else end if let proc diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim b/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim deleted file mode 100644 index 874940d47..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim +++ /dev/null @@ -1,28 +0,0 @@ -# Tests for Nim -let s = "foobar" - -# Feature #1260 -{.ident.} -stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!") - -# Feature #1261 -# IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME: -proc `$` (x: myDataType): string = ... -# Style ticks as SCE_NIM_BACKTICKS: -if `==`( `+`(3,4),7): echo "True" - -# Feature #1262 -# Standard raw string identifier: -let standardDoubleLitRawStr = R"A raw string\" -let standardTripleLitRawStr = R"""A triple-double raw string\"""" -# Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true -let customDoubleLitRawStr = customIdent"A string\" -let customTripleLitRawStr = customIdent"""A triple-double raw string\"""" - -# Feature #1268 -10_000 -10__000 -10_ -1....5 -1.ident -1._ident diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.folded deleted file mode 100644 index 2018456c0..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.folded +++ /dev/null @@ -1,29 +0,0 @@ - 1 0 0 # Tests for Nim - 0 400 0 let s = "foobar" - 1 400 0 - 1 400 0 # Feature #1260 - 0 400 0 {.ident.} - 0 400 0 stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!") - 1 400 0 - 1 400 0 # Feature #1261 - 1 400 0 # IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME: - 0 400 0 proc `$` (x: myDataType): string = ... - 1 400 0 # Style ticks as SCE_NIM_BACKTICKS: - 0 400 0 if `==`( `+`(3,4),7): echo "True" - 1 400 0 - 1 400 0 # Feature #1262 - 1 400 0 # Standard raw string identifier: - 0 400 0 let standardDoubleLitRawStr = R"A raw string\" - 0 400 0 let standardTripleLitRawStr = R"""A triple-double raw string\"""" - 1 400 0 # Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true - 0 400 0 let customDoubleLitRawStr = customIdent"A string\" - 0 400 0 let customTripleLitRawStr = customIdent"""A triple-double raw string\"""" - 1 400 0 - 1 400 0 # Feature #1268 - 0 400 0 10_000 - 0 400 0 10__000 - 0 400 0 10_ - 0 400 0 1....5 - 0 400 0 1.ident - 0 400 0 1._ident - 1 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.styled deleted file mode 100644 index 3a05c04b8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/nim/x.nim.styled +++ /dev/null @@ -1,28 +0,0 @@ -{3}# Tests for Nim -{8}let{0} {16}s{0} {15}={0} {6}"foobar"{0} - -{3}# Feature #1260 -{15}{.{16}ident{15}.}{0} -{16}stdin{15}.{16}readLine{15}.{16}split{15}.{16}map{15}({16}parseInt{15}).{16}max{15}.{11}`$`{15}.{16}echo{15}({6}" is the maximum!"{15}){0} - -{3}# Feature #1261 -# IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME: -{8}proc{0} {12}`$`{0} {15}({16}x{15}:{0} {16}myDataType{15}):{0} {16}string{0} {15}={0} {15}...{0} -{3}# Style ticks as SCE_NIM_BACKTICKS: -{8}if{0} {11}`==`{15}({0} {11}`+`{15}({5}3{15},{5}4{15}),{5}7{15}):{0} {16}echo{0} {6}"True"{0} - -{3}# Feature #1262 -# Standard raw string identifier: -{8}let{0} {16}standardDoubleLitRawStr{0} {15}={0} {6}R"A raw string\"{0} -{8}let{0} {16}standardTripleLitRawStr{0} {15}={0} {10}R"""A triple-double raw string\""""{0} -{3}# Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true -{8}let{0} {16}customDoubleLitRawStr{0} {15}={0} {16}customIdent{6}"A string\"{0} -{8}let{0} {16}customTripleLitRawStr{0} {15}={0} {16}customIdent{10}"""A triple-double raw string\""""{0} - -{3}# Feature #1268 -{5}10_000{0} -{5}10{16}__000{0} -{5}10{16}_{0} -{5}1{15}....{5}5{0} -{5}1{15}.{16}ident{0} -{5}1{15}.{16}_ident{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/SciTE.properties deleted file mode 100644 index da97ffaa1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/SciTE.properties +++ /dev/null @@ -1,33 +0,0 @@ -lexer.*.pl=perl -keywords.*.pl=\ -NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD \ -BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept \ -alarm and atan2 bind binmode bless caller chdir chmod chomp chop \ -chown chr chroot close closedir cmp connect continue cos crypt \ -dbmclose dbmopen defined delete die do dump each else elsif endgrent \ -endhostent endnetent endprotoent endpwent endservent eof eq eval \ -exec exists exit exp fcntl fileno flock for foreach fork format \ -formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname \ -gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername \ -getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent \ -getpwent getpwnam getpwuid getservbyname getservbyport getservent \ -getsockname getsockopt glob gmtime goto grep gt hex if index \ -int ioctl join keys kill last lc lcfirst le length link listen \ -local localtime lock log lstat lt map mkdir msgctl msgget msgrcv \ -msgsnd my ne next no not oct open opendir or ord our pack package \ -pipe pop pos print printf prototype push quotemeta qu \ -rand read readdir readline readlink readpipe recv redo \ -ref rename require reset return reverse rewinddir rindex rmdir \ -scalar seek seekdir select semctl semget semop send setgrent \ -sethostent setnetent setpgrp setpriority setprotoent setpwent \ -setservent setsockopt shift shmctl shmget shmread shmwrite shutdown \ -sin sleep socket socketpair sort splice split sprintf sqrt srand \ -stat study sub substr symlink syscall sysopen sysread sysseek \ -system syswrite tell telldir tie tied time times truncate \ -uc ucfirst umask undef unless unlink unpack unshift untie until \ -use utime values vec wait waitpid wantarray warn while write \ -xor \ -given when default break say state UNITCHECK __SUB__ fc - -fold=1 -fold.comment=1 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl deleted file mode 100644 index a9c80caa2..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl +++ /dev/null @@ -1,178 +0,0 @@ -# -*- coding: utf-8 -*- -#-------------------------------------------------------------------------- -# perl-test-5220delta.pl -#-------------------------------------------------------------------------- -# REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod -# maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod -# also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22 -# -#-------------------------------------------------------------------------- -# Kein-Hong Man Public Domain 20151217 -#-------------------------------------------------------------------------- -# 20151217 initial document -# 20151218 updated tests and comments -#-------------------------------------------------------------------------- - -use v5.22; # may be needed - -#-------------------------------------------------------------------------- -# New bitwise operators -#-------------------------------------------------------------------------- - -use feature 'bitwise' # enable feature, warning enabled -use experimental "bitwise"; # enable feature, warning disabled - -# numerical operands -10&20 10|20 10^20 ~10 -$a&"8" $a|"8" $a^"8" ~$a ~"8" - -# string operands -'0'&."8" '0'|."8" '0'^."8" ~.'0' ~."8" -# the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled -# so it's feature-setting-dependent, no plans to change current behaviour - $a&.10 $a|.10 $a^.10 ~.$a ~.10 - -# assignment variants -$a&=10; $a|=10; $a^=10; -$b&.='20'; $b|.='20'; $b^.='20'; -$c&="30"; $c|="30"; $c^="30"; -$d&.=$e; $d|.=$e; $d^.=$e; - -#-------------------------------------------------------------------------- -# New double-diamond operator -#-------------------------------------------------------------------------- -# <<>> is like <> but each element of @ARGV will be treated as an actual file name - -# example snippet from brian d foy's blog post -while( <<>> ) { # new, safe line input operator - ...; - } - -#-------------------------------------------------------------------------- -# New \b boundaries in regular expressions -#-------------------------------------------------------------------------- - -qr/\b{gcb}/ -qr/\b{wb}/ -qr/\b{sb}/ - -#-------------------------------------------------------------------------- -# Non-Capturing Regular Expression Flag -#-------------------------------------------------------------------------- -# disables capturing and filling in $1, $2, etc - -"hello" =~ /(hi|hello)/n; # $1 is not set - -#-------------------------------------------------------------------------- -# Aliasing via reference -#-------------------------------------------------------------------------- -# Variables and subroutines can now be aliased by assigning to a reference - -\$c = \$d; -\&x = \&y; - -# Aliasing can also be applied to foreach iterator variables - -foreach \%hash (@array_of_hash_refs) { ... } - -# example snippet from brian d foy's blog post - -use feature qw(refaliasing); - -\%other_hash = \%hash; - -use v5.22; -use feature qw(refaliasing); - -foreach \my %hash ( @array_of_hashes ) { # named hash control variable - foreach my $key ( keys %hash ) { # named hash now! - ...; - } - } - -#-------------------------------------------------------------------------- -# New :const subroutine attribute -#-------------------------------------------------------------------------- - -my $x = 54321; -*INLINED = sub : const { $x }; -$x++; - -# more examples of attributes -# (not 5.22 stuff, but some general examples for study, useful for -# handling subroutine signature and subroutine prototype highlighting) - -sub foo : lvalue ; - -package X; -sub Y::x : lvalue { 1 } - -package X; -sub foo { 1 } -package Y; -BEGIN { *bar = \&X::foo; } -package Z; -sub Y::bar : lvalue ; - -# built-in attributes for subroutines: -lvalue method prototype(..) locked const - -#-------------------------------------------------------------------------- -# Repetition in list assignment -#-------------------------------------------------------------------------- - -# example snippet from brian d foy's blog post -use v5.22; -my(undef, $card_num, (undef)x3, $count) = split /:/; - -(undef,undef,$foo) = that_function() -# is equivalent to -((undef)x2, $foo) = that_function() - -#-------------------------------------------------------------------------- -# Floating point parsing has been improved -#-------------------------------------------------------------------------- -# Hexadecimal floating point literals - -# some hex floats from a program by Rick Regan -# appropriated and extended from Lua 5.2.x test cases -# tested on perl 5.22/cygwin - -0x1p-1074; -0x3.3333333333334p-5; -0xcc.ccccccccccdp-11; -0x1p+1; -0x1p-6; -0x1.b7p-1; -0x1.fffffffffffffp+1023; -0x1p-1022; -0X1.921FB4D12D84AP+1; -0x1.999999999999ap-4; - -# additional test cases for characterization -0x1p-1074. # dot is a string operator -0x.ABCDEFp10 # legal, dot immediately after 0x -0x.p10 # perl allows 0x as a zero, then concat with p10 bareword -0x.p 0x0.p # dot then bareword -0x_0_.A_BC___DEF_p1_0 # legal hex float, underscores are mostly allowed -0x0._ABCDEFp10 # _ABCDEFp10 is a bareword, no underscore allowed after dot - -# illegal, but does not use error highlighting -0x0p1ABC # illegal, highlighted as 0x0p1 abut with bareword ABC - -# allowed to FAIL for now -0x0.ABCDEFp_10 # ABCDEFp_10 is a bareword, '_10' exponent not allowed -0xp 0xp1 0x0.0p # syntax errors -0x41.65.65 # hex dot number, but lexer now fails with 0x41.65 left as a partial hex float - -#-------------------------------------------------------------------------- -# Support for ?PATTERN? without explicit operator has been removed -#-------------------------------------------------------------------------- -# ?PATTERN? must now be written as m?PATTERN? - -?PATTERN? # does not work in current LexPerl anyway, NO ACTION NEEDED -m?PATTERN? - -#-------------------------------------------------------------------------- -# end of test file -#-------------------------------------------------------------------------- diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.folded deleted file mode 100644 index b25368c79..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.folded +++ /dev/null @@ -1,179 +0,0 @@ - 2 400 401 + # -*- coding: utf-8 -*- - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5220delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod - 0 401 401 | # maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod - 0 401 401 | # also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22 - 0 401 401 | # - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # Kein-Hong Man Public Domain 20151217 - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # 20151217 initial document - 0 401 401 | # 20151218 updated tests and comments - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 use v5.22; # may be needed - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # New bitwise operators - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 use feature 'bitwise' # enable feature, warning enabled - 0 400 400 use experimental "bitwise"; # enable feature, warning disabled - 1 400 400 - 0 400 400 # numerical operands - 0 400 400 10&20 10|20 10^20 ~10 - 0 400 400 $a&"8" $a|"8" $a^"8" ~$a ~"8" - 1 400 400 - 0 400 400 # string operands - 0 400 400 '0'&."8" '0'|."8" '0'^."8" ~.'0' ~."8" - 2 400 401 + # the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled - 0 401 400 | # so it's feature-setting-dependent, no plans to change current behaviour - 0 400 400 $a&.10 $a|.10 $a^.10 ~.$a ~.10 - 1 400 400 - 0 400 400 # assignment variants - 0 400 400 $a&=10; $a|=10; $a^=10; - 0 400 400 $b&.='20'; $b|.='20'; $b^.='20'; - 0 400 400 $c&="30"; $c|="30"; $c^="30"; - 0 400 400 $d&.=$e; $d|.=$e; $d^.=$e; - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # New double-diamond operator - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 400 | # <<>> is like <> but each element of @ARGV will be treated as an actual file name - 1 400 400 - 0 400 400 # example snippet from brian d foy's blog post - 2 400 401 + while( <<>> ) { # new, safe line input operator - 0 401 401 | ...; - 0 401 400 | } - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # New \b boundaries in regular expressions - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 qr/\b{gcb}/ - 0 400 400 qr/\b{wb}/ - 0 400 400 qr/\b{sb}/ - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # Non-Capturing Regular Expression Flag - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 400 | # disables capturing and filling in $1, $2, etc - 1 400 400 - 0 400 400 "hello" =~ /(hi|hello)/n; # $1 is not set - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # Aliasing via reference - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 400 | # Variables and subroutines can now be aliased by assigning to a reference - 1 400 400 - 0 400 400 \$c = \$d; - 0 400 400 \&x = \&y; - 1 400 400 - 0 400 400 # Aliasing can also be applied to foreach iterator variables - 1 400 400 - 0 400 400 foreach \%hash (@array_of_hash_refs) { ... } - 1 400 400 - 0 400 400 # example snippet from brian d foy's blog post - 1 400 400 - 0 400 400 use feature qw(refaliasing); - 1 400 400 - 0 400 400 \%other_hash = \%hash; - 1 400 400 - 0 400 400 use v5.22; - 0 400 400 use feature qw(refaliasing); - 1 400 400 - 2 400 401 + foreach \my %hash ( @array_of_hashes ) { # named hash control variable - 2 401 402 + foreach my $key ( keys %hash ) { # named hash now! - 0 402 402 | ...; - 0 402 401 | } - 0 401 400 | } - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # New :const subroutine attribute - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 my $x = 54321; - 0 400 400 *INLINED = sub : const { $x }; - 0 400 400 $x++; - 1 400 400 - 2 400 401 + # more examples of attributes - 0 401 401 | # (not 5.22 stuff, but some general examples for study, useful for - 0 401 400 | # handling subroutine signature and subroutine prototype highlighting) - 1 400 400 - 0 400 400 sub foo : lvalue ; - 1 400 400 - 2 400 401 + package X; - 0 401 401 | sub Y::x : lvalue { 1 } - 1 401 401 | - 2 400 401 + package X; - 0 401 401 | sub foo { 1 } - 2 400 401 + package Y; - 0 401 401 | BEGIN { *bar = \&X::foo; } - 2 400 401 + package Z; - 0 401 401 | sub Y::bar : lvalue ; - 1 401 401 | - 0 401 401 | # built-in attributes for subroutines: - 0 401 401 | lvalue method prototype(..) locked const - 1 401 401 | - 2 401 402 + #-------------------------------------------------------------------------- - 0 402 402 | # Repetition in list assignment - 0 402 401 | #-------------------------------------------------------------------------- - 1 401 401 | - 0 401 401 | # example snippet from brian d foy's blog post - 0 401 401 | use v5.22; - 0 401 401 | my(undef, $card_num, (undef)x3, $count) = split /:/; - 1 401 401 | - 0 401 401 | (undef,undef,$foo) = that_function() - 0 401 401 | # is equivalent to - 0 401 401 | ((undef)x2, $foo) = that_function() - 1 401 401 | - 2 401 402 + #-------------------------------------------------------------------------- - 0 402 402 | # Floating point parsing has been improved - 0 402 402 | #-------------------------------------------------------------------------- - 0 402 401 | # Hexadecimal floating point literals - 1 401 401 | - 2 401 402 + # some hex floats from a program by Rick Regan - 0 402 402 | # appropriated and extended from Lua 5.2.x test cases - 0 402 401 | # tested on perl 5.22/cygwin - 1 401 401 | - 0 401 401 | 0x1p-1074; - 0 401 401 | 0x3.3333333333334p-5; - 0 401 401 | 0xcc.ccccccccccdp-11; - 0 401 401 | 0x1p+1; - 0 401 401 | 0x1p-6; - 0 401 401 | 0x1.b7p-1; - 0 401 401 | 0x1.fffffffffffffp+1023; - 0 401 401 | 0x1p-1022; - 0 401 401 | 0X1.921FB4D12D84AP+1; - 0 401 401 | 0x1.999999999999ap-4; - 1 401 401 | - 0 401 401 | # additional test cases for characterization - 0 401 401 | 0x1p-1074. # dot is a string operator - 0 401 401 | 0x.ABCDEFp10 # legal, dot immediately after 0x - 0 401 401 | 0x.p10 # perl allows 0x as a zero, then concat with p10 bareword - 0 401 401 | 0x.p 0x0.p # dot then bareword - 0 401 401 | 0x_0_.A_BC___DEF_p1_0 # legal hex float, underscores are mostly allowed - 0 401 401 | 0x0._ABCDEFp10 # _ABCDEFp10 is a bareword, no underscore allowed after dot - 1 401 401 | - 0 401 401 | # illegal, but does not use error highlighting - 0 401 401 | 0x0p1ABC # illegal, highlighted as 0x0p1 abut with bareword ABC - 1 401 401 | - 0 401 401 | # allowed to FAIL for now - 0 401 401 | 0x0.ABCDEFp_10 # ABCDEFp_10 is a bareword, '_10' exponent not allowed - 0 401 401 | 0xp 0xp1 0x0.0p # syntax errors - 0 401 401 | 0x41.65.65 # hex dot number, but lexer now fails with 0x41.65 left as a partial hex float - 1 401 401 | - 2 401 402 + #-------------------------------------------------------------------------- - 0 402 402 | # Support for ?PATTERN? without explicit operator has been removed - 0 402 402 | #-------------------------------------------------------------------------- - 0 402 401 | # ?PATTERN? must now be written as m?PATTERN? - 1 401 401 | - 0 401 401 | ?PATTERN? # does not work in current LexPerl anyway, NO ACTION NEEDED - 0 401 401 | m?PATTERN? - 1 401 401 | - 2 401 402 + #-------------------------------------------------------------------------- - 0 402 402 | # end of test file - 0 402 401 | #-------------------------------------------------------------------------- - 0 401 0 | \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.styled deleted file mode 100644 index 4a763a47a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-5220delta.pl.styled +++ /dev/null @@ -1,178 +0,0 @@ -{2}# -*- coding: utf-8 -*- -#-------------------------------------------------------------------------- -# perl-test-5220delta.pl -#-------------------------------------------------------------------------- -# REF: https://metacpan.org/pod/distribution/perl/pod/perldelta.pod -# maybe future ref: https://metacpan.org/pod/distribution/perl/pod/perl5220delta.pod -# also: http://perltricks.com/article/165/2015/4/10/A-preview-of-Perl-5-22 -# -#-------------------------------------------------------------------------- -# Kein-Hong Man Public Domain 20151217 -#-------------------------------------------------------------------------- -# 20151217 initial document -# 20151218 updated tests and comments -#-------------------------------------------------------------------------- -{0} -{5}use{0} {6}v5.22{10};{0} {2}# may be needed -{0} -{2}#-------------------------------------------------------------------------- -# New bitwise operators -#-------------------------------------------------------------------------- -{0} -{5}use{0} {11}feature{0} {7}'bitwise'{0} {2}# enable feature, warning enabled -{5}use{0} {11}experimental{0} {6}"bitwise"{10};{0} {2}# enable feature, warning disabled -{0} -{2}# numerical operands -{4}10{10}&{4}20{0} {4}10{10}|{4}20{0} {4}10{10}^{4}20{0} {10}~{4}10{0} -{12}$a{10}&{6}"8"{0} {12}$a{10}|{6}"8"{0} {12}$a{10}^{6}"8"{0} {10}~{12}$a{0} {10}~{6}"8"{0} - -{2}# string operands -{7}'0'{10}&.{6}"8"{0} {7}'0'{10}|.{6}"8"{0} {7}'0'{10}^.{6}"8"{0} {10}~.{7}'0'{0} {10}~.{6}"8"{0} -{2}# the following is AMBIGUOUS, perl sees 10 and not .10 only when bitwise feature is enabled -# so it's feature-setting-dependent, no plans to change current behaviour -{0} {12}$a{10}&{4}.10{0} {12}$a{10}|{4}.10{0} {12}$a{10}^{4}.10{0} {10}~.{12}$a{0} {10}~{4}.10{0} - -{2}# assignment variants -{12}$a{10}&={4}10{10};{0} {12}$a{10}|={4}10{10};{0} {12}$a{10}^={4}10{10};{0} -{12}$b{10}&.={7}'20'{10};{0} {12}$b{10}|.={7}'20'{10};{0} {12}$b{10}^.={7}'20'{10};{0} -{12}$c{10}&={6}"30"{10};{0} {12}$c{10}|={6}"30"{10};{0} {12}$c{10}^={6}"30"{10};{0} -{12}$d{10}&.={12}$e{10};{0} {12}$d{10}|.={12}$e{10};{0} {12}$d{10}^.={12}$e{10};{0} - -{2}#-------------------------------------------------------------------------- -# New double-diamond operator -#-------------------------------------------------------------------------- -# <<>> is like <> but each element of @ARGV will be treated as an actual file name -{0} -{2}# example snippet from brian d foy's blog post -{5}while{10}({0} {10}<<>>{0} {10}){0} {10}{{0} {2}# new, safe line input operator -{0} {10}...;{0} - {10}}{0} - -{2}#-------------------------------------------------------------------------- -# New \b boundaries in regular expressions -#-------------------------------------------------------------------------- -{0} -{29}qr/\b{gcb}/{0} -{29}qr/\b{wb}/{0} -{29}qr/\b{sb}/{0} - -{2}#-------------------------------------------------------------------------- -# Non-Capturing Regular Expression Flag -#-------------------------------------------------------------------------- -# disables capturing and filling in $1, $2, etc -{0} -{6}"hello"{0} {10}=~{0} {17}/(hi|hello)/n{10};{0} {2}# $1 is not set -{0} -{2}#-------------------------------------------------------------------------- -# Aliasing via reference -#-------------------------------------------------------------------------- -# Variables and subroutines can now be aliased by assigning to a reference -{0} -{10}\{12}$c{0} {10}={0} {10}\{12}$d{10};{0} -{10}\&{11}x{0} {10}={0} {10}\&{11}y{10};{0} - -{2}# Aliasing can also be applied to foreach iterator variables -{0} -{5}foreach{0} {10}\{14}%hash{0} {10}({13}@array_of_hash_refs{10}){0} {10}{{0} {10}...{0} {10}}{0} - -{2}# example snippet from brian d foy's blog post -{0} -{5}use{0} {11}feature{0} {30}qw(refaliasing){10};{0} - -{10}\{14}%other_hash{0} {10}={0} {10}\{14}%hash{10};{0} - -{5}use{0} {6}v5.22{10};{0} -{5}use{0} {11}feature{0} {30}qw(refaliasing){10};{0} - -{5}foreach{0} {10}\{5}my{0} {14}%hash{0} {10}({0} {13}@array_of_hashes{0} {10}){0} {10}{{0} {2}# named hash control variable -{0} {5}foreach{0} {5}my{0} {12}$key{0} {10}({0} {5}keys{0} {14}%hash{0} {10}){0} {10}{{0} {2}# named hash now! -{0} {10}...;{0} - {10}}{0} - {10}}{0} - -{2}#-------------------------------------------------------------------------- -# New :const subroutine attribute -#-------------------------------------------------------------------------- -{0} -{5}my{0} {12}$x{0} {10}={0} {4}54321{10};{0} -{15}*INLINED{0} {10}={0} {5}sub{0} {10}:{0} {11}const{0} {10}{{0} {12}$x{0} {10}};{0} -{12}$x{10}++;{0} - -{2}# more examples of attributes -# (not 5.22 stuff, but some general examples for study, useful for -# handling subroutine signature and subroutine prototype highlighting) -{0} -{5}sub{0} {11}foo{0} {10}:{0} {11}lvalue{0} {10};{0} - -{5}package{0} {11}X{10};{0} -{5}sub{0} {11}Y{10}::{11}x{0} {10}:{0} {11}lvalue{0} {10}{{0} {4}1{0} {10}}{0} - -{5}package{0} {11}X{10};{0} -{5}sub{0} {11}foo{0} {10}{{0} {4}1{0} {10}}{0} -{5}package{0} {11}Y{10};{0} -{5}BEGIN{0} {10}{{0} {15}*bar{0} {10}={0} {10}\&{11}X{10}::{11}foo{10};{0} {10}}{0} -{5}package{0} {11}Z{10};{0} -{5}sub{0} {11}Y{10}::{11}bar{0} {10}:{0} {11}lvalue{0} {10};{0} - -{2}# built-in attributes for subroutines: -{11}lvalue{0} {11}method{0} {5}prototype{10}(..){0} {11}locked{0} {11}const{0} - -{2}#-------------------------------------------------------------------------- -# Repetition in list assignment -#-------------------------------------------------------------------------- -{0} -{2}# example snippet from brian d foy's blog post -{5}use{0} {6}v5.22{10};{0} -{5}my{10}({5}undef{10},{0} {12}$card_num{10},{0} {10}({5}undef{10})x{4}3{10},{0} {12}$count{10}){0} {10}={0} {5}split{0} {17}/:/{10};{0} - -{10}({5}undef{10},{5}undef{10},{12}$foo{10}){0} {10}={0} {11}that_function{10}(){0} -{2}# is equivalent to -{10}(({5}undef{10})x{4}2{10},{0} {12}$foo{10}){0} {10}={0} {11}that_function{10}(){0} - -{2}#-------------------------------------------------------------------------- -# Floating point parsing has been improved -#-------------------------------------------------------------------------- -# Hexadecimal floating point literals -{0} -{2}# some hex floats from a program by Rick Regan -# appropriated and extended from Lua 5.2.x test cases -# tested on perl 5.22/cygwin -{0} -{4}0x1p-1074{10};{0} -{4}0x3.3333333333334p-5{10};{0} -{4}0xcc.ccccccccccdp-11{10};{0} -{4}0x1p+1{10};{0} -{4}0x1p-6{10};{0} -{4}0x1.b7p-1{10};{0} -{4}0x1.fffffffffffffp+1023{10};{0} -{4}0x1p-1022{10};{0} -{4}0X1.921FB4D12D84AP+1{10};{0} -{4}0x1.999999999999ap-4{10};{0} - -{2}# additional test cases for characterization -{4}0x1p-1074{10}.{0} {2}# dot is a string operator -{4}0x.ABCDEFp10{0} {2}# legal, dot immediately after 0x -{4}0x{10}.{11}p10{0} {2}# perl allows 0x as a zero, then concat with p10 bareword -{4}0x{10}.{11}p{0} {4}0x0{10}.{11}p{0} {2}# dot then bareword -{4}0x_0_.A_BC___DEF_p1_0{0} {2}# legal hex float, underscores are mostly allowed -{4}0x0{10}.{11}_ABCDEFp10{0} {2}# _ABCDEFp10 is a bareword, no underscore allowed after dot -{0} -{2}# illegal, but does not use error highlighting -{4}0x0p1{11}ABC{0} {2}# illegal, highlighted as 0x0p1 abut with bareword ABC -{0} -{2}# allowed to FAIL for now -{4}0x0.ABCDEFp_10{0} {2}# ABCDEFp_10 is a bareword, '_10' exponent not allowed -{4}0xp{0} {4}0xp1{0} {4}0x0.0p{0} {2}# syntax errors -{4}0x41.65{10}.{4}65{0} {2}# hex dot number, but lexer now fails with 0x41.65 left as a partial hex float -{0} -{2}#-------------------------------------------------------------------------- -# Support for ?PATTERN? without explicit operator has been removed -#-------------------------------------------------------------------------- -# ?PATTERN? must now be written as m?PATTERN? -{0} -{10}?{11}PATTERN{10}?{0} {2}# does not work in current LexPerl anyway, NO ACTION NEEDED -{17}m?PATTERN?{0} - -{2}#-------------------------------------------------------------------------- -# end of test file -#-------------------------------------------------------------------------- diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl deleted file mode 100644 index 9cfb488ba..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl +++ /dev/null @@ -1,239 +0,0 @@ -# -*- coding: utf-8 -*- -#-------------------------------------------------------------------------- -# perl-test-sub-prototypes.pl -#-------------------------------------------------------------------------- -# compiled all relevant subroutine prototype test cases -# -#-------------------------------------------------------------------------- -# Kein-Hong Man Public Domain -#-------------------------------------------------------------------------- -# 20151227 initial document -#-------------------------------------------------------------------------- - -#-------------------------------------------------------------------------- -# test cases for sub syntax scanner -#-------------------------------------------------------------------------- -# sub syntax: simple and with added module notation -#-------------------------------------------------------------------------- - -sub fish($) { 123; } -sub fish::chips($) { 123; } # module syntax -sub fish::chips::sauce($) { 123; } # multiple module syntax - -sub fish :: chips :: sauce ($) { 123; } # added whitespace - -sub fish :: # embedded comment -chips # embedded comment - :: sauce ($) { 123; } - -sub fish :: ($) { 123; } # incomplete or bad syntax examples -sub fish :: 123 ($) { 123; } -sub fish :: chips 123 ($) { 123; } -sub 123 ($) { 123; } - -#-------------------------------------------------------------------------- -# sub syntax: prototype attributes -#-------------------------------------------------------------------------- - -sub fish:prototype($) { 123; } -sub fish : prototype ($) { 123; } # added whitespace - -sub fish:salted($) { 123; } # wrong attribute example (must use 'prototype') -sub fish : 123($) { 123; } # illegal attribute -sub fish:prototype:salted($) { 123; } # wrong 'prototype' position -sub fish:salted salt:prototype($) { 123; } # wrong attribute syntax - -sub fish:const:prototype($) { 123; } # extra attributes -sub fish:const:lvalue:prototype($) { 123; } -sub fish:const:prototype($):lvalue{ 123; } # might be legal too -sub fish :const :prototype($) { 123; } # extra whitespace - -sub fish :const # embedded comment: a constant sub -:prototype # embedded comment -($) { 123; } - -#-------------------------------------------------------------------------- -# sub syntax: mixed -#-------------------------------------------------------------------------- - -sub fish::chips:prototype($) { 123; } -sub fish::chips::sauce:prototype($) { 123; } -sub fish ::chips ::sauce :prototype($) { 123; } # +whitespace - -sub fish::chips::sauce:const:prototype($) { 123; } -sub fish::chips::sauce :const :prototype($) { 123; } # +whitespace - -sub fish # embedded comment -::chips ::sauce # embedded comment - : const # embedded comment - : prototype ($) { 123; } - -# wrong syntax examples, parentheses must follow ':prototype' -sub fish :prototype :const ($) { 123;} -sub fish :prototype ::chips ($) { 123;} - -#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# More consistent prototype parsing -#-------------------------------------------------------------------------- -# - whitespace now allowed, lexer now allows spaces or tabs - -sub foo ( $ $ ) {} -sub foo ( ) {} # spaces/tabs empty -sub foo ( * ) {} -sub foo (@ ) {} -sub foo ( %) {} - -# untested, should probably be \[ but scanner does not check this for now -sub foo ( \ [ $ @ % & * ] ) {} - -#-------------------------------------------------------------------------- -# perl-test-5140delta.pl -#-------------------------------------------------------------------------- -# new + prototype character, acts like (\[@%]) -#-------------------------------------------------------------------------- - -# these samples work as before -sub mylink ($$) # mylink $old, $new -sub myvec ($$$) # myvec $var, $offset, 1 -sub myindex ($$;$) # myindex &getstring, "substr" -sub mysyswrite ($$$;$) # mysyswrite $buf, 0, length($buf) - $off, $off -sub myreverse (@) # myreverse $a, $b, $c -sub myjoin ($@) # myjoin ":", $a, $b, $c -sub myopen (*;$) # myopen HANDLE, $name -sub mypipe (**) # mypipe READHANDLE, WRITEHANDLE -sub mygrep (&@) # mygrep { /foo/ } $a, $b, $c -sub myrand (;$) # myrand 42 -sub mytime () # mytime - -# backslash group notation to specify more than one allowed argument type -sub myref (\[$@%&*]) {} - -sub mysub (_) # underscore can be optionally used FIXED 20151211 - -# these uses the new '+' prototype character -sub mypop (+) # mypop @array -sub mysplice (+$$@) # mysplice @array, 0, 2, @pushme -sub mykeys (+) # mykeys %{$hashref} - -#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# Experimental Subroutine signatures (mostly works) -#-------------------------------------------------------------------------- -# INCLUDED FOR COMPLETENESS ONLY -# IMPORTANT NOTE the subroutine prototypes lexing implementation has -# no effect on subroutine signature syntax highlighting - -# subroutine signatures mostly looks fine except for the @ and % slurpy -# notation which are highlighted as operators (all other parameters are -# highlighted as vars of some sort), a minor aesthetic issue - -use feature 'signatures'; - -sub foo ($left, $right) { # mandatory positional parameters - return $left + $right; -} -sub foo ($first, $, $third) { # ignore second argument - return "first=$first, third=$third"; -} -sub foo ($left, $right = 0) { # optional parameter with default value - return $left + $right; -} -my $auto_id = 0; # default value expression, evaluated if default used only -sub foo ($thing, $id = $auto_id++) { - print "$thing has ID $id"; -} -sub foo ($first_name, $surname, $nickname = $first_name) { # 3rd parm may depend on 1st parm - print "$first_name $surname is known as \"$nickname\""; -} -sub foo ($thing, $ = 1) { # nameless default parameter - print $thing; -} -sub foo ($thing, $=) { # (this does something, I'm not sure what...) - print $thing; -} -sub foo ($filter, @inputs) { # additional arguments (slurpy parameter) - print $filter->($_) foreach @inputs; -} -sub foo ($thing, @) { # nameless slurpy parameter FAILS for now - print $thing; -} -sub foo ($filter, %inputs) { # slurpy parameter, hash type - print $filter->($_, $inputs{$_}) foreach sort keys %inputs; -} -sub foo ($thing, %) { # nameless slurpy parm, hash type FAILS for now - print $thing; -} -sub foo () { # empty signature no arguments (styled as prototype) - return 123; -} - -#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# subs now take a prototype attribute -#-------------------------------------------------------------------------- - -sub foo :prototype($) { $_[0] } - -sub foo :prototype($$) ($left, $right) { - return $left + $right; -} - -sub foo : prototype($$){} # whitespace allowed - -# additional samples from perl-test-cases.pl with ':prototype' added: -sub mylink :prototype($$) {} sub myvec :prototype($$$) {} -sub myindex :prototype($$;$) {} sub mysyswrite :prototype($$$;$) {} -sub myreverse :prototype(@) {} sub myjoin :prototype($@) {} -sub mypop :prototype(\@) {} sub mysplice :prototype(\@$$@) {} -sub mykeys :prototype(\%) {} sub myopen :prototype(*;$) {} -sub mypipe :prototype(**) {} sub mygrep :prototype(&@) {} -sub myrand :prototype($) {} sub mytime :prototype() {} -# backslash group notation to specify more than one allowed argument type -sub myref :prototype(\[$@%&*]) {} - -# additional attributes may complicate scanning for prototype syntax, -# for example (from https://metacpan.org/pod/perlsub): -# Lvalue subroutines - -my $val; -sub canmod : lvalue { - $val; # or: return $val; -} -canmod() = 5; # assigns to $val - -#-------------------------------------------------------------------------- -# perl-test-5220delta.pl -#-------------------------------------------------------------------------- -# New :const subroutine attribute -#-------------------------------------------------------------------------- - -my $x = 54321; -*INLINED = sub : const { $x }; -$x++; - -# more examples of attributes -# (not 5.22 stuff, but some general examples for study, useful for -# handling subroutine signature and subroutine prototype highlighting) - -sub foo : lvalue ; - -package X; -sub Y::z : lvalue { 1 } - -package X; -sub foo { 1 } -package Y; -BEGIN { *bar = \&X::foo; } -package Z; -sub Y::bar : lvalue ; - -# built-in attributes for subroutines: -lvalue method prototype(..) locked const - -#-------------------------------------------------------------------------- -# end of test file -#-------------------------------------------------------------------------- diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.folded deleted file mode 100644 index aae301abf..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.folded +++ /dev/null @@ -1,240 +0,0 @@ - 2 400 401 + # -*- coding: utf-8 -*- - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-sub-prototypes.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # compiled all relevant subroutine prototype test cases - 0 401 401 | # - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # Kein-Hong Man Public Domain - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # 20151227 initial document - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # test cases for sub syntax scanner - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # sub syntax: simple and with added module notation - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 sub fish($) { 123; } - 0 400 400 sub fish::chips($) { 123; } # module syntax - 0 400 400 sub fish::chips::sauce($) { 123; } # multiple module syntax - 1 400 400 - 0 400 400 sub fish :: chips :: sauce ($) { 123; } # added whitespace - 1 400 400 - 0 400 400 sub fish :: # embedded comment - 0 400 400 chips # embedded comment - 0 400 400 :: sauce ($) { 123; } - 1 400 400 - 0 400 400 sub fish :: ($) { 123; } # incomplete or bad syntax examples - 0 400 400 sub fish :: 123 ($) { 123; } - 0 400 400 sub fish :: chips 123 ($) { 123; } - 0 400 400 sub 123 ($) { 123; } - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # sub syntax: prototype attributes - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 sub fish:prototype($) { 123; } - 0 400 400 sub fish : prototype ($) { 123; } # added whitespace - 1 400 400 - 0 400 400 sub fish:salted($) { 123; } # wrong attribute example (must use 'prototype') - 0 400 400 sub fish : 123($) { 123; } # illegal attribute - 0 400 400 sub fish:prototype:salted($) { 123; } # wrong 'prototype' position - 0 400 400 sub fish:salted salt:prototype($) { 123; } # wrong attribute syntax - 1 400 400 - 0 400 400 sub fish:const:prototype($) { 123; } # extra attributes - 0 400 400 sub fish:const:lvalue:prototype($) { 123; } - 0 400 400 sub fish:const:prototype($):lvalue{ 123; } # might be legal too - 0 400 400 sub fish :const :prototype($) { 123; } # extra whitespace - 1 400 400 - 0 400 400 sub fish :const # embedded comment: a constant sub - 0 400 400 :prototype # embedded comment - 0 400 400 ($) { 123; } - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # sub syntax: mixed - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 sub fish::chips:prototype($) { 123; } - 0 400 400 sub fish::chips::sauce:prototype($) { 123; } - 0 400 400 sub fish ::chips ::sauce :prototype($) { 123; } # +whitespace - 1 400 400 - 0 400 400 sub fish::chips::sauce:const:prototype($) { 123; } - 0 400 400 sub fish::chips::sauce :const :prototype($) { 123; } # +whitespace - 1 400 400 - 0 400 400 sub fish # embedded comment - 0 400 400 ::chips ::sauce # embedded comment - 0 400 400 : const # embedded comment - 0 400 400 : prototype ($) { 123; } - 1 400 400 - 0 400 400 # wrong syntax examples, parentheses must follow ':prototype' - 0 400 400 sub fish :prototype :const ($) { 123;} - 0 400 400 sub fish :prototype ::chips ($) { 123;} - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5200delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # More consistent prototype parsing - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 400 | # - whitespace now allowed, lexer now allows spaces or tabs - 1 400 400 - 0 400 400 sub foo ( $ $ ) {} - 0 400 400 sub foo ( ) {} # spaces/tabs empty - 0 400 400 sub foo ( * ) {} - 0 400 400 sub foo (@ ) {} - 0 400 400 sub foo ( %) {} - 1 400 400 - 0 400 400 # untested, should probably be \[ but scanner does not check this for now - 0 400 400 sub foo ( \ [ $ @ % & * ] ) {} - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5140delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # new + prototype character, acts like (\[@%]) - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 # these samples work as before - 0 400 400 sub mylink ($$) # mylink $old, $new - 0 400 400 sub myvec ($$$) # myvec $var, $offset, 1 - 0 400 400 sub myindex ($$;$) # myindex &getstring, "substr" - 0 400 400 sub mysyswrite ($$$;$) # mysyswrite $buf, 0, length($buf) - $off, $off - 0 400 400 sub myreverse (@) # myreverse $a, $b, $c - 0 400 400 sub myjoin ($@) # myjoin ":", $a, $b, $c - 0 400 400 sub myopen (*;$) # myopen HANDLE, $name - 0 400 400 sub mypipe (**) # mypipe READHANDLE, WRITEHANDLE - 0 400 400 sub mygrep (&@) # mygrep { /foo/ } $a, $b, $c - 0 400 400 sub myrand (;$) # myrand 42 - 0 400 400 sub mytime () # mytime - 1 400 400 - 0 400 400 # backslash group notation to specify more than one allowed argument type - 0 400 400 sub myref (\[$@%&*]) {} - 1 400 400 - 0 400 400 sub mysub (_) # underscore can be optionally used FIXED 20151211 - 1 400 400 - 0 400 400 # these uses the new '+' prototype character - 0 400 400 sub mypop (+) # mypop @array - 0 400 400 sub mysplice (+$$@) # mysplice @array, 0, 2, @pushme - 0 400 400 sub mykeys (+) # mykeys %{$hashref} - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5200delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # Experimental Subroutine signatures (mostly works) - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # INCLUDED FOR COMPLETENESS ONLY - 0 401 401 | # IMPORTANT NOTE the subroutine prototypes lexing implementation has - 0 401 400 | # no effect on subroutine signature syntax highlighting - 1 400 400 - 2 400 401 + # subroutine signatures mostly looks fine except for the @ and % slurpy - 0 401 401 | # notation which are highlighted as operators (all other parameters are - 0 401 400 | # highlighted as vars of some sort), a minor aesthetic issue - 1 400 400 - 0 400 400 use feature 'signatures'; - 1 400 400 - 2 400 401 + sub foo ($left, $right) { # mandatory positional parameters - 0 401 401 | return $left + $right; - 0 401 400 | } - 2 400 401 + sub foo ($first, $, $third) { # ignore second argument - 0 401 401 | return "first=$first, third=$third"; - 0 401 400 | } - 2 400 401 + sub foo ($left, $right = 0) { # optional parameter with default value - 0 401 401 | return $left + $right; - 0 401 400 | } - 0 400 400 my $auto_id = 0; # default value expression, evaluated if default used only - 2 400 401 + sub foo ($thing, $id = $auto_id++) { - 0 401 401 | print "$thing has ID $id"; - 0 401 400 | } - 2 400 401 + sub foo ($first_name, $surname, $nickname = $first_name) { # 3rd parm may depend on 1st parm - 0 401 401 | print "$first_name $surname is known as \"$nickname\""; - 0 401 400 | } - 2 400 401 + sub foo ($thing, $ = 1) { # nameless default parameter - 0 401 401 | print $thing; - 0 401 400 | } - 2 400 401 + sub foo ($thing, $=) { # (this does something, I'm not sure what...) - 0 401 401 | print $thing; - 0 401 400 | } - 2 400 401 + sub foo ($filter, @inputs) { # additional arguments (slurpy parameter) - 0 401 401 | print $filter->($_) foreach @inputs; - 0 401 400 | } - 2 400 401 + sub foo ($thing, @) { # nameless slurpy parameter FAILS for now - 0 401 401 | print $thing; - 0 401 400 | } - 2 400 401 + sub foo ($filter, %inputs) { # slurpy parameter, hash type - 0 401 401 | print $filter->($_, $inputs{$_}) foreach sort keys %inputs; - 0 401 400 | } - 2 400 401 + sub foo ($thing, %) { # nameless slurpy parm, hash type FAILS for now - 0 401 401 | print $thing; - 0 401 400 | } - 2 400 401 + sub foo () { # empty signature no arguments (styled as prototype) - 0 401 401 | return 123; - 0 401 400 | } - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5200delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # subs now take a prototype attribute - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 sub foo :prototype($) { $_[0] } - 1 400 400 - 2 400 401 + sub foo :prototype($$) ($left, $right) { - 0 401 401 | return $left + $right; - 0 401 400 | } - 1 400 400 - 0 400 400 sub foo : prototype($$){} # whitespace allowed - 1 400 400 - 0 400 400 # additional samples from perl-test-cases.pl with ':prototype' added: - 0 400 400 sub mylink :prototype($$) {} sub myvec :prototype($$$) {} - 0 400 400 sub myindex :prototype($$;$) {} sub mysyswrite :prototype($$$;$) {} - 0 400 400 sub myreverse :prototype(@) {} sub myjoin :prototype($@) {} - 0 400 400 sub mypop :prototype(\@) {} sub mysplice :prototype(\@$$@) {} - 0 400 400 sub mykeys :prototype(\%) {} sub myopen :prototype(*;$) {} - 0 400 400 sub mypipe :prototype(**) {} sub mygrep :prototype(&@) {} - 0 400 400 sub myrand :prototype($) {} sub mytime :prototype() {} - 0 400 400 # backslash group notation to specify more than one allowed argument type - 0 400 400 sub myref :prototype(\[$@%&*]) {} - 1 400 400 - 2 400 401 + # additional attributes may complicate scanning for prototype syntax, - 0 401 401 | # for example (from https://metacpan.org/pod/perlsub): - 0 401 400 | # Lvalue subroutines - 1 400 400 - 0 400 400 my $val; - 2 400 401 + sub canmod : lvalue { - 0 401 401 | $val; # or: return $val; - 0 401 400 | } - 0 400 400 canmod() = 5; # assigns to $val - 1 400 400 - 2 400 401 + #-------------------------------------------------------------------------- - 0 401 401 | # perl-test-5220delta.pl - 0 401 401 | #-------------------------------------------------------------------------- - 0 401 401 | # New :const subroutine attribute - 0 401 400 | #-------------------------------------------------------------------------- - 1 400 400 - 0 400 400 my $x = 54321; - 0 400 400 *INLINED = sub : const { $x }; - 0 400 400 $x++; - 1 400 400 - 2 400 401 + # more examples of attributes - 0 401 401 | # (not 5.22 stuff, but some general examples for study, useful for - 0 401 400 | # handling subroutine signature and subroutine prototype highlighting) - 1 400 400 - 0 400 400 sub foo : lvalue ; - 1 400 400 - 2 400 401 + package X; - 0 401 401 | sub Y::z : lvalue { 1 } - 1 401 401 | - 2 400 401 + package X; - 0 401 401 | sub foo { 1 } - 2 400 401 + package Y; - 0 401 401 | BEGIN { *bar = \&X::foo; } - 2 400 401 + package Z; - 0 401 401 | sub Y::bar : lvalue ; - 1 401 401 | - 0 401 401 | # built-in attributes for subroutines: - 0 401 401 | lvalue method prototype(..) locked const - 1 401 401 | - 2 401 402 + #-------------------------------------------------------------------------- - 0 402 402 | # end of test file - 0 402 401 | #-------------------------------------------------------------------------- - 0 401 0 | \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled deleted file mode 100644 index e7290803b..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/perl-test-sub-prototypes.pl.styled +++ /dev/null @@ -1,239 +0,0 @@ -{2}# -*- coding: utf-8 -*- -#-------------------------------------------------------------------------- -# perl-test-sub-prototypes.pl -#-------------------------------------------------------------------------- -# compiled all relevant subroutine prototype test cases -# -#-------------------------------------------------------------------------- -# Kein-Hong Man Public Domain -#-------------------------------------------------------------------------- -# 20151227 initial document -#-------------------------------------------------------------------------- -{0} -{2}#-------------------------------------------------------------------------- -# test cases for sub syntax scanner -#-------------------------------------------------------------------------- -# sub syntax: simple and with added module notation -#-------------------------------------------------------------------------- -{0} -{5}sub{0} {11}fish{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{10}::{11}chips{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# module syntax -{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# multiple module syntax -{0} -{5}sub{0} {11}fish{0} {10}::{0} {11}chips{0} {10}::{0} {11}sauce{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# added whitespace -{0} -{5}sub{0} {11}fish{0} {10}::{0} {2}# embedded comment -{11}chips{0} {2}# embedded comment -{0} {10}::{0} {11}sauce{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} - -{5}sub{0} {11}fish{0} {10}::{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# incomplete or bad syntax examples -{5}sub{0} {11}fish{0} {10}::{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{0} {10}::{0} {11}chips{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {4}123{0} {10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} - -{2}#-------------------------------------------------------------------------- -# sub syntax: prototype attributes -#-------------------------------------------------------------------------- -{0} -{5}sub{0} {11}fish{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{0} {10}:{0} {5}prototype{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# added whitespace -{0} -{5}sub{0} {11}fish{10}:{11}salted{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# wrong attribute example (must use 'prototype') -{5}sub{0} {11}fish{0} {10}:{0} {4}123{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# illegal attribute -{5}sub{0} {11}fish{10}:{5}prototype{10}:{11}salted{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# wrong 'prototype' position -{5}sub{0} {11}fish{10}:{11}salted{0} {11}salt{10}:{5}prototype{10}({12}$){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# wrong attribute syntax -{0} -{5}sub{0} {11}fish{10}:{11}const{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# extra attributes -{5}sub{0} {11}fish{10}:{11}const{10}:{11}lvalue{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{10}:{11}const{10}:{5}prototype{40}($){10}:{11}lvalue{10}{{0} {4}123{10};{0} {10}}{0} {2}# might be legal too -{5}sub{0} {11}fish{0} {10}:{11}const{0} {10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# extra whitespace -{0} -{5}sub{0} {11}fish{0} {10}:{11}const{0} {2}# embedded comment: a constant sub -{10}:{5}prototype{0} {2}# embedded comment -{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} - -{2}#-------------------------------------------------------------------------- -# sub syntax: mixed -#-------------------------------------------------------------------------- -{0} -{5}sub{0} {11}fish{10}::{11}chips{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{0} {10}::{11}chips{0} {10}::{11}sauce{0} {10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# +whitespace -{0} -{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{10}:{11}const{10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} -{5}sub{0} {11}fish{10}::{11}chips{10}::{11}sauce{0} {10}:{11}const{0} {10}:{5}prototype{40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} {2}# +whitespace -{0} -{5}sub{0} {11}fish{0} {2}# embedded comment -{10}::{11}chips{0} {10}::{11}sauce{0} {2}# embedded comment -{0} {10}:{0} {11}const{0} {2}# embedded comment -{0} {10}:{0} {5}prototype{0} {40}($){0} {10}{{0} {4}123{10};{0} {10}}{0} - -{2}# wrong syntax examples, parentheses must follow ':prototype' -{5}sub{0} {11}fish{0} {10}:{5}prototype{0} {10}:{11}const{0} {10}({12}$){0} {10}{{0} {4}123{10};}{0} -{5}sub{0} {11}fish{0} {10}:{5}prototype{0} {10}::{11}chips{0} {10}({12}$){0} {10}{{0} {4}123{10};}{0} - -{2}#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# More consistent prototype parsing -#-------------------------------------------------------------------------- -# - whitespace now allowed, lexer now allows spaces or tabs -{0} -{5}sub{0} {11}foo{0} {40}( $ $ ){0} {10}{}{0} -{5}sub{0} {11}foo{0} {40}( ){0} {10}{}{0} {2}# spaces/tabs empty -{5}sub{0} {11}foo{0} {40}( * ){0} {10}{}{0} -{5}sub{0} {11}foo{0} {40}(@ ){0} {10}{}{0} -{5}sub{0} {11}foo{0} {40}( %){0} {10}{}{0} - -{2}# untested, should probably be \[ but scanner does not check this for now -{5}sub{0} {11}foo{0} {40}( \ [ $ @ % & * ] ){0} {10}{}{0} - -{2}#-------------------------------------------------------------------------- -# perl-test-5140delta.pl -#-------------------------------------------------------------------------- -# new + prototype character, acts like (\[@%]) -#-------------------------------------------------------------------------- -{0} -{2}# these samples work as before -{5}sub{0} {11}mylink{0} {40}($$){0} {2}# mylink $old, $new -{5}sub{0} {11}myvec{0} {40}($$$){0} {2}# myvec $var, $offset, 1 -{5}sub{0} {11}myindex{0} {40}($$;$){0} {2}# myindex &getstring, "substr" -{5}sub{0} {11}mysyswrite{0} {40}($$$;$){0} {2}# mysyswrite $buf, 0, length($buf) - $off, $off -{5}sub{0} {11}myreverse{0} {40}(@){0} {2}# myreverse $a, $b, $c -{5}sub{0} {11}myjoin{0} {40}($@){0} {2}# myjoin ":", $a, $b, $c -{5}sub{0} {11}myopen{0} {40}(*;$){0} {2}# myopen HANDLE, $name -{5}sub{0} {11}mypipe{0} {40}(**){0} {2}# mypipe READHANDLE, WRITEHANDLE -{5}sub{0} {11}mygrep{0} {40}(&@){0} {2}# mygrep { /foo/ } $a, $b, $c -{5}sub{0} {11}myrand{0} {40}(;$){0} {2}# myrand 42 -{5}sub{0} {11}mytime{0} {40}(){0} {2}# mytime -{0} -{2}# backslash group notation to specify more than one allowed argument type -{5}sub{0} {11}myref{0} {40}(\[$@%&*]){0} {10}{}{0} - -{5}sub{0} {11}mysub{0} {40}(_){0} {2}# underscore can be optionally used FIXED 20151211 -{0} -{2}# these uses the new '+' prototype character -{5}sub{0} {11}mypop{0} {40}(+){0} {2}# mypop @array -{5}sub{0} {11}mysplice{0} {40}(+$$@){0} {2}# mysplice @array, 0, 2, @pushme -{5}sub{0} {11}mykeys{0} {40}(+){0} {2}# mykeys %{$hashref} -{0} -{2}#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# Experimental Subroutine signatures (mostly works) -#-------------------------------------------------------------------------- -# INCLUDED FOR COMPLETENESS ONLY -# IMPORTANT NOTE the subroutine prototypes lexing implementation has -# no effect on subroutine signature syntax highlighting -{0} -{2}# subroutine signatures mostly looks fine except for the @ and % slurpy -# notation which are highlighted as operators (all other parameters are -# highlighted as vars of some sort), a minor aesthetic issue -{0} -{5}use{0} {11}feature{0} {7}'signatures'{10};{0} - -{5}sub{0} {11}foo{0} {10}({12}$left{10},{0} {12}$right{10}){0} {10}{{0} {2}# mandatory positional parameters -{0} {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$first{10},{0} {12}$,{0} {12}$third{10}){0} {10}{{0} {2}# ignore second argument -{0} {5}return{0} {6}"first={43}$first{6}, third={43}$third{6}"{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$left{10},{0} {12}$right{0} {10}={0} {4}0{10}){0} {10}{{0} {2}# optional parameter with default value -{0} {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0} -{10}}{0} -{5}my{0} {12}$auto_id{0} {10}={0} {4}0{10};{0} {2}# default value expression, evaluated if default used only -{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}$id{0} {10}={0} {12}$auto_id{10}++){0} {10}{{0} - {5}print{0} {6}"{43}$thing{6} has ID {43}$id{6}"{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$first_name{10},{0} {12}$surname{10},{0} {12}$nickname{0} {10}={0} {12}$first_name{10}){0} {10}{{0} {2}# 3rd parm may depend on 1st parm -{0} {5}print{0} {6}"{43}$first_name{6} {43}$surname{6} is known as \"{43}$nickname{6}\""{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}${0} {10}={0} {4}1{10}){0} {10}{{0} {2}# nameless default parameter -{0} {5}print{0} {12}$thing{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {12}$={10}){0} {10}{{0} {2}# (this does something, I'm not sure what...) -{0} {5}print{0} {12}$thing{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$filter{10},{0} {13}@inputs{10}){0} {10}{{0} {2}# additional arguments (slurpy parameter) -{0} {5}print{0} {12}$filter{10}->({12}$_{10}){0} {5}foreach{0} {13}@inputs{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {10}@){0} {10}{{0} {2}# nameless slurpy parameter FAILS for now -{0} {5}print{0} {12}$thing{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$filter{10},{0} {14}%inputs{10}){0} {10}{{0} {2}# slurpy parameter, hash type -{0} {5}print{0} {12}$filter{10}->({12}$_{10},{0} {12}$inputs{10}{{12}$_{10}}){0} {5}foreach{0} {5}sort{0} {5}keys{0} {14}%inputs{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {10}({12}$thing{10},{0} {10}%){0} {10}{{0} {2}# nameless slurpy parm, hash type FAILS for now -{0} {5}print{0} {12}$thing{10};{0} -{10}}{0} -{5}sub{0} {11}foo{0} {40}(){0} {10}{{0} {2}# empty signature no arguments (styled as prototype) -{0} {5}return{0} {4}123{10};{0} -{10}}{0} - -{2}#-------------------------------------------------------------------------- -# perl-test-5200delta.pl -#-------------------------------------------------------------------------- -# subs now take a prototype attribute -#-------------------------------------------------------------------------- -{0} -{5}sub{0} {11}foo{0} {10}:{5}prototype{40}($){0} {10}{{0} {12}$_{10}[{4}0{10}]{0} {10}}{0} - -{5}sub{0} {11}foo{0} {10}:{5}prototype{40}($$){0} {10}({12}$left{10},{0} {12}$right{10}){0} {10}{{0} - {5}return{0} {12}$left{0} {10}+{0} {12}$right{10};{0} -{10}}{0} - -{5}sub{0} {11}foo{0} {10}:{0} {5}prototype{40}($$){10}{}{0} {2}# whitespace allowed -{0} -{2}# additional samples from perl-test-cases.pl with ':prototype' added: -{5}sub{0} {11}mylink{0} {10}:{5}prototype{40}($$){0} {10}{}{0} {5}sub{0} {11}myvec{0} {10}:{5}prototype{40}($$$){0} {10}{}{0} -{5}sub{0} {11}myindex{0} {10}:{5}prototype{40}($$;$){0} {10}{}{0} {5}sub{0} {11}mysyswrite{0} {10}:{5}prototype{40}($$$;$){0} {10}{}{0} -{5}sub{0} {11}myreverse{0} {10}:{5}prototype{40}(@){0} {10}{}{0} {5}sub{0} {11}myjoin{0} {10}:{5}prototype{40}($@){0} {10}{}{0} -{5}sub{0} {11}mypop{0} {10}:{5}prototype{40}(\@){0} {10}{}{0} {5}sub{0} {11}mysplice{0} {10}:{5}prototype{40}(\@$$@){0} {10}{}{0} -{5}sub{0} {11}mykeys{0} {10}:{5}prototype{40}(\%){0} {10}{}{0} {5}sub{0} {11}myopen{0} {10}:{5}prototype{40}(*;$){0} {10}{}{0} -{5}sub{0} {11}mypipe{0} {10}:{5}prototype{40}(**){0} {10}{}{0} {5}sub{0} {11}mygrep{0} {10}:{5}prototype{40}(&@){0} {10}{}{0} -{5}sub{0} {11}myrand{0} {10}:{5}prototype{40}($){0} {10}{}{0} {5}sub{0} {11}mytime{0} {10}:{5}prototype{40}(){0} {10}{}{0} -{2}# backslash group notation to specify more than one allowed argument type -{5}sub{0} {11}myref{0} {10}:{5}prototype{40}(\[$@%&*]){0} {10}{}{0} - -{2}# additional attributes may complicate scanning for prototype syntax, -# for example (from https://metacpan.org/pod/perlsub): -# Lvalue subroutines -{0} -{5}my{0} {12}$val{10};{0} -{5}sub{0} {11}canmod{0} {10}:{0} {11}lvalue{0} {10}{{0} - {12}$val{10};{0} {2}# or: return $val; -{10}}{0} -{11}canmod{10}(){0} {10}={0} {4}5{10};{0} {2}# assigns to $val -{0} -{2}#-------------------------------------------------------------------------- -# perl-test-5220delta.pl -#-------------------------------------------------------------------------- -# New :const subroutine attribute -#-------------------------------------------------------------------------- -{0} -{5}my{0} {12}$x{0} {10}={0} {4}54321{10};{0} -{15}*INLINED{0} {10}={0} {5}sub{0} {10}:{0} {11}const{0} {10}{{0} {12}$x{0} {10}};{0} -{12}$x{10}++;{0} - -{2}# more examples of attributes -# (not 5.22 stuff, but some general examples for study, useful for -# handling subroutine signature and subroutine prototype highlighting) -{0} -{5}sub{0} {11}foo{0} {10}:{0} {11}lvalue{0} {10};{0} - -{5}package{0} {11}X{10};{0} -{5}sub{0} {11}Y{10}::{11}z{0} {10}:{0} {11}lvalue{0} {10}{{0} {4}1{0} {10}}{0} - -{5}package{0} {11}X{10};{0} -{5}sub{0} {11}foo{0} {10}{{0} {4}1{0} {10}}{0} -{5}package{0} {11}Y{10};{0} -{5}BEGIN{0} {10}{{0} {15}*bar{0} {10}={0} {10}\&{11}X{10}::{11}foo{10};{0} {10}}{0} -{5}package{0} {11}Z{10};{0} -{5}sub{0} {11}Y{10}::{11}bar{0} {10}:{0} {11}lvalue{0} {10};{0} - -{2}# built-in attributes for subroutines: -{11}lvalue{0} {11}method{0} {5}prototype{10}(..){0} {11}locked{0} {11}const{0} - -{2}#-------------------------------------------------------------------------- -# end of test file -#-------------------------------------------------------------------------- diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl deleted file mode 100644 index 19288f2c9..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl +++ /dev/null @@ -1,5 +0,0 @@ -use strict; -while ( $r ) { - printf ( "Example text \n" ); - sleep 1; -} \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.folded deleted file mode 100644 index f05af0bbc..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.folded +++ /dev/null @@ -1,5 +0,0 @@ - 0 400 400 use strict; - 2 400 401 + while ( $r ) { - 0 401 401 | printf ( "Example text \n" ); - 0 401 401 | sleep 1; - 0 401 0 | } \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.styled deleted file mode 100644 index 74da4e911..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/perl/x.pl.styled +++ /dev/null @@ -1,5 +0,0 @@ -{5}use{0} {11}strict{10};{0} -{5}while{0} {10}({0} {12}$r{0} {10}){0} {10}{{0} - {5}printf{0} {10}({0} {6}"Example text \n"{0} {10});{0} - {5}sleep{0} {4}1{10};{0} -{10}} \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py deleted file mode 100644 index a93df7500..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py +++ /dev/null @@ -1,63 +0,0 @@ -# Enumerate all styles: 0 to 19 -# comment=1 - -# whitespace=0 - # w - -# number=2 -37 - -# double-quoted-string=3 -"str" - -# single-quoted-string=4 -'str' - -# keyword=5 -pass - -# triple-quoted-string=6 -'''str''' - -# triple-double-quoted-string=7 -"""str""" - -# class-name=8 -class ClassName: - pass - -# function-name=9 -def function_name(): - pass - -# operator=10 -1 + 3 - -# identifier=11 -identifier = 2 - -# comment-block=12 -## block - -# unclosed-string=13 -" unclosed - -# highlighted-identifier=14 -hilight = 2 - -# decorator=15 -@staticmethod -def fn(): pass - -a = 1 -# double-quoted-f-string=16 -f"{a}" - -# single-quoted-f-string=17 -f'{a}' - -# triple-quoted-f-string=18 -f'''{a}''' - -# double-triple-quoted-f-string=19 -f"""{a}""" diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.folded deleted file mode 100644 index 995ea78c1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.folded +++ /dev/null @@ -1,64 +0,0 @@ - 0 400 0 # Enumerate all styles: 0 to 19 - 0 400 0 # comment=1 - 1 400 0 - 0 400 0 # whitespace=0 - 0 400 0 # w - 1 400 0 - 0 400 0 # number=2 - 0 400 0 37 - 1 400 0 - 0 400 0 # double-quoted-string=3 - 0 400 0 "str" - 1 400 0 - 0 400 0 # single-quoted-string=4 - 0 400 0 'str' - 1 400 0 - 0 400 0 # keyword=5 - 0 400 0 pass - 1 400 0 - 0 400 0 # triple-quoted-string=6 - 0 400 0 '''str''' - 1 400 0 - 0 400 0 # triple-double-quoted-string=7 - 0 400 0 """str""" - 1 400 0 - 0 400 0 # class-name=8 - 2 400 0 + class ClassName: - 0 408 0 | pass - 1 400 0 - 0 400 0 # function-name=9 - 2 400 0 + def function_name(): - 0 408 0 | pass - 1 400 0 - 0 400 0 # operator=10 - 0 400 0 1 + 3 - 1 400 0 - 0 400 0 # identifier=11 - 0 400 0 identifier = 2 - 1 400 0 - 0 400 0 # comment-block=12 - 0 400 0 ## block - 1 400 0 - 0 400 0 # unclosed-string=13 - 0 400 0 " unclosed - 1 400 0 - 0 400 0 # highlighted-identifier=14 - 0 400 0 hilight = 2 - 1 400 0 - 0 400 0 # decorator=15 - 0 400 0 @staticmethod - 0 400 0 def fn(): pass - 1 400 0 - 0 400 0 a = 1 - 0 400 0 # double-quoted-f-string=16 - 0 400 0 f"{a}" - 1 400 0 - 0 400 0 # single-quoted-f-string=17 - 0 400 0 f'{a}' - 1 400 0 - 0 400 0 # triple-quoted-f-string=18 - 0 400 0 f'''{a}''' - 1 400 0 - 0 400 0 # double-triple-quoted-f-string=19 - 0 400 0 f"""{a}""" - 1 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.styled deleted file mode 100644 index e824e9e4c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/AllStyles.py.styled +++ /dev/null @@ -1,63 +0,0 @@ -{1}# Enumerate all styles: 0 to 19{0} -{1}# comment=1{0} - -{1}# whitespace=0{0} - {1}# w{0} - -{1}# number=2{0} -{2}37{0} - -{1}# double-quoted-string=3{0} -{3}"str"{0} - -{1}# single-quoted-string=4{0} -{4}'str'{0} - -{1}# keyword=5{0} -{5}pass{0} - -{1}# triple-quoted-string=6{0} -{6}'''str'''{0} - -{1}# triple-double-quoted-string=7{0} -{7}"""str"""{0} - -{1}# class-name=8{0} -{5}class{0} {8}ClassName{10}:{0} - {5}pass{0} - -{1}# function-name=9{0} -{5}def{0} {9}function_name{10}():{0} - {5}pass{0} - -{1}# operator=10{0} -{2}1{0} {10}+{0} {2}3{0} - -{1}# identifier=11{0} -{11}identifier{0} {10}={0} {2}2{0} - -{1}# comment-block=12{0} -{12}## block{0} - -{1}# unclosed-string=13{0} -{13}" unclosed -{0} -{1}# highlighted-identifier=14{0} -{14}hilight{0} {10}={0} {2}2{0} - -{1}# decorator=15{0} -{15}@staticmethod{0} -{5}def{0} {9}fn{10}():{0} {5}pass{0} - -{11}a{0} {10}={0} {2}1{0} -{1}# double-quoted-f-string=16{0} -{16}f"{{11}a{16}}"{0} - -{1}# single-quoted-f-string=17{0} -{17}f'{{11}a{17}}'{0} - -{1}# triple-quoted-f-string=18{0} -{18}f'''{{11}a{18}}'''{0} - -{1}# double-triple-quoted-f-string=19{0} -{19}f"""{{11}a{19}}"""{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/SciTE.properties deleted file mode 100644 index 3cd71b52a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/SciTE.properties +++ /dev/null @@ -1,5 +0,0 @@ -lexer.*.py=python -keywords.*.py=class def else for if import in pass print return while with yield -keywords2.*.py=hilight -fold=1 -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py deleted file mode 100644 index 57833c059..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py +++ /dev/null @@ -1,19 +0,0 @@ -# Convert all punctuation characters except '_', '*', and '.' into spaces. -def depunctuate(s): - '''A docstring''' - """Docstring 2""" - d = "" - for ch in s: - if ch in 'abcde': - d = d + ch - else: - d = d + " " - return d - -import contextlib - -@contextlib.contextmanager -def singleuse(): - print("Before") - yield -with singleuse(): pass diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.folded deleted file mode 100644 index 7e7dd46eb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.folded +++ /dev/null @@ -1,20 +0,0 @@ - 0 400 0 # Convert all punctuation characters except '_', '*', and '.' into spaces. - 2 400 0 + def depunctuate(s): - 0 408 0 | '''A docstring''' - 0 408 0 | """Docstring 2""" - 0 408 0 | d = "" - 2 408 0 + for ch in s: - 2 410 0 + if ch in 'abcde': - 0 418 0 | d = d + ch - 2 410 0 + else: - 0 418 0 | d = d + " " - 0 408 0 | return d - 1 400 0 - 0 400 0 import contextlib - 1 400 0 - 0 400 0 @contextlib.contextmanager - 2 400 0 + def singleuse(): - 0 408 0 | print("Before") - 0 408 0 | yield - 0 400 0 with singleuse(): pass - 1 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.styled deleted file mode 100644 index 8ba7513c8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/python/x.py.styled +++ /dev/null @@ -1,19 +0,0 @@ -{1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0} -{5}def{0} {9}depunctuate{10}({11}s{10}):{0} - {6}'''A docstring'''{0} - {7}"""Docstring 2"""{0} - {11}d{0} {10}={0} {3}""{0} - {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0} - {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0} - {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0} - {5}else{10}:{0} - {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0} - {5}return{0} {11}d{0} - -{5}import{0} {11}contextlib{0} - -{15}@contextlib{10}.{11}contextmanager{0} -{5}def{0} {9}singleuse{10}():{0} - {5}print{10}({3}"Before"{10}){0} - {5}yield{0} -{5}with{0} {11}singleuse{10}():{0} {5}pass{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/SciTE.properties deleted file mode 100644 index 8e79ca240..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/SciTE.properties +++ /dev/null @@ -1,114 +0,0 @@ -lexer.*.p6=raku -# Keywords (base) -keywords.*.p6=BEGIN CATCH CHECK CONTROL END ENTER EVAL FIRST \ - INIT KEEP LAST LEAVE NEXT POST PRE START TEMP UNDO after also andthen as \ - async augment bag before but category circumfix class cmp complex constant \ - contend default defer div does dynamic else elsif enum eq eqv extra fail \ - fatal ff fff for gather gcd ge given grammar gt handles has if infix is lcm \ - le leave leg let lift loop lt macro make maybe method mix mod module multi \ - ne not o only oo or orelse orwith postcircumfix postfix prefix proto regex \ - repeat require return-rw returns role rule size_t slang start str submethod \ - subset supersede take temp term token trusts try unit unless until when \ - where while with without x xor xx -# Keywords (functions) -keywords2.*.p6=ACCEPTS AT-KEY EVALFILE EXISTS-KEY Filetests \ - IO STORE abs accept acos acosec acosech acosh acotan acotanh alarm and \ - antipairs asec asech asin asinh atan atan2 atanh base bind binmode bless \ - break caller ceiling chars chdir chmod chomp chop chr chroot chrs cis close \ - closedir codes comb conj connect contains continue cos cosec cosech cosh \ - cotan cotanh crypt dbm defined die do dump each elems eof exec exists exit \ - exp expmod fc fcntl fileno flat flip flock floor fmt fork formats functions \ - get getc getpeername getpgrp getppid getpriority getsock gist glob gmtime \ - goto grep hyper import index int invert ioctl is-prime iterator join keyof \ - keys kill kv last lazy lc lcfirst lines link list listen local localtime \ - lock log log10 lsb lstat map match mkdir msb msg my narrow new next no of \ - open ord ords our pack package pairs path pick pipe polymod pop pos pred \ - print printf prototype push quoting race rand read readdir readline readlink \ - readpipe recv redo ref rename requires reset return reverse rewinddir rindex \ - rmdir roots round samecase say scalar sec sech seek seekdir select semctl \ - semget semop send set setpgrp setpriority setsockopt shift shm shutdown sign \ - sin sinh sleep sockets sort splice split sprintf sqrt srand stat state study \ - sub subst substr substr-rw succ symlink sys syscall system syswrite tan tanh \ - tc tclc tell telldir tie time times trans trim trim-leading trim-trailing \ - truncate uc ucfirst unimatch uniname uninames uniprop uniprops unival unlink \ - unpack unpolar unshift untie use utime values wait waitpid wantarray warn \ - wordcase words write -# Keywords (types) -keywords3.*.p6=AST Any Block Bool CallFrame Callable Code \ - Collation Compiler Complex ComplexStr Cool CurrentThreadScheduler Date \ - DateTime Dateish Distribution Distribution::Hash Distribution::Locally \ - Distribution::Path Duration Encoding Encoding::Registry Endian FatRat \ - ForeignCode HyperSeq HyperWhatever Instant Int IntStr Junction Label \ - Lock::Async Macro Method Mu Nil Num NumStr Numeric ObjAt Parameter Perl \ - PredictiveIterator Proxy RaceSeq Rat RatStr Rational Real Routine \ - Routine::WrapHandle Scalar Sequence Signature Str StrDistance Stringy Sub \ - Submethod Telemetry Telemetry::Instrument::Thread \ - Telemetry::Instrument::ThreadPool Telemetry::Instrument::Usage \ - Telemetry::Period Telemetry::Sampler UInt ValueObjAt Variable Version \ - Whatever WhateverCode atomicint bit bool buf buf1 buf16 buf2 buf32 buf4 \ - buf64 buf8 int int1 int16 int2 int32 int4 int64 int8 long longlong num \ - num32 num64 rat rat1 rat16 rat2 rat32 rat4 rat64 rat8 uint uint1 uint16 \ - uint2 uint32 uint4 uint64 uint8 utf16 utf32 utf8 -# Keywords (types composite) -keywords4.*.p6=Array Associative Bag BagHash Baggy Blob Buf \ - Capture Enumeration Hash Iterable Iterator List Map Mix MixHash Mixy NFC NFD \ - NFKC NFKD Pair Positional PositionalBindFailover PseudoStash QuantHash Range \ - Seq Set SetHash Setty Slip Stash Uni utf8 -# Keywords (types domain specific) -keywords5.*.p6=Attribute Cancellation Channel CompUnit \ - CompUnit::Repository CompUnit::Repository::FileSystem \ - CompUnit::Repository::Installation Distro Grammar IO IO::ArgFiles \ - IO::CatHandle IO::Handle IO::Notification IO::Path IO::Path::Cygwin \ - IO::Path::QNX IO::Path::Unix IO::Path::Win32 IO::Pipe IO::Socket \ - IO::Socket::Async IO::Socket::INET IO::Spec IO::Spec::Cygwin \ - IO::Spec::QNX IO::Spec::Unix IO::Spec::Win32 IO::Special Kernel Lock \ - Match Order Pod::Block Pod::Block::Code Pod::Block::Comment \ - Pod::Block::Declarator Pod::Block::Named Pod::Block::Para Pod::Block::Table \ - Pod::Defn Pod::FormattingCode Pod::Heading Pod::Item Proc Proc::Async \ - Promise Regex Scheduler Semaphore Supplier Supplier::Preserving Supply \ - Systemic Tap Thread ThreadPoolScheduler VM -# Keywords (types domain exceptions) -keywords6.*.p6=Backtrace Backtrace::Frame CX::Done CX::Emit \ - CX::Last CX::Next CX::Proceed CX::Redo CX::Return CX::Succeed CX::Take \ - CX::Warn Exception Failure X::AdHoc X::Anon::Augment X::Anon::Multi \ - X::Assignment::RO X::Attribute::NoPackage X::Attribute::Package \ - X::Attribute::Required X::Attribute::Undeclared X::Augment::NoSuchType \ - X::Bind X::Bind::NativeType X::Bind::Slice X::Caller::NotDynamic \ - X::Channel::ReceiveOnClosed X::Channel::SendOnClosed X::Comp \ - X::Composition::NotComposable X::Constructor::Positional X::Control \ - X::ControlFlow X::ControlFlow::Return X::DateTime::TimezoneClash \ - X::Declaration::Scope X::Declaration::Scope::Multi X::Does::TypeObject \ - X::Dynamic::NotFound X::Eval::NoSuchLang X::Export::NameClash X::IO \ - X::IO::Chdir X::IO::Chmod X::IO::Copy X::IO::Cwd X::IO::Dir X::IO::DoesNotExist \ - X::IO::Link X::IO::Mkdir X::IO::Move X::IO::Rename X::IO::Rmdir \ - X::IO::Symlink X::IO::Unlink X::Inheritance::NotComposed \ - X::Inheritance::Unsupported X::Method::InvalidQualifier X::Method::NotFound \ - X::Method::Private::Permission X::Method::Private::Unqualified \ - X::Mixin::NotComposable X::NYI X::NoDispatcher X::Numeric::Real \ - X::OS X::Obsolete X::OutOfRange X::Package::Stubbed X::Parameter::Default \ - X::Parameter::MultipleTypeConstraints X::Parameter::Placeholder \ - X::Parameter::Twigil X::Parameter::WrongOrder X::Phaser::Multiple \ - X::Phaser::PrePost X::Placeholder::Block X::Placeholder::Mainline \ - X::Pod X::Proc::Async X::Proc::Async::AlreadyStarted X::Proc::Async::BindOrUse \ - X::Proc::Async::CharsOrBytes X::Proc::Async::MustBeStarted \ - X::Proc::Async::OpenForWriting X::Proc::Async::TapBeforeSpawn \ - X::Proc::Unsuccessful X::Promise::CauseOnlyValidOnBroken X::Promise::Vowed \ - X::Redeclaration X::Role::Initialization X::Scheduler::CueInNaNSeconds \ - X::Seq::Consumed X::Sequence::Deduction X::Signature::NameClash \ - X::Signature::Placeholder X::Str::Numeric X::StubCode X::Syntax \ - X::Syntax::Augment::WithoutMonkeyTyping X::Syntax::Comment::Embedded \ - X::Syntax::Confused X::Syntax::InfixInTermPosition X::Syntax::Malformed \ - X::Syntax::Missing X::Syntax::NegatedPair X::Syntax::NoSelf \ - X::Syntax::Number::RadixOutOfRange X::Syntax::P5 X::Syntax::Perl5Var \ - X::Syntax::Regex::Adverb X::Syntax::Regex::SolitaryQuantifier \ - X::Syntax::Reserved X::Syntax::Self::WithoutObject \ - X::Syntax::Signature::InvocantMarker X::Syntax::Term::MissingInitializer \ - X::Syntax::UnlessElse X::Syntax::Variable::Match X::Syntax::Variable::Numeric \ - X::Syntax::Variable::Twigil X::Temporal X::Temporal::InvalidFormat \ - X::TypeCheck X::TypeCheck::Assignment X::TypeCheck::Binding \ - X::TypeCheck::Return X::TypeCheck::Splice X::Undeclared -# Keywords (adverbs) -keywords7.*.p6=D a array b backslash c closure delete double \ - exec exists f function h hash heredoc k kv p q qq quotewords s scalar single \ - sym to v val w words ww x -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6 b/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6 deleted file mode 100644 index 0cbdb6a57..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6 +++ /dev/null @@ -1,54 +0,0 @@ -use v6; - -# Normal single line comment -my Int $i = 0; -my Rat $r = 3.142; -my Str $s = "Hello, world! \$i == $i and \$r == $r"; -say $s; - -#`{{ -*** This is a multi-line comment *** -}} - -my @array = #`[[ inline comment ]] ; -my %hash = ( AAA => 1, BBB => 2 ); - -say q[This back\slash stays]; -say q[This back\\slash stays]; # Identical output -say Q:q!Just a literal "\n" here!; - -=begin pod -POD Documentation... -=end pod - -say qq:to/END/; -A multi-line -string with interpolated vars: $i, $r -END - -sub function { - return q:to/END/; -Here is -some multi-line -string -END -} - -my $func = &function; -say $func(); - -grammar Calculator { - token TOP { } - proto rule calc-op {*} - rule calc-op:sym { '+' } - rule calc-op:sym { '-' } - token num { \d+ } -} - -class Calculations { - method TOP ($/) { make $.made; } - method calc-op:sym ($/) { make [+] $; } - method calc-op:sym ($/) { make [-] $; } -} - -say Calculator.parse('2 + 3', actions => Calculations).made; diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.folded deleted file mode 100644 index 6591e04b4..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.folded +++ /dev/null @@ -1,55 +0,0 @@ - 0 400 400 use v6; - 1 400 400 - 0 400 400 # Normal single line comment - 0 400 400 my Int $i = 0; - 0 400 400 my Rat $r = 3.142; - 0 400 400 my Str $s = "Hello, world! \$i == $i and \$r == $r"; - 0 400 400 say $s; - 1 400 400 - 2 400 401 + #`{{ - 0 401 401 | *** This is a multi-line comment *** - 0 401 400 | }} - 1 400 400 - 0 400 400 my @array = #`[[ inline comment ]] ; - 0 400 400 my %hash = ( AAA => 1, BBB => 2 ); - 1 400 400 - 0 400 400 say q[This back\slash stays]; - 0 400 400 say q[This back\\slash stays]; # Identical output - 0 400 400 say Q:q!Just a literal "\n" here!; - 1 400 400 - 2 400 401 + =begin pod - 0 401 401 | POD Documentation... - 0 401 400 | =end pod - 1 400 400 - 0 400 400 say qq:to/END/; - 0 400 400 A multi-line - 0 400 400 string with interpolated vars: $i, $r - 0 400 400 END - 1 400 400 - 2 400 401 + sub function { - 0 401 401 | return q:to/END/; - 0 401 401 | Here is - 0 401 401 | some multi-line - 0 401 401 | string - 0 401 401 | END - 0 401 400 | } - 1 400 400 - 0 400 400 my $func = &function; - 0 400 400 say $func(); - 1 400 400 - 2 400 401 + grammar Calculator { - 0 401 401 | token TOP { } - 0 401 401 | proto rule calc-op {*} - 0 401 401 | rule calc-op:sym { '+' } - 0 401 401 | rule calc-op:sym { '-' } - 0 401 401 | token num { \d+ } - 0 401 400 | } - 1 400 400 - 2 400 401 + class Calculations { - 0 401 401 | method TOP ($/) { make $.made; } - 0 401 401 | method calc-op:sym ($/) { make [+] $; } - 0 401 401 | method calc-op:sym ($/) { make [-] $; } - 0 401 400 | } - 1 400 400 - 0 400 400 say Calculator.parse('2 + 3', actions => Calculations).made; - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.styled deleted file mode 100644 index f23902104..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/raku/x.p6.styled +++ /dev/null @@ -1,54 +0,0 @@ -{20}use{0} {16}v6{18};{0} - -{2}# Normal single line comment{0} -{20}my{0} {22}Int{0} {23}$i{0} {18}={0} {16}0{18};{0} -{20}my{0} {22}Rat{0} {23}$r{0} {18}={0} {16}3.142{18};{0} -{20}my{0} {22}Str{0} {23}$s{0} {18}={0} {8}"Hello, world! \$i == {12}$i{8} and \$r == {12}$r{8}"{18};{0} -{20}say{0} {23}$s{18};{0} - -{2}#`{3}{{ -*** This is a multi-line comment *** -}}{0} - -{20}my{0} {24}@array{0} {18}={0} {2}#`{3}[[ inline comment ]]{0} {9}{18};{0} -{20}my{0} {25}%hash{0} {18}={0} {18}({0} {21}AAA{0} {18}=>{0} {16}1{18},{0} {21}BBB{0} {18}=>{0} {16}2{0} {18});{0} - -{20}say{0} {9}q[This back\slash stays]{18};{0} -{20}say{0} {9}q[This back\\slash stays]{18};{0} {2}# Identical output{0} -{20}say{0} {11}Q{15}:q{11}!Just a literal "\n" here!{18};{0} - -{4}=begin pod -POD Documentation... -=end pod{0} - -{20}say{0} {10}qq{15}:to{10}/END/{18};{0} -{7}A multi-line -string with interpolated vars: {12}$i{7}, {12}$r{7} -END{0} - -{20}sub{0} {21}function{0} {18}{{0} - {20}return{0} {9}q{15}:to{9}/END/{18};{0} -{6}Here is -some multi-line -string -END{0} -{18}}{0} - -{20}my{0} {23}$func{0} {18}={0} {26}&function{18};{0} -{20}say{0} {23}$func{18}();{0} - -{19}grammar{0} {27}Calculator{0} {18}{{0} - {19}token{0} {21}TOP{0} {13}{ }{0} - {19}proto{0} {19}rule{0} {21}calc-op{0} {13}{*}{0} - {19}rule{0} {21}calc-op{15}:sym{18}<{21}add{18}>{0} {13}{ '+' }{0} - {19}rule{0} {21}calc-op{15}:sym{18}<{21}sub{18}>{0} {13}{ '-' }{0} - {19}token{0} {21}num{0} {13}{ \d+ }{0} -{18}}{0} - -{19}class{0} {28}Calculations{0} {18}{{0} - {19}method{0} {21}TOP{0} {18}({23}$/{18}){0} {18}{{0} {19}make{0} {23}${18}<{23}calc-op{18}>.{21}made{18};{0} {18}}{0} - {19}method{0} {21}calc-op{15}:sym{18}<{21}add{18}>{0} {18}({23}$/{18}){0} {18}{{0} {21}make{0} {18}[+]{0} {23}${18}<{23}num{18}>;{0} {18}}{0} - {19}method{0} {21}calc-op{15}:sym{18}<{21}sub{18}>{0} {18}({23}$/{18}){0} {18}{{0} {21}make{0} {18}[-]{0} {23}${18}<{23}num{18}>;{0} {18}}{0} -{18}}{0} - -{20}say{0} {21}Calculator{18}.{21}parse{18}({8}'2 + 3'{18},{0} {21}actions{0} {18}=>{0} {21}Calculations{18}).{21}made{18};{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/SciTE.properties deleted file mode 100644 index 896f83f14..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -lexer.*.rb=ruby -keywords.*.rb=class def end -fold=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb b/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb deleted file mode 100644 index d1bb0f0a8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb +++ /dev/null @@ -1,6 +0,0 @@ -class Demo - def test # A test - i = 1 - puts "Example" - end -end \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.folded deleted file mode 100644 index 7f2e80d39..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.folded +++ /dev/null @@ -1,6 +0,0 @@ - 2 400 0 + class Demo - 2 401 0 + def test # A test - 0 402 0 | i = 1 - 0 402 0 | puts "Example" - 0 402 0 | end - 0 400 0 end \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.styled deleted file mode 100644 index 904d07dd3..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/ruby/x.rb.styled +++ /dev/null @@ -1,6 +0,0 @@ -{5}class{0} {8}Demo{0} - {5}def{0} {9}test{0} {2}# A test{0} - {11}i{0} {10}={0} {4}1{0} - {11}puts{0} {6}"Example"{0} - {5}end{0} -{5}end \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs deleted file mode 100644 index 309bf9f84..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - let a: i128 = 42i128; - let b: u128 = 1337u128; - println!("{} + {} = {}", a, b, (a as u128) + b); -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.folded deleted file mode 100644 index dd85a534c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.folded +++ /dev/null @@ -1,6 +0,0 @@ - 2 400 401 + fn main() { - 0 401 401 | let a: i128 = 42i128; - 0 401 401 | let b: u128 = 1337u128; - 0 401 401 | println!("{} + {} = {}", a, b, (a as u128) + b); - 0 401 400 | } - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.styled deleted file mode 100644 index 0a6ab549a..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue33.rs.styled +++ /dev/null @@ -1,5 +0,0 @@ -{6}fn{0} {17}main{16}(){0} {16}{{0} - {6}let{0} {17}a{16}:{0} {7}i128{0} {16}={0} {5}42i128{16};{0} - {6}let{0} {17}b{16}:{0} {7}u128{0} {16}={0} {5}1337u128{16};{0} - {19}println!{16}({13}"{} + {} = {}"{16},{0} {17}a{16},{0} {17}b{16},{0} {16}({17}a{0} {6}as{0} {7}u128{16}){0} {16}+{0} {17}b{16});{0} -{16}}{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs deleted file mode 100644 index 838d92b12..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs +++ /dev/null @@ -1,11 +0,0 @@ -/** - * SCE_RUST_COMMENTBLOCKDOC - */ -fn main() { - /// SCE_RUST_COMMENTLINEDOC - println!("Hello, World!"); -} -// SCE_RUST_COMMENTLINE -/* - * SCE_RUST_COMMENTBLOCK - */ diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.folded deleted file mode 100644 index 2469a9b65..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.folded +++ /dev/null @@ -1,12 +0,0 @@ - 2 400 401 + /** - 0 401 401 | * SCE_RUST_COMMENTBLOCKDOC - 0 401 400 | */ - 2 400 401 + fn main() { - 0 401 401 | /// SCE_RUST_COMMENTLINEDOC - 0 401 401 | println!("Hello, World!"); - 0 401 400 | } - 0 400 400 // SCE_RUST_COMMENTLINE - 2 400 401 + /* - 0 401 401 | * SCE_RUST_COMMENTBLOCK - 0 401 400 | */ - 1 400 400 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.styled deleted file mode 100644 index b7a71c677..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue34.rs.styled +++ /dev/null @@ -1,11 +0,0 @@ -{3}/** - * SCE_RUST_COMMENTBLOCKDOC - */{0} -{6}fn{0} {17}main{16}(){0} {16}{{0} - {4}/// SCE_RUST_COMMENTLINEDOC{0} - {19}println!{16}({13}"Hello, World!"{16});{0} -{16}}{0} -{2}// SCE_RUST_COMMENTLINE{0} -{1}/* - * SCE_RUST_COMMENTBLOCK - */{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs deleted file mode 100644 index bbe7b09f5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs +++ /dev/null @@ -1,3 +0,0 @@ -/// GitHub Issue #35 -fn main() {} -/* \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.folded deleted file mode 100644 index cdb61a78b..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.folded +++ /dev/null @@ -1,3 +0,0 @@ - 0 400 400 /// GitHub Issue #35 - 0 400 400 fn main() {} - 2 400 401 + /* \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.styled deleted file mode 100644 index 6d6973926..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/Issue35.rs.styled +++ /dev/null @@ -1,3 +0,0 @@ -{4}/// GitHub Issue #35{0} -{6}fn{0} {17}main{16}(){0} {16}{}{0} -{1}/* \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/SciTE.properties deleted file mode 100644 index 5ef528bfa..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/rust/SciTE.properties +++ /dev/null @@ -1,12 +0,0 @@ -lexer.*.rs=rust - -keywords.*.rs= \ -alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield - -keywords2.*.rs= \ -bool char f32 f64 i16 i32 i64 i128 i8 int str u16 u32 u64 u128 u8 uint - -keywords3.*.rs=Self - -fold=1 -fold.comment=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/SciTE.properties deleted file mode 100644 index 397bdeb7f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/SciTE.properties +++ /dev/null @@ -1,4 +0,0 @@ -lexer.*.tcl=tcl -keywords.*.tcl=proc set socket vwait -fold.comment=1 -fold.compact=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl b/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl deleted file mode 100644 index d1260fc82..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl +++ /dev/null @@ -1,13 +0,0 @@ -# tcl tests - -#simple example - -proc Echo_Server {port} { - set s [socket -server EchoAccept $port] - vwait forever; -} - -# Bug #1947 - -$s($i,"n") -set n $showArray($i,"neighbor") diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.folded deleted file mode 100644 index 671b0873f..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.folded +++ /dev/null @@ -1,14 +0,0 @@ - 2 400 3 + # tcl tests - 1 401 3 | - 0 401 3 | #simple example - 1 401 3 | - 2 400 2 + proc Echo_Server {port} { - 0 401 2 | set s [socket -server EchoAccept $port] - 0 401 2 | vwait forever; - 0 401 0 | } - 1 400 0 - 2 400 3 + # Bug #1947 - 1 401 3 | - 0 400 0 $s($i,"n") - 0 400 0 set n $showArray($i,"neighbor") - 1 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.styled deleted file mode 100644 index 66af41327..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/tcl/x.tcl.styled +++ /dev/null @@ -1,13 +0,0 @@ -{2}# tcl tests -{0} -{2}#simple example -{0} -{12}proc{0} {7}Echo_Server{0} {6}{{7}port{6}}{0} {6}{ -{0} {12}set{0} {7}s{0} {6}[{12}socket{0} {10}-server{0} {7}EchoAccept{0} {8}$port{6}] -{0} {12}vwait{0} {7}forever{0}; -{6}} -{0} -{2}# Bug #1947 -{0} -{8}$s{6}({8}$i{6},{5}"n"{6}) -{12}set{0} {7}n{0} {8}$showArray{6}({8}$i{6},{5}"neighbor"{6}) diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/SciTE.properties deleted file mode 100644 index 54fead3f1..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/SciTE.properties +++ /dev/null @@ -1,2 +0,0 @@ -lexer.*.vb=vb -keywords.*.vb=as dim or string diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb b/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb deleted file mode 100644 index a672831a0..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb +++ /dev/null @@ -1,13 +0,0 @@ -' String" -Dim a As String = "hello, world" -Dim b As String = "hello world" -Dim c As String = "Joe said ""Hello"" to me" -Dim d As String = "\\\\server\\share\\file.txt" -' Character -""C "c"C "cc"C -' Date -d = #5/31/1993# or # 01/01/0001 12:00:00AM # -' Number -123_456___789 -123_ -&b10101_01010 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.folded deleted file mode 100644 index 82a280699..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.folded +++ /dev/null @@ -1,14 +0,0 @@ - 0 400 0 ' String" - 0 400 0 Dim a As String = "hello, world" - 0 400 0 Dim b As String = "hello world" - 0 400 0 Dim c As String = "Joe said ""Hello"" to me" - 0 400 0 Dim d As String = "\\\\server\\share\\file.txt" - 0 400 0 ' Character - 0 400 0 ""C "c"C "cc"C - 0 400 0 ' Date - 0 400 0 d = #5/31/1993# or # 01/01/0001 12:00:00AM # - 0 400 0 ' Number - 0 400 0 123_456___789 - 0 400 0 123_ - 0 400 0 &b10101_01010 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.styled deleted file mode 100644 index 1d19c8ae8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/vb/x.vb.styled +++ /dev/null @@ -1,13 +0,0 @@ -{1}' String" -{3}Dim{0} {7}a{0} {3}As{0} {3}String{0} {6}={0} {4}"hello, world"{0} -{3}Dim{0} {7}b{0} {3}As{0} {3}String{0} {6}={0} {4}"hello world"{0} -{3}Dim{0} {7}c{0} {3}As{0} {3}String{0} {6}={0} {4}"Joe said ""Hello"" to me"{0} -{3}Dim{0} {7}d{0} {3}As{0} {3}String{0} {6}={0} {4}"\\\\server\\share\\file.txt"{0} -{1}' Character -{4}""C{0} {4}"c"C{0} {4}"cc"C{0} -{1}' Date -{7}d{0} {6}={0} {8}#5/31/1993#{0} {3}or{0} {8}# 01/01/0001 12:00:00AM #{0} -{1}' Number -{2}123_456___789{0} -{2}123_{0} -{2}&b10101_01010{0} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/SciTE.properties deleted file mode 100644 index eb6557081..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -lexer.*.x12=x12 -fold=1 - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12 b/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12 deleted file mode 100644 index a7a4c459e..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12 +++ /dev/null @@ -1,33 +0,0 @@ -ISA*00* *00* *01*0011223456 *01*999999999 *950120*0147*U*00300*000000007*0*P*~ -GS*PO*0011223456*999999999*950120*0147*5*X*003040 -ST*850*000000001 -BEG*00*SA*95018017***950118 -N1*SE*UNIVERSAL WIDGETS -N3*375 PLYMOUTH PARK*SUITE 205 -N4*IRVING*TX*75061 -PO1*001*4*EA*330*TE*IN*525*VN*X357-W2 -PID*F****HIGH PERFORMANCE WIDGET -SCH*4*EA****002*950322 -CTT*1*1 -SE*10*000000001 -ST*850*000000002 -BEG*00*SA*95018017***950118 -N1*SE*UNIVERSAL WIDGETS -PID*F****HIGH PERFORMANCE WIDGET -SCH*4*EA****002*950322 -CTT*1*1 -SE*7*000000002 -GE*2*5 -GS*PO*0011223456*999999999*950120*0147*6*X*003040 -ST*850*000000003 -BEG*00*SA*95018017***950118 -N1*SE*UNIVERSAL WIDGETS -N3*375 PLYMOUTH PARK*SUITE 205 -N4*IRVING*TX*75061 -PO1*001*4*EA*330*TE*IN*525*VN*X357-W2 -PID*F****HIGH PERFORMANCE WIDGET -SCH*4*EA****002*950322 -CTT*1*1 -SE*10*000000003 -GE*1*6 -IEA*2*000000007 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.folded deleted file mode 100644 index c7b092466..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.folded +++ /dev/null @@ -1,34 +0,0 @@ - 2 400 0 + ISA*00* *00* *01*0011223456 *01*999999999 *950120*0147*U*00300*000000007*0*P*~ - 2 401 0 + GS*PO*0011223456*999999999*950120*0147*5*X*003040 - 2 402 0 + ST*850*000000001 - 0 403 0 | BEG*00*SA*95018017***950118 - 0 403 0 | N1*SE*UNIVERSAL WIDGETS - 0 403 0 | N3*375 PLYMOUTH PARK*SUITE 205 - 0 403 0 | N4*IRVING*TX*75061 - 0 403 0 | PO1*001*4*EA*330*TE*IN*525*VN*X357-W2 - 0 403 0 | PID*F****HIGH PERFORMANCE WIDGET - 0 403 0 | SCH*4*EA****002*950322 - 0 403 0 | CTT*1*1 - 0 403 0 | SE*10*000000001 - 2 402 0 + ST*850*000000002 - 0 403 0 | BEG*00*SA*95018017***950118 - 0 403 0 | N1*SE*UNIVERSAL WIDGETS - 0 403 0 | PID*F****HIGH PERFORMANCE WIDGET - 0 403 0 | SCH*4*EA****002*950322 - 0 403 0 | CTT*1*1 - 0 403 0 | SE*7*000000002 - 0 402 0 | GE*2*5 - 2 401 0 + GS*PO*0011223456*999999999*950120*0147*6*X*003040 - 2 402 0 + ST*850*000000003 - 0 403 0 | BEG*00*SA*95018017***950118 - 0 403 0 | N1*SE*UNIVERSAL WIDGETS - 0 403 0 | N3*375 PLYMOUTH PARK*SUITE 205 - 0 403 0 | N4*IRVING*TX*75061 - 0 403 0 | PO1*001*4*EA*330*TE*IN*525*VN*X357-W2 - 0 403 0 | PID*F****HIGH PERFORMANCE WIDGET - 0 403 0 | SCH*4*EA****002*950322 - 0 403 0 | CTT*1*1 - 0 403 0 | SE*10*000000003 - 0 402 0 | GE*1*6 - 0 401 0 | IEA*2*000000007 - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.styled deleted file mode 100644 index 0b71a93dc..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/x12/x.x12.styled +++ /dev/null @@ -1,33 +0,0 @@ -{2}ISA{7}*{0}00{7}*{0} {7}*{0}00{7}*{0} {7}*{0}01{7}*{0}0011223456 {7}*{0}01{7}*{0}999999999 {7}*{0}950120{7}*{0}0147{7}*{0}U{7}*{0}00300{7}*{0}000000007{7}*{0}0{7}*{0}P{7}*{8}~{6} -{3}GS{7}*{0}PO{7}*{0}0011223456{7}*{0}999999999{7}*{0}950120{7}*{0}0147{7}*{0}5{7}*{0}X{7}*{0}003040{6} -{4}ST{7}*{0}850{7}*{0}000000001{6} -{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6} -{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6} -{5}N3{7}*{0}375 PLYMOUTH PARK{7}*{0}SUITE 205{6} -{5}N4{7}*{0}IRVING{7}*{0}TX{7}*{0}75061{6} -{5}PO1{7}*{0}001{7}*{0}4{7}*{0}EA{7}*{0}330{7}*{0}TE{7}*{0}IN{7}*{0}525{7}*{0}VN{7}*{0}X357-W2{6} -{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6} -{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6} -{5}CTT{7}*{0}1{7}*{0}1{6} -{4}SE{7}*{0}10{7}*{0}000000001{6} -{4}ST{7}*{0}850{7}*{0}000000002{6} -{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6} -{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6} -{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6} -{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6} -{5}CTT{7}*{0}1{7}*{0}1{6} -{4}SE{7}*{0}7{7}*{0}000000002{6} -{3}GE{7}*{0}2{7}*{0}5{6} -{3}GS{7}*{0}PO{7}*{0}0011223456{7}*{0}999999999{7}*{0}950120{7}*{0}0147{7}*{0}6{7}*{0}X{7}*{0}003040{6} -{4}ST{7}*{0}850{7}*{0}000000003{6} -{5}BEG{7}*{0}00{7}*{0}SA{7}*{0}95018017{7}***{0}950118{6} -{5}N1{7}*{0}SE{7}*{0}UNIVERSAL WIDGETS{6} -{5}N3{7}*{0}375 PLYMOUTH PARK{7}*{0}SUITE 205{6} -{5}N4{7}*{0}IRVING{7}*{0}TX{7}*{0}75061{6} -{5}PO1{7}*{0}001{7}*{0}4{7}*{0}EA{7}*{0}330{7}*{0}TE{7}*{0}IN{7}*{0}525{7}*{0}VN{7}*{0}X357-W2{6} -{5}PID{7}*{0}F{7}****{0}HIGH PERFORMANCE WIDGET{6} -{5}SCH{7}*{0}4{7}*{0}EA{7}****{0}002{7}*{0}950322{6} -{5}CTT{7}*{0}1{7}*{0}1{6} -{4}SE{7}*{0}10{7}*{0}000000003{6} -{3}GE{7}*{0}1{7}*{0}6{6} -{2}IEA{7}*{0}2{7}*{0}000000007{6} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/SciTE.properties deleted file mode 100644 index f275e023b..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/SciTE.properties +++ /dev/null @@ -1,3 +0,0 @@ -lexer.*.yaml=yaml -keywords.*.yaml=true false yes no -fold=1 diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml b/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml deleted file mode 100644 index f0fc75186..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# comment - -key: value # comment - -colon:in:key: value - -hanging_value: - value - -1: 1 - -true: true diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.folded b/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.folded deleted file mode 100644 index 67fe96e8c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.folded +++ /dev/null @@ -1,13 +0,0 @@ - 0 400 0 # comment - 1 400 0 - 0 400 0 key: value # comment - 1 400 0 - 0 400 0 colon:in:key: value - 1 400 0 - 2 400 0 + hanging_value: - 0 402 0 | value - 1 400 0 - 0 400 0 1: 1 - 1 400 0 - 0 400 0 true: true - 0 400 0 \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.styled b/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.styled deleted file mode 100644 index df14c1558..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/examples/yaml/x.yaml.styled +++ /dev/null @@ -1,12 +0,0 @@ -{1}# comment -{0} -{2}key{9}:{0} value {1}# comment -{0} -{2}colon:in:key{9}:{0} value - -{2}hanging_value{9}:{0} - value - -{2}1{9}:{4} 1 -{0} -{2}true{9}:{3} true diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/makefile b/3rdparty/unioncode-scintilla515/lexilla/test/makefile deleted file mode 100644 index db96d1762..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/makefile +++ /dev/null @@ -1,69 +0,0 @@ -# Build all the lexer tests using GNU make and either g++ or Clang -# @file makefile -# Copyright 2019 by Neil Hodgson -# The License.txt file describes the conditions under which this software may be distributed. -# Should be run using mingw32-make on Windows, not nmake -# On Windows g++ is used, on OS X clang, and on Linux g++ is used by default -# but clang can be used by defining CLANG when invoking make -# clang works only with libc++, not libstdc++ - -.PHONY: all test clean - -.SUFFIXES: .cxx - -WARNINGS = -Wpedantic -Wall -Wextra - -ifndef windir -LIBS += -ldl -ifeq ($(shell uname),Darwin) -# On macOS always use Clang -CLANG = 1 -endif -endif - -EXE = $(if $(windir),TestLexers.exe,TestLexers) - -BASE_FLAGS += --std=c++2a - -ifdef CLANG - CXX = clang++ - BASE_FLAGS += -fsanitize=address -endif - -ifdef LEXILLA_STATIC - DEFINES += -D LEXILLA_STATIC - LIBS += ../bin/liblexilla.a -endif - -ifdef windir - DEL = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q) -else - DEL = rm -f -endif - -vpath %.cxx ../access - -DEFINES += -D$(if $(DEBUG),DEBUG,NDEBUG) -BASE_FLAGS += $(if $(DEBUG),-g,-Os) - -INCLUDES = -I ../../scintilla/include -I ../include -I ../access -BASE_FLAGS += $(WARNINGS) - -all: $(EXE) - -test: $(EXE) - ./$(EXE) - -clean: - $(DEL) *.o *.obj $(EXE) - -%.o: %.cxx - $(CXX) $(DEFINES) $(INCLUDES) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ - -OBJS = TestLexers.o TestDocument.o LexillaAccess.o - -$(EXE): $(OBJS) - $(CXX) $(BASE_FLAGS) $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS) $(LDLIBS) -o $@ - -TestLexers.o: TestLexers.cxx TestDocument.h -TestDocument.o: TestDocument.cxx TestDocument.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/testlexers.mak b/3rdparty/unioncode-scintilla515/lexilla/test/testlexers.mak deleted file mode 100644 index a0b7c3ed5..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/testlexers.mak +++ /dev/null @@ -1,44 +0,0 @@ -# Build the lexers test with Microsoft Visual C++ using nmake -# Tested with Visual C++ 2019 - -DEL = del /q -EXE = TestLexers.exe - -INCLUDEDIRS = -I ../../scintilla/include -I ../include -I ../access - -!IFDEF LEXILLA_STATIC -STATIC_FLAG = -D LEXILLA_STATIC -LIBS = ../bin/liblexilla.lib -!ENDIF - -!IFDEF DEBUG -DEBUG_OPTIONS = -Od -MTd -DDEBUG $(STATIC_FLAG) -!ELSE -DEBUG_OPTIONS=-O1 -MT -DNDEBUG $(STATIC_FLAG) -GL -!ENDIF - -CXXFLAGS = /EHsc /std:c++latest $(DEBUG_OPTIONS) $(INCLUDEDIRS) - -OBJS = TestLexers.obj TestDocument.obj LexillaAccess.obj - -all: $(EXE) - -test: $(EXE) - $(EXE) - -clean: - $(DEL) *.o *.obj *.exe - -$(EXE): $(OBJS) $(LIBS) - $(CXX) $(CXXFLAGS) $(LIBS) /Fe$@ $** - -.cxx.obj:: - $(CXX) $(CXXFLAGS) -c $< -{..\access}.cxx.obj:: - $(CXX) $(CXXFLAGS) -c $(NAME) $< - -.cxx.obj:: - $(CXX) $(CXXFLAGS) -c $< - -TestLexers.obj: $*.cxx TestDocument.h -TestDocument.obj: $*.cxx $*.h diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/LICENSE_1_0.txt b/3rdparty/unioncode-scintilla515/lexilla/test/unit/LICENSE_1_0.txt deleted file mode 100644 index 36b7cd93c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/LICENSE_1_0.txt +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/README b/3rdparty/unioncode-scintilla515/lexilla/test/unit/README deleted file mode 100644 index dce06addb..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/README +++ /dev/null @@ -1,15 +0,0 @@ -The test/unit directory contains unit tests for Scintilla data structures. - -The tests can be run on Windows, OS X, or Linux using g++ and GNU make. -The Catch test framework is used. -https://github.com/philsquared/Catch -The file catch.hpp is under the Boost Software License which is contained in LICENSE_1_0.txt - - To run the tests on OS X or Linux: -make test - - To run the tests on Windows: -mingw32-make test - - Visual C++ (2010+) and nmake can also be used on Windows: -nmake -f test.mak test diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/Sci.natvis b/3rdparty/unioncode-scintilla515/lexilla/test/unit/Sci.natvis deleted file mode 100644 index d6ac2b96c..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/Sci.natvis +++ /dev/null @@ -1,33 +0,0 @@ - - - - {{size = {lengthBody}}} - - lengthBody - part1Length - gapLength - - lengthBody - body[($i<part1Length)?$i:$i+gapLength] - - - - - {{size = {body->lengthBody}}} - - - body->lengthBody - body->body[($i<body->part1Length)?$i:$i+body->gapLength]+($i>stepPartition?stepLength:0) - - - - - _Mypair._Myval2 - empty - unique_ptr {*_Mypair._Myval2} - - _Mypair._Myval2 - _Mypair - - - diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/SciTE.properties b/3rdparty/unioncode-scintilla515/lexilla/test/unit/SciTE.properties deleted file mode 100644 index cbbe20862..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/SciTE.properties +++ /dev/null @@ -1,5 +0,0 @@ -command.go.*.cxx=./unitTest -if PLAT_WIN - make.command=mingw32-make - command.go.*.cxx=unitTest -command.go.needs.$(file.patterns.cplusplus)=$(make.command) diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.cxx b/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.cxx deleted file mode 100644 index 6457036a8..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.cxx +++ /dev/null @@ -1,24 +0,0 @@ -/** @file UnitTester.cxx - ** UnitTester.cpp : Defines the entry point for the console application. - **/ - -// Catch uses std::uncaught_exception which is deprecated in C++17. -// This define silences a warning from Visual C++. -#define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING - -#include -#include - -#include -#include -#include - -#define CATCH_CONFIG_WINDOWS_CRTDBG -#define CATCH_CONFIG_RUNNER -#include "catch.hpp" - -int main(int argc, char* argv[]) { - const int result = Catch::Session().run(argc, argv); - - return result; -} diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.vcxproj b/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.vcxproj deleted file mode 100644 index 9116fcab6..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/UnitTester.vcxproj +++ /dev/null @@ -1,169 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {35688A27-D91B-453A-8A05-65A7F28DEFBF} - Win32Proj - UnitTester - 10.0.16299.0 - - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - Application - true - v141 - Unicode - - - Application - false - v141 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include\;..\..\src\;..\..\lexlib\;..\..\..\scintilla\include\ - stdcpp17 - - - Console - true - - - - - - - Level3 - Disabled - _CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include\;..\..\src\;..\..\lexlib\;..\..\..\scintilla\include\ - stdcpp17 - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include\;..\..\src\;..\..\lexlib\;..\..\..\scintilla\include\ - stdcpp17 - - - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - _CRT_SECURE_NO_WARNINGS=1;_HAS_AUTO_PTR_ETC=1;_SCL_SECURE_NO_WARNINGS=1;CHECK_CORRECTNESS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include\;..\..\src\;..\..\lexlib\;..\..\..\scintilla\include\ - stdcpp17 - - - Console - true - true - true - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/unioncode-scintilla515/lexilla/test/unit/catch.hpp b/3rdparty/unioncode-scintilla515/lexilla/test/unit/catch.hpp deleted file mode 100644 index 7e706f947..000000000 --- a/3rdparty/unioncode-scintilla515/lexilla/test/unit/catch.hpp +++ /dev/null @@ -1,17959 +0,0 @@ -/* - * Catch v2.13.7 - * Generated: 2021-07-28 20:29:27.753164 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2021 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ -#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -// start catch.hpp - - -#define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 13 -#define CATCH_VERSION_PATCH 7 - -#ifdef __clang__ -# pragma clang system_header -#elif defined __GNUC__ -# pragma GCC system_header -#endif - -// start catch_suppress_warnings.h - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(push) -# pragma warning(disable: 161 1682) -# else // __ICC -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -# pragma clang diagnostic ignored "-Wswitch-enum" -# pragma clang diagnostic ignored "-Wcovered-switch-default" -# endif -#elif defined __GNUC__ - // Because REQUIREs trigger GCC's -Wparentheses, and because still - // supported version of g++ have only buggy support for _Pragmas, - // Wparentheses have to be suppressed globally. -# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details - -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wpadded" -#endif -// end catch_suppress_warnings.h -#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) -# define CATCH_IMPL -# define CATCH_CONFIG_ALL_PARTS -#endif - -// In the impl file, we want to have access to all parts of the headers -// Can also be used to sanely support PCHs -#if defined(CATCH_CONFIG_ALL_PARTS) -# define CATCH_CONFIG_EXTERNAL_INTERFACES -# if defined(CATCH_CONFIG_DISABLE_MATCHERS) -# undef CATCH_CONFIG_DISABLE_MATCHERS -# endif -# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -# endif -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) -// start catch_platform.h - -// See e.g.: -// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html -#ifdef __APPLE__ -# include -# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ - (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) -# define CATCH_PLATFORM_MAC -# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) -# define CATCH_PLATFORM_IPHONE -# endif - -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define CATCH_PLATFORM_LINUX - -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) -# define CATCH_PLATFORM_WINDOWS -#endif - -// end catch_platform.h - -#ifdef CATCH_IMPL -# ifndef CLARA_CONFIG_MAIN -# define CLARA_CONFIG_MAIN_NOT_DEFINED -# define CLARA_CONFIG_MAIN -# endif -#endif - -// start catch_user_interfaces.h - -namespace Catch { - unsigned int rngSeed(); -} - -// end catch_user_interfaces.h -// start catch_tag_alias_autoregistrar.h - -// start catch_common.h - -// start catch_compiler_capabilities.h - -// Detect a number of compiler features - by compiler -// The following features are defined: -// -// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? -// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? -// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? -// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? -// **************** -// Note to maintainers: if new toggles are added please document them -// in configuration.md, too -// **************** - -// In general each macro has a _NO_ form -// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. -// Many features, at point of detection, define an _INTERNAL_ macro, so they -// can be combined, en-mass, with the _NO_ forms later. - -#ifdef __cplusplus - -# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) -# define CATCH_CPP14_OR_GREATER -# endif - -# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -# define CATCH_CPP17_OR_GREATER -# endif - -#endif - -// Only GCC compiler should be used in this block, so other compilers trying to -// mask themselves as GCC should be ignored. -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) - -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) - -#endif - -#if defined(__clang__) - -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) - -// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug -// which results in calls to destructors being emitted for each temporary, -// without a matching initialization. In practice, this can result in something -// like `std::string::~string` being called on an uninitialized value. -// -// For example, this code will likely segfault under IBM XL: -// ``` -// REQUIRE(std::string("12") + "34" == "1234") -// ``` -// -// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. -# if !defined(__ibmxl__) && !defined(__CUDACC__) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ -# endif - -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ - _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") - -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) - -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ - _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) - -#endif // __clang__ - -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif - -//////////////////////////////////////////////////////////////////////////////// -// We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -#endif - -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# define CATCH_CONFIG_COLOUR_NONE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Android somehow still does not support std::to_string -#if defined(__ANDROID__) -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING -# define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Not all Windows environments support SEH properly -#if defined(__MINGW32__) -# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH -#endif - -//////////////////////////////////////////////////////////////////////////////// -// PS4 -#if defined(__ORBIS__) -# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Cygwin -#ifdef __CYGWIN__ - -// Required for some versions of Cygwin to declare gettimeofday -// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin -# define _BSD_SOURCE -// some versions of cygwin (most) do not support std::to_string. Use the libstd check. -// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 -# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ - && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) - -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING - -# endif -#endif // __CYGWIN__ - -//////////////////////////////////////////////////////////////////////////////// -// Visual C++ -#if defined(_MSC_VER) - -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) - -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif - -// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ -// _MSVC_TRADITIONAL == 0 means new conformant preprocessor -// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(__clang__) // Handle Clang masquerading for msvc -# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) -# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -# endif // MSVC_TRADITIONAL -# endif // __clang__ - -#endif // _MSC_VER - -#if defined(_REENTRANT) || defined(_MSC_VER) -// Enable async processing, as -pthread is specified or no additional linking is required -# define CATCH_INTERNAL_CONFIG_USE_ASYNC -#endif // _MSC_VER - -//////////////////////////////////////////////////////////////////////////////// -// Check if we are compiled with -fno-exceptions or equivalent -#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) -# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED -#endif - -//////////////////////////////////////////////////////////////////////////////// -// DJGPP -#ifdef __DJGPP__ -# define CATCH_INTERNAL_CONFIG_NO_WCHAR -#endif // __DJGPP__ - -//////////////////////////////////////////////////////////////////////////////// -// Embarcadero C++Build -#if defined(__BORLANDC__) - #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// Use of __COUNTER__ is suppressed during code analysis in -// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly -// handled by it. -// Otherwise all supported compilers support COUNTER macro, -// but user still might want to turn it off -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// RTX is a special version of Windows that is real time. -// This means that it is detected as Windows, but does not provide -// the same set of capabilities as real Windows does. -#if defined(UNDER_RTSS) || defined(RTX64_BUILD) - #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH - #define CATCH_INTERNAL_CONFIG_NO_ASYNC - #define CATCH_CONFIG_COLOUR_NONE -#endif - -#if !defined(_GLIBCXX_USE_C99_MATH_TR1) -#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER -#endif - -// Various stdlib support checks that require __has_include -#if defined(__has_include) - // Check if string_view is available and usable - #if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW - #endif - - // Check if optional is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) - - // Check if byte is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # include - # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) - # define CATCH_INTERNAL_CONFIG_CPP17_BYTE - # endif - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) - - // Check if variant is available and usable - # if __has_include() && defined(CATCH_CPP17_OR_GREATER) - # if defined(__clang__) && (__clang_major__ < 8) - // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 - // fix should be in clang 8, workaround in libstdc++ 8.2 - # include - # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) - # define CATCH_CONFIG_NO_CPP17_VARIANT - # else - # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT - # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) - # else - # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT - # endif // defined(__clang__) && (__clang_major__ < 8) - # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // defined(__has_include) - -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) -# define CATCH_CONFIG_COUNTER -#endif -#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) -# define CATCH_CONFIG_WINDOWS_SEH -#endif -// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. -#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_CONFIG_POSIX_SIGNALS -#endif -// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. -#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) -# define CATCH_CONFIG_WCHAR -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) -# define CATCH_CONFIG_CPP11_TO_STRING -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) -# define CATCH_CONFIG_CPP17_OPTIONAL -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) -# define CATCH_CONFIG_CPP17_STRING_VIEW -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) -# define CATCH_CONFIG_CPP17_VARIANT -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE) -# define CATCH_CONFIG_CPP17_BYTE -#endif - -#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) -# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) -# define CATCH_CONFIG_NEW_CAPTURE -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -# define CATCH_CONFIG_DISABLE_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) -# define CATCH_CONFIG_POLYFILL_ISNAN -#endif - -#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) -# define CATCH_CONFIG_USE_ASYNC -#endif - -#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE) -# define CATCH_CONFIG_ANDROID_LOGWRITE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) -# define CATCH_CONFIG_GLOBAL_NEXTAFTER -#endif - -// Even if we do not think the compiler has that warning, we still have -// to provide a macro that can be used by the code. -#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION) -# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION -#endif -#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION) -# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS -#endif - -// The goal of this macro is to avoid evaluation of the arguments, but -// still have the compiler warn on problems inside... -#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN) -# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) -#endif - -#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) -# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#elif defined(__clang__) && (__clang_major__ < 5) -# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS -#endif - -#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -#define CATCH_TRY if ((true)) -#define CATCH_CATCH_ALL if ((false)) -#define CATCH_CATCH_ANON(type) if ((false)) -#else -#define CATCH_TRY try -#define CATCH_CATCH_ALL catch (...) -#define CATCH_CATCH_ANON(type) catch (type) -#endif - -#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) -#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#endif - -// end catch_compiler_capabilities.h -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#include -#include -#include - -// We need a dummy global operator<< so we can bring it into Catch namespace later -struct Catch_global_namespace_dummy {}; -std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); - -namespace Catch { - - struct CaseSensitive { enum Choice { - Yes, - No - }; }; - - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable& operator = ( NonCopyable const& ) = delete; - NonCopyable& operator = ( NonCopyable && ) = delete; - - protected: - NonCopyable(); - virtual ~NonCopyable(); - }; - - struct SourceLineInfo { - - SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} - - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo( SourceLineInfo&& ) noexcept = default; - SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; - - bool empty() const noexcept { return file[0] == '\0'; } - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; - - char const* file; - std::size_t line; - }; - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); - - // Bring in operator<< from global namespace into Catch namespace - // This is necessary because the overload of operator<< above makes - // lookup stop at namespace Catch - using ::operator<<; - - // Use this in variadic streaming macros to allow - // >> +StreamEndStop - // as well as - // >> stuff +StreamEndStop - struct StreamEndStop { - std::string operator+() const; - }; - template - T const& operator + ( T const& value, StreamEndStop ) { - return value; - } -} - -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) - -// end catch_common.h -namespace Catch { - - struct RegistrarForTagAliases { - RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); - }; - -} // end namespace Catch - -#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ - CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ - CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION - -// end catch_tag_alias_autoregistrar.h -// start catch_test_registry.h - -// start catch_interfaces_testcase.h - -#include - -namespace Catch { - - class TestSpec; - - struct ITestInvoker { - virtual void invoke () const = 0; - virtual ~ITestInvoker(); - }; - - class TestCase; - struct IConfig; - - struct ITestCaseRegistry { - virtual ~ITestCaseRegistry(); - virtual std::vector const& getAllTests() const = 0; - virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool isThrowSafe( TestCase const& testCase, IConfig const& config ); - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - -} - -// end catch_interfaces_testcase.h -// start catch_stringref.h - -#include -#include -#include -#include - -namespace Catch { - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. - class StringRef { - public: - using size_type = std::size_t; - using const_iterator = const char*; - - private: - static constexpr char const* const s_empty = ""; - - char const* m_start = s_empty; - size_type m_size = 0; - - public: // construction - constexpr StringRef() noexcept = default; - - StringRef( char const* rawChars ) noexcept; - - constexpr StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - explicit operator std::string() const { - return std::string(m_start, m_size); - } - - public: // operators - auto operator == ( StringRef const& other ) const noexcept -> bool; - auto operator != (StringRef const& other) const noexcept -> bool { - return !(*this == other); - } - - auto operator[] ( size_type index ) const noexcept -> char { - assert(index < m_size); - return m_start[index]; - } - - public: // named queries - constexpr auto empty() const noexcept -> bool { - return m_size == 0; - } - constexpr auto size() const noexcept -> size_type { - return m_size; - } - - // Returns the current start pointer. If the StringRef is not - // null-terminated, throws std::domain_exception - auto c_str() const -> char const*; - - public: // substrings and searches - // Returns a substring of [start, start + length). - // If start + length > size(), then the substring is [start, size()). - // If start > size(), then the substring is empty. - auto substr( size_type start, size_type length ) const noexcept -> StringRef; - - // Returns the current start pointer. May not be null-terminated. - auto data() const noexcept -> char const*; - - constexpr auto isNullTerminated() const noexcept -> bool { - return m_start[m_size] == '\0'; - } - - public: // iterators - constexpr const_iterator begin() const { return m_start; } - constexpr const_iterator end() const { return m_start + m_size; } - }; - - auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; - auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; - - constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } -} // namespace Catch - -constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { - return Catch::StringRef( rawChars, size ); -} - -// end catch_stringref.h -// start catch_preprocessor.hpp - - -#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ -#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) - -#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ -// MSVC needs more evaluations -#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) -#else -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) -#endif - -#define CATCH_REC_END(...) -#define CATCH_REC_OUT - -#define CATCH_EMPTY() -#define CATCH_DEFER(id) id CATCH_EMPTY() - -#define CATCH_REC_GET_END2() 0, CATCH_REC_END -#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 -#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 -#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT -#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) -#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) - -#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) - -#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) - -// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, -// and passes userdata as the first parameter to each invocation, -// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) -#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) -#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ -#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ -#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) -#else -// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) -#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) -#endif - -#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ -#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) - -#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) - -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) -#else -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) -#endif - -#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ - CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) - -#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) -#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) -#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) -#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) -#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) -#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) -#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) -#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) -#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) -#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) - -#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N - -#define INTERNAL_CATCH_TYPE_GEN\ - template struct TypeList {};\ - template\ - constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ - template class...> struct TemplateTypeList{};\ - template class...Cs>\ - constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ - template\ - struct append;\ - template\ - struct rewrap;\ - template class, typename...>\ - struct create;\ - template class, typename>\ - struct convert;\ - \ - template \ - struct append { using type = T; };\ - template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ - struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ - template< template class L1, typename...E1, typename...Rest>\ - struct append, TypeList, Rest...> { using type = L1; };\ - \ - template< template class Container, template class List, typename...elems>\ - struct rewrap, List> { using type = TypeList>; };\ - template< template class Container, template class List, class...Elems, typename...Elements>\ - struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ - \ - template