Skip to content

Commit

Permalink
- intentional removal of #if SCINTILLA5 code, not sure I understand t…
Browse files Browse the repository at this point in the history
…he backward compat need at this point, native scintilla 5 is basically a requirement, expected and I'm intentionally forcing it into the project, not sure where v4 would be a necessary check.

- minor change to locatenativedll function
- removing Lexer enum, type and class, not needed
- adding fix for #92
  • Loading branch information
desjarlais committed Jan 29, 2024
1 parent fdc2c6f commit 7260163
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 328 deletions.
3 changes: 1 addition & 2 deletions Scintilla.NET/Scintilla.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<NeutralLanguage>en-US</NeutralLanguage>
<Description>Source Editing Component based on Scintilla 5 series.</Description>
<Copyright>Copyright (c) 2018, Jacob Slusser. All rights reserved. VPKSoft, cyber960 2022, desjarlais 2023.</Copyright>
<Version>5.3.3.14</Version>
<Version>5.3.3.15</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\$(Configuration)\ScintillaNET.xml</DocumentationFile>
<UseWindowsForms>true</UseWindowsForms>
Expand Down Expand Up @@ -110,7 +110,6 @@
<Compile Include="..\Shared\Layer.cs">
<Link>Layer.cs</Link>
</Compile>
<Compile Include="..\Shared\Lexer.cs" Link="Lexer.cs" />
<Compile Include="..\Shared\Line.cs" Link="Line.cs" />
<Compile Include="..\Shared\LineCollection.cs" Link="LineCollection.cs" />
<Compile Include="..\Shared\LineEndType.cs" Link="LineEndType.cs" />
Expand Down
358 changes: 178 additions & 180 deletions Shared/Lexer.cs
Original file line number Diff line number Diff line change
@@ -1,180 +1,178 @@
namespace ScintillaNET;

