Merge pull request #2896 from RaiKoHoff/Dev_Lexilla

Prepare for Lexilla (Scintilla v5)
This commit is contained in:
Rainer Kottenhoff 2020-09-25 15:37:36 +02:00 committed by GitHub
commit cd4b021a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 998 additions and 319 deletions

View File

@ -344,6 +344,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mp_es_mx", "minipath\langua
{29AB36E1-284E-4E0B-9DF4-F4F84760BD9B} = {29AB36E1-284E-4E0B-9DF4-F4F84760BD9B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lexilla", "Lexilla\Lexilla.vcxproj", "{6D470002-E04D-4BBB-8B57-D20C2721FECE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -788,6 +790,14 @@ Global
{2AD33E48-FEC6-47B1-8FEF-A0CF1F23DD58}.Release|Win32.Build.0 = Release|Win32
{2AD33E48-FEC6-47B1-8FEF-A0CF1F23DD58}.Release|x64.ActiveCfg = Release|x64
{2AD33E48-FEC6-47B1-8FEF-A0CF1F23DD58}.Release|x64.Build.0 = Release|x64
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Debug|Win32.ActiveCfg = Debug|Win32
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Debug|Win32.Build.0 = Debug|Win32
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Debug|x64.ActiveCfg = Debug|x64
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Debug|x64.Build.0 = Debug|x64
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Release|Win32.ActiveCfg = Release|Win32
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Release|Win32.Build.0 = Release|Win32
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Release|x64.ActiveCfg = Release|x64
{6D470002-E04D-4BBB-8B57-D20C2721FECE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -850,6 +860,7 @@ Global
{CC891C3A-8A32-46EA-B80A-0D1DED2BCFB1} = {8FD783D5-8709-432D-A88E-6E3073AFF220}
{B6757299-D2DD-4103-834D-45227AC13CB7} = {8C28F8E6-5B4E-4233-B5C7-5A903596AEB2}
{2AD33E48-FEC6-47B1-8FEF-A0CF1F23DD58} = {8FD783D5-8709-432D-A88E-6E3073AFF220}
{6D470002-E04D-4BBB-8B57-D20C2721FECE} = {C3735E17-6EAE-4CC5-980E-30BCEF094862}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C0B8FE68-ECBC-4173-9027-E1EC2C9B5BDF}

252
lexilla/Lexilla.vcxproj Normal file
View File

@ -0,0 +1,252 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\lexers_x\CharSetX.h" />
<ClInclude Include="src\lexers_x\SciXLexer.h" />
<ClInclude Include="src\Lexilla.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\scintilla\lexers\LexAsm.cxx" />
<ClCompile Include="..\scintilla\lexers\LexAU3.cxx" />
<ClCompile Include="..\scintilla\lexers\LexAVS.cxx" />
<ClCompile Include="..\scintilla\lexers\LexBash.cxx" />
<ClCompile Include="..\scintilla\lexers\LexBatch.cxx" />
<ClCompile Include="..\scintilla\lexers\LexCmake.cxx" />
<ClCompile Include="..\scintilla\lexers\LexCoffeeScript.cxx" />
<ClCompile Include="..\scintilla\lexers\LexConf.cxx" />
<ClCompile Include="..\scintilla\lexers\LexCPP.cxx" />
<ClCompile Include="..\scintilla\lexers\LexCSS.cxx" />
<ClCompile Include="..\scintilla\lexers\LexD.cxx" />
<ClCompile Include="..\scintilla\lexers\LexDiff.cxx" />
<ClCompile Include="..\scintilla\lexers\LexHTML.cxx" />
<ClCompile Include="..\scintilla\lexers\LexInno.cxx" />
<ClCompile Include="..\scintilla\lexers\LexJSON.cxx" />
<ClCompile Include="..\scintilla\lexers\LexLaTeX.cxx" />
<ClCompile Include="..\scintilla\lexers\LexLua.cxx" />
<ClCompile Include="..\scintilla\lexers\LexMake.cxx" />
<ClCompile Include="..\scintilla\lexers\LexMarkdown.cxx" />
<ClCompile Include="..\scintilla\lexers\LexMatlab.cxx" />
<ClCompile Include="..\scintilla\lexers\LexNim.cxx" />
<ClCompile Include="..\scintilla\lexers\LexNsis.cxx" />
<ClCompile Include="..\scintilla\lexers\LexNull.cxx" />
<ClCompile Include="..\scintilla\lexers\LexPascal.cxx" />
<ClCompile Include="..\scintilla\lexers\LexPerl.cxx" />
<ClCompile Include="..\scintilla\lexers\LexPowerShell.cxx" />
<ClCompile Include="..\scintilla\lexers\LexProps.cxx" />
<ClCompile Include="..\scintilla\lexers\LexPython.cxx" />
<ClCompile Include="..\scintilla\lexers\LexR.cxx" />
<ClCompile Include="..\scintilla\lexers\LexRegistry.cxx" />
<ClCompile Include="..\scintilla\lexers\LexRuby.cxx" />
<ClCompile Include="..\scintilla\lexers\LexRust.cxx" />
<ClCompile Include="..\scintilla\lexers\LexSQL.cxx" />
<ClCompile Include="..\scintilla\lexers\LexTCL.cxx" />
<ClCompile Include="..\scintilla\lexers\LexVB.cxx" />
<ClCompile Include="..\scintilla\lexers\LexVHDL.cxx" />
<ClCompile Include="..\scintilla\lexers\LexYAML.cxx" />
<ClCompile Include="src\lexers_x\LexAHKL.cxx" />
<ClCompile Include="src\lexers_x\LexCSV.cxx" />
<ClCompile Include="src\lexers_x\LexTOML.cxx" />
<ClCompile Include="src\Lexilla.cxx" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\LexillaVersion.rc" />
</ItemGroup>
<ItemGroup>
<None Include="src\lexers_x\SciX.iface" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{6d470002-e04d-4bbb-8b57-d20c2721fece}</ProjectGuid>
<RootNamespace>Lexilla</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>Lexilla</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\</OutDir>
<IntDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\lexilla\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\</OutDir>
<IntDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\lexilla\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\</OutDir>
<IntDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\lexilla\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\</OutDir>
<IntDir>..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\lexilla\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>SCI_LEXER;_CRT_SECURE_NO_WARNINGS;STATIC_BUILD;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\scintilla\include;..\scintilla\lexlib;src</AdditionalIncludeDirectories>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>SCI_LEXER;_CRT_SECURE_NO_WARNINGS;STATIC_BUILD;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\scintilla\include;..\scintilla\lexlib;src;ser\lexer_x</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>SCI_LEXER;_CRT_SECURE_NO_WARNINGS;STATIC_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\scintilla\include;..\scintilla\lexlib;src</AdditionalIncludeDirectories>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>SCI_LEXER;_CRT_SECURE_NO_WARNINGS;STATIC_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>..\scintilla\include;..\scintilla\lexlib;src;ser\lexer_x</AdditionalIncludeDirectories>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="scripts">
<UniqueIdentifier>{fa13b33a-f2d9-4d2f-8ad4-b03e597c2551}</UniqueIdentifier>
</Filter>
<Filter Include="lexers">
<UniqueIdentifier>{27c55e47-67fa-43d3-83f6-b9c801ea6532}</UniqueIdentifier>
</Filter>
<Filter Include="lexers_x">
<UniqueIdentifier>{0087651a-f9f8-4b96-a61b-9d58c9eedada}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Lexilla.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\lexers_x\CharSetX.h">
<Filter>lexers_x</Filter>
</ClInclude>
<ClInclude Include="src\lexers_x\SciXLexer.h">
<Filter>lexers_x</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Lexilla.cxx">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexAsm.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexAU3.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexAVS.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexBash.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexBatch.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexCmake.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexCoffeeScript.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexConf.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexCPP.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexCSS.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexD.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexDiff.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexHTML.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexInno.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexJSON.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexLaTeX.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexLua.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexMake.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexMarkdown.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexMatlab.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexNim.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexNsis.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexNull.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexPascal.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexPerl.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexPowerShell.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexProps.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexPython.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexR.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexRegistry.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexRuby.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexRust.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexSQL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexTCL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexVB.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexVHDL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="..\scintilla\lexers\LexYAML.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="src\lexers_x\LexAHKL.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
<ClCompile Include="src\lexers_x\LexCSV.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
<ClCompile Include="src\lexers_x\LexTOML.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\LexillaVersion.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="src\lexers_x\SciX.iface">
<Filter>lexers_x</Filter>
</None>
</ItemGroup>
</Project>

365
lexilla/src/Lexilla.cxx Normal file
View File

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

24
lexilla/src/Lexilla.h Normal file
View File

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

View File

@ -0,0 +1,37 @@
// Resource file for Lexilla - provides a version number
// Copyright 2020 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <windows.h>
#define VERSION_LEXILLA "4.4.5"
#define VERSION_WORDS 4, 4, 5, 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.lib - 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.lib\0"
VALUE "ProductName", "Lexilla\0"
VALUE "ProductVersion", VERSION_LEXILLA "\0"
END
END
END

View File

@ -782,4 +782,4 @@ void SCI_METHOD LexerAHKL::Fold(Sci_PositionU startPos, Sci_Position lengthDoc,
}
LexerModule lmAHKL(SCLEX_AHKL, LexerAHKL::LexerFactoryAHKL, "ahk; ahkl", ahklWordLists);
LexerModule lmAHKL(SCLEX_AHKL, LexerAHKL::LexerFactoryAHKL, "ahkl", ahklWordLists);

View File

@ -1,7 +1,7 @@
// encoding: UTF-8
#pragma once
#ifndef _SCIXLEXER_H_
#define _SCIXLEXER_H_
#include "SciLexer.h" // Scintilla/Lexilla Lexer defines
#define SCLEX_AHKL 200
#define SCLEX_TOML 201
@ -92,5 +92,3 @@
#define SCE_YAML_DATETIME 18
#define SCE_YAML_INDENTED_TEXT 19
#endif //_SCIXLEXER_H_

View File

@ -31,12 +31,14 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<CharacterSet>Unicode</CharacterSet>
@ -121,15 +123,15 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;STATIC_BUILD;SCI_LEXER;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<SmallerTypeCheck>false</SmallerTypeCheck>
<OmitFramePointers />
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
@ -146,13 +148,13 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;_WIN64;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;STATIC_BUILD;SCI_LEXER;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;_WIN64;_DEBUG;_WINDOWS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<SmallerTypeCheck>false</SmallerTypeCheck>
<StringPooling>true</StringPooling>
<FloatingPointModel>Fast</FloatingPointModel>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Lib>
<TargetMachine>MachineX64</TargetMachine>
@ -170,13 +172,13 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;STATIC_BUILD;SCI_LEXER;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<WholeProgramOptimization>true</WholeProgramOptimization>
<OmitFramePointers />
<FloatingPointModel>Fast</FloatingPointModel>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp17</LanguageStandard>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -193,12 +195,12 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;_WIN64;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;STATIC_BUILD;SCI_LEXER;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_SCL_SECURE_NO_WARNINGS;NP3;NO_CXX11_REGEX;SCI_OWNREGEX;ONIG_STATIC;SCI_LEXER;_WIN64;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;STATIC_BUILD;USE_D2D;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<WholeProgramOptimization>true</WholeProgramOptimization>
<FloatingPointModel>Fast</FloatingPointModel>
<LanguageStandard>stdcpplatest</LanguageStandard>
<LanguageStandard>stdcpp17</LanguageStandard>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<StringPooling>true</StringPooling>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@ -233,52 +235,6 @@
<ClCompile Include="oniguruma\src\unicode_unfold_key.c" />
<ClCompile Include="oniguruma\src\utf8.c" />
<ClCompile Include="oniguruma\scintilla\OnigurumaRegExEngine.cxx" />
<ClCompile Include="lexers_x\LexAHKL.cxx" />
<ClCompile Include="lexers_x\LexCSV.cxx" />
<ClCompile Include="lexers_x\LexTOML.cxx" />
<ClCompile Include="lexers\LexAsm.cxx" />
<ClCompile Include="lexers\LexAU3.cxx" />
<ClCompile Include="lexers\LexAVS.cxx" />
<ClCompile Include="lexers\LexBash.cxx" />
<ClCompile Include="lexers\LexBatch.cxx" />
<ClCompile Include="lexers\LexCmake.cxx" />
<ClCompile Include="lexers\LexCoffeeScript.cxx" />
<ClCompile Include="lexers\LexConf.cxx" />
<ClCompile Include="lexers\LexCPP.cxx" />
<ClCompile Include="lexers\LexCSS.cxx" />
<ClCompile Include="lexers\LexD.cxx" />
<ClCompile Include="lexers\LexDiff.cxx" />
<ClCompile Include="lexers\LexHTML.cxx" />
<ClCompile Include="lexers\LexInno.cxx" />
<ClCompile Include="lexers\LexJSON.cxx" />
<ClCompile Include="lexers\LexLaTeX.cxx" />
<ClCompile Include="lexers\LexLua.cxx" />
<ClCompile Include="lexers\LexMake.cxx" />
<ClCompile Include="lexers\LexMarkdown.cxx" />
<ClCompile Include="lexers\LexMatlab.cxx" />
<ClCompile Include="lexers\LexNim.cxx" />
<ClCompile Include="lexers\LexNsis.cxx" />
<ClCompile Include="lexers\LexNull.cxx" />
<ClCompile Include="lexers\LexPascal.cxx" />
<ClCompile Include="lexers\LexPerl.cxx" />
<ClCompile Include="lexers\LexPowerShell.cxx" />
<ClCompile Include="lexers\LexProps.cxx" />
<ClCompile Include="lexers\LexPython.cxx" />
<ClCompile Include="lexers\LexR.cxx" />
<ClCompile Include="lexers\LexRegistry.cxx" />
<ClCompile Include="lexers\LexRuby.cxx" />
<ClCompile Include="lexers\LexRust.cxx" />
<ClCompile Include="lexers\LexSQL.cxx" />
<ClCompile Include="lexers\LexTCL.cxx" />
<ClCompile Include="lexers\LexVB.cxx" />
<ClCompile Include="lexers\LexVHDL.cxx" />
<ClCompile Include="lexers\LexYAML.cxx" />
<ClCompile Include="lexilla\src\Lexilla.cxx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="lexlib\Accessor.cxx" />
<ClCompile Include="lexlib\CharacterCategory.cxx" />
<ClCompile Include="lexlib\CharacterSet.cxx" />
@ -332,20 +288,12 @@
<ClInclude Include="oniguruma\src\regint.h" />
<ClInclude Include="oniguruma\src\regparse.h" />
<ClInclude Include="oniguruma\src\st.h" />
<ClInclude Include="lexers_x\CharSetX.h" />
<ClInclude Include="lexers_x\SciXLexer.h" />
<ClInclude Include="include\ILexer.h" />
<ClInclude Include="include\ILoader.h" />
<ClInclude Include="include\Platform.h" />
<ClInclude Include="include\SciLexer.h" />
<ClInclude Include="include\Scintilla.h" />
<ClInclude Include="include\Sci_Position.h" />
<ClInclude Include="lexilla\src\Lexilla.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="lexlib\Accessor.h" />
<ClInclude Include="lexlib\CharacterCategory.h" />
<ClInclude Include="lexlib\CharacterSet.h" />

View File

@ -4,9 +4,6 @@
<Filter Include="include">
<UniqueIdentifier>{b78c6486-26fc-4890-89c0-f7f3e301b79c}</UniqueIdentifier>
</Filter>
<Filter Include="lexers">
<UniqueIdentifier>{6b8793d0-aa9c-432f-aa65-b763bc23ae40}</UniqueIdentifier>
</Filter>
<Filter Include="lexlib">
<UniqueIdentifier>{b4579e25-25b5-4f0d-8dab-c34ed9f53913}</UniqueIdentifier>
</Filter>
@ -19,12 +16,6 @@
<Filter Include="oniguruma">
<UniqueIdentifier>{97da2683-9a5a-42f9-8ac6-0e8c54ce61e7}</UniqueIdentifier>
</Filter>
<Filter Include="lexilla">
<UniqueIdentifier>{326090d3-060e-4529-9b3e-4be7793fb194}</UniqueIdentifier>
</Filter>
<Filter Include="lexers_x">
<UniqueIdentifier>{3e51698b-084e-40cf-8dee-860bd61d7a2c}</UniqueIdentifier>
</Filter>
<Filter Include="oniguruma\scintilla">
<UniqueIdentifier>{32ffd4ad-2b04-4d07-acff-dad68cf258de}</UniqueIdentifier>
</Filter>
@ -33,96 +24,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="lexers\LexAsm.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexAU3.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexAVS.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexBash.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexBatch.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexCmake.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexCoffeeScript.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexConf.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexCPP.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexCSS.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexDiff.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexHTML.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexInno.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexLaTeX.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexLua.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexMake.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexMarkdown.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexNsis.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexNull.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexPascal.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexPerl.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexPowerShell.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexProps.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexPython.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexRuby.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexSQL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexTCL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexVB.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexYAML.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexVHDL.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexlib\Accessor.cxx">
<Filter>lexlib</Filter>
</ClCompile>
@ -246,48 +147,15 @@
<ClCompile Include="win32\ScintillaWin.cxx">
<Filter>win32</Filter>
</ClCompile>
<ClCompile Include="lexers\LexJSON.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexMatlab.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexRegistry.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="src\DBCS.cxx">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="lexlib\DefaultLexer.cxx">
<Filter>lexlib</Filter>
</ClCompile>
<ClCompile Include="lexers\LexD.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexR.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexRust.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="lexers\LexNim.cxx">
<Filter>lexers</Filter>
</ClCompile>
<ClCompile Include="src\UniqueString.cxx">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="lexilla\src\Lexilla.cxx">
<Filter>lexilla</Filter>
</ClCompile>
<ClCompile Include="lexers_x\LexAHKL.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
<ClCompile Include="lexers_x\LexCSV.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
<ClCompile Include="lexers_x\LexTOML.cxx">
<Filter>lexers_x</Filter>
</ClCompile>
<ClCompile Include="oniguruma\scintilla\OnigurumaRegExEngine.cxx">
<Filter>oniguruma\scintilla</Filter>
</ClCompile>
@ -539,15 +407,6 @@
<ClInclude Include="src\IntegerRectangle.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="lexilla\src\Lexilla.h">
<Filter>lexilla</Filter>
</ClInclude>
<ClInclude Include="lexers_x\CharSetX.h">
<Filter>lexers_x</Filter>
</ClInclude>
<ClInclude Include="lexers_x\SciXLexer.h">
<Filter>lexers_x</Filter>
</ClInclude>
<ClInclude Include="oniguruma\src\config.h">
<Filter>oniguruma\src</Filter>
</ClInclude>

View File

@ -31,7 +31,9 @@ __declspec(dllexport) int Scintilla_GetSystemMetricsForDpi(int nIndex, DPI_T d
__declspec(dllexport) int Scintilla_AdjustWindowRectForDpi(WRCT_T* lpRect, unsigned long dwStyle, unsigned long dwExStyle, DPI_T dpi);
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
#ifdef SCI_LEXER
int Scintilla_LinkLexers(void);
#endif
#ifdef __cplusplus
}

View File

@ -51,6 +51,14 @@ public:
}
}
int LngID(unsigned int index) const noexcept {
if (index < static_cast<unsigned int>(lexerCatalogue.size())) {
return lexerCatalogue[index]->language;
} else {
return -1;
}
}
LexerFactoryFunction Factory(unsigned int index) const noexcept {
// Works for object lexers but not for function lexers
return lexerCatalogue[index]->fnFactory;

View File

@ -152,6 +152,7 @@ st_init_table_with_size(type, size)
#endif
size = new_size(size); /* round up to prime number */
if (size <= 0) return 0;
tbl = alloc(st_table);
if (tbl == 0) return 0;
@ -319,10 +320,13 @@ rehash(table)
register st_table *table;
{
register st_table_entry *ptr, *next, **new_bins;
int i, old_num_bins = table->num_bins, new_num_bins;
int i, new_num_bins, old_num_bins;
unsigned int hash_val;
new_num_bins = new_size(old_num_bins+1);
old_num_bins = table->num_bins;
new_num_bins = new_size(old_num_bins + 1);
if (new_num_bins <= 0) return ;
new_bins = (st_table_entry**)Calloc(new_num_bins, sizeof(st_table_entry*));
if (new_bins == 0) {
return ;

View File

@ -388,15 +388,15 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (i = 0; i < ncs[0]; i++) {
for (j = 0; j < ncs[1]; j++) {
for (k = 0; k < ncs[2]; k++) {
if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1] &&
cs[2][k] == orig_codes[2])
continue;
items[n].byte_len = lens[2];
items[n].code_len = 3;
items[n].code[0] = cs[0][i];
items[n].code[1] = cs[1][j];
items[n].code[2] = cs[2][k];
if (items[n].code[0] == orig_codes[0] &&
items[n].code[1] == orig_codes[1] &&
items[n].code[2] == orig_codes[2])
continue;
n++;
}
}
@ -432,13 +432,12 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (i = 0; i < ncs[0]; i++) {
for (j = 0; j < ncs[1]; j++) {
if (cs[0][i] == orig_codes[0] && cs[1][j] == orig_codes[1])
continue;
items[n].byte_len = lens[1];
items[n].code_len = 2;
items[n].code[0] = cs[0][i];
items[n].code[1] = cs[1][j];
if (items[n].code[0] == orig_codes[0] &&
items[n].code[1] == orig_codes[1])
continue;
n++;
}
}

View File

@ -46,6 +46,7 @@ void Catalogue::AddLexerModule(LexerModule *plm) {
// Force a reference to all of the Scintilla lexers so that the linker will
// not remove the code of the lexers.
#ifdef SCI_LEXER
int Scintilla_LinkLexers() {
static int initialised = 0;
@ -200,3 +201,5 @@ int Scintilla_LinkLexers() {
return 1;
}
#endif // SCI_LEXER

View File

@ -40,7 +40,7 @@
#include "DarkMode/DarkMode.h"
#include "SciCall.h"
#include "SciLexer.h"
//#include "SciLexer.h"
#include "Edit.h"
@ -862,24 +862,25 @@ void EditDetectEOLMode(LPCSTR lpData, size_t cbData, EditFileIOStatus* const sta
// No NULL-terminated requirement for *ptr == '\n'
const uint8_t* const end = (const uint8_t*)lpData + cbData - 1;
uint32_t const mask = (1 << '\r') | (1 << '\n');
do {
// skip to line end
uint8_t ch;
uint8_t type = 0;
while (ptr < end && ((ch = *ptr++) > '\r' || (type = eol_table[ch]) == 0)) {} // nop
switch (type) {
case 1: //'\n'
++lineCountLF;
break;
case 2: //'\r'
if (*ptr == '\n') {
++ptr;
++lineCountCRLF;
}
else {
++lineCountCR;
}
break;
uint8_t ch = 0;
while (ptr < end && ((ch = *ptr++) > '\r' || ((mask >> ch) & 1) == 0)) {
// nop
}
switch (ch) {
case '\n':
++lineCountLF;
break;
case '\r':
if (*ptr == '\n') {
++ptr;
++lineCountCRLF;
} else {
++lineCountCR;
}
break;
}
} while (ptr < end);

View File

@ -43,7 +43,6 @@
#include "Config/Config.h"
#include "DarkMode/DarkMode.h"
#include "SciLexer.h"
#include "lexers_x/SciXLexer.h"
// ============================================================================
@ -1431,7 +1430,7 @@ HWND InitInstance(const HINSTANCE hInstance, LPCWSTR pszCmdLine, int nCmdShow)
{
if (StrIsNotEmpty(s_lpFileArg)) {
StringCchCopy(Globals.CurrentFile, COUNTOF(Globals.CurrentFile), s_lpFileArg);
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
else {
StringCchCopy(Globals.CurrentFile, COUNTOF(Globals.CurrentFile), L"");
@ -1477,7 +1476,7 @@ HWND InitInstance(const HINSTANCE hInstance, LPCWSTR pszCmdLine, int nCmdShow)
case FWM_MSGBOX:
FileWatching.FileWatchingMode = FWM_DONT_CARE;
FileWatching.ResetFileWatching = true;
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
break;
case FWM_AUTORELOAD:
if (!FileWatching.MonitoringLog) {
@ -1486,7 +1485,7 @@ HWND InitInstance(const HINSTANCE hInstance, LPCWSTR pszCmdLine, int nCmdShow)
else {
FileWatching.FileWatchingMode = FWM_AUTORELOAD;
FileWatching.ResetFileWatching = true;
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
break;
case FWM_DONT_CARE:
@ -2769,7 +2768,7 @@ LRESULT MsgEndSession(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
}
// Terminate file watching
InstallFileWatching(NULL);
InstallFileWatching(false);
DragAcceptFiles(hwnd, true);
@ -3149,7 +3148,7 @@ LRESULT MsgCopyData(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
FileWatching.FileWatchingMode = FWM_DONT_CARE;
FileWatching.ResetFileWatching = true;
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
else if (params->flagChangeNotify == FWM_AUTORELOAD) {
if (!FileWatching.MonitoringLog) {
@ -3158,7 +3157,7 @@ LRESULT MsgCopyData(HWND hwnd, WPARAM wParam, LPARAM lParam)
else {
FileWatching.FileWatchingMode = FWM_AUTORELOAD;
FileWatching.ResetFileWatching = true;
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
}
@ -3374,16 +3373,23 @@ LRESULT MsgChangeNotify(HWND hwnd, WPARAM wParam, LPARAM lParam)
Sci_GotoPosChooseCaret(iCurPos);
}
}
if (!s_bRunningWatch) {
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
}
else {
INT_PTR const answer = InfoBoxLng(MB_YESNO | MB_ICONWARNING, NULL, IDS_MUI_FILECHANGENOTIFY2);
if ((IDOK == answer) || (IDYES == answer)) {
FileSave(true, false, false, false, Flags.bPreserveFileModTime);
if (!s_bRunningWatch) {
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
}
else if (!PathIsExistingFile(Globals.CurrentFile))
{
InstallFileWatching(false); // terminate
SetSaveNeeded();
}
}
if (!s_bRunningWatch) {
InstallFileWatching(Globals.CurrentFile);
}
return FALSE;
}
@ -5745,7 +5751,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
}
EditEnsureSelectionVisible();
InstallFileWatching(Globals.CurrentFile); // force
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
CheckCmd(GetMenu(Globals.hwndMain), IDM_VIEW_CHASING_DOCTAIL, FileWatching.MonitoringLog);
@ -6016,7 +6022,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case IDM_VIEW_CHANGENOTIFY:
if (ChangeNotifyDlg(hwnd)) {
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
break;
@ -10089,7 +10095,7 @@ bool FileLoad(bool bDontSave, bool bNew, bool bReload,
}
FileWatching.FileWatchingMode = Settings.FileWatchingMode;
}
InstallFileWatching(NULL);
InstallFileWatching(false); // terminate
Flags.bSettingsFileSoftLocked = false;
UpdateSaveSettingsCmds();
COND_SHOW_ZOOM_CALLTIP();
@ -10230,7 +10236,7 @@ bool FileLoad(bool bDontSave, bool bNew, bool bReload,
}
FileWatching.FileWatchingMode = Settings.FileWatchingMode;
}
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
// the .LOG feature ...
if (SciCall_GetTextLength() >= 4) {
@ -10658,7 +10664,7 @@ bool FileSave(bool bSaveAlways, bool bAsk, bool bSaveAs, bool bSaveCopy, bool bP
}
FileWatching.FileWatchingMode = Settings.FileWatchingMode;
}
InstallFileWatching(Globals.CurrentFile);
InstallFileWatching(StrIsNotEmpty(Globals.CurrentFile));
}
// if current file is settings/config file: ask to start
@ -11374,12 +11380,12 @@ void CancelCallTip()
//=============================================================================
//
// TerminateFileWatching()
// InstallFileWatching()
//
static void TerminateFileWatching()
void InstallFileWatching(const bool bInstall)
{
if (s_bRunningWatch)
{
// Terminate previous watching
if (s_bRunningWatch) {
KillTimer(NULL, ID_WATCHTIMER);
if (s_hChangeHandle) {
FindCloseChangeNotification(s_hChangeHandle);
@ -11388,26 +11394,12 @@ static void TerminateFileWatching()
s_bRunningWatch = false;
s_dwChangeNotifyTime = 0UL; // reset
}
}
//=============================================================================
//
// InstallFileWatching()
//
void InstallFileWatching(LPCWSTR lpszFile)
{
// Terminate
if (StrIsEmpty(lpszFile) || (FileWatching.FileWatchingMode == FWM_DONT_CARE))
// Install
if (bInstall && (FileWatching.FileWatchingMode != FWM_DONT_CARE))
{
TerminateFileWatching();
}
else // Install
{
// Terminate previous watching
TerminateFileWatching();
WCHAR tchDirectory[MAX_PATH] = { L'\0' };
StringCchCopy(tchDirectory,COUNTOF(tchDirectory),lpszFile);
StringCchCopy(tchDirectory, COUNTOF(tchDirectory), Globals.CurrentFile);
PathCchRemoveFileSpec(tchDirectory, COUNTOF(tchDirectory));
// Save data of current file
@ -11487,7 +11479,7 @@ void CALLBACK WatchTimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
&& //|| // TODO: OR for read only auto reload without save requester
CurrentFileChanged())
{
TerminateFileWatching();
InstallFileWatching(false); // terminate
PostMessage(Globals.hwndMain, WM_CHANGENOTIFY, 0, 0);
}
break;
@ -11500,7 +11492,7 @@ void CALLBACK WatchTimerProc(HWND hwnd,UINT uMsg,UINT_PTR idEvent,DWORD dwTime)
// Check if the changes affect the current file
if (CurrentFileChanged()) {
// Shutdown current watching and give control to main window
TerminateFileWatching();
InstallFileWatching(false); // terminate
PostMessage(Globals.hwndMain, WM_CHANGENOTIFY, 0, 0);
break; // while
}

View File

@ -114,7 +114,7 @@ bool DoElevatedRelaunch(EditFileIOStatus* pFioStatus, bool bAutoSaveOnRelaunch);
void SnapToWinInfoPos(HWND hwnd, const WININFO winInfo, SCREEN_MODE mode);
void ShowNotifyIcon(HWND hwnd, bool bAdd);
void SetNotifyIconTitle(HWND hwnd);
void InstallFileWatching(LPCWSTR lpszFile);
void InstallFileWatching(const bool bInstall);
//bool GetDocModified();
void SetSavePoint();
void CALLBACK WatchTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);

View File

@ -103,7 +103,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;..\lexilla\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
@ -115,7 +115,7 @@
<WholeProgramOptimization>false</WholeProgramOptimization>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<FloatingPointModel>Fast</FloatingPointModel>
<LanguageStandard>stdcpp17</LanguageStandard>
<CompileAsWinRT>false</CompileAsWinRT>
@ -123,7 +123,7 @@
<ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;lexilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
@ -169,7 +169,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;..\lexilla\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<MinimalRebuild>false</MinimalRebuild>
@ -188,7 +188,7 @@
<ExceptionHandling>Async</ExceptionHandling>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;lexilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>Debug</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
@ -234,7 +234,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;..\lexilla\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>D_NP3_WIN10_DARK_MODE;_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;WIN32;STATIC_BUILD;SCI_LEXER;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -253,9 +253,10 @@
<ExceptionHandling>Async</ExceptionHandling>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;lexilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>No</GenerateDebugInformation>
<MergeSections>.rdata=.text</MergeSections>
<OptimizeReferences>true</OptimizeReferences>
@ -305,7 +306,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\scintilla\include;..\scintilla;..\lexilla\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>D_NP3_WIN10_DARK_MODE;_WIN32_WINNT=0x601;WINVER=0x601;NTDDI_VERSION=0x06010000;_WIN64;STATIC_BUILD;SCI_LEXER;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -326,7 +327,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>comctl32.lib;imm32.lib;shlwapi.lib;uxtheme.lib;muiload.lib;scintilla.lib;lexilla.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>No</GenerateDebugInformation>
<MergeSections>.rdata=.text</MergeSections>
<OptimizeReferences>true</OptimizeReferences>

View File

@ -244,7 +244,6 @@ DeclareSciCallV0(SelectionDuplicate, SELECTIONDUPLICATE)
DeclareSciCallV0(LineTranspose, LINETRANSPOSE)
DeclareSciCallV0(MoveSelectedLinesUp, MOVESELECTEDLINESUP)
DeclareSciCallV0(MoveSelectedLinesDown, MOVESELECTEDLINESDOWN)
DeclareSciCallR0(GetLexer, GETLEXER, int)
DeclareSciCallR2(FindText, FINDTEXT, DocPos, int, flags, struct Sci_TextToFind*, text)
// Operations
@ -391,7 +390,10 @@ DeclareSciCallV1(SetVScrollbar, SETVSCROLLBAR, bool, visible)
//
// Style definition
//
DeclareSciCallV1(SetLexer, SETLEXER, int, lexerid)
DeclareSciCallR0(GetLexer, GETLEXER, int)
DeclareSciCallV1(SetLexer, SETLEXER, int, lexerid) // deprecated
DeclareSciCallV01(SetILexer, SETILEXER, void*, lexerPtr) // ILexer5*
DeclareSciCallV0(StyleClearAll, STYLECLEARALL);
DeclareSciCallV0(ClearDocumentStyle, CLEARDOCUMENTSTYLE)
DeclareSciCallV0(StyleResetDefault, STYLERESETDEFAULT)

View File

@ -1,5 +1,4 @@
#ifndef _EDIT_LEXER_H_
#define _EDIT_LEXER_H_
#pragma once
#include "typedefs.h"
#include "Scintilla.h"
@ -38,11 +37,11 @@ typedef struct _keywordlist
#pragma warning(disable : 4200) // MS's Non-Std: Null-Array in Structure/Union
typedef struct _editlexer
{
int lexerID;
int resID;
LPCWSTR pszName;
LPCWSTR pszDefExt;
WCHAR szExtensions[BUFZIZE_STYLE_EXTENTIONS];
int lexerID;
int resID;
LPCWSTR pszName;
LPCWSTR pszDefExt;
WCHAR szExtensions[BUFZIZE_STYLE_EXTENTIONS];
PKEYWORDLIST pKeyWords;
EDITSTYLE Styles[];
@ -138,6 +137,7 @@ extern EDITLEXER lexHTML; // Web Source Code
extern EDITLEXER lexXML; // XML Document
extern EDITLEXER lexYAML; // YAML
// -----------------------------------------------------------------------------
// common defines
// -----------------------------------------------------------------------------
@ -162,5 +162,3 @@ extern EDITLEXER lexYAML; // YAML
"variant wend when while with withevents writeonly xor"
// -----------------------------------------------------------------------------
#endif // _EDIT_LEXER_H_

View File

@ -5,13 +5,10 @@
#include <assert.h>
#include "Scintilla.h"
#include "SciLexer.h"
#include "../scintilla/lexers_x/SciXLexer.h"
#include "resource.h"
#include "EditLexer.h"
#include "Scintilla.h"
#include "lexers_x/SciXLexer.h"
#include "EditLexer.h"
// ----------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@
#include <shlwapi.h>
#include <stdio.h>
#include "SciLexer.h"
#include "Lexilla.h"
#include "lexers_x/SciXLexer.h"
#include "Edit.h"
@ -102,7 +102,7 @@ static PEDITLEXER g_pLexArray[NUMLEXERS] =
&lexVB, // Visual Basic
&lexHTML, // Web Source Code
&lexXML, // XML Document
&lexYAML // YAML
&lexYAML, // YAML
};
@ -624,7 +624,7 @@ bool Style_ImportFromFile(const WCHAR* szFile)
if (bIsStdIniFile) {
IniSectionGetString(Lexer_Section, L"FileNameExtensions", g_pLexArray[iLexer]->pszDefExt,
g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions));
g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions));
}
// don't allow empty extensions settings => use default ext
if (StrIsEmpty(g_pLexArray[iLexer]->szExtensions)) {
@ -635,9 +635,9 @@ bool Style_ImportFromFile(const WCHAR* szFile)
while (g_pLexArray[iLexer]->Styles[i].iStyle != -1)
{
IniSectionGetString(Lexer_Section, g_pLexArray[iLexer]->Styles[i].pszName,
g_pLexArray[iLexer]->Styles[i].pszDefault,
g_pLexArray[iLexer]->Styles[i].szValue,
COUNTOF(g_pLexArray[iLexer]->Styles[i].szValue));
g_pLexArray[iLexer]->Styles[i].pszDefault,
g_pLexArray[iLexer]->Styles[i].szValue,
COUNTOF(g_pLexArray[iLexer]->Styles[i].szValue));
++i;
}
@ -1076,8 +1076,14 @@ void Style_SetLexer(HWND hwnd, PEDITLEXER pLexNew)
Style_SetUse2ndDefault(pCurrentStandard == &lexStandard2nd); // sync if forced
// Lexer
SciCall_SetLexer(pLexNew->lexerID);
// Set Lexer
if ((pLexNew->lexerID == SCLEX_CONTAINER) || (pLexNew->lexerID == SCLEX_NULL)) {
SciCall_SetLexer(pLexNew->lexerID);
}
else { // ILexer5 via Lexilla
SciCall_SetILexer(CreateLexerByID(pLexNew->lexerID));
assert(SciCall_GetLexer() == pLexNew->lexerID);
}
// Lexer very specific styles
Style_SetLexerSpecificProperties(pLexNew->lexerID);
@ -2017,7 +2023,7 @@ PEDITLEXER Style_MatchLexer(LPCWSTR lpszMatch, bool bCheckNames)
{
if (StrCmpNI(g_pLexArray[iLex]->pszName, lpszMatch, cch) == 0)
{
return(g_pLexArray[iLex]);
return (g_pLexArray[iLex]);
}
}
}
@ -2049,7 +2055,7 @@ PEDITLEXER Style_RegExMatchLexer(LPCWSTR lpszFileName)
for (int iLex = 0; iLex < COUNTOF(g_pLexArray); ++iLex)
{
const WCHAR* p = g_pLexArray[iLex]->szExtensions;
const WCHAR *p = g_pLexArray[iLex]->szExtensions;
do {
const WCHAR* f = StrChr(p, L'\\');
const WCHAR* e = f;
@ -2346,7 +2352,7 @@ void Style_SetXMLLexer(HWND hwnd)
void Style_SetLexerFromID(HWND hwnd,int id)
{
if (id >= 0 && id < COUNTOF(g_pLexArray)) {
Style_SetLexer(hwnd,g_pLexArray[id]);
Style_SetLexer(hwnd, g_pLexArray[id]);
}
}
@ -4141,11 +4147,11 @@ INT_PTR CALLBACK Style_CustomizeSchemesDlgProc(HWND hwnd, UINT umsg, WPARAM wPar
int cnt = 0;
for (int iLexer = 0; iLexer < COUNTOF(g_pLexArray); ++iLexer)
{
Style_StylesBackup[cnt++] = StrDup(g_pLexArray[iLexer]->szExtensions);
Style_StylesBackup[cnt++] = StrDup(g_pLexArray[iLexer]->szExtensions);
int i = 0;
while (g_pLexArray[iLexer]->Styles[i].iStyle != -1)
while (g_pLexArray[iLexer]->Styles[i].iStyle != -1)
{
Style_StylesBackup[cnt++] = StrDup(g_pLexArray[iLexer]->Styles[i].szValue);
Style_StylesBackup[cnt++] = StrDup(g_pLexArray[iLexer]->Styles[i].szValue);
++i;
}
}
@ -4171,7 +4177,7 @@ INT_PTR CALLBACK Style_CustomizeSchemesDlgProc(HWND hwnd, UINT umsg, WPARAM wPar
int found = -1;
for (int i = 0; i < COUNTOF(g_pLexArray); ++i)
{
if (g_pLexArray[i] == s_pLexCurrent)
if (g_pLexArray[i] == s_pLexCurrent)
{
found = i;
break;
@ -4183,9 +4189,9 @@ INT_PTR CALLBACK Style_CustomizeSchemesDlgProc(HWND hwnd, UINT umsg, WPARAM wPar
for (int i = 0; i < COUNTOF(g_pLexArray); i++)
{
if (i == found)
hCurrentTVLex = Style_AddLexerToTreeView(hwndTV, g_pLexArray[i]);
hCurrentTVLex = Style_AddLexerToTreeView(hwndTV, g_pLexArray[i]);
else
Style_AddLexerToTreeView(hwndTV, g_pLexArray[i]);
Style_AddLexerToTreeView(hwndTV, g_pLexArray[i]);
}
if (!hCurrentTVLex)
{
@ -4821,7 +4827,7 @@ INT_PTR CALLBACK Style_CustomizeSchemesDlgProc(HWND hwnd, UINT umsg, WPARAM wPar
int cnt = 0;
for (int iLexer = 0; iLexer < COUNTOF(g_pLexArray); ++iLexer)
{
StringCchCopy(g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions), Style_StylesBackup[cnt]);
StringCchCopy(g_pLexArray[iLexer]->szExtensions, COUNTOF(g_pLexArray[iLexer]->szExtensions), Style_StylesBackup[cnt]);
++cnt;
int i = 0;