mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #149 from RaiKoHoff/Scintilla_401
Update to Scintilla v.4.0.1 (401)
This commit is contained in:
commit
674edeaba2
Binary file not shown.
@ -272,6 +272,7 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="deelx\deelx64.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" />
|
||||
|
||||
@ -440,6 +440,9 @@
|
||||
<ClInclude Include="lexlib\DefaultLexer.h">
|
||||
<Filter>lexlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\ILoader.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="deelx\doc\deelx_en.chm">
|
||||
|
||||
@ -46,9 +46,8 @@
|
||||
#include "deelx64.h" // DEELX - Regular Expression Engine (v1.3)
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
class DeelxRegexSearch : public RegexSearchBase
|
||||
{
|
||||
@ -104,17 +103,10 @@ private:
|
||||
// ============================================================================
|
||||
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
RegexSearchBase *Scintilla::CreateRegexSearch(CharClassify *charClassTable)
|
||||
{
|
||||
return new DeelxRegexSearch(charClassTable);
|
||||
}
|
||||
#else
|
||||
RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable)
|
||||
{
|
||||
return new DeelxRegexSearch(charClassTable);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ============================================================================
|
||||
|
||||
|
||||
@ -133,8 +133,7 @@
|
||||
C++, exceptions may not be thrown out of Scintilla and all exceptions should be caught
|
||||
before returning from Scintilla.
|
||||
Run-time type information adds to memory use so is turned off.
|
||||
A 'Scintilla' name spaces is optionally used based on the SCI_NAMESPACE
|
||||
definition. This helps with name clashes on OS X.
|
||||
A 'Scintilla' name space is used. This helps with name clashes on OS X.
|
||||
</p>
|
||||
<p>
|
||||
The goto statement is not used because of bad memories from my first job
|
||||
|
||||
@ -2900,8 +2900,7 @@ struct Sci_TextToFind {
|
||||
number used by the C and C++ lexer to display literal strings; it has the value 6). This
|
||||
feature works differently on Windows and GTK+.<br />
|
||||
The default character set is <code>SC_CHARSET_DEFAULT</code>.</p>
|
||||
<p><code>SC_CHARSET_ANSI</code> specifies European Windows code page 1252.</p>
|
||||
<p><code>SC_CHARSET_DEFAULT</code> specifies the system-default code page unless the code page is set.</p>
|
||||
<p><code>SC_CHARSET_ANSI</code> and <code>SC_CHARSET_DEFAULT</code> specify European Windows code page 1252 unless the code page is set.</p>
|
||||
|
||||
<table class="standard" summary="Character Sets supported"><tbody>
|
||||
<tr>
|
||||
|
||||
@ -26,9 +26,9 @@
|
||||
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<font size="4"> <a href="http://www.scintilla.org/scintilla400.zip">
|
||||
<font size="4"> <a href="http://www.scintilla.org/scintilla401.zip">
|
||||
Windows</a>
|
||||
<a href="http://www.scintilla.org/scintilla400.tgz">
|
||||
<a href="http://www.scintilla.org/scintilla401.tgz">
|
||||
GTK+/Linux</a>
|
||||
</font>
|
||||
</td>
|
||||
@ -42,7 +42,7 @@
|
||||
containing very few restrictions.
|
||||
</p>
|
||||
<h3>
|
||||
Release 4.0.0
|
||||
Release 4.0.1
|
||||
</h3>
|
||||
<h4>
|
||||
Source Code
|
||||
@ -50,8 +50,8 @@
|
||||
The source code package contains all of the source code for Scintilla but no binary
|
||||
executable code and is available in
|
||||
<ul>
|
||||
<li><a href="http://www.scintilla.org/scintilla400.zip">zip format</a> (1600K) commonly used on Windows</li>
|
||||
<li><a href="http://www.scintilla.org/scintilla400.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
|
||||
<li><a href="http://www.scintilla.org/scintilla401.zip">zip format</a> (1600K) commonly used on Windows</li>
|
||||
<li><a href="http://www.scintilla.org/scintilla401.tgz">tgz format</a> (1400K) commonly used on Linux and compatible operating systems</li>
|
||||
</ul>
|
||||
Instructions for building on both Windows and Linux are included in the readme file.
|
||||
<h4>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@ -511,6 +511,10 @@
|
||||
<td>Thorsten Kani</td>
|
||||
<td>Bernhard M. Wiedemann</td>
|
||||
<td>Baldur Karlsson</td>
|
||||
</tr><tr>
|
||||
<td>Martin Kleusberg</td>
|
||||
<td>Jannick</td>
|
||||
<td>Zufu Liu</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
@ -522,6 +526,53 @@
|
||||
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://www.scintilla.org/scite401.zip">Release 4.0.1</a>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
Released 23 October 2017.
|
||||
</li>
|
||||
<li>
|
||||
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.
|
||||
</li>
|
||||
<li>
|
||||
The Scintilla namespace is always active for internal symbols and for the lexer interfaces
|
||||
ILexer4 and IDocument.
|
||||
</li>
|
||||
<li>
|
||||
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.
|
||||
</li>
|
||||
<li>
|
||||
The C++ lexer improved preprocessor conformance.<br />
|
||||
Default value of 0 for undefined preprocessor symbols.<br />
|
||||
#define A is treated as #define A 1.<br />
|
||||
"defined A" removes "A" before replacing "defined" with value.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1966/">Bug #1966</a>.
|
||||
</li>
|
||||
<li>
|
||||
The Python folder treats triple-quoted f-strings like triple-quoted strings.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1977/">Bug #1977</a>.
|
||||
</li>
|
||||
<li>
|
||||
The SQL lexer uses sql.backslash.escapes for double quoted strings.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1968/">Bug #1968</a>.
|
||||
</li>
|
||||
<li>
|
||||
Minor undefined behaviour fixed.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1978">Bug #1978</a>.
|
||||
</li>
|
||||
<li>
|
||||
On Cocoa, improve scrolling on macOS 10.12.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1885">Bug #1885</a>.
|
||||
</li>
|
||||
<li>
|
||||
On Cocoa, fix line selection by clicking in the margin when scrolled.
|
||||
<a href="http://sourceforge.net/p/scintilla/bugs/1971">Bug #1971</a>.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>
|
||||
<a href="http://www.scintilla.org/scite400.zip">Release 4.0.0</a>
|
||||
</h3>
|
||||
@ -1181,7 +1232,7 @@
|
||||
C++11 range-based for loops used in SciTE so GCC 4.6 is now the minimum supported version.
|
||||
</li>
|
||||
<li>
|
||||
(REVERTED in Notepad3) SC_CHARSET_DEFAULT now means code page 1252 on Windows unless a code page is set.
|
||||
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.
|
||||
|
||||
@ -127,10 +127,6 @@
|
||||
<h3>
|
||||
Projects using Scintilla
|
||||
</h3>
|
||||
<p>
|
||||
<a href="http://www.rizonesoft.com/downloads/notepad3">Notepad3</a>
|
||||
is a fast and light-weight replacement for Windows Notepad.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://stefanstools.sourceforge.net/BowPad.html">BowPad</a>
|
||||
is a small and fast text editor with a modern ribbon user interface (Windows7 or later).
|
||||
|
||||
204
scintilla/doc/StyleMetadata.html
Normal file
204
scintilla/doc/StyleMetadata.html
Normal file
@ -0,0 +1,204 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org" />
|
||||
<meta name="generator" content="SciTE" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>
|
||||
Scintilla Style Metadata
|
||||
</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
/*<![CDATA[*/
|
||||
CODE { font-weight: bold; font-family: Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace; }
|
||||
/*]]>*/
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="SciTEIco.png" border="3" height="64" width="64" alt="Scintilla icon" />
|
||||
</td>
|
||||
<td>
|
||||
<a href="index.html" style="color:white;text-decoration:none"><font size="5">Scintilla</font></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>
|
||||
Language Types
|
||||
</h2>
|
||||
<p>
|
||||
Scintilla contains lexers for various types of languages:
|
||||
<ul>
|
||||
<li>Programming languages like C++, Java, and Python.</li>
|
||||
<li>Assembler languages are low-level programming languages which may additionally include instructions and registers.</li>
|
||||
<li>Markup languages like HTML, TeX, and Markdown.</li>
|
||||
<li>Data languages like EDIFACT and YAML.</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
Some languages can be used in different ways. JavaScript is a programming language but also
|
||||
the basis of JSON data files. Similarly,
|
||||
<a href="https://en.wikipedia.org/wiki/S-expression">Lisp s expressions</a> can be used for both source code and data.
|
||||
</p>
|
||||
<p>
|
||||
Each language type has common elements such as identifiers in programming languages.
|
||||
These common elements should be identified so that languages can be displayed with common
|
||||
styles for these elements.
|
||||
Style tags are used for this purpose in Scintilla.
|
||||
</p>
|
||||
<h2>
|
||||
Style Tags
|
||||
</h2>
|
||||
<p>
|
||||
Every style has a list of tags where a tag is a lower-case word containing only the common ASCII letters 'a'-'z'
|
||||
such as "comment" or "operator".
|
||||
</p>
|
||||
<p>
|
||||
Tags are ordered from most important to least important.
|
||||
</p>
|
||||
<p>
|
||||
While applications may assign visual attributes for tag lists in many different ways, one reasonable technique is to
|
||||
apply tag-specific attributes in reverse order so that earlier and more important tags override less important tags.
|
||||
For example, the tag list <code>"error comment documentation keyword"</code> with
|
||||
a set of tag attributes <br />
|
||||
<code>{ comment=fore:green,back:very-light-green,font:Serif documentation=fore:light-green error=strikethrough keyword=bold }</code><br />
|
||||
could be rendered as <br />
|
||||
<code>bold,fore:light-green,back:very-light-green,font:Serif,strikethrough</code>.
|
||||
</p>
|
||||
<p>
|
||||
Alternative renderings could check for multi-tag combinations like
|
||||
<code>{ comment.documentation=fore:light-green comment.line=dark-green comment=green }.</code>
|
||||
</p>
|
||||
<p>
|
||||
Commonly, a tag list will contain an optional embedded language; optional statuses; a base type; and a set of type modifiers:<br />
|
||||
<code>embedded-language? status* base-type modifiers*</code>
|
||||
</p>
|
||||
<h3>Embedded language</h3>
|
||||
<p>
|
||||
The embedded language may be a source <code>(client | server)</code> followed by a language name
|
||||
<code>(javascript | php | python | basic)</code>.
|
||||
This may be extended in the future with other programming languages and style-definition languages like CSS.
|
||||
</p>
|
||||
<h3>Status</h3>
|
||||
<p>
|
||||
The statuses may be <code>(error | unused | predefined | inactive)</code>.<br />
|
||||
The <code>error</code> status is used for lexical statuses that indicate errors in the source code such as unterminated quoted strings.<br />
|
||||
The <code>unused</code> status may indicate a gap in the lexical states, possibly because an old lexical class is no longer used or an upcoming lexical class may fill that position.<br />
|
||||
The <code>predefined</code> status indicates a style in the range 32.39 that is used for non-lexical purposes in Scintilla.<br />
|
||||
The <code>inactive</code> status is used for text that is not currently interpreted such as C++ code that is contained within a '#if 0' preprocessor block.
|
||||
</p>
|
||||
<h3>Basic Types</h3>
|
||||
<p>
|
||||
The basic types for programming languages are <code>(default | operator | keyword | identifier | literal | comment | preprocessor | label)</code>.<br />
|
||||
The <code>default</code> type is commonly used for spaces and tabs between tokens although it may cover other characters in some languages.
|
||||
</p>
|
||||
<p>
|
||||
Assembler languages add <code>(instruction | register)</code>. to the basic types from programming languages.<br />
|
||||
</p>
|
||||
<p>
|
||||
The basic types for markup languages are <code>(default | tag | attribute | comment | preprocessor)</code>.<br />
|
||||
</p>
|
||||
<p>
|
||||
The basic types for data languages are <code>(default | key | data | comment)</code>.<br />
|
||||
</p>
|
||||
<h3>Comments</h3>
|
||||
<p>
|
||||
Programming languages may differentiate between line and stream comments and treat documentation comments as distinct from other comments.
|
||||
Documentation comments may be marked up with documentation keywords.<br />
|
||||
The additional attributes commonly used are <code>(line | documentation | keyword | taskmarker)</code>.
|
||||
</p>
|
||||
<h3>Literals</h3>
|
||||
<p>
|
||||
Programming and assembler languages contain a rich set of literals including numbers like <code>7</code> and <code>3.89e23</code>; <code>"string\n"</code>; and <code>nullptr</code>
|
||||
and differentiating between these is often wanted.<br />
|
||||
The common literal types are <code>(numeric | boolean | string | regex | date | time | uuid | nil | compound)</code>.<br />
|
||||
Numeric literal types are subdivided into <code>(integer | real)</code>.<br />
|
||||
String literal types may add (perhaps multiple) further attributes from <code> (heredoc | character | escapesequence | interpolated | multiline | raw)</code>.<br />
|
||||
</p>
|
||||
<p>
|
||||
An escape sequence within an interpolated heredoc may thus be <code>literal string heredoc escapesequence</code>.
|
||||
</p>
|
||||
<h3>
|
||||
List of known tags
|
||||
</h3>
|
||||
<table>
|
||||
<tr><td><code>attribute</code></td><td>Markup attribute</td></tr>
|
||||
<tr><td><code>basic</code></td><td>Embedded Basic</td></tr>
|
||||
<tr><td><code>boolean</code></td><td>True or false literal</td></tr>
|
||||
<tr><td><code>character</code></td><td>Single character literal as opposed to a string literal</td></tr>
|
||||
<tr><td><code>client</code></td><td>Script executed on client</td></tr>
|
||||
<tr><td><code>comment</code></td><td>The standard comment type in a language: may be stream or line</td></tr>
|
||||
<tr><td><code>compound</code></td><td>Literal containing multiple subliterals such as a tuple or complex number</td></tr>
|
||||
<tr><td><code>data</code></td><td>A value in a data file</td></tr>
|
||||
<tr><td><code>date</code></td><td>Literal representing a data such as '19/November/1975'</td></tr>
|
||||
<tr><td><code>default</code></td><td>Starting state commonly also used for white space</td></tr>
|
||||
<tr><td><code>documentation</code></td><td>Comment that can be extracted into documentation</td></tr>
|
||||
<tr><td><code>error</code></td><td>State indicating an invalid or erroneous element</td></tr>
|
||||
<tr><td><code>escapesequence</code></td><td>Parts of a string that are not literal such as '\t' for tab in C</td></tr>
|
||||
<tr><td><code>heredoc</code></td><td>Lengthy text literal marked by a word at both ends</td></tr>
|
||||
<tr><td><code>identifier</code></td><td>Name that identifies an object or class of object</td></tr>
|
||||
<tr><td><code>inactive</code></td><td>Code that is not currently interpreted</td></tr>
|
||||
<tr><td><code>instruction</code></td><td>Mnemonic in assembler languages like 'addc'</td></tr>
|
||||
<tr><td><code>integer</code></td><td>Numeric literal with no fraction or exponent like '738'</td></tr>
|
||||
<tr><td><code>interpolated</code></td><td>String that can contain expressions</td></tr>
|
||||
<tr><td><code>javascript</code></td><td>Embedded Javascript</td></tr>
|
||||
<tr><td><code>key</code></td><td>Element which allows finding associated data</td></tr>
|
||||
<tr><td><code>keyword</code></td><td>Reserved word with special meaning like 'while'</td></tr>
|
||||
<tr><td><code>label</code></td><td>Destination for jumps in programming and assembler languages</td></tr>
|
||||
<tr><td><code>line</code></td><td>Differentiates between stream comments and line comments in languages that have both</td></tr>
|
||||
<tr><td><code>literal</code></td><td>Fixed value in source code</td></tr>
|
||||
<tr><td><code>multiline</code></td><td>Differentiates between single line and multiline elements, commonly strings</td></tr>
|
||||
<tr><td><code>nil</code></td><td>Literal for the null pointer such as nullptr in C++ or NULL in C</td></tr>
|
||||
<tr><td><code>numeric</code></td><td>Literal number like '16'</td></tr>
|
||||
<tr><td><code>operator</code></td><td>Punctuation character such as '&' or '['</td></tr>
|
||||
<tr><td><code>php</code></td><td>Embedded PHP</td></tr>
|
||||
<tr><td><code>predefined</code></td><td>Style in the range 32.39 that is used for non-lexical purposes</td></tr>
|
||||
<tr><td><code>preprocessor</code></td><td>Element that is recognized in an early stage of translation</td></tr>
|
||||
<tr><td><code>python</code></td><td>Embedded Python</td></tr>
|
||||
<tr><td><code>raw</code></td><td>String type that avoids interpretation: may be used for regular expressions in languages without a specific regex type</td></tr>
|
||||
<tr><td><code>real</code></td><td>Numeric literal which may have a fraction or exponent like '3.84e-15'</td></tr>
|
||||
<tr><td><code>regex</code></td><td>Regular expression literal like '^[a-z]+'</td></tr>
|
||||
<tr><td><code>register</code></td><td>CPU register in assembler languages</td></tr>
|
||||
<tr><td><code>server</code></td><td>Script executed on server</td></tr>
|
||||
<tr><td><code>string</code></td><td>Sequence of characters</td></tr>
|
||||
<tr><td><code>tag</code></td><td>Markup tag like '<br />'</td></tr>
|
||||
<tr><td><code>taskmarker</code></td><td>Word in comment that marks future work like 'FIXME'</td></tr>
|
||||
<tr><td><code>time</code></td><td>Literal representing a time such as '9:34:31'</td></tr>
|
||||
<tr><td><code>unused</code></td><td>Style that is not currently used</td></tr>
|
||||
<tr><td><code>uuid</code></td><td>Universally unique identifier often used in interface definition files which may look like '{098f2470-bae0-11cd-b579-08002b30bfeb}'</td></tr>
|
||||
</table>
|
||||
<h2>
|
||||
Extension
|
||||
</h2>
|
||||
<p>
|
||||
Each element in this scheme may be extended in the future. This may be done by revising this document to provide a common approach to new features.
|
||||
Individual lexers may also choose to expose unique language features through new tags.
|
||||
</p>
|
||||
<h2>
|
||||
Translation
|
||||
</h2>
|
||||
<p>
|
||||
Tags could be exposed directly in user interfaces or configuration languages.
|
||||
However, an application may also translate these to match its naming schema.
|
||||
Capitalization and punctuation could be different (like <code>Here-Doc</code> instead of <code>heredoc</code>),
|
||||
terminology changed ("constant" instead of "literal"),
|
||||
or human language changed from English to Chinese or Spanish.
|
||||
</p>
|
||||
<p>
|
||||
Starting from a common set of tags makes these modifications tractable.
|
||||
</p>
|
||||
<h2>
|
||||
Open issues
|
||||
</h2>
|
||||
<p>
|
||||
The C++ lexer (for example) has inactive states and dynamically allocated substyles.
|
||||
These should be exposed through the metadata mechanism but are not currently.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@ -9,7 +9,7 @@
|
||||
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
|
||||
<meta name="Description"
|
||||
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
|
||||
<meta name="Date.Modified" content="20170816" />
|
||||
<meta name="Date.Modified" content="20171023" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<style type="text/css">
|
||||
#versionlist {
|
||||
@ -56,8 +56,8 @@
|
||||
GTK+, and OS X</font>
|
||||
</td>
|
||||
<td width="40%" align="right">
|
||||
<font color="#FFCC99" size="3"> Release version 4.0.0<br />
|
||||
Site last modified August 16 2017</font>
|
||||
<font color="#FFCC99" size="3"> Release version 4.0.1<br />
|
||||
Site last modified October 23 2017</font>
|
||||
</td>
|
||||
<td width="20%">
|
||||
|
||||
@ -72,6 +72,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<ul id="versionlist">
|
||||
<li>Version 4.0.1 makes some changes to namespaces and headers. Scrolling is smoother on Cocoa.</li>
|
||||
<li>Version 4.0.0 is an unstable major release with changes to some internal and external interfaces.</li>
|
||||
<li>Version 3.7.6 was a minor long term release.</li>
|
||||
<li>Version 3.7.5 adds a Reverse Selected Lines command.
|
||||
@ -157,6 +158,10 @@ if (!IsRemote()) { //if NOT remote...
|
||||
<p>
|
||||
<a href="http://www.scintilla.org/Icons.html">Icons that can be used with Scintilla.</a>
|
||||
</p>
|
||||
<p>
|
||||
The <a href="http://www.scintilla.org/LongTermDownload.html">LongTerm3</a>
|
||||
branch of Scintilla avoids using features from C++14 or later in order to support older systems.
|
||||
</p>
|
||||
<p>
|
||||
Questions and comments about Scintilla should be directed to the
|
||||
<a href="https://groups.google.com/forum/#!forum/scintilla-interest">scintilla-interest</a>
|
||||
|
||||
@ -10,15 +10,7 @@
|
||||
|
||||
#include "Sci_Position.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SCI_METHOD __stdcall
|
||||
#else
|
||||
#define SCI_METHOD
|
||||
#endif
|
||||
|
||||
enum { dvRelease4=2 };
|
||||
|
||||
@ -81,16 +73,6 @@ public:
|
||||
virtual const char * SCI_METHOD DescriptionOfStyle(int style) = 0;
|
||||
};
|
||||
|
||||
class ILoader {
|
||||
public:
|
||||
virtual int SCI_METHOD Release() = 0;
|
||||
// Returns a status code from SC_STATUS_*
|
||||
virtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;
|
||||
virtual void * SCI_METHOD ConvertToDocument() = 0;
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
21
scintilla/include/ILoader.h
Normal file
21
scintilla/include/ILoader.h
Normal file
@ -0,0 +1,21 @@
|
||||
// Scintilla source code edit control
|
||||
/** @file ILoader.h
|
||||
** Interface for loading into a Scintilla document from a background thread.
|
||||
**/
|
||||
// Copyright 1998-2017 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
|
||||
#ifndef ILOADER_H
|
||||
#define ILOADER_H
|
||||
|
||||
#include "Sci_Position.h"
|
||||
|
||||
class ILoader {
|
||||
public:
|
||||
virtual int SCI_METHOD Release() = 0;
|
||||
// Returns a status code from SC_STATUS_*
|
||||
virtual int SCI_METHOD AddData(const char *data, Sci_Position length) = 0;
|
||||
virtual void * SCI_METHOD ConvertToDocument() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -71,9 +71,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
namespace Scintilla {
|
||||
#endif
|
||||
|
||||
typedef float XYPOSITION;
|
||||
typedef double XYACCUMULATOR;
|
||||
@ -511,15 +509,9 @@ public:
|
||||
#ifdef NDEBUG
|
||||
#define PLATFORM_ASSERT(c) ((void)0)
|
||||
#else
|
||||
#ifdef SCI_NAMESPACE
|
||||
#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Scintilla::Platform::Assert(#c, __FILE__, __LINE__))
|
||||
#else
|
||||
#define PLATFORM_ASSERT(c) ((c) ? (void)(0) : Platform::Assert(#c, __FILE__, __LINE__))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -20,4 +20,10 @@ typedef size_t Sci_PositionU;
|
||||
// For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE
|
||||
typedef long Sci_PositionCR;
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SCI_METHOD __stdcall
|
||||
#else
|
||||
#define SCI_METHOD
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -320,8 +320,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_SETWHITESPACEBACK 2085
|
||||
#define SCI_SETWHITESPACESIZE 2086
|
||||
#define SCI_GETWHITESPACESIZE 2087
|
||||
#define SCI_SETSTYLEBITS 2090
|
||||
#define SCI_GETSTYLEBITS 2091
|
||||
#define SCI_SETLINESTATE 2092
|
||||
#define SCI_GETLINESTATE 2093
|
||||
#define SCI_GETMAXLINESTATE 2094
|
||||
@ -988,7 +986,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
|
||||
#define SCI_GETPROPERTY 4008
|
||||
#define SCI_GETPROPERTYEXPANDED 4009
|
||||
#define SCI_GETPROPERTYINT 4010
|
||||
#define SCI_GETSTYLEBITSNEEDED 4011
|
||||
#define SCI_GETLEXERLANGUAGE 4012
|
||||
#define SCI_PRIVATELEXERCALL 4013
|
||||
#define SCI_PROPERTYNAMES 4014
|
||||
@ -1127,7 +1124,6 @@ struct Sci_TextToFind {
|
||||
struct Sci_CharacterRange chrgText;
|
||||
};
|
||||
|
||||
|
||||
typedef void *Sci_SurfaceID;
|
||||
|
||||
struct Sci_Rectangle {
|
||||
@ -1148,7 +1144,6 @@ struct Sci_RangeToFormat {
|
||||
struct Sci_CharacterRange chrg;
|
||||
};
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
/* For the GTK+ platform, g-ir-scanner needs to have these typedefs. This
|
||||
* is not required in C++ code and actually seems to break ScintillaEditPy */
|
||||
@ -1165,7 +1160,6 @@ struct Sci_NotifyHeader {
|
||||
unsigned int code;
|
||||
};
|
||||
|
||||
|
||||
struct SCNotification {
|
||||
Sci_NotifyHeader nmhdr;
|
||||
Sci_Position position;
|
||||
@ -1219,6 +1213,10 @@ struct SCNotification {
|
||||
#define RangeToFormat Sci_RangeToFormat
|
||||
#define NotifyHeader Sci_NotifyHeader
|
||||
|
||||
#define SCI_SETSTYLEBITS 2090
|
||||
#define SCI_GETSTYLEBITS 2091
|
||||
#define SCI_GETSTYLEBITSNEEDED 4011
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -702,14 +702,6 @@ set void SetWhitespaceSize=2086(int size,)
|
||||
# Get the size of the dots used to mark space characters.
|
||||
get int GetWhitespaceSize=2087(,)
|
||||
|
||||
# Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||
# bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||
# is used to expand the possible states.
|
||||
set void SetStyleBits=2090(int bits,)
|
||||
|
||||
# Retrieve number of bits in style bytes used to hold the lexical state.
|
||||
get int GetStyleBits=2091(,)
|
||||
|
||||
# Used to hold extra styling information for each line.
|
||||
set void SetLineState=2092(int line, int state)
|
||||
|
||||
@ -2638,9 +2630,6 @@ get int GetPropertyExpanded=4009(string key, stringresult value)
|
||||
# interpreted as an int AFTER any "$()" variable replacement.
|
||||
get int GetPropertyInt=4010(string key, int defaultValue)
|
||||
|
||||
# Retrieve the number of bits the current lexer needs for styling.
|
||||
get int GetStyleBitsNeeded=4011(,)
|
||||
|
||||
# Retrieve the name of the lexer.
|
||||
# Return the length of the text.
|
||||
# Result is NUL-terminated.
|
||||
@ -4875,6 +4864,17 @@ cat Provisional
|
||||
|
||||
cat Deprecated
|
||||
|
||||
# Divide each styling byte into lexical class bits (default: 5) and indicator
|
||||
# bits (default: 3). If a lexer requires more than 32 lexical states, then this
|
||||
# is used to expand the possible states.
|
||||
set void SetStyleBits=2090(int bits,)
|
||||
|
||||
# Retrieve number of bits in style bytes used to hold the lexical state.
|
||||
get int GetStyleBits=2091(,)
|
||||
|
||||
# Retrieve the number of bits the current lexer needs for styling.
|
||||
get int GetStyleBitsNeeded=4011(,)
|
||||
|
||||
# Deprecated in 3.5.5
|
||||
|
||||
# Always interpret keyboard input as Unicode
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
// Return values for GetOperatorType
|
||||
|
||||
@ -26,6 +26,8 @@
|
||||
#include "LexerModule.h"
|
||||
//#include "DefaultLexer.h"
|
||||
|
||||
using namespace Scintilla;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4100)
|
||||
#endif
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80 && (isalnum(ch) || ch == '_'));
|
||||
|
||||
@ -19,9 +19,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseAsyDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
|
||||
WordList *keywordlists[], Accessor &styler) {
|
||||
|
||||
@ -68,9 +68,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsTypeCharacter(const int ch)
|
||||
{
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAKeywordChar(const int ch) {
|
||||
return (ch < 0x80 && (isalnum(ch) || (ch == '_') || (ch == ' ')));
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Interface
|
||||
|
||||
@ -32,9 +32,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Some char test functions
|
||||
static bool isAsn1Number(int ch)
|
||||
|
||||
@ -36,9 +36,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
# ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
# endif
|
||||
|
||||
namespace {
|
||||
// Use an unnamed namespace to protect the functions and classes from name conflicts
|
||||
@ -510,7 +508,8 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
char word[1000];
|
||||
int wordlen = 0;
|
||||
|
||||
std::string preProcessorTags[11] = { "#define", "#elif", "#else", "#endif",
|
||||
std::string preProcessorTags[13] = { "#context_off", "#context_on",
|
||||
"#define", "#elif", "#else", "#endif",
|
||||
"#ident", "#if", "#ifdef", "#ifndef",
|
||||
"#include", "#pragma", "#undef" };
|
||||
LexAccessor styler(pAccess);
|
||||
@ -568,7 +567,10 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
sc.ChangeState(SCE_BAAN_WORD2);
|
||||
}
|
||||
else if ((keywords3.kwHasSection && (sc.ch == ':')) ? keywords3.Contains(s1) : keywords3.Contains(s)) {
|
||||
sc.ChangeState(SCE_BAAN_WORD3);
|
||||
if (sc.ch == '(')
|
||||
sc.ChangeState(SCE_BAAN_WORD3);
|
||||
else
|
||||
sc.ChangeState(SCE_BAAN_IDENTIFIER);
|
||||
}
|
||||
else if ((keywords4.kwHasSection && (sc.ch == ':')) ? keywords4.Contains(s1) : keywords4.Contains(s)) {
|
||||
sc.ChangeState(SCE_BAAN_WORD4);
|
||||
@ -688,7 +690,7 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
word[wordlen++] = sc.ch;
|
||||
word[wordlen++] = '\0';
|
||||
}
|
||||
if (!wordInArray(word, preProcessorTags, 11))
|
||||
if (!wordInArray(word, preProcessorTags, 13))
|
||||
// Colorise only preprocessor built in Baan.
|
||||
sc.ChangeState(SCE_BAAN_IDENTIFIER);
|
||||
if (strcmp(word, "#pragma") == 0 || strcmp(word, "#include") == 0) {
|
||||
@ -800,9 +802,10 @@ void SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int
|
||||
else if (style == SCE_BAAN_PREPROCESSOR) {
|
||||
// folds #ifdef/#if/#ifndef - they are not part of the IsPreProcLine folding.
|
||||
if (ch == '#') {
|
||||
if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef"))
|
||||
if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef")
|
||||
|| styler.Match(i, "#context_on"))
|
||||
levelCurrent++;
|
||||
else if (styler.Match(i, "#endif"))
|
||||
else if (styler.Match(i, "#endif") || styler.Match(i, "#context_off"))
|
||||
levelCurrent--;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define HERE_DELIM_MAX 256
|
||||
|
||||
|
||||
@ -39,9 +39,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/* Bits:
|
||||
* 1 - whitespace
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool Is0To9(char ch) {
|
||||
return (ch >= '0') && (ch <= '9');
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
bool IsAlphabetic(unsigned int ch)
|
||||
|
||||
@ -19,9 +19,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static int classifyWordBullant(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler) {
|
||||
char s[100];
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Is an end of line character
|
||||
inline bool IsEOL(const int ch) {
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define IN_DIVISION 0x01
|
||||
#define IN_DECLARATIVES 0x02
|
||||
|
||||
@ -33,9 +33,7 @@
|
||||
#include "SparseState.h"
|
||||
#include "SubStyles.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
// Use an unnamed namespace to protect the functions and classes from name conflicts
|
||||
@ -1333,6 +1331,8 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i
|
||||
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;
|
||||
@ -1520,6 +1520,7 @@ void LexerCPP::EvaluateTokens(std::vector<std::string> &tokens, const SymbolTabl
|
||||
if (it != preprocessorDefinitions.end()) {
|
||||
val = "1";
|
||||
}
|
||||
tokens.erase(tokens.begin() + i + 1, tokens.begin() + i + 2);
|
||||
}
|
||||
tokens[i] = val;
|
||||
} else {
|
||||
@ -1582,8 +1583,8 @@ void LexerCPP::EvaluateTokens(std::vector<std::string> &tokens, const SymbolTabl
|
||||
tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end());
|
||||
}
|
||||
} else {
|
||||
// Identifier not found
|
||||
tokens.erase(tokens.begin() + i);
|
||||
// Identifier not found and value defaults to zero
|
||||
tokens[i] = "0";
|
||||
}
|
||||
} else {
|
||||
i++;
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
// Scintilla source code edit control
|
||||
// Encoding: UTF-8
|
||||
/** @file LexCSS.cxx
|
||||
** Lexer for Cascading Style Sheets
|
||||
** Written by Jakub Vrána
|
||||
** Written by Jakub Vrána
|
||||
** Improved by Philippe Lhoste (CSS2)
|
||||
** Improved by Ross McKay (SCSS mode; see http://sass-lang.com/ )
|
||||
**/
|
||||
@ -31,9 +32,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
static inline bool IsAWordChar(const unsigned int ch) {
|
||||
@ -347,6 +346,7 @@ static void ColouriseCssDoc(Sci_PositionU startPos, Sci_Position length, int ini
|
||||
case SCE_CSS_DEFAULT:
|
||||
if (isLessDocument) // give priority to pseudo elements
|
||||
break;
|
||||
// Falls through.
|
||||
case SCE_CSS_VALUE:
|
||||
lastStateVar = sc.state;
|
||||
sc.SetState(SCE_CSS_VARIABLE);
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wcomma"
|
||||
#endif
|
||||
|
||||
// Since the Microsoft __iscsym[f] funcs are not ANSI...
|
||||
inline int iscaml(int c) {return isalnum(c) || c == '_';}
|
||||
inline int iscamlf(int c) {return isalpha(c) || c == '_';}
|
||||
@ -46,9 +50,7 @@ static const int baseT[24] = {
|
||||
0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */
|
||||
};
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_AS_EXTERNAL_LEXER
|
||||
/*
|
||||
@ -368,6 +370,7 @@ void ColouriseCamlDoc(
|
||||
break;
|
||||
}/* else
|
||||
// fall through for SML char literal (handle like string) */
|
||||
// Falls through.
|
||||
|
||||
case SCE_CAML_STRING:
|
||||
// [try to] interpret as [additional] [SML char/] string literal char
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool isCmakeNumber(char ch)
|
||||
{
|
||||
|
||||
@ -28,9 +28,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool IsSpaceEquiv(int state) {
|
||||
return (state == SCE_COFFEESCRIPT_DEFAULT
|
||||
|
||||
@ -27,9 +27,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseConfDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler)
|
||||
{
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseNncrontabDoc(Sci_PositionU startPos, Sci_Position length, int, WordList
|
||||
*keywordLists[], Accessor &styler)
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/* Nested comments require keeping the value of the nesting level for every
|
||||
position in the document. But since scintilla always styles line by line,
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "LexerModule.h"
|
||||
/***************************************/
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/***********************************************/
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "LexerModule.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
static const char *const DMISWordListDesc[] = {
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool AtEOL(Accessor &styler, Sci_PositionU i) {
|
||||
return (styler[i] == '\n') ||
|
||||
|
||||
@ -42,9 +42,7 @@
|
||||
#define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
#define SET_DIGITS "0123456789"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool IsSpaceEquiv(int state) {
|
||||
switch (state) {
|
||||
|
||||
@ -20,9 +20,7 @@
|
||||
#include "LexerModule.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
class LexerEDIFACT : public DefaultLexer
|
||||
{
|
||||
|
||||
@ -22,9 +22,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool isEiffelOperator(unsigned int ch) {
|
||||
// '.' left out as it is used to make up numbers
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
// Scintilla source code edit control
|
||||
// Encoding: UTF-8
|
||||
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
|
||||
// The License.txt file describes the conditions under which this software may be distributed.
|
||||
/** @file LexErlang.cxx
|
||||
** Lexer for Erlang.
|
||||
** Enhanced by Etienne 'Lenain' Girondel (lenaing@gmail.com)
|
||||
** Originally wrote by Peter-Henry Mander,
|
||||
** based on Matlab lexer by José Fonseca.
|
||||
** based on Matlab lexer by José Fonseca.
|
||||
**/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -26,9 +27,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static int is_radix(int radix, int ch) {
|
||||
int digit;
|
||||
@ -116,6 +115,7 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int
|
||||
}
|
||||
}
|
||||
// V--- Falling through!
|
||||
// Falls through.
|
||||
case COMMENT_FUNCTION : {
|
||||
if (sc.ch != '%') {
|
||||
to_late_to_comment = true;
|
||||
@ -128,6 +128,7 @@ static void ColouriseErlangDoc(Sci_PositionU startPos, Sci_Position length, int
|
||||
}
|
||||
}
|
||||
// V--- Falling through!
|
||||
// Falls through.
|
||||
case COMMENT_MODULE : {
|
||||
if (parse_state != COMMENT) {
|
||||
// Search for comment documentation
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool strstart(const char *haystack, const char *needle) {
|
||||
return strncmp(haystack, needle, strlen(needle)) == 0;
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Extended to accept accented characters
|
||||
static inline bool IsAWordChar(int ch)
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordStart(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '.');
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "LexerModule.h"
|
||||
/***************************************/
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/***********************************************/
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsGAPOperator(char ch) {
|
||||
if (IsASCII(ch) && isalnum(ch)) return false;
|
||||
|
||||
@ -39,9 +39,7 @@ val SCE_GC_OPERATOR=9
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define debug Platform::DebugPrintf
|
||||
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START)
|
||||
#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START)
|
||||
|
||||
@ -43,9 +43,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// See https://github.com/ghc/ghc/blob/master/compiler/parser/Lexer.x#L1682
|
||||
// Note, letter modifiers are prohibited.
|
||||
|
||||
@ -118,9 +118,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// prototypes for general helper functions
|
||||
static inline bool IsNewline(const int ch);
|
||||
|
||||
@ -22,9 +22,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseIndentDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],
|
||||
Accessor &styler) {
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseInnoDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *keywordLists[], Accessor &styler) {
|
||||
int state = SCE_INNO_DEFAULT;
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static const char *const JSONWordListDesc[] = {
|
||||
"JSON Keywords",
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
/* KVIrc Script syntactic rules: http://www.kvirc.net/doc/doc_syntactic_rules.html */
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Extended to accept accented characters
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
#include "DefaultLexer.h"
|
||||
#include "LexerBase.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define SCE_LISP_CHARACTER 29
|
||||
#define SCE_LISP_MACRO 30
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalpha(ch) || ch == '@' || ch == '_');
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ],
|
||||
// return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on.
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
// Scintilla source code edit control
|
||||
// Encoding: UTF-8
|
||||
/** @file LexMMIXAL.cxx
|
||||
** Lexer for MMIX Assembler Language.
|
||||
** Written by Christoph Hösler <christoph.hoesler@student.uni-tuebingen.de>
|
||||
** Written by Christoph Hösler <christoph.hoesler@student.uni-tuebingen.de>
|
||||
** For information about MMIX visit http://www-cs-faculty.stanford.edu/~knuth/mmix.html
|
||||
**/
|
||||
// Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
|
||||
@ -25,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
|
||||
@ -27,9 +27,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static int GetLotLineState(std::string &line) {
|
||||
if (line.length()) {
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#define KW_MSSQL_STATEMENTS 0
|
||||
#define KW_MSSQL_DATA_TYPES 1
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Is it a core character (C isalpha(), exclamation and question mark)
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool AtEOL(Accessor &styler, Sci_PositionU i) {
|
||||
return (styler[i] == '\n') ||
|
||||
|
||||
@ -51,9 +51,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsNewline(const int ch) {
|
||||
return (ch == '\n' || ch == '\r');
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
// Scintilla source code edit control
|
||||
// Encoding: UTF-8
|
||||
/** @file LexMatlab.cxx
|
||||
** Lexer for Matlab.
|
||||
** Written by José Fonseca
|
||||
** Written by José Fonseca
|
||||
**
|
||||
** Changes by Christoph Dalitz 2003/12/04:
|
||||
** - added support for Octave
|
||||
@ -43,9 +44,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static bool IsMatlabCommentChar(int c) {
|
||||
return (c == '%') ;
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// val SCE_METAPOST_DEFAULT = 0
|
||||
// val SCE_METAPOST_SPECIAL = 1
|
||||
|
||||
@ -28,9 +28,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_LEX_MODULA
|
||||
#define DEBUG_STATE( p, c )\
|
||||
|
||||
@ -28,9 +28,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '_');
|
||||
|
||||
@ -25,9 +25,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
return (ch >= 0x80) || isalnum(ch) || ch == '_';
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
/*
|
||||
// located in SciLexer.h
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColouriseNullDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[],
|
||||
Accessor &styler) {
|
||||
|
||||
@ -26,9 +26,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// -----------------------------------------
|
||||
// Functions classifying a single character.
|
||||
|
||||
@ -22,9 +22,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
inline static void getRange( Sci_PositionU start, Sci_PositionU end, Accessor & styler, char * s, Sci_PositionU len )
|
||||
{
|
||||
|
||||
@ -51,9 +51,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsTypeCharacter(const int ch)
|
||||
{
|
||||
|
||||
@ -20,9 +20,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void GetRange(Sci_PositionU start,
|
||||
Sci_PositionU end,
|
||||
|
||||
@ -31,9 +31,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int initStyle, WordList *[], Accessor &styler) {
|
||||
StyleContext sc(startPos, length, initStyle, styler);
|
||||
|
||||
@ -32,9 +32,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
return ch < 0x80 && (isalnum(ch) || ch == '_');
|
||||
|
||||
@ -30,9 +30,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsASelfDelimitingChar(const int ch) {
|
||||
return (ch == '[' || ch == ']' || ch == '{' || ch == '}' ||
|
||||
|
||||
@ -128,9 +128,7 @@ contains requires
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static void GetRangeLowered(Sci_PositionU start,
|
||||
Sci_PositionU end,
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
#include "OptionSet.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Info for HERE document handling from perldata.pod (reformatted):
|
||||
// ----------------------------------------------------------------
|
||||
@ -123,8 +121,8 @@ static int disambiguateBareword(LexAccessor &styler, Sci_PositionU bk, Sci_Posit
|
||||
// if ch isn't one of '[{(,' we can skip the test
|
||||
if ((ch == '{' || ch == '(' || ch == '['|| ch == ',')
|
||||
&& fw < endPos) {
|
||||
while (ch = static_cast<unsigned char>(styler.SafeGetCharAt(fw)),
|
||||
IsASpaceOrTab(ch) && fw < endPos) {
|
||||
while (IsASpaceOrTab(ch = static_cast<unsigned char>(styler.SafeGetCharAt(fw)))
|
||||
&& fw < endPos) {
|
||||
fw++;
|
||||
}
|
||||
if ((ch == '}' && brace)
|
||||
@ -139,10 +137,12 @@ static int disambiguateBareword(LexAccessor &styler, Sci_PositionU bk, Sci_Posit
|
||||
|
||||
static void skipWhitespaceComment(LexAccessor &styler, Sci_PositionU &p) {
|
||||
// when backtracking, we need to skip whitespace and comments
|
||||
int style;
|
||||
while ((p > 0) && (style = styler.StyleAt(p),
|
||||
style == SCE_PL_DEFAULT || style == SCE_PL_COMMENTLINE))
|
||||
while (p > 0) {
|
||||
const int style = styler.StyleAt(p);
|
||||
if (style != SCE_PL_DEFAULT && style != SCE_PL_COMMENTLINE)
|
||||
break;
|
||||
p--;
|
||||
}
|
||||
}
|
||||
|
||||
static int findPrevLexeme(LexAccessor &styler, Sci_PositionU &bk, int &style) {
|
||||
@ -1175,6 +1175,7 @@ void SCI_METHOD LexerPerl::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
break;
|
||||
}
|
||||
// (continued for ' delim)
|
||||
// Falls through.
|
||||
default: // non-interpolated path
|
||||
sc.Forward(sLen);
|
||||
}
|
||||
|
||||
@ -43,9 +43,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsStreamCommentStyle(int style) {
|
||||
return style == SCE_POWERPRO_COMMENTBLOCK;
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
// Extended to accept accented characters
|
||||
static inline bool IsAWordChar(int ch) {
|
||||
|
||||
@ -40,9 +40,7 @@ Differentiate between labels and variables
|
||||
#include "SparseState.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
// Use an unnamed namespace to protect the functions and classes from name conflicts
|
||||
|
||||
@ -23,9 +23,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool AtEOL(Accessor &styler, Sci_PositionU i) {
|
||||
return (styler[i] == '\n') ||
|
||||
|
||||
@ -32,9 +32,7 @@
|
||||
#include "SubStyles.h"
|
||||
#include "DefaultLexer.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
// Use an unnamed namespace to protect the functions and classes from name conflicts
|
||||
@ -838,7 +836,7 @@ static bool IsCommentLine(Sci_Position line, Accessor &styler) {
|
||||
|
||||
static bool IsQuoteLine(Sci_Position line, const Accessor &styler) {
|
||||
const int style = styler.StyleAt(styler.LineStart(line)) & 31;
|
||||
return ((style == SCE_P_TRIPLE) || (style == SCE_P_TRIPLEDOUBLE));
|
||||
return IsPyTripleQuoteStringState(style);
|
||||
}
|
||||
|
||||
|
||||
@ -874,7 +872,7 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
|
||||
int prev_state = SCE_P_DEFAULT & 31;
|
||||
if (lineCurrent >= 1)
|
||||
prev_state = styler.StyleAt(startPos - 1) & 31;
|
||||
int prevQuote = options.foldQuotes && ((prev_state == SCE_P_TRIPLE) || (prev_state == SCE_P_TRIPLEDOUBLE));
|
||||
int prevQuote = options.foldQuotes && IsPyTripleQuoteStringState(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
|
||||
@ -891,7 +889,7 @@ void SCI_METHOD LexerPython::Fold(Sci_PositionU startPos, Sci_Position length, i
|
||||
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 && ((style == SCE_P_TRIPLE) || (style == SCE_P_TRIPLEDOUBLE));
|
||||
quote = options.foldQuotes && IsPyTripleQuoteStringState(style);
|
||||
}
|
||||
const int quote_start = (quote && !prevQuote);
|
||||
const int quote_continue = (quote && prevQuote);
|
||||
|
||||
@ -24,9 +24,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
|
||||
|
||||
@ -29,9 +29,7 @@
|
||||
#include "CharacterSet.h"
|
||||
#include "LexerModule.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
||||
static inline bool IsAWordChar(const int ch) {
|
||||
return (isalnum(ch) || ch == '?' || ch == '!' || ch == '.' || ch == '\'' || ch == '+' || ch == '-' || ch == '*' || ch == '&' || ch == '|' || ch == '=' || ch == '_' || ch == '~');
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user