/// <summary>
/// Specifies the lexer to use for syntax highlighting in a <see cref="Scintilla" /> control.
/// </summary>
public enum Lexer
{
#if SCINTILLA5
/// <summary>
/// The lexer enumeration wasn't found for the specified lexer name.
/// </summary>
/// <remarks>Scintilla 5+ does not support lexer type constants.</remarks>
NotFound = -1,
#endif

/// <summary>
/// Lexing is performed by the <see cref="Scintilla" /> control container (host) using
/// the <see cref="Scintilla.StyleNeeded" /> event.
/// </summary>
Container = NativeMethods.SCLEX_CONTAINER,

/// <summary>
/// No lexing should be performed.
/// </summary>
Null = NativeMethods.SCLEX_NULL,

/// <summary>
/// The Ada (95) language lexer.
/// </summary>
Ada = NativeMethods.SCLEX_ADA,

/// <summary>
/// The assembly language lexer.
/// </summary>
Asm = NativeMethods.SCLEX_ASM,

/// <summary>
/// The batch file lexer.
/// </summary>
Batch = NativeMethods.SCLEX_BATCH,

/// <summary>
/// The Clarion language
/// </summary>
Clw = NativeMethods.SCLEX_CLW,

/// <summary>
/// The Clarion language No Case
/// </summary>
ClwNoCase = NativeMethods.SCLEX_CLWNOCASE,
/// <summary>
/// The C language family (C++, C, C#, Java, JavaScript, etc...) lexer.
/// </summary>
Cpp = NativeMethods.SCLEX_CPP,

/// <summary>
/// The Cascading Style Sheets (CSS, SCSS) lexer.
/// </summary>
Css = NativeMethods.SCLEX_CSS,

/// <summary>
/// The Fortran language lexer.
/// </summary>
Fortran = NativeMethods.SCLEX_FORTRAN,

/// <summary>
/// The FreeBASIC language lexer.
/// </summary>
FreeBasic = NativeMethods.SCLEX_FREEBASIC,

/// <summary>
/// The HyperText Markup Language (HTML) lexer.
/// </summary>
Html = NativeMethods.SCLEX_HTML,

/// <summary>
/// JavaScript Object Notation (JSON) lexer.
/// </summary>
Json = NativeMethods.SCLEX_JSON,

/// <summary>
/// The Lisp language lexer.
/// </summary>
Lisp = NativeMethods.SCLEX_LISP,

/// <summary>
/// The Lua scripting language lexer.
/// </summary>
Lua = NativeMethods.SCLEX_LUA,

/// <summary>
/// The Matlab scripting language lexer.
/// </summary>
Matlab = NativeMethods.SCLEX_MATLAB,

/// <summary>
/// The Pascal language lexer.
/// </summary>
Pascal = NativeMethods.SCLEX_PASCAL,

/// <summary>
/// The Perl language lexer.
/// </summary>
Perl = NativeMethods.SCLEX_PERL,

/// <summary>
/// The PHP: Hypertext Preprocessor (PHP) script lexer.
/// </summary>
PhpScript = NativeMethods.SCLEX_PHPSCRIPT,

/// <summary>
/// PowerShell script lexer.
/// </summary>
PowerShell = NativeMethods.SCLEX_POWERSHELL,

/// <summary>
/// Properties file (INI) lexer.
/// </summary>
Properties = NativeMethods.SCLEX_PROPERTIES,

/// <summary>
/// The PureBasic language lexer.
/// </summary>
PureBasic = NativeMethods.SCLEX_PUREBASIC,

/// <summary>
/// The Python language lexer.
/// </summary>
Python = NativeMethods.SCLEX_PYTHON,

/// <summary>
/// The Ruby language lexer.
/// </summary>
Ruby = NativeMethods.SCLEX_RUBY,

/// <summary>
/// The SmallTalk language lexer.
/// </summary>
Smalltalk = NativeMethods.SCLEX_SMALLTALK,

/// <summary>
/// The Structured Query Language (SQL) lexer.
/// </summary>
Sql = NativeMethods.SCLEX_SQL,

/// <summary>
/// The Visual Basic (VB) lexer.
/// </summary>
Vb = NativeMethods.SCLEX_VB,

/// <summary>
/// The Visual Basic Script (VBScript) lexer.
/// </summary>
VbScript = NativeMethods.SCLEX_VBSCRIPT,

/// <summary>
/// The Verilog hardware description language lexer.
/// </summary>
Verilog = NativeMethods.SCLEX_VERILOG,

/// <summary>
/// The Extensible Markup Language (XML) lexer.
/// </summary>
Xml = NativeMethods.SCLEX_XML,

/// <summary>
/// The Blitz (Blitz3D, BlitzMax, etc...) variant of Basic lexer.
/// </summary>
BlitzBasic = NativeMethods.SCLEX_BLITZBASIC,

/// <summary>
/// The Markdown syntax lexer.
/// </summary>
Markdown = NativeMethods.SCLEX_MARKDOWN,

/// <summary>
/// The R programming language lexer.
/// </summary>
R = NativeMethods.SCLEX_R
}
//namespace ScintillaNET;

///// <summary>
///// Specifies the lexer to use for syntax highlighting in a <see cref="Scintilla" /> control.
///// </summary>
//public enum Lexer
//{
// /// <summary>
// /// The lexer enumeration wasn't found for the specified lexer name.
// /// </summary>
// /// <remarks>Scintilla 5+ does not support lexer type constants.</remarks>
// NotFound = -1,

// /// <summary>
// /// Lexing is performed by the <see cref="Scintilla" /> control container (host) using
// /// the <see cref="Scintilla.StyleNeeded" /> event.
// /// </summary>
// Container = NativeMethods.SCLEX_CONTAINER,

// /// <summary>
// /// No lexing should be performed.
// /// </summary>
// Null = NativeMethods.SCLEX_NULL,

// /// <summary>
// /// The Ada (95) language lexer.
// /// </summary>
// Ada = NativeMethods.SCLEX_ADA,

// /// <summary>
// /// The assembly language lexer.
// /// </summary>
// Asm = NativeMethods.SCLEX_ASM,

// /// <summary>
// /// The batch file lexer.
// /// </summary>
// Batch = NativeMethods.SCLEX_BATCH,

// /// <summary>
// /// The Clarion language
// /// </summary>
// Clw = NativeMethods.SCLEX_CLW,

// /// <summary>
// /// The Clarion language No Case
// /// </summary>
// ClwNoCase = NativeMethods.SCLEX_CLWNOCASE,
// /// <summary>
// /// The C language family (C++, C, C#, Java, JavaScript, etc...) lexer.
// /// </summary>
// Cpp = NativeMethods.SCLEX_CPP,

// /// <summary>
// /// The Cascading Style Sheets (CSS, SCSS) lexer.
// /// </summary>
// Css = NativeMethods.SCLEX_CSS,

// /// <summary>
// /// The Fortran language lexer.
// /// </summary>
// Fortran = NativeMethods.SCLEX_FORTRAN,

// /// <summary>
// /// The FreeBASIC language lexer.
// /// </summary>
// FreeBasic = NativeMethods.SCLEX_FREEBASIC,

// /// <summary>
// /// The HyperText Markup Language (HTML) lexer.
// /// </summary>
// Html = NativeMethods.SCLEX_HTML,

// /// <summary>
// /// JavaScript Object Notation (JSON) lexer.
// /// </summary>
// Json = NativeMethods.SCLEX_JSON,

// /// <summary>
// /// The Lisp language lexer.
// /// </summary>
// Lisp = NativeMethods.SCLEX_LISP,

// /// <summary>
// /// The Lua scripting language lexer.
// /// </summary>
// Lua = NativeMethods.SCLEX_LUA,

// /// <summary>
// /// The Matlab scripting language lexer.
// /// </summary>
// Matlab = NativeMethods.SCLEX_MATLAB,

// /// <summary>
// /// The Pascal language lexer.
// /// </summary>
// Pascal = NativeMethods.SCLEX_PASCAL,

// /// <summary>
// /// The Perl language lexer.
// /// </summary>
// Perl = NativeMethods.SCLEX_PERL,

// /// <summary>
// /// The PHP: Hypertext Preprocessor (PHP) script lexer.
// /// </summary>
// PhpScript = NativeMethods.SCLEX_PHPSCRIPT,

// /// <summary>
// /// PowerShell script lexer.
// /// </summary>
// PowerShell = NativeMethods.SCLEX_POWERSHELL,

// /// <summary>
// /// Properties file (INI) lexer.
// /// </summary>
// Properties = NativeMethods.SCLEX_PROPERTIES,

// /// <summary>
// /// The PureBasic language lexer.
// /// </summary>
// PureBasic = NativeMethods.SCLEX_PUREBASIC,

// /// <summary>
// /// The Python language lexer.
// /// </summary>
// Python = NativeMethods.SCLEX_PYTHON,

// /// <summary>
// /// The Ruby language lexer.
// /// </summary>
// Ruby = NativeMethods.SCLEX_RUBY,

// /// <summary>
// /// The SmallTalk language lexer.
// /// </summary>
// Smalltalk = NativeMethods.SCLEX_SMALLTALK,

// /// <summary>
// /// The Structured Query Language (SQL) lexer.
// /// </summary>
// Sql = NativeMethods.SCLEX_SQL,

// /// <summary>
// /// The Visual Basic (VB) lexer.
// /// </summary>
// Vb = NativeMethods.SCLEX_VB,

// /// <summary>
// /// The Visual Basic Script (VBScript) lexer.
// /// </summary>
// VbScript = NativeMethods.SCLEX_VBSCRIPT,

// /// <summary>
// /// The Verilog hardware description language lexer.
// /// </summary>
// Verilog = NativeMethods.SCLEX_VERILOG,

// /// <summary>
// /// The Extensible Markup Language (XML) lexer.
// /// </summary>
// Xml = NativeMethods.SCLEX_XML,

// /// <summary>
// /// The Blitz (Blitz3D, BlitzMax, etc...) variant of Basic lexer.
// /// </summary>
// BlitzBasic = NativeMethods.SCLEX_BLITZBASIC,

// /// <summary>
// /// The Markdown syntax lexer.
// /// </summary>
// Markdown = NativeMethods.SCLEX_MARKDOWN,

// /// <summary>
// /// The R programming language lexer.
// /// </summary>
// R = NativeMethods.SCLEX_R
//}
Loading

0 comments on commit 7260163

Please sign in to comment.