├── version.txt
├── test
├── examples
│ ├── hypertext
│ │ ├── Issue340BadSGML.html
│ │ ├── Issue340BadSGML.html.styled
│ │ ├── Bug2219.html
│ │ ├── Issue340BadSGML.html.folded
│ │ ├── Issue288.php
│ │ ├── Issue53.html
│ │ ├── Bug2219.html.styled
│ │ ├── mako.html
│ │ ├── Issue47.html
│ │ ├── Issue288.php.styled
│ │ ├── mako.html.folded
│ │ ├── mako.html.styled
│ │ ├── Issue288.php.folded
│ │ ├── Issue53.html.styled
│ │ ├── Bug2219.html.folded
│ │ ├── Issue53.html.folded
│ │ ├── Issue47.html.styled
│ │ ├── Bug2207.html
│ │ ├── Issue47.html.folded
│ │ ├── Issue250RegEx.html
│ │ ├── apostophe.php
│ │ ├── Issue192.html
│ │ ├── Bug2207.html.folded
│ │ ├── Issue272SGML.xml
│ │ ├── Issue273JavaScript.html
│ │ ├── Bug2207.html.styled
│ │ ├── x.asp
│ │ ├── comment.html
│ │ ├── Issue250RegEx.html.folded
│ │ ├── apostophe.php.folded
│ │ ├── Issue272SGML.xml.folded
│ │ ├── apostophe.php.styled
│ │ ├── ServerJavaScript.aspx
│ │ ├── Issue252Tag.php
│ │ ├── Issue272SGML.xml.styled
│ │ ├── Issue192.html.styled
│ │ ├── Issue273JavaScript.html.styled
│ │ ├── Issue250RegEx.html.styled
│ │ ├── comment.html.folded
│ │ ├── comment.html.styled
│ │ ├── ServerBasic.aspx
│ │ ├── Issue192.html.folded
│ │ ├── Issue273JavaScript.html.folded
│ │ ├── Issue19.php
│ │ ├── Issue259CaseLower.html
│ │ ├── Issue252Tag.php.styled
│ │ ├── x.asp.folded
│ │ ├── x.asp.styled
│ │ ├── x.html
│ │ ├── Issue20Numbers.php
│ │ ├── ServerJavaScript.aspx.folded
│ │ ├── Issue338.html
│ │ ├── Issue252Tag.php.folded
│ │ ├── x.php
│ │ ├── ServerJavaScript.aspx.styled
│ │ ├── Issue259CaseLower.html.folded
│ │ ├── ServerBasic.aspx.styled
│ │ ├── ServerBasic.aspx.folded
│ │ ├── Issue259CaseLower.html.styled
│ │ ├── Issue19.php.styled
│ │ ├── Issue19.php.folded
│ │ └── x.html.folded
│ ├── latex
│ │ ├── SciTE.properties
│ │ ├── Feature1358.tex
│ │ ├── Feature1358.tex.styled
│ │ ├── Feature1358.tex.folded
│ │ └── AllStyles.tex
│ ├── diff
│ │ └── SciTE.properties
│ ├── rust
│ │ ├── Issue35.rs
│ │ ├── Issue239.rs
│ │ ├── Issue35.rs.styled
│ │ ├── Issue35.rs.folded
│ │ ├── Issue239.rs.folded
│ │ ├── Issue33.rs
│ │ ├── Issue239.rs.styled
│ │ ├── Issue33.rs.folded
│ │ ├── Issue34.rs
│ │ ├── Issue34.rs.styled
│ │ ├── Issue33.rs.styled
│ │ ├── Issue34.rs.folded
│ │ ├── SciTE.properties
│ │ └── Issue268.rs
│ ├── vhdl
│ │ └── SciTE.properties
│ ├── x12
│ │ ├── SciTE.properties
│ │ ├── empty.x12
│ │ ├── empty.x12.folded
│ │ └── empty.x12.styled
│ ├── powershell
│ │ ├── Pull99Comment.ps1
│ │ ├── Pull99Comment.ps1.styled
│ │ ├── Pull99Comment.ps1.folded
│ │ ├── SciTE.properties
│ │ ├── CharacterTruncation.ps1
│ │ ├── Pull92.ps1
│ │ ├── CharacterTruncation.ps1.styled
│ │ ├── CharacterTruncation.ps1.folded
│ │ ├── Pull92.ps1.styled
│ │ ├── Pull92.ps1.folded
│ │ ├── NumericLiterals.ps1
│ │ ├── NumericLiterals.ps1.styled
│ │ └── AllStyles.ps1
│ ├── makefile
│ │ ├── SciTE.properties
│ │ ├── x.mak
│ │ ├── x.mak.styled
│ │ └── x.mak.folded
│ ├── asciidoc
│ │ └── SciTE.properties
│ ├── mssql
│ │ ├── Issue90.tsql
│ │ ├── Issue90.tsql.styled
│ │ ├── Issue90.tsql.folded
│ │ ├── Issue87.tsql
│ │ ├── Issue87.tsql.styled
│ │ ├── Issue87.tsql.folded
│ │ ├── SciTE.properties
│ │ └── AllStyles.tsql
│ ├── nim
│ │ ├── SciTE.properties
│ │ └── x.nim
│ ├── props
│ │ ├── SciTE.properties
│ │ ├── Issue96Folding.props
│ │ ├── Issue96Folding.props.styled
│ │ ├── Issue96Folding.props.folded
│ │ ├── example.session
│ │ ├── example.session.styled
│ │ └── example.session.folded
│ ├── ruby
│ │ ├── x.rb
│ │ ├── Issue132.rb
│ │ ├── Issue132.rb.styled
│ │ ├── Issue140.rb
│ │ ├── Issue132.rb.folded
│ │ ├── Issue66.rb
│ │ ├── Issue135.rb
│ │ ├── x.rb.styled
│ │ ├── x.rb.folded
│ │ ├── Issue66.rb.styled
│ │ ├── 225NumberDotMethod.rb
│ │ ├── PercentEquals124.rb
│ │ ├── 234HereDoc.rb
│ │ ├── Issue135.rb.styled
│ │ ├── SciTE.properties
│ │ ├── Issue136.rb
│ │ ├── Issue66.rb.folded
│ │ ├── Issue135.rb.folded
│ │ ├── Issue140.rb.folded
│ │ ├── PercentEquals124.rb.styled
│ │ ├── PercentEquals124.rb.folded
│ │ ├── Issue140.rb.styled
│ │ ├── 225NumberDotMethod.rb.folded
│ │ ├── 225NumberDotMethod.rb.styled
│ │ ├── 234HereDoc.rb.folded
│ │ ├── 234HereDoc.rb.styled
│ │ ├── Issue136.rb.styled
│ │ ├── Issue69.rb
│ │ ├── Issue136.rb.folded
│ │ ├── Issue67.rb
│ │ ├── Issue67.rb.styled
│ │ └── Issue69.rb.folded
│ ├── toml
│ │ └── SciTE.properties
│ ├── yaml
│ │ ├── SciTE.properties
│ │ ├── x.yaml
│ │ ├── x.yaml.styled
│ │ └── x.yaml.folded
│ ├── perl
│ │ ├── x.pl
│ │ ├── x.pl.folded
│ │ └── x.pl.styled
│ ├── tcl
│ │ ├── SciTE.properties
│ │ ├── x.tcl
│ │ ├── x.tcl.styled
│ │ └── x.tcl.folded
│ ├── bash
│ │ ├── Issue180.bsh
│ │ ├── Issue182.bsh
│ │ ├── Issue184.bsh
│ │ ├── Issue184Copy.bsh
│ │ ├── Issue180.bsh.styled
│ │ ├── Issue180.bsh.folded
│ │ ├── continuation.bsh
│ │ ├── Issue182.bsh.folded
│ │ ├── Issue184.bsh.folded
│ │ ├── Issue184Copy.bsh.folded
│ │ ├── Issue182.bsh.styled
│ │ ├── Issue184.bsh.styled
│ │ ├── Issue184Copy.bsh.styled
│ │ ├── continuation.bsh.styled
│ │ ├── 197ArithmeticOperator.bsh
│ │ ├── continuation.bsh.folded
│ │ ├── 203TestOption.bsh
│ │ ├── NestedRich.bsh
│ │ ├── 202LineStartOption.bsh
│ │ ├── 197ArithmeticOperator.bsh.folded
│ │ ├── 203TestOption.bsh.folded
│ │ ├── AllStyles.bsh
│ │ ├── 257Delimiter.bsh
│ │ └── NestedRich.bsh.folded
│ ├── caml
│ │ ├── SciTE.properties
│ │ └── AllStyles.ml
│ ├── modula
│ │ ├── Issue297.m3
│ │ ├── Issue129.m3
│ │ ├── Issue297.m3.styled
│ │ ├── Issue297.m3.folded
│ │ ├── Issue129.m3.styled
│ │ ├── Issue129.m3.folded
│ │ ├── 128Endless.m3
│ │ ├── 128Endless.m3.folded
│ │ └── 128Endless.m3.styled
│ ├── batch
│ │ ├── SciTE.properties
│ │ ├── Issue222.bat
│ │ ├── Issue222.bat.styled
│ │ ├── Issue222.bat.folded
│ │ └── Issue115.bat
│ ├── cobol
│ │ ├── SciTE.properties
│ │ ├── 230.cob
│ │ ├── 230.cob.styled
│ │ ├── 230.cob.folded
│ │ ├── 231.cob
│ │ ├── 231.cob.styled
│ │ ├── 229.cob
│ │ ├── 231.cob.folded
│ │ ├── 229.cob.styled
│ │ ├── 229.cob.folded
│ │ ├── AllStyles.cob
│ │ └── AllStyles.cob.styled
│ ├── progress
│ │ └── SciTE.properties
│ ├── cpp
│ │ ├── Bug2245.cxx
│ │ ├── 149KeywordCase.cxx
│ │ ├── 130NonAsciiKeyword.cxx
│ │ ├── 149KeywordCase.cxx.styled
│ │ ├── 130NonAsciiKeyword.cxx.styled
│ │ ├── Bug2245.cxx.styled
│ │ ├── Bug2245.cxx.folded
│ │ ├── 130NonAsciiKeyword.cxx.folded
│ │ ├── 149KeywordCase.cxx.folded
│ │ ├── SciTE.properties
│ │ └── 94Template.cxx
│ ├── mmixal
│ │ ├── SciTE.properties
│ │ ├── x.mms
│ │ ├── x.mms.styled
│ │ ├── x.mms.folded
│ │ ├── references.mms
│ │ ├── references.mms.styled
│ │ └── references.mms.folded
│ ├── lua
│ │ ├── x.lua
│ │ ├── Bug2205.lua
│ │ ├── Bug2205.lua.styled
│ │ ├── x.lua.styled
│ │ ├── x.lua.folded
│ │ ├── Bug2205.lua.folded
│ │ ├── SciTE.properties
│ │ ├── nonASCII242.lua
│ │ ├── nonASCII242.lua.folded
│ │ ├── nonASCII242.lua.styled
│ │ └── folding.lua
│ ├── sinex
│ │ └── SciTE.properties
│ ├── cmake
│ │ ├── SciTE.properties
│ │ ├── Bug77_0.cmake
│ │ ├── Bug77_1.cmake
│ │ ├── Bug77_0.cmake.styled
│ │ ├── Bug77_1.cmake.styled
│ │ ├── Bug77_0.cmake.folded
│ │ └── Bug77_1.cmake.folded
│ ├── smalltalk
│ │ └── SciTE.properties
│ ├── fortran
│ │ ├── SciTE.properties
│ │ ├── AllStyles.f
│ │ └── AllStyles.f.styled
│ ├── julia
│ │ ├── SciTE.properties
│ │ ├── x.jl
│ │ ├── x.jl.folded
│ │ └── x.jl.styled
│ ├── gdscript
│ │ ├── SciTE.properties
│ │ ├── NodePath.gd
│ │ ├── NodePath.gd.styled
│ │ ├── AllStyles.gd
│ │ └── NodePath.gd.folded
│ ├── python
│ │ ├── SciTE.properties
│ │ ├── strings.py
│ │ ├── attributes
│ │ │ ├── attrib-decorator.py
│ │ │ ├── attrib-decorator.py.styled
│ │ │ ├── SciTE.properties
│ │ │ ├── attrib-decorator.py.folded
│ │ │ ├── attributes.py
│ │ │ ├── attrib-id.py
│ │ │ ├── attributes.py.folded
│ │ │ ├── attributes.py.styled
│ │ │ ├── attrib-id.py.styled
│ │ │ └── attrib-id.py.folded
│ │ ├── f-strings.py
│ │ ├── t-strings.py
│ │ ├── strings.py.styled
│ │ ├── x.py
│ │ ├── f-strings.py.styled
│ │ ├── t-strings.py.styled
│ │ ├── strings.py.folded
│ │ ├── f-strings.py.folded
│ │ ├── t-strings.py.folded
│ │ ├── matchcase.py
│ │ ├── x.py.folded
│ │ ├── x.py.styled
│ │ ├── matchcase.py.styled
│ │ └── matchcase.py.folded
│ ├── r
│ │ ├── SciTE.properties
│ │ ├── 102Backticks.r
│ │ ├── 102Backticks.r.styled
│ │ └── 102Backticks.r.folded
│ ├── erlang
│ │ └── SciTE.properties
│ ├── markdown
│ │ ├── HeaderEOLFill_0.md
│ │ ├── HeaderEOLFill_1.md
│ │ ├── HeaderEOLFill_1.md.styled
│ │ ├── Issue117.md
│ │ ├── SciTE.properties
│ │ ├── HeaderEOLFill_0.md.styled
│ │ ├── Issue117.md.styled
│ │ ├── Issue117.md.folded
│ │ ├── HeaderEOLFill_0.md.folded
│ │ ├── HeaderEOLFill_1.md.folded
│ │ ├── Bug2247.md
│ │ ├── Bug2235.md
│ │ ├── Bug1216.md
│ │ ├── AllStyles.md
│ │ ├── Bug2235.md.styled
│ │ ├── Bug2247.md.styled
│ │ ├── Bug1216.md.styled
│ │ ├── Bug2235.md.folded
│ │ ├── AllStyles.md.styled
│ │ └── Bug2247.md.folded
│ ├── d
│ │ ├── SciTE.properties
│ │ └── x.d
│ ├── errorlist
│ │ ├── SciTE.properties
│ │ ├── BoldOrBright.err
│ │ ├── BoldOrBright.err.styled
│ │ └── BoldOrBright.err.folded
│ ├── fsharp
│ │ ├── Issue56.fs
│ │ ├── Issue56.fs.styled
│ │ └── Issue56.fs.folded
│ ├── matlab
│ │ ├── SciTE.properties
│ │ ├── Issue18_EscapeSequence.m.octave
│ │ ├── Issue18_EscapeSequence.m.octave.styled
│ │ ├── NumericLiterals.m.matlab
│ │ ├── Issue18_EscapeSequence.m.octave.folded
│ │ ├── Issue18_EscapeSequence.m.matlab
│ │ ├── FoldPoints.m.matlab
│ │ ├── Issue18_EscapeSequence.m.matlab.styled
│ │ ├── AllStyles.m.matlab
│ │ ├── AllStyles.m.octave
│ │ ├── Issue18_EscapeSequence.m.matlab.folded
│ │ ├── FoldPoints.m.matlab.styled
│ │ └── NumericLiterals.m.matlab.folded
│ ├── gui4cli
│ │ ├── SciTE.properties
│ │ ├── AllStyles.gui
│ │ └── AllStyles.gui.styled
│ ├── json
│ │ ├── SciTE.properties
│ │ ├── AllStyles.json
│ │ └── AllStyles.json.styled
│ ├── vb
│ │ ├── SciTE.properties
│ │ ├── x.vb
│ │ ├── x.vb.folded
│ │ ├── x.vb.styled
│ │ ├── AllStyles.vb
│ │ └── AllStyles.vbs
│ ├── asm
│ │ └── SciTE.properties
│ ├── escseq
│ │ ├── SciTE.properties
│ │ ├── colourText0.ans
│ │ └── colourText1.ans
│ ├── mysql
│ │ └── SciTE.properties
│ ├── sql
│ │ └── SciTE.properties
│ ├── inno
│ │ ├── SciTE.properties
│ │ └── x.iss
│ ├── css
│ │ └── SciTE.properties
│ └── zig
│ │ └── SciTE.properties
└── unit
│ ├── SciTE.properties
│ ├── README
│ ├── testInList.cxx
│ ├── UnitTester.cxx
│ ├── unitTest.cxx
│ └── test.mak
├── bin
└── empty.txt
├── doc
├── LexillaLogo.png
└── LexillaLogo2x.png
├── tgzsrc
├── delbin.bat
├── src
├── Lexilla.def
├── Lexilla
│ ├── Lexilla.xcodeproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Info.plist
├── Lexilla.ruleset
└── Lexilla.pro
├── scripts
├── RunTest.bat
├── RunTest.sh
├── PromoteNew.bat
└── LexFacer.py
├── zipsrc.bat
├── access
└── README
├── examples
└── CheckLexilla
│ └── makefile
├── lexlib
└── InList.h
└── License.txt
/version.txt:
--------------------------------------------------------------------------------
1 | 546
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue340BadSGML.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/test/examples/latex/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.tex=latex
2 |
--------------------------------------------------------------------------------
/bin/empty.txt:
--------------------------------------------------------------------------------
1 | This empty files ensures that the directory is created.
--------------------------------------------------------------------------------
/test/examples/diff/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.diff=diff
2 | fold=1
3 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue35.rs:
--------------------------------------------------------------------------------
1 | /// GitHub Issue #35
2 | fn main() {}
3 | /*
--------------------------------------------------------------------------------
/test/examples/vhdl/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.vhd=vhdl
2 | fold=1
3 |
4 |
--------------------------------------------------------------------------------
/test/examples/x12/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.x12=x12
2 | fold=1
3 |
4 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue340BadSGML.html.styled:
--------------------------------------------------------------------------------
1 | {21}{0}
2 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Bug2219.html:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue340BadSGML.html.folded:
--------------------------------------------------------------------------------
1 | 0 400 0
2 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/Pull99Comment.ps1:
--------------------------------------------------------------------------------
1 | # End comment before \r carriage return.
2 |
--------------------------------------------------------------------------------
/test/examples/makefile/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.mak=makefile
2 | keywords.*.mak=ifdef
3 |
--------------------------------------------------------------------------------
/doc/LexillaLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScintillaOrg/lexilla/HEAD/doc/LexillaLogo.png
--------------------------------------------------------------------------------
/doc/LexillaLogo2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScintillaOrg/lexilla/HEAD/doc/LexillaLogo2x.png
--------------------------------------------------------------------------------
/test/examples/asciidoc/SciTE.properties:
--------------------------------------------------------------------------------
1 | code.page=65001
2 | lexer.*.adoc=asciidoc
3 | fold=1
4 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue288.php:
--------------------------------------------------------------------------------
1 |
2 | nl2br("\n); // unterminated string
3 | ?>
4 | ")
5 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue90.tsql:
--------------------------------------------------------------------------------
1 | CREATE TABLE TestTable (
2 | col
3 | CHAR(3)
4 | );
5 |
--------------------------------------------------------------------------------
/test/examples/nim/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.nim=nim
2 | keywords.*.nim=else end if let proc
3 |
--------------------------------------------------------------------------------
/test/examples/props/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.session=props
2 | lexer.*.props=props
3 | fold=1
4 |
--------------------------------------------------------------------------------
/test/examples/powershell/Pull99Comment.ps1.styled:
--------------------------------------------------------------------------------
1 | {1}# End comment before \r carriage return.{0}
2 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue53.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/test/examples/ruby/x.rb:
--------------------------------------------------------------------------------
1 | class Demo
2 | def test # A test
3 | i = 1
4 | puts "Example"
5 | end
6 | end
--------------------------------------------------------------------------------
/test/examples/rust/Issue239.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | let r#true = false;
3 | println!("{}", r#true);
4 | }
--------------------------------------------------------------------------------
/test/examples/toml/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.toml=toml
2 | fold=1
3 | keywords.*.toml=false inf nan true
4 |
--------------------------------------------------------------------------------
/test/examples/yaml/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.yaml=yaml
2 | keywords.*.yaml=true false yes no
3 | fold=1
4 |
--------------------------------------------------------------------------------
/test/examples/perl/x.pl:
--------------------------------------------------------------------------------
1 | use strict;
2 | while ( $r ) {
3 | printf ( "Example text \n" );
4 | sleep 1;
5 | }
--------------------------------------------------------------------------------
/test/examples/rust/Issue35.rs.styled:
--------------------------------------------------------------------------------
1 | {4}/// GitHub Issue #35{0}
2 | {6}fn{0} {17}main{16}(){0} {16}{}{0}
3 | {1}/*
--------------------------------------------------------------------------------
/test/examples/hypertext/Bug2219.html.styled:
--------------------------------------------------------------------------------
1 | {1}{0}
7 |
--------------------------------------------------------------------------------
/test/examples/hypertext/mako.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScintillaOrg/lexilla/HEAD/test/examples/hypertext/mako.html
--------------------------------------------------------------------------------
/test/examples/powershell/Pull99Comment.ps1.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 # End comment before \r carriage return.
2 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/props/Issue96Folding.props:
--------------------------------------------------------------------------------
1 | ; comment
2 | [empty section]
3 | [normal section]
4 | @=default
5 | key=value
6 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue132.rb:
--------------------------------------------------------------------------------
1 | # Bad folding when single character ')' in SCE_RB_STRING_QW #132
2 | %W(#{1 + 1})
3 |
4 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue35.rs.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 /// GitHub Issue #35
2 | 0 400 400 fn main() {}
3 | 2 400 401 + /*
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue47.html:
--------------------------------------------------------------------------------
1 |
4 |
8 |
--------------------------------------------------------------------------------
/test/examples/tcl/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.tcl=tcl
2 | keywords.*.tcl=proc set socket vwait
3 | fold.comment=1
4 | fold.compact=1
5 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue180.bsh:
--------------------------------------------------------------------------------
1 | echo '$'
2 | echo "$"
3 | echo "$"
4 | echo "$"x""
5 | echo x$'\t'y
6 | echo "x$'\t'y"
7 | echo "x\ty"
8 |
--------------------------------------------------------------------------------
/test/examples/caml/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.ml=caml
2 | keywords.*.ml=and xandalso
3 | keywords2.*.ml=None
4 | keywords3.*.ml=char
5 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue288.php.styled:
--------------------------------------------------------------------------------
1 | {18}{118}
2 | {198}nl2br{127}({119}"\n); // unterminated string
3 | ?>
4 | "{127}){118}
5 |
--------------------------------------------------------------------------------
/test/examples/hypertext/mako.html.folded:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScintillaOrg/lexilla/HEAD/test/examples/hypertext/mako.html.folded
--------------------------------------------------------------------------------
/test/examples/hypertext/mako.html.styled:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScintillaOrg/lexilla/HEAD/test/examples/hypertext/mako.html.styled
--------------------------------------------------------------------------------
/test/examples/modula/Issue297.m3:
--------------------------------------------------------------------------------
1 | INTERFACE Issue297;
2 |
3 | TYPE
4 | INTEGER32 = [-16_7fffffff-1 .. 16_7fffffff];
5 |
6 | END Issue297.
7 |
--------------------------------------------------------------------------------
/test/examples/batch/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.bat=batch
2 | keywords.*.bat=call defined do echo else errorlevel exist exit for goto if in not set
3 |
4 |
--------------------------------------------------------------------------------
/test/examples/props/Issue96Folding.props.styled:
--------------------------------------------------------------------------------
1 | {1}; comment
2 | {2}[empty section]
3 | [normal section]
4 | {4}@{0}=default
5 | {5}key{3}={0}value
6 |
--------------------------------------------------------------------------------
/test/examples/cobol/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.cob=COBOL
2 | keywords.*.cob=data
3 | keywords2.*.cob=cancel variance
4 | keywords3.*.cob=remarks varying
5 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue90.tsql.styled:
--------------------------------------------------------------------------------
1 | {9}CREATE{0} {9}TABLE{0} {6}TestTable{15} {5}({0}
2 | {6}col{15}
3 | {10}CHAR{5}({3}3{5}){0}
4 | {5});{0}
5 |
--------------------------------------------------------------------------------
/test/examples/x12/empty.x12:
--------------------------------------------------------------------------------
1 | ISA*00* *00* *01*0011223456 *01*999999999 *950120*0147*U*00300*000000007*0*P*~
2 | IEA*2*000000007
3 |
--------------------------------------------------------------------------------
/test/examples/progress/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.p=abl
2 | keywords.*.p=as define display message name object progress run using variable visible
3 | fold=1
4 |
--------------------------------------------------------------------------------
/test/examples/cpp/Bug2245.cxx:
--------------------------------------------------------------------------------
1 | int i;
2 | #if 1
3 | i=1;
4 | #
5 | i=2;
6 | #else
7 | i=3;
8 | #endif
9 | i=4;
10 | #elif 1
11 | i=5;
12 | #else
13 | i=6;
14 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue288.php.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
2 | 0 401 0 | nl2br("\n); // unterminated string
3 | 0 401 0 | ?>
4 | 0 401 0 | ")
5 | 0 401 0 |
--------------------------------------------------------------------------------
/test/examples/mmixal/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.mms=mmixal
2 | keywords.*.mms=BYTE GETA JMP LOC PREFIX TRAP
3 | keywords2.*.mms=rA
4 | keywords3.*.mms=Fputs StdOut
5 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue90.tsql.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 CREATE TABLE TestTable (
2 | 0 400 0 col
3 | 0 400 0 CHAR(3)
4 | 0 400 0 );
5 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/rust/Issue239.rs.folded:
--------------------------------------------------------------------------------
1 | 2 400 401 + fn main() {
2 | 0 401 401 | let r#true = false;
3 | 0 401 401 | println!("{}", r#true);
4 | 0 401 400 | }
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue53.html.styled:
--------------------------------------------------------------------------------
1 | {1}{0}
6 |
--------------------------------------------------------------------------------
/test/examples/lua/x.lua:
--------------------------------------------------------------------------------
1 | --[[ coding:UTF-8
2 | comment ]]
3 | function first()
4 | ::開::
5 | -- Comment
6 | func(SCI_ANNOTATIONSETTEXT, 'a', 0, "LINE1")
7 | end
8 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue132.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# Bad folding when single character ')' in SCE_RB_STRING_QW #132{0}
2 | {28}%W({10}#{{4}1{0} {10}+{0} {4}1{10}}{28}){0}
3 |
4 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue33.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | let a: i128 = 42i128;
3 | let b: u128 = 1337u128;
4 | println!("{} + {} = {}", a, b, (a as u128) + b);
5 | }
6 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue140.rb:
--------------------------------------------------------------------------------
1 | "#{1}"#
2 | "#@a"#
3 | "#@@a"#
4 | "#$a"#
5 | "#$?"#
6 | "#$-a1"#
7 | "#$_a1"#
8 | "#$123"#
9 | "#$\"#
10 | "#$""#
11 | a = /#$//#
12 |
--------------------------------------------------------------------------------
/test/examples/sinex/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.snx=sinex
2 |
3 | fold=1
4 | fold.comment=0
5 |
6 | if $(= $(FileNameExt);AllStyles_comment_fold.snx)
7 | fold.comment=1
8 |
--------------------------------------------------------------------------------
/test/examples/cmake/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.cmake=cmake
2 | keywords2.*.cmake=MSVC80 MSVC90 APPLE
3 | fold=1
4 | fold.at.else=0
5 |
6 | match Bug77_1.cmake
7 | fold.at.else=1
8 |
--------------------------------------------------------------------------------
/test/examples/perl/x.pl.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 use strict;
2 | 2 400 401 + while ( $r ) {
3 | 0 401 401 | printf ( "Example text \n" );
4 | 0 401 401 | sleep 1;
5 | 0 401 0 | }
--------------------------------------------------------------------------------
/test/examples/ruby/Issue132.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Bad folding when single character ')' in SCE_RB_STRING_QW #132
2 | 0 400 0 %W(#{1 + 1})
3 | 1 400 0
4 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/Issue66.rb:
--------------------------------------------------------------------------------
1 | # Test that final \n in indented heredoc (2nd example) is styled as SCE_RB_HERE_Q not SCE_RB_HERE_DELIM
2 | <
2 | 1 401 0 |
3 | 2 401 0 + /**
4 | 0 402 0 | */
5 | 1 401 0 |
6 | 0 401 0 |
7 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/Issue135.rb:
--------------------------------------------------------------------------------
1 | a = <
2 | 2 401 0 + {
3 | 0 402 0 | /\d{1}\}/.test('{0}')
4 | 0 402 0 | }
5 | 0 401 0 |
6 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/modula/Issue129.m3:
--------------------------------------------------------------------------------
1 | INTERFACE Test;
2 |
3 | TYPE
4 | (* Opaque types *)
5 | HANDLE = ADDRESS;
6 | HMOD(* Module handle *) = HANDLE;
7 |
8 | END Test.
9 |
--------------------------------------------------------------------------------
/test/examples/ruby/x.rb.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + class Demo
2 | 2 401 0 + def test # A test
3 | 0 402 0 | i = 1
4 | 0 402 0 | puts "Example"
5 | 0 402 0 | end
6 | 0 401 0 | end
--------------------------------------------------------------------------------
/tgzsrc:
--------------------------------------------------------------------------------
1 | cd ..
2 | rm -f lexilla.tgz
3 | tar --create --exclude \*.o --exclude \*.obj --exclude \*.dll --exclude \*.so --exclude \*.exe --exclude \*.a lexilla/* \
4 | | gzip -c >lexilla.tgz
5 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue47.html.styled:
--------------------------------------------------------------------------------
1 | {1}{0}
4 | {1}{0}
8 |
--------------------------------------------------------------------------------
/test/examples/julia/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.jl=julia
2 | keywords.*.jl=const end for function in where
3 | keywords2.*.jl=Int Number
4 | keywords3.*.jl=true
5 | testlexers.per.line.disable=1
6 |
--------------------------------------------------------------------------------
/delbin.bat:
--------------------------------------------------------------------------------
1 | @del /S /Q *.a *.aps *.bsc *.dll *.dsw *.exe *.idb *.ilc *.ild *.ilf *.ilk *.ils *.lib *.map *.ncb *.obj *.o *.opt *.ipdb *.pdb *.plg *.res *.sbr *.tds *.exp *.tlog *.lastbuildstate >NUL:
2 |
--------------------------------------------------------------------------------
/test/examples/gdscript/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.gd=gdscript
2 | keywords.*.gd=class func else for if extends in pass print return while var
3 | keywords2.*.gd=hilight
4 | fold=1
5 | fold.compact=1
6 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue87.tsql:
--------------------------------------------------------------------------------
1 | /**
2 | /*
3 | GitHub Issue 87
4 | /*
5 | /****** Object: Table [dbo].[Issue87] Script Date: 04/06/2022 8:07:57 PM ******/
6 | */
7 | */
8 | */
9 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue239.rs.styled:
--------------------------------------------------------------------------------
1 | {6}fn{0} {17}main{16}(){0} {16}{{0}
2 | {6}let{0} {17}r#true{0} {16}={0} {6}false{16};{0}
3 | {19}println!{16}({13}"{}"{16},{0} {17}r#true{16});{0}
4 | {16}}
--------------------------------------------------------------------------------
/test/examples/x12/empty.x12.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + ISA*00* *00* *01*0011223456 *01*999999999 *950120*0147*U*00300*000000007*0*P*~
2 | 0 401 0 | IEA*2*000000007
3 | 0 400 0
--------------------------------------------------------------------------------
/test/unit/SciTE.properties:
--------------------------------------------------------------------------------
1 | command.go.*.cxx=./unitTest
2 | if PLAT_WIN
3 | make.command=mingw32-make
4 | command.go.*.cxx=unitTest
5 | command.go.needs.$(file.patterns.cplusplus)=$(make.command)
6 |
--------------------------------------------------------------------------------
/src/Lexilla.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | GetLexerCount
3 | GetLexerName
4 | GetLexerFactory
5 | CreateLexer
6 | LexerNameFromID
7 | GetLibraryPropertyNames
8 | SetLibraryProperty
9 | GetNameSpace
10 |
--------------------------------------------------------------------------------
/test/examples/lua/Bug2205.lua:
--------------------------------------------------------------------------------
1 | print("First")
2 | --[[ Block comment start
3 | print("Second")
4 | --[[ Another block comment ]]
5 | print("Third. If run through an actual program, this will be executed.")
6 |
--------------------------------------------------------------------------------
/test/examples/props/Issue96Folding.props.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 ; comment
2 | 0 400 0 [empty section]
3 | 2 400 0 + [normal section]
4 | 0 401 0 | @=default
5 | 0 401 0 | key=value
6 | 0 401 0 |
--------------------------------------------------------------------------------
/test/examples/cobol/230.cob:
--------------------------------------------------------------------------------
1 | * Keywords starting with V to be identified and styled
2 |
3 | * in list keywords2
4 | VARIANCE
5 |
6 | * in list keywords3
7 | VARYING
8 |
--------------------------------------------------------------------------------
/test/examples/cpp/149KeywordCase.cxx:
--------------------------------------------------------------------------------
1 | // SCE_C_WORD2 (16)
2 | second
3 |
4 | // SCE_C_IDENTIFIER (11)
5 | Second
6 |
7 | // SCE_C_IDENTIFIER (11)
8 | upper
9 |
10 | // SCE_C_WORD2 (16)
11 | Upper
12 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue87.tsql.styled:
--------------------------------------------------------------------------------
1 | {1}/**
2 | /*
3 | GitHub Issue 87
4 | /*
5 | /****** Object: Table [dbo].[Issue87] Script Date: 04/06/2022 8:07:57 PM ******/
6 | */
7 | */
8 | */{0}
9 |
--------------------------------------------------------------------------------
/test/examples/python/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.py=python
2 | keywords.*.py=case class def else for if import in match pass print return while with yield
3 | keywords2.*.py=hilight
4 | fold=1
5 | fold.compact=1
6 |
--------------------------------------------------------------------------------
/scripts/RunTest.bat:
--------------------------------------------------------------------------------
1 | rem Test lexers
2 | rem build lexilla.dll and TestLexers.exe then run TestLexers.exe
3 | cd ../src
4 | make --jobs=%NUMBER_OF_PROCESSORS% DEBUG=1
5 | cd ../test
6 | make DEBUG=1
7 | make test
8 |
--------------------------------------------------------------------------------
/test/examples/perl/x.pl.styled:
--------------------------------------------------------------------------------
1 | {5}use{0} {11}strict{10};{0}
2 | {5}while{0} {10}({0} {12}$r{0} {10}){0} {10}{{0}
3 | {5}printf{0} {10}({0} {6}"Example text \n"{0} {10});{0}
4 | {5}sleep{0} {4}1{10};{0}
5 | {10}}
--------------------------------------------------------------------------------
/test/examples/r/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.r=r
2 | keywords.*.r=if
3 | keywords2.*.r=abbreviate
4 | keywords3.*.r=acme
5 | fold=1
6 | fold.compact=1
7 |
8 | match AllStyles.r
9 | lexer.r.escape.sequence=1
10 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue184.bsh:
--------------------------------------------------------------------------------
1 | echo $*
2 | echo $@
3 | echo $?
4 | echo $-
5 | echo $$
6 | echo $!
7 | echo $_
8 | echo $%
9 | echo $<
10 |
11 | ifeth=$(ls /sys/class/net | grep ^"$intf" | grep "$intf"$)
12 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue184Copy.bsh:
--------------------------------------------------------------------------------
1 | echo $*
2 | echo $@
3 | echo $?
4 | echo $-
5 | echo $$
6 | echo $!
7 | echo $_
8 | echo $%
9 | echo $<
10 |
11 | ifeth=$(ls /sys/class/net | grep ^"$intf" | grep "$intf"$)
12 |
--------------------------------------------------------------------------------
/test/examples/erlang/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.erl=erlang
2 | keywords.*.erl=let
3 | keywords2.*.erl=atom_to_binary
4 | keywords3.*.erl=-define
5 | keywords4.*.erl=-module
6 | keywords5.*.erl=@todo
7 | keywords6.*.erl=@module
8 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Bug2207.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_0.md:
--------------------------------------------------------------------------------
1 | H1
2 | ==
3 |
4 | H2
5 | --
6 |
7 | # H1
8 |
9 | ## H2
10 |
11 | H1
12 | ==
13 | H2
14 | --
15 | # H1
16 | ## H2
17 | ### H3
18 | #### H4
19 | ##### H5
20 | ###### H6
21 |
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_1.md:
--------------------------------------------------------------------------------
1 | H1
2 | ==
3 |
4 | H2
5 | --
6 |
7 | # H1
8 |
9 | ## H2
10 |
11 | H1
12 | ==
13 | H2
14 | --
15 | # H1
16 | ## H2
17 | ### H3
18 | #### H4
19 | ##### H5
20 | ###### H6
21 |
--------------------------------------------------------------------------------
/test/examples/modula/Issue297.m3.styled:
--------------------------------------------------------------------------------
1 | {4}INTERFACE{0} Issue297{16};{0}
2 |
3 | {4}TYPE{0}
4 | INTEGER32 {16}={0} {16}[-{7}16_7fffffff{16}-{6}1{0} {16}..{0} {7}16_7fffffff{16}];{0}
5 |
6 | {4}END{0} Issue297{16}.{0}
7 |
--------------------------------------------------------------------------------
/test/examples/cpp/130NonAsciiKeyword.cxx:
--------------------------------------------------------------------------------
1 | // coding: utf-8
2 | // All three following symbols should highlight as keywords
3 | cheese
4 | käse
5 | сыр
6 |
7 | // Lookalikes with ASCII so should not highlight:
8 | сыp
9 | cыp
10 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue47.html.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
4 | 2 400 0 +
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/props/example.session:
--------------------------------------------------------------------------------
1 | # Default=0
2 | a
3 |
4 | # Comment=1
5 |
6 |
7 | # Heading=2
8 | [heading]
9 |
10 |
11 | # Assignment=3
12 | =
13 |
14 | # Default Value=4
15 | @
16 |
17 | # Key=5
18 | key=
19 |
20 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue66.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# Test that final \n in indented heredoc (2nd example) is styled as SCE_RB_HERE_Q not SCE_RB_HERE_DELIM{0}
2 | {10}<<{20}T{22}
3 | X
4 | {20}T{0}
5 |
6 | {10}<<{20}-T{22}
7 | X
8 | {20}T{0}
9 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue180.bsh.styled:
--------------------------------------------------------------------------------
1 | {4}echo{0} {6}'$'{0}
2 | {4}echo{0} {5}"$"{0}
3 | {4}echo{0} {5}"$"{0}
4 | {4}echo{0} {5}"$"{8}x{5}""{0}
5 | {4}echo{0} {8}x{5}$'\t'{8}y{0}
6 | {4}echo{0} {5}"x$'\t'y"{0}
7 | {4}echo{0} {5}"x\ty"{0}
8 |
--------------------------------------------------------------------------------
/test/examples/modula/Issue297.m3.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 INTERFACE Issue297;
2 | 1 400 400
3 | 0 400 400 TYPE
4 | 0 400 400 INTEGER32 = [-16_7fffffff-1 .. 16_7fffffff];
5 | 1 400 400
6 | 0 400 3ff END Issue297.
7 | 1 3ff 3ff
--------------------------------------------------------------------------------
/test/examples/yaml/x.yaml.styled:
--------------------------------------------------------------------------------
1 | {1}# comment
2 | {0}
3 | {2}key{9}:{0} value {1}# comment
4 | {0}
5 | {2}colon:in:key{9}:{0} value
6 |
7 | {2}hanging_value{9}:{0}
8 | value
9 |
10 | {2}1{9}:{4} 1
11 | {0}
12 | {2}true{9}:{3} true
13 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue180.bsh.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 echo '$'
2 | 0 400 0 echo "$"
3 | 0 400 0 echo "$"
4 | 0 400 0 echo "$"x""
5 | 0 400 0 echo x$'\t'y
6 | 0 400 0 echo "x$'\t'y"
7 | 0 400 0 echo "x\ty"
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/cobol/230.cob.styled:
--------------------------------------------------------------------------------
1 | {0} {2}* Keywords starting with V to be identified and styled{0}
2 |
3 | {2}* in list keywords2{0}
4 | {16}VARIANCE{0}
5 |
6 | {2}* in list keywords3{0}
7 | {8}VARYING{0}
8 |
--------------------------------------------------------------------------------
/test/examples/ruby/225NumberDotMethod.rb:
--------------------------------------------------------------------------------
1 | # Float Literals
2 | 12.34
3 | 1234e-2
4 | 1.234E1
5 | # Range Literals
6 | (1..2)
7 | (2.0..3)
8 | # Method on number
9 | 1.5.ceil
10 | 1ri.abs
11 | 3.times {|i| puts i}
12 | 3. times {|i| puts i}
13 |
--------------------------------------------------------------------------------
/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/test/examples/cpp/149KeywordCase.cxx.styled:
--------------------------------------------------------------------------------
1 | {2}// SCE_C_WORD2 (16)
2 | {16}second{0}
3 |
4 | {2}// SCE_C_IDENTIFIER (11)
5 | {11}Second{0}
6 |
7 | {2}// SCE_C_IDENTIFIER (11)
8 | {11}upper{0}
9 |
10 | {2}// SCE_C_WORD2 (16)
11 | {16}Upper{0}
12 |
--------------------------------------------------------------------------------
/test/examples/d/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.d=d
2 | keywords.*.d=keyword1
3 | keywords2.*.d=keyword2
4 | keywords3.*.d=
5 | keywords4.*.d=keyword4
6 | keywords5.*.d=keyword5
7 | keywords6.*.d=keyword6
8 | keywords7.*.d=keyword7
9 |
10 | fold=1
11 |
--------------------------------------------------------------------------------
/test/examples/lua/Bug2205.lua.styled:
--------------------------------------------------------------------------------
1 | {13}print{10}({6}"First"{10}){0}
2 | {1}--[[ Block comment start
3 | print("Second")
4 | --[[ Another block comment ]]{0}
5 | {13}print{10}({6}"Third. If run through an actual program, this will be executed."{10}){0}
6 |
--------------------------------------------------------------------------------
/test/examples/ruby/PercentEquals124.rb:
--------------------------------------------------------------------------------
1 | # Issue 124, disambiguating %= which may be a quote or modulo assignment
2 | # %-quoting with '=' as the quote
3 | s = %=3=
4 | puts s
5 | x = 7
6 | # Modulo assignment, equivalent to x = x % 2
7 | x %=2
8 | puts x
9 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue33.rs.folded:
--------------------------------------------------------------------------------
1 | 2 400 401 + fn main() {
2 | 0 401 401 | let a: i128 = 42i128;
3 | 0 401 401 | let b: u128 = 1337u128;
4 | 0 401 401 | println!("{} + {} = {}", a, b, (a as u128) + b);
5 | 0 401 400 | }
6 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/rust/Issue34.rs:
--------------------------------------------------------------------------------
1 | /**
2 | * SCE_RUST_COMMENTBLOCKDOC
3 | */
4 | fn main() {
5 | /// SCE_RUST_COMMENTLINEDOC
6 | println!("Hello, World!");
7 | }
8 | // SCE_RUST_COMMENTLINE
9 | /*
10 | * SCE_RUST_COMMENTBLOCK
11 | */
12 |
--------------------------------------------------------------------------------
/scripts/RunTest.sh:
--------------------------------------------------------------------------------
1 | # Test lexers
2 | # build lexilla.so and TestLexers then run TestLexers
3 | JOBS="--jobs=$(getconf _NPROCESSORS_ONLN)"
4 | (
5 | cd ../src
6 | make "$JOBS" DEBUG=1
7 | )
8 | (
9 | cd ../test
10 | make DEBUG=1
11 | make test
12 | )
13 |
--------------------------------------------------------------------------------
/test/examples/r/102Backticks.r:
--------------------------------------------------------------------------------
1 | # ugly code to demonstrate multiline string.
2 | `Hello
3 | World` <- function(x, y, z) {
4 | print(x);
5 | print(y);
6 | print(z);
7 | }
8 | `Hello\nWorld`("Hello\nMoon!", "Hello
9 | Venus", 'Hello\
10 | Mars');
11 |
--------------------------------------------------------------------------------
/test/examples/lua/x.lua.styled:
--------------------------------------------------------------------------------
1 | {1}--[[ coding:UTF-8
2 | comment ]]{0}
3 | {5}function{0} {11}first{10}(){0}
4 | {20}::開::{0}
5 | {2}-- Comment
6 | {0} {11}func{10}({11}SCI_ANNOTATIONSETTEXT{10},{0} {7}'a'{10},{0} {4}0{10},{0} {6}"LINE1"{10}){0}
7 | {5}end{0}
8 |
--------------------------------------------------------------------------------
/test/examples/ruby/234HereDoc.rb:
--------------------------------------------------------------------------------
1 | # encoding: utf-8
2 | puts <
2 | /a|b/i.test("baby");
3 | // arrow function
4 | () => /a|b/i.test("baby");
5 | // Issue 289
6 | /a/g.test('a');
7 | /a/gm.test('a');
8 | 'a'.replace(/a/g, 'b');
9 | 'a'.replace(/a/gm, 'b');
10 |
11 |
--------------------------------------------------------------------------------
/test/examples/modula/Issue129.m3.styled:
--------------------------------------------------------------------------------
1 | {4}INTERFACE{0} Test{16};{0}
2 |
3 | {4}TYPE{0}
4 | {1}(* Opaque types *){0}
5 | HANDLE {16}={0} {5}ADDRESS{16};{0}
6 | HMOD{1}(* Module handle *){0} {16}={0} HANDLE{16};{0}
7 |
8 | {4}END{0} Test{16}.{0}
9 |
--------------------------------------------------------------------------------
/test/examples/hypertext/apostophe.php:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue135.rb.styled:
--------------------------------------------------------------------------------
1 | {11}a{0} {10}={0} {10}<<{20}XXX{0} {2}# :nodoc:{22}
2 | heredoc
3 | {20}XXX{0}
4 |
5 | {11}puts{10}(<<{20}-ONE{10},{0} {10}<<{20}-TWO{10}){22}
6 | content for heredoc one
7 | ONE
8 | content for heredoc two
9 | {20}TWO{0}
10 |
--------------------------------------------------------------------------------
/test/examples/cpp/130NonAsciiKeyword.cxx.styled:
--------------------------------------------------------------------------------
1 | {2}// coding: utf-8
2 | // All three following symbols should highlight as keywords
3 | {5}cheese{0}
4 | {5}käse{0}
5 | {5}сыр{0}
6 |
7 | {2}// Lookalikes with ASCII so should not highlight:
8 | {11}сыp{0}
9 | {11}cыp{0}
10 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue192.html:
--------------------------------------------------------------------------------
1 | &
2 | &1
3 | &A
4 | &中
5 | &
6 | &1
7 | &A
8 | &中
9 | &&
10 |
11 | 中
12 | &A;
13 |
14 | 中
15 | &
16 | <
17 | <
18 | &b.eps;
19 | &b.eps!
20 | &—;
21 |
--------------------------------------------------------------------------------
/test/examples/lua/x.lua.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + --[[ coding:UTF-8
2 | 0 401 0 | comment ]]
3 | 2 400 0 + function first()
4 | 0 401 0 | ::開::
5 | 0 401 0 | -- Comment
6 | 0 401 0 | func(SCI_ANNOTATIONSETTEXT, 'a', 0, "LINE1")
7 | 0 401 0 | end
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/bash/continuation.bsh:
--------------------------------------------------------------------------------
1 | # Tests for line continuation.
2 | # Issue #195.
3 |
4 | #backslash1\
5 | echo 1
6 | #backslash2\\
7 | echo 2
8 |
9 | if [ 1 ]; then
10 | backslash1=A\
11 | fi
12 | backslash2=B\\
13 | fi
14 |
15 | echo $backslash1, $backslash2
16 |
--------------------------------------------------------------------------------
/test/examples/x12/empty.x12.styled:
--------------------------------------------------------------------------------
1 | {2}ISA{7}*{0}00{7}*{0} {7}*{0}00{7}*{0} {7}*{0}01{7}*{0}0011223456 {7}*{0}01{7}*{0}999999999 {7}*{0}950120{7}*{0}0147{7}*{0}U{7}*{0}00300{7}*{0}000000007{7}*{0}0{7}*{0}P{7}*{8}~{6}
2 | {2}IEA{7}*{0}2{7}*{0}000000007{6}
3 |
--------------------------------------------------------------------------------
/test/examples/lua/Bug2205.lua.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 print("First")
2 | 2 400 0 + --[[ Block comment start
3 | 0 401 0 | print("Second")
4 | 0 401 0 | --[[ Another block comment ]]
5 | 0 400 0 print("Third. If run through an actual program, this will be executed.")
6 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/bash/Issue182.bsh.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + if [ -n "$eth" -o -n "$wlan" ]; then
2 | 0 401 0 | fi
3 | 1 400 0
4 | 0 400 0 test $((1 + 1)) -eq 2 && echo yes
5 | 0 400 0 [ $((1 + 1)) -eq 2 ] && echo yes
6 | 1 400 0
7 | 0 400 0 ls -a --directory
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/props/example.session.styled:
--------------------------------------------------------------------------------
1 | {1}# Default=0
2 | {0}a
3 |
4 | {1}# Comment=1
5 | {0}
6 |
7 | {1}# Heading=2
8 | {2}[heading]
9 | {0}
10 |
11 | {1}# Assignment=3
12 | {3}={0}
13 |
14 | {1}# Default Value=4
15 | {4}@{0}
16 |
17 | {1}# Key=5
18 | {5}key{3}={0}
19 |
20 |
--------------------------------------------------------------------------------
/test/examples/ruby/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.rb=ruby
2 | keywords.*.rb=begin class def do else end false if module return self super true unless until while \
3 | __FILE__ __LINE__
4 | fold=1
5 |
6 | substyles.ruby.11=2
7 | substylewords.11.1.*=decrypt STDERR
8 | substylewords.11.2.*=encrypt
9 |
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_1.md.styled:
--------------------------------------------------------------------------------
1 | {0}H1{1}
2 | {6}==
3 | {1}
4 | {0}H2{1}
5 | {7}--
6 | {1}
7 | {6}# H1
8 | {1}
9 | {7}## H2
10 | {1}
11 | {0}H1{1}
12 | {6}==
13 | {0}H2{1}
14 | {7}--
15 | {6}# H1
16 | {7}## H2
17 | {8}### H3
18 | {9}#### H4
19 | {10}##### H5
20 | {11}###### H6
21 |
--------------------------------------------------------------------------------
/test/examples/mmixal/x.mms:
--------------------------------------------------------------------------------
1 | % Some example code
2 |
3 | % Set the address of the program initially to 0x100.
4 | LOC #100
5 |
6 | Main GETA $255,string
7 |
8 | TRAP 0,Fputs,StdOut
9 |
10 | TRAP 0,Halt,0
11 |
12 | string BYTE "Hello, world!",#a,0
13 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue136.rb:
--------------------------------------------------------------------------------
1 | a = {r: /\w+/, h: < ignore
15 |
--------------------------------------------------------------------------------
/test/examples/python/strings.py:
--------------------------------------------------------------------------------
1 | # Simple raw string
2 | r''
3 |
4 | # Raw f-string
5 | rf''
6 | fr''
7 |
8 | # Raw byte string
9 | rb''
10 | br''
11 |
12 | # Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as
13 | # valid; ru'' is never valid
14 | ru''
15 | ur''
16 |
17 |
--------------------------------------------------------------------------------
/test/examples/modula/Issue129.m3.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 INTERFACE Test;
2 | 1 400 400
3 | 0 400 400 TYPE
4 | 0 400 400 (* Opaque types *)
5 | 0 400 400 HANDLE = ADDRESS;
6 | 0 400 400 HMOD(* Module handle *) = HANDLE;
7 | 1 400 400
8 | 0 400 3ff END Test.
9 | 1 3ff 3ff
--------------------------------------------------------------------------------
/test/examples/powershell/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.ps1=powershell
2 | fold=1
3 |
4 | keywords.*.ps1=break if else in local
5 | keywords2.*.ps1=write-host write-output
6 | keywords3.*.ps1=cd chdir cat
7 | keywords4.*.ps1=mkdir prompt get-verb
8 | keywords5.*.ps1=lexilla 7z
9 | keywords6.*.ps1=synopsis
10 |
--------------------------------------------------------------------------------
/test/examples/cobol/230.cob.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 * Keywords starting with V to be identified and styled
2 | 0 400 0
3 | 0 400 0 * in list keywords2
4 | 0 400 0 VARIANCE
5 | 0 400 0
6 | 0 400 0 * in list keywords3
7 | 0 400 0 VARYING
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/cpp/Bug2245.cxx.styled:
--------------------------------------------------------------------------------
1 | {5}int{0} {11}i{10};{0}
2 | {9}#if 1
3 | {11}i{10}={4}1{10};{0}
4 | {9}#
5 | {11}i{10}={4}2{10};{0}
6 | {9}#else
7 | {75}i{74}={68}3{74};{64}
8 | {9}#endif
9 | {11}i{10}={4}4{10};{0}
10 | {9}#elif 1
11 | {11}i{10}={4}5{10};{0}
12 | {9}#else
13 | {11}i{10}={4}6{10};{0}
14 |
--------------------------------------------------------------------------------
/test/examples/markdown/Issue117.md:
--------------------------------------------------------------------------------
1 | The number:
2 |
3 | 338269006135764734700913562171
4 |
5 | is prime. Therefore:
6 |
7 | 1. the only factors of 338269006135764734700913562171 are:
8 |
9 | 1
10 | 338269006135764734700913562171
11 |
12 | 2. 338269006135764734700913562171 is a natural number
13 |
--------------------------------------------------------------------------------
/test/examples/matlab/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.matlab=matlab
2 | keywords.*.matlab=end for global if break case catch classdef continue else elseif function otherwise parfor persistent return spmd switch try while
3 |
4 | lexer.*.octave=octave
5 | keywords.*.octave=end for global if
6 |
7 | fold=1
8 | fold.compact=1
9 |
--------------------------------------------------------------------------------
/test/examples/mssql/Issue87.tsql.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + /**
2 | 0 401 0 | /*
3 | 0 401 0 | GitHub Issue 87
4 | 0 401 0 | /*
5 | 0 401 0 | /****** Object: Table [dbo].[Issue87] Script Date: 04/06/2022 8:07:57 PM ******/
6 | 0 401 0 | */
7 | 0 401 0 | */
8 | 0 401 0 | */
9 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/Issue135.rb.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + a = <
2 | 2 400 0 +
3 | 2 401 0 +
7 | 0 401 0 |
8 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/python/f-strings.py:
--------------------------------------------------------------------------------
1 | # Simple nesting
2 | f" { "" } "
3 |
4 | # Multi-line field with comment
5 | f" {
6 |
7 | "" # comment
8 |
9 | } "
10 |
11 | # Single quoted continued with \
12 | f" \
13 | "
14 |
15 | # 4 nested f-strings
16 | f'Outer {f"nested {1} {f"nested {2} {f"nested {3} {f"nested {4}"}"}"}"}'
17 |
--------------------------------------------------------------------------------
/test/examples/python/t-strings.py:
--------------------------------------------------------------------------------
1 | # Simple nesting
2 | t" { "" } "
3 |
4 | # Multi-line field with comment
5 | t" {
6 |
7 | "" # comment
8 |
9 | } "
10 |
11 | # Single quoted continued with \
12 | t" \
13 | "
14 |
15 | # 4 nested t-strings
16 | t'Outer {t"nested {1} {t"nested {2} {t"nested {3} {t"nested {4}"}"}"}"}'
17 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue140.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 "#{1}"#
2 | 0 400 0 "#@a"#
3 | 0 400 0 "#@@a"#
4 | 0 400 0 "#$a"#
5 | 0 400 0 "#$?"#
6 | 0 400 0 "#$-a1"#
7 | 0 400 0 "#$_a1"#
8 | 0 400 0 "#$123"#
9 | 0 400 0 "#$\"#
10 | 0 400 0 "#$""#
11 | 0 400 0 a = /#$//#
12 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/rust/Issue34.rs.styled:
--------------------------------------------------------------------------------
1 | {3}/**
2 | * SCE_RUST_COMMENTBLOCKDOC
3 | */{0}
4 | {6}fn{0} {17}main{16}(){0} {16}{{0}
5 | {4}/// SCE_RUST_COMMENTLINEDOC{0}
6 | {19}println!{16}({13}"Hello, World!"{16});{0}
7 | {16}}{0}
8 | {2}// SCE_RUST_COMMENTLINE{0}
9 | {1}/*
10 | * SCE_RUST_COMMENTBLOCK
11 | */{0}
12 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue272SGML.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | An ampersand (&) may be escaped
6 | numerically (&#38) or with a general entity (&).
" >
7 | ]>
8 | &example;
9 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue273JavaScript.html:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/test/examples/latex/Feature1358.tex:
--------------------------------------------------------------------------------
1 | \begin{lstlisting}[language=make]
2 | # If no BOARD is found in the environment, use this default:
3 | BOARD ?= bluepill
4 |
5 | # To use chinese st-link v2 and ch340 dongle with bluepill
6 | ifeq ($(BOARD),bluepill)
7 | STLINK_VERSION=2
8 | PORT_LINUX=/dev/ttyUSB0
9 | endif
10 | \end{lstlisting}
11 |
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_0.cmake:
--------------------------------------------------------------------------------
1 | if(MSVC80)
2 | # 1
3 | elseif(MSVC90)
4 | # 2
5 | elseif(APPLE)
6 | # 3
7 | else()
8 | # 4
9 | endif()
10 |
11 | if(MSVC80)
12 | # 1
13 | elseif(MSVC90)
14 | # 2
15 | endif()
16 |
17 | if(MSVC80)
18 | # 1
19 | else()
20 | # 2
21 | endif()
22 |
23 | if(MSVC80)
24 | # 1
25 | endif()
26 |
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_1.cmake:
--------------------------------------------------------------------------------
1 | if(MSVC80)
2 | # 1
3 | elseif(MSVC90)
4 | # 2
5 | elseif(APPLE)
6 | # 3
7 | else()
8 | # 4
9 | endif()
10 |
11 | if(MSVC80)
12 | # 1
13 | elseif(MSVC90)
14 | # 2
15 | endif()
16 |
17 | if(MSVC80)
18 | # 1
19 | else()
20 | # 2
21 | endif()
22 |
23 | if(MSVC80)
24 | # 1
25 | endif()
26 |
--------------------------------------------------------------------------------
/test/examples/markdown/SciTE.properties:
--------------------------------------------------------------------------------
1 | code.page=65001
2 | lexer.*.md=markdown
3 | fold=1
4 |
5 | # Tests for the lexer.markdown.header.eolfill property, issue #62
6 | if $(= $(FileNameExt);HeaderEOLFill_0.md)
7 | lexer.markdown.header.eolfill=0
8 | if $(= $(FileNameExt);HeaderEOLFill_1.md)
9 | lexer.markdown.header.eolfill=1
10 |
--------------------------------------------------------------------------------
/src/Lexilla/Lexilla.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/test/examples/cpp/Bug2245.cxx.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 int i;
2 | 2 400 401 + #if 1
3 | 0 401 401 | i=1;
4 | 0 401 401 | #
5 | 0 401 401 | i=2;
6 | 0 401 401 | #else
7 | 0 401 401 | i=3;
8 | 0 401 400 | #endif
9 | 0 400 400 i=4;
10 | 0 400 400 #elif 1
11 | 0 400 400 i=5;
12 | 0 400 400 #else
13 | 0 400 400 i=6;
14 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_0.md.styled:
--------------------------------------------------------------------------------
1 | {0}H1{1}
2 | {6}=={1}
3 |
4 | {0}H2{1}
5 | {7}--{1}
6 |
7 | {6}#{0} H1{1}
8 |
9 | {7}##{0} H2{1}
10 |
11 | {0}H1{1}
12 | {6}=={1}
13 | {0}H2{1}
14 | {7}--{1}
15 | {6}#{0} H1{1}
16 | {7}##{0} H2{1}
17 | {8}###{0} H3{1}
18 | {9}####{0} H4{1}
19 | {10}#####{0} H5{1}
20 | {11}######{0} H6{1}
21 |
--------------------------------------------------------------------------------
/test/examples/yaml/x.yaml.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # comment
2 | 1 400 0
3 | 0 400 0 key: value # comment
4 | 1 400 0
5 | 0 400 0 colon:in:key: value
6 | 1 400 0
7 | 2 400 0 + hanging_value:
8 | 0 402 0 | value
9 | 1 400 0
10 | 0 400 0 1: 1
11 | 1 400 0
12 | 0 400 0 true: true
13 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/CharacterTruncation.ps1:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE)
3 | # to be styled as an operator as static_cast(0x121) = 0x21 == '!' which is an operator
4 |
5 | # Isolate
6 | ġ
7 |
8 | # Continuing from operator
9 | (ġ)
10 |
--------------------------------------------------------------------------------
/test/examples/gui4cli/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.gui=gui4cli
2 | fold=1
3 |
4 | #global
5 | keywords.*.gui=G4C WINDOW XBUTTON
6 | #event
7 | keywords2.*.gui=XONCLOSE XONLVDIR XONLOAD
8 | #attribute
9 | keywords3.*.gui=ATTR
10 | #control
11 | keywords4.*.gui=IF ELSE ENDIF GOSUB
12 | #command
13 | keywords5.*.gui=GUIOPEN GUIQUIT INPUT MSGBOX SETWINTITLE
14 |
--------------------------------------------------------------------------------
/test/examples/ruby/PercentEquals124.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# Issue 124, disambiguating %= which may be a quote or modulo assignment{0}
2 | {2}# %-quoting with '=' as the quote{0}
3 | {11}s{0} {10}={0} {25}%=3={0}
4 | {11}puts{0} {11}s{0}
5 | {11}x{0} {10}={0} {4}7{0}
6 | {2}# Modulo assignment, equivalent to x = x % 2{0}
7 | {11}x{0} {10}%={4}2{0}
8 | {11}puts{0} {11}x{0}
9 |
--------------------------------------------------------------------------------
/test/examples/latex/Feature1358.tex.styled:
--------------------------------------------------------------------------------
1 | {1}\begin{2}{lstlisting}{8}[language=make]
2 | # If no BOARD is found in the environment, use this default:
3 | BOARD ?= bluepill
4 |
5 | # To use chinese st-link v2 and ch340 dongle with bluepill
6 | ifeq ($(BOARD),bluepill)
7 | STLINK_VERSION=2
8 | PORT_LINUX=/dev/ttyUSB0
9 | endif
10 | {1}\end{5}{lstlisting}{0}
11 |
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.octave:
--------------------------------------------------------------------------------
1 | % Ensure escape sequences still work in octave
2 | % Octave terminates string at 3rd ", Matlab at 4th
3 | i="\" "; % " %
4 |
5 |
6 | % Octave allows string continuation with an escape
7 | b = "multi\
8 | line"
9 |
10 | % No escape so string ends at line end
11 | c = "multi
12 | line"
13 |
14 | % end
15 |
--------------------------------------------------------------------------------
/test/examples/cpp/130NonAsciiKeyword.cxx.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 // coding: utf-8
2 | 0 400 400 // All three following symbols should highlight as keywords
3 | 0 400 400 cheese
4 | 0 400 400 käse
5 | 0 400 400 сыр
6 | 1 400 400
7 | 0 400 400 // Lookalikes with ASCII so should not highlight:
8 | 0 400 400 сыp
9 | 0 400 400 cыp
10 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/cpp/149KeywordCase.cxx.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 // SCE_C_WORD2 (16)
2 | 0 400 400 second
3 | 1 400 400
4 | 0 400 400 // SCE_C_IDENTIFIER (11)
5 | 0 400 400 Second
6 | 1 400 400
7 | 0 400 400 // SCE_C_IDENTIFIER (11)
8 | 0 400 400 upper
9 | 1 400 400
10 | 0 400 400 // SCE_C_WORD2 (16)
11 | 0 400 400 Upper
12 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/hypertext/Bug2207.html.styled:
--------------------------------------------------------------------------------
1 | {21}{0}
2 | {1}{0}
3 | {1}{0}
7 | {1}{0}
8 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue33.rs.styled:
--------------------------------------------------------------------------------
1 | {6}fn{0} {17}main{16}(){0} {16}{{0}
2 | {6}let{0} {17}a{16}:{0} {7}i128{0} {16}={0} {5}42i128{16};{0}
3 | {6}let{0} {17}b{16}:{0} {7}u128{0} {16}={0} {5}1337u128{16};{0}
4 | {19}println!{16}({13}"{} + {} = {}"{16},{0} {17}a{16},{0} {17}b{16},{0} {16}({17}a{0} {6}as{0} {7}u128{16}){0} {16}+{0} {17}b{16});{0}
5 | {16}}{0}
6 |
--------------------------------------------------------------------------------
/zipsrc.bat:
--------------------------------------------------------------------------------
1 | cd ..
2 | del/q lexilla.zip
3 | zip lexilla.zip lexilla\*.* lexilla\*\*.* lexilla\*\*\*.* lexilla\*\*\*\*.* lexilla\*\*\*\*\*.* ^
4 | -x *.bak *.o *.obj *.iobj *.dll *.exe *.a *.lib *.res *.exp *.sarif *.pdb *.ipdb *.idb *.sbr *.ilk *.tgz ^
5 | **/__pycache__/* **/Debug/* **/Release/* **/x64/* **/ARM64/* **/cov-int/* **/.vs/* **/.vscode/* @
6 | cd lexilla
7 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue184.bsh.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 echo $*
2 | 0 400 0 echo $@
3 | 0 400 0 echo $?
4 | 0 400 0 echo $-
5 | 0 400 0 echo $$
6 | 0 400 0 echo $!
7 | 0 400 0 echo $_
8 | 0 400 0 echo $%
9 | 0 400 0 echo $<
10 | 1 400 0
11 | 0 400 0 ifeth=$(ls /sys/class/net | grep ^"$intf" | grep "$intf"$)
12 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/PercentEquals124.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Issue 124, disambiguating %= which may be a quote or modulo assignment
2 | 0 400 0 # %-quoting with '=' as the quote
3 | 0 400 0 s = %=3=
4 | 0 400 0 puts s
5 | 0 400 0 x = 7
6 | 0 400 0 # Modulo assignment, equivalent to x = x % 2
7 | 0 400 0 x %=2
8 | 0 400 0 puts x
9 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/bash/Issue184Copy.bsh.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 echo $*
2 | 0 400 0 echo $@
3 | 0 400 0 echo $?
4 | 0 400 0 echo $-
5 | 0 400 0 echo $$
6 | 0 400 0 echo $!
7 | 0 400 0 echo $_
8 | 0 400 0 echo $%
9 | 0 400 0 echo $<
10 | 1 400 0
11 | 0 400 0 ifeth=$(ls /sys/class/net | grep ^"$intf" | grep "$intf"$)
12 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/cobol/231.cob:
--------------------------------------------------------------------------------
1 | * Comment preceded by 6 characters to be styled
2 | * Include / to be styled as a comment
3 |
4 | * Comment colored in green
5 | ABCDE * Comment colored in green
6 | ABCDEF* Comment NOT colored in green
7 | / Comment NOT colored in green
8 | ABCDE / Comment NOT colored in green
9 | ABCDEF/ Comment NOT colored in green
10 |
--------------------------------------------------------------------------------
/test/examples/json/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.json=json
2 |
3 | # JSON keywords
4 | keywords.*.json=false true null
5 |
6 | # JSON-LD keywords
7 | keywords2.*.json=@id @context @type @value @language @container \
8 | @list @set @reverse @index @base @vocab @graph
9 |
10 | lexer.json.escape.sequence=1
11 | lexer.json.allow.comments=1
12 | fold=1
13 | fold.compact=1
14 |
15 |
--------------------------------------------------------------------------------
/test/examples/vb/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.vb=vb
2 | keywords.*.vb=as dim or string
3 | keywords2.*.vb=key2
4 | keywords3.*.vb=key3
5 | keywords4.*.vb=key4
6 |
7 | lexer.*.vbs=vbscript
8 | keywords.*.vbs=as dim or string
9 | keywords2.*.vbs=key2
10 | keywords3.*.vbs=key3
11 | keywords4.*.vbs=key4
12 |
13 | fold=1
14 |
15 | match x.vb
16 | lexer.vb.strings.multiline=1
17 |
--------------------------------------------------------------------------------
/test/examples/hypertext/x.asp:
--------------------------------------------------------------------------------
1 | <%@language=javas%>
2 | <%
3 | #include
4 | serve x;
5 | function x() {
6 | }
7 | %>
8 | <%@language=vbscript%>
9 | <%
10 | sub x 'comment
11 | peek 1024
12 | %>
13 |
14 | <%@language=python%>
15 | <%
16 | import random
17 | x = 'comment'
18 | parse "x=8"
19 | %>
20 |
21 |
22 |
--------------------------------------------------------------------------------
/test/examples/markdown/Issue117.md.styled:
--------------------------------------------------------------------------------
1 | {0}The number:{1}
2 |
3 | {0}338269006135764734700913562171{1}
4 |
5 | {0}is prime. Therefore:{1}
6 |
7 | {12} {14}1.{0} the only factors of 338269006135764734700913562171 are:{1}
8 |
9 | {12} {0} 1{1}
10 | {12} {0} 338269006135764734700913562171{1}
11 |
12 | {12} {14}2.{0} 338269006135764734700913562171 is a natural number{1}
13 |
--------------------------------------------------------------------------------
/test/examples/powershell/Pull92.ps1:
--------------------------------------------------------------------------------
1 | <# Tests for PowerShell #>
2 |
3 | <# Backticks should escape in double quoted strings #>
4 | $double_quote_str_esc_1 = "`"XXX`""
5 | $double_quote_str_esc_2 = "This `"string`" `$useses `r`n Backticks '``'"
6 |
7 | <# Backticks should be ignored in quoted strings #>
8 | $single_quote_str_esc_1 = 'XXX`'
9 | $single_quote_str_esc_2 = 'XXX```'
10 |
--------------------------------------------------------------------------------
/test/examples/python/strings.py.styled:
--------------------------------------------------------------------------------
1 | {1}# Simple raw string{0}
2 | {4}r''{0}
3 |
4 | {1}# Raw f-string{0}
5 | {17}rf''{0}
6 | {17}fr''{0}
7 |
8 | {1}# Raw byte string{0}
9 | {4}rb''{0}
10 | {4}br''{0}
11 |
12 | {1}# Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as{0}
13 | {1}# valid; ru'' is never valid{0}
14 | {11}ru{4}''{0}
15 | {4}ur''{0}
16 |
17 |
--------------------------------------------------------------------------------
/test/examples/r/102Backticks.r.styled:
--------------------------------------------------------------------------------
1 | {1}# ugly code to demonstrate multiline string.{0}
2 | {12}`Hello
3 | World`{0} {8}<-{0} {9}function{8}({9}x{0}, {9}y{0}, {9}z{8}){0} {8}{{0}
4 | {9}print{8}({9}x{8}){0};
5 | {9}print{8}({9}y{8}){0};
6 | {9}print{8}({9}z{8}){0};
7 | {8}}{0}
8 | {12}`Hello\nWorld`{8}({6}"Hello\nMoon!"{0}, {6}"Hello
9 | Venus"{0}, {7}'Hello\
10 | Mars'{8}){0};
11 |
--------------------------------------------------------------------------------
/test/examples/hypertext/comment.html:
--------------------------------------------------------------------------------
1 | 1 normal comment
2 | 2 valid comment
3 | 3 abrupt-closing-of-empty-comment
4 | 4 abrupt-closing-of-empty-comment
5 | 5 incorrectly-closed-comment
6 | 6 incorrectly-closed-comment
7 | 7 nested-comment
8 | 8 nested-comment
9 |
--------------------------------------------------------------------------------
/access/README:
--------------------------------------------------------------------------------
1 | README for access directory.
2 |
3 | LexillaAccess is a module that simplifies using multiple libraries that follow the Lexilla protocol.
4 |
5 | It can be compiled into a Lexilla client application.
6 |
7 | Applications with complex needs can copy the code and customise it to meet their requirements.
8 |
9 | This module is not meant to be compiled into Lexilla.
10 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue182.bsh.styled:
--------------------------------------------------------------------------------
1 | {4}if{0} {7}[{0} {4}-n{0} {5}"{9}$eth{5}"{0} {4}-o{0} {4}-n{0} {5}"{9}$wlan{5}"{0} {7}];{0} {4}then{0}
2 | {4}fi{0}
3 |
4 | {4}test{0} {7}$(({3}1{0} {7}+{0} {3}1{7})){0} {4}-eq{0} {3}2{0} {7}&&{0} {4}echo{0} {8}yes{0}
5 | {7}[{0} {7}$(({3}1{0} {7}+{0} {3}1{7})){0} {4}-eq{0} {3}2{0} {7}]{0} {7}&&{0} {4}echo{0} {8}yes{0}
6 |
7 | {8}ls{0} {8}-a{0} {8}--directory{0}
8 |
--------------------------------------------------------------------------------
/test/examples/r/102Backticks.r.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 # ugly code to demonstrate multiline string.
2 | 0 400 400 `Hello
3 | 2 400 401 + World` <- function(x, y, z) {
4 | 0 401 401 | print(x);
5 | 0 401 401 | print(y);
6 | 0 401 401 | print(z);
7 | 0 401 400 | }
8 | 0 400 400 `Hello\nWorld`("Hello\nMoon!", "Hello
9 | 0 400 400 Venus", 'Hello\
10 | 0 400 400 Mars');
11 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/CharacterTruncation.ps1.styled:
--------------------------------------------------------------------------------
1 | {1}# -*- coding: utf-8 -*-{0}
2 | {1}# Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE){0}
3 | {1}# to be styled as an operator as static_cast(0x121) = 0x21 == '!' which is an operator{0}
4 |
5 | {1}# Isolate{0}
6 | {7}ġ{0}
7 |
8 | {1}# Continuing from operator{0}
9 | {6}({7}ġ{6}){0}
10 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue34.rs.folded:
--------------------------------------------------------------------------------
1 | 2 400 401 + /**
2 | 0 401 401 | * SCE_RUST_COMMENTBLOCKDOC
3 | 0 401 400 | */
4 | 2 400 401 + fn main() {
5 | 0 401 401 | /// SCE_RUST_COMMENTLINEDOC
6 | 0 401 401 | println!("Hello, World!");
7 | 0 401 400 | }
8 | 0 400 400 // SCE_RUST_COMMENTLINE
9 | 2 400 401 + /*
10 | 0 401 401 | * SCE_RUST_COMMENTBLOCK
11 | 0 401 400 | */
12 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue250RegEx.html.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
11 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/python/attributes/attrib-decorator.py.styled:
--------------------------------------------------------------------------------
1 | {1}# issue#294 also pointed out that decorator attributes behaved differently{0}
2 | {1}# for left-justified decorators vs indented decorators{0}
3 |
4 | {15}@decorator{10}.{15}attribute{0}
5 | {5}def{0} {9}foo{10}():{0}
6 | {15}@decorator{10}.{15}attribute{0}
7 | {5}def{0} {9}bar{10}():{0}
8 | {5}pass{0}
9 | {11}bar{10}(){0}
10 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue140.rb.styled:
--------------------------------------------------------------------------------
1 | {6}"{10}#{{4}1{10}}{6}"{2}#{0}
2 | {6}"{10}#{16}@a{6}"{2}#{0}
3 | {6}"{10}#{17}@@a{6}"{2}#{0}
4 | {6}"{10}#{13}$a{6}"{2}#{0}
5 | {6}"{10}#{13}$?{6}"{2}#{0}
6 | {6}"{10}#{13}$-a{6}1"{2}#{0}
7 | {6}"{10}#{13}$_a1{6}"{2}#{0}
8 | {6}"{10}#{13}$123{6}"{2}#{0}
9 | {6}"{10}#{13}$\{6}"{2}#{0}
10 | {6}"{10}#{13}$"{6}"{2}#{0}
11 | {11}a{0} {10}={0} {12}/{10}#{13}$/{12}/{2}#{0}
12 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue184.bsh.styled:
--------------------------------------------------------------------------------
1 | {4}echo{0} {9}$*{0}
2 | {4}echo{0} {9}$@{0}
3 | {4}echo{0} {9}$?{0}
4 | {4}echo{0} {9}$-{0}
5 | {4}echo{0} {9}$${0}
6 | {4}echo{0} {9}$!{0}
7 | {4}echo{0} {9}$_{0}
8 | {4}echo{0} ${7}%{0}
9 | {4}echo{0} ${7}<{0}
10 |
11 | {8}ifeth{7}=$({8}ls{0} {7}/{8}sys{7}/{8}class{7}/{8}net{0} {7}|{0} {8}grep{0} {7}^{5}"{9}$intf{5}"{0} {7}|{0} {8}grep{0} {5}"{9}$intf{5}"{0}${7}){0}
12 |
--------------------------------------------------------------------------------
/test/examples/bash/Issue184Copy.bsh.styled:
--------------------------------------------------------------------------------
1 | {4}echo{0} {9}$*{0}
2 | {4}echo{0} {9}$@{0}
3 | {4}echo{0} {9}$?{0}
4 | {4}echo{0} {9}$-{0}
5 | {4}echo{0} {9}$${0}
6 | {4}echo{0} {9}$!{0}
7 | {4}echo{0} {9}$_{0}
8 | {4}echo{0} {9}$%{0}
9 | {4}echo{0} {9}$<{0}
10 |
11 | {8}ifeth{7}=$({8}ls{0} {7}/{8}sys{7}/{8}class{7}/{8}net{0} {7}|{0} {8}grep{0} {7}^{5}"{9}$intf{5}"{0} {7}|{0} {8}grep{0} {5}"{9}$intf{5}"{0}${7}){0}
12 |
--------------------------------------------------------------------------------
/test/examples/fsharp/Issue56.fs.styled:
--------------------------------------------------------------------------------
1 | {9}// not folded
2 | {0}
3 | {9}// first line in comment fold
4 | // second . . .
5 | // third . . .
6 | {1}namespace{0} {6}Issue56{0}
7 |
8 | {1}open{0} {3}System{0}
9 |
10 | {1}module{0} {6}LineBasedFoldingCheck{0} {12}={0}
11 | {1}open{0} {3}FSharp{0}.{6}Quotations{0}
12 | {1}open{0} {3}FSharp{0}.{6}Reflection{0}
13 |
14 | {1}(){0} {12}|>{0} {2}ignore{0}
15 |
--------------------------------------------------------------------------------
/test/examples/ruby/225NumberDotMethod.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Float Literals
2 | 0 400 0 12.34
3 | 0 400 0 1234e-2
4 | 0 400 0 1.234E1
5 | 0 400 0 # Range Literals
6 | 0 400 0 (1..2)
7 | 0 400 0 (2.0..3)
8 | 0 400 0 # Method on number
9 | 0 400 0 1.5.ceil
10 | 0 400 0 1ri.abs
11 | 0 400 0 3.times {|i| puts i}
12 | 0 400 0 3. times {|i| puts i}
13 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/asm/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.asm=asm
2 |
3 | keywords.*.asm=add sub xor mov lea call
4 | keywords2.*.asm=fadd
5 | keywords3.*.asm=rsp rax rcx rdx r8 r9 ecx
6 | keywords4.*.asm=db section segment ends alignb resq resqdb global extern equ .bss .text .data start comment
7 | keywords5.*.asm=qword rel
8 | keywords6.*.asm=movd movq
9 | keywords7.*.asm=segment
10 | keywords8.*.asm=ends
11 |
12 | fold=1
13 |
--------------------------------------------------------------------------------
/test/examples/bash/continuation.bsh.styled:
--------------------------------------------------------------------------------
1 | {2}# Tests for line continuation.{0}
2 | {2}# Issue #195.{0}
3 |
4 | {2}#backslash1\{0}
5 | {4}echo{0} {3}1{0}
6 | {2}#backslash2\\{0}
7 | {4}echo{0} {3}2{0}
8 |
9 | {4}if{0} {7}[{0} {3}1{0} {7}];{0} {4}then{0}
10 | {8}backslash1{7}={8}A{7}\{0}
11 | {8}fi{0}
12 | {8}backslash2{7}={8}B\\{0}
13 | {4}fi{0}
14 |
15 | {4}echo{0} {9}$backslash1{7},{0} {9}$backslash2{0}
16 |
--------------------------------------------------------------------------------
/test/examples/escseq/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.ans=escseq
2 |
3 | # Identifier and Unknown colour
4 | match colourText0.ans
5 | lexer.escseq.colour.text=0
6 | style.escseq.171=back:#EEFFEE,visible
7 | style.escseq.172=back:#FFEEEE,visible
8 |
9 | # Full colour
10 | match colourText1.ans
11 | lexer.escseq.colour.text=1
12 | style.escseq.171=back:#EEFFEE,notvisible
13 | style.escseq.172=back:#FFEEEE,notvisible
14 |
--------------------------------------------------------------------------------
/test/examples/lua/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.lua=lua
2 | keywords.*.lua=do else elseif end for function if local repeat then until while
3 | keywords2.*.lua=print
4 | keywords3.*.lua=keyword3
5 | keywords4.*.lua=keyword4
6 | keywords5.*.lua=keyword5
7 | keywords6.*.lua=keyword6
8 | keywords7.*.lua=keyword7
9 | keywords8.*.lua=keyword8
10 |
11 | substyles.lua.11=1
12 | substylewords.11.1.*.lua=moon
13 |
14 | fold=1
15 |
--------------------------------------------------------------------------------
/test/examples/lua/nonASCII242.lua:
--------------------------------------------------------------------------------
1 | -- Tests behaviour with non-ASCII identifiers joined with '.' or ':'
2 | 输出栏选择夹:加入子夹("提示"):加入子夹("输出"):加入子夹("提示&输出"):加入子夹("Log")
3 | 支持库管理器:置坐标(0,工具栏:取高度() + 资源栏选择夹:取高度()):置宽高(分隔条_X.x,分隔条_Y:取坐标()):显示()
4 |
5 | 選択グリップ:に参加(10,"グリップ"):に参加("グリップ")
6 |
7 | 클립선택:가입("레이블")
8 | δέλτα:ζήτα("δέλτα")
9 | źdźbło.krnąbrność(0)
10 | 🍣😂:💮("😂")
11 |
12 | string:rep("ddf"):gsub("ddf","ffd")
13 |
--------------------------------------------------------------------------------
/test/examples/hypertext/apostophe.php.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
10 | 1 400 0
11 | 0 400 0
12 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/tcl/x.tcl.styled:
--------------------------------------------------------------------------------
1 | {2}# tcl tests
2 | {0}
3 | {2}#simple example
4 | {0}
5 | {12}proc{0} {7}Echo_Server{0} {6}{{7}port{6}}{0} {6}{
6 | {0} {12}set{0} {7}s{0} {6}[{12}socket{0} {10}-server{0} {7}EchoAccept{0} {8}$port{6}]
7 | {0} {12}vwait{0} {7}forever{0};
8 | {6}}
9 | {0}
10 | {2}# Bug #1947
11 | {0}
12 | {8}$s{6}({8}$i{6},{5}"n"{6})
13 | {12}set{0} {7}n{0} {8}$showArray{6}({8}$i{6},{5}"neighbor"{6})
14 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.py=python
2 | keywords.*.py=class def else for if import in pass print return while with yield
3 | keywords2.*.py=hilight
4 | fold=1
5 | fold.compact=1
6 | lexer.python.identifier.attributes=1
7 | lexer.python.decorator.attributes=1
8 |
9 | substyles.python.11=3
10 | substylewords.11.3.$(file.patterns.py)=findall replace
11 | style.python.11.3=fore:#EEAA80,italics,bold
12 |
--------------------------------------------------------------------------------
/test/examples/vb/x.vb:
--------------------------------------------------------------------------------
1 | ' String"
2 | Dim a As String = "hello, world"
3 | Dim b As String = "hello world"
4 | Dim c As String = "Joe said ""Hello"" to me"
5 | Dim d As String = "\\\\server\\share\\file.txt"
6 | Dim e As String = "The brown fox
7 | jumps over
8 | the lazy dog"
9 | ' Character
10 | ""C "c"C "cc"C
11 | ' Date
12 | d = #5/31/1993# or # 01/01/0001 12:00:00AM #
13 | ' Number
14 | 123_456___789
15 | 123_
16 | &b10101_01010
17 |
--------------------------------------------------------------------------------
/test/examples/python/x.py:
--------------------------------------------------------------------------------
1 | # Convert all punctuation characters except '_', '*', and '.' into spaces.
2 | def depunctuate(s):
3 | '''A docstring'''
4 | """Docstring 2"""
5 | d = ""
6 | for ch in s:
7 | if ch in 'abcde':
8 | d = d + ch
9 | else:
10 | d = d + " "
11 | return d
12 |
13 | import contextlib
14 |
15 | @contextlib.contextmanager
16 | def singleuse():
17 | print("Before")
18 | yield
19 | with singleuse(): pass
20 |
--------------------------------------------------------------------------------
/test/examples/tcl/x.tcl.folded:
--------------------------------------------------------------------------------
1 | 2 400 3 + # tcl tests
2 | 1 401 3 |
3 | 0 401 3 | #simple example
4 | 1 401 3 |
5 | 2 400 2 + proc Echo_Server {port} {
6 | 0 401 2 | set s [socket -server EchoAccept $port]
7 | 0 401 2 | vwait forever;
8 | 0 401 0 | }
9 | 1 400 0
10 | 2 400 3 + # Bug #1947
11 | 1 401 3 |
12 | 0 400 0 $s($i,"n")
13 | 0 400 0 set n $showArray($i,"neighbor")
14 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue272SGML.xml.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
3 | 0 401 0 |
4 | 0 401 0 |
5 | 2 401 0 + An ampersand (&) may be escaped
6 | 0 402 0 | numerically (&#38) or with a general entity (&)." >
7 | 0 401 0 | ]>
8 | 0 400 0 &example;
9 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/apostophe.php.styled:
--------------------------------------------------------------------------------
1 | {18}{0}
10 |
11 | {1}
{0}
12 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/attrib-decorator.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # issue#294 also pointed out that decorator attributes behaved differently
2 | 0 400 0 # for left-justified decorators vs indented decorators
3 | 1 400 0
4 | 0 400 0 @decorator.attribute
5 | 2 400 0 + def foo():
6 | 0 404 0 | @decorator.attribute
7 | 2 404 0 + def bar():
8 | 0 408 0 | pass
9 | 0 404 0 | bar()
10 | 1 404 0 |
--------------------------------------------------------------------------------
/test/examples/python/f-strings.py.styled:
--------------------------------------------------------------------------------
1 | {1}# Simple nesting{0}
2 | {16}f" {{0} {3}""{0} {16}} "{0}
3 |
4 | {1}# Multi-line field with comment{0}
5 | {16}f" {{0}
6 |
7 | {3}""{0} {1}# comment{0}
8 |
9 | {16}} "{0}
10 |
11 | {1}# Single quoted continued with \{0}
12 | {16}f" \
13 | "{0}
14 |
15 | {1}# 4 nested f-strings{0}
16 | {17}f'Outer {{16}f"nested {{2}1{16}} {f"nested {{2}2{16}} {f"nested {{2}3{16}} {f"nested {{2}4{16}}"}"}"}"{17}}'{0}
17 |
--------------------------------------------------------------------------------
/test/examples/python/t-strings.py.styled:
--------------------------------------------------------------------------------
1 | {1}# Simple nesting{0}
2 | {16}t" {{0} {3}""{0} {16}} "{0}
3 |
4 | {1}# Multi-line field with comment{0}
5 | {16}t" {{0}
6 |
7 | {3}""{0} {1}# comment{0}
8 |
9 | {16}} "{0}
10 |
11 | {1}# Single quoted continued with \{0}
12 | {16}t" \
13 | "{0}
14 |
15 | {1}# 4 nested t-strings{0}
16 | {17}t'Outer {{16}t"nested {{2}1{16}} {t"nested {{2}2{16}} {t"nested {{2}3{16}} {t"nested {{2}4{16}}"}"}"}"{17}}'{0}
17 |
--------------------------------------------------------------------------------
/test/examples/cobol/231.cob.styled:
--------------------------------------------------------------------------------
1 | {0} {2}* Comment preceded by 6 characters to be styled{0}
2 | {2}* Include / to be styled as a comment{0}
3 |
4 | {2}* Comment colored in green{0}
5 | {11}ABCDE{0} {2}* Comment colored in green{0}
6 | {11}ABCDEF{2}* Comment NOT colored in green{0}
7 | {2}/ Comment NOT colored in green{0}
8 | {11}ABCDE{0} {2}/ Comment NOT colored in green{0}
9 | {11}ABCDEF{2}/ Comment NOT colored in green{0}
10 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerJavaScript.aspx:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%@language=JScript%>
4 | <%-- comment --%>
5 |
9 |
13 | Start
14 | <%Response.Write("1")%>
15 | <%var x=3;//comment%>
16 | <%x=3;//comment ?> %>
17 | <%Response.Write(x)%>
18 | <%Response.Write(`template ${2+2}`)%>
19 | End
20 |
21 |
--------------------------------------------------------------------------------
/test/examples/mmixal/x.mms.styled:
--------------------------------------------------------------------------------
1 | {1}% Some example code
2 | {0}
3 | {1}% Set the address of the program initially to 0x100.
4 | {0} {5}LOC{7} {14}#100{1}
5 | {0}
6 | {2}Main{4} {5}GETA{7} {13}$255{15},{10}string{1}
7 | {0}
8 | {5}TRAP{7} {9}0{15},{16}Fputs{15},{16}StdOut{1}
9 | {0}
10 | {5}TRAP{7} {9}0{15},{10}Halt{15},{9}0{1}
11 | {0}
12 | {2}string{4} {5}BYTE{7} {12}"Hello, world!"{15},{14}#a{15},{9}0{1}
13 |
--------------------------------------------------------------------------------
/test/examples/mysql/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.sql=mysql
2 |
3 | keywords.*.sql=select
4 | keywords2.*.sql=in
5 | keywords3.*.sql=object
6 | keywords4.*.sql=function
7 | keywords5.*.sql=known
8 | keywords6.*.sql=procedure
9 | keywords7.*.sql=user1
10 | keywords8.*.sql=user2
11 | keywords9.*.sql=user3
12 |
13 | lexer.sql.backticks.identifier=1
14 | lexer.sql.numbersign.comment=1
15 | lexer.sql.allow.dotted.word=1
16 |
17 | fold=1
18 | fold.compact=1
19 |
--------------------------------------------------------------------------------
/test/examples/sql/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.sql=sql
2 |
3 | keywords.*.sql=select
4 | keywords2.*.sql=object
5 | keywords3.*.sql=return
6 | keywords4.*.sql=a~ppend pro~mpt rem~ark
7 | keywords5.*.sql=dbms_output.disable
8 | keywords6.*.sql=analyze
9 | keywords7.*.sql=array
10 | keywords8.*.sql=false
11 |
12 | lexer.sql.backticks.identifier=1
13 | lexer.sql.numbersign.comment=1
14 | lexer.sql.allow.dotted.word=1
15 |
16 | fold=1
17 | fold.compact=1
18 |
--------------------------------------------------------------------------------
/test/examples/julia/x.jl:
--------------------------------------------------------------------------------
1 |
2 | # Comment here
3 | const bar = '\n'
4 |
5 | """
6 | test_fun(a::Int)
7 | For test only
8 | """
9 | function test_fun(a::Int, b::T) where T <: Number
10 | println(a)
11 | println("foo $(bar)")
12 | end
13 |
14 | @enum Unicode α=1 β=2
15 |
16 | res = [√i for i in 1:10]
17 | ∀=1; ∃=2; ∄=3;
18 |
19 | t!'#'
20 | t!='#'
21 | t[]!='#'
22 |
23 | #= Dummy function =#
24 | test_fun²(:sym, true, raw"test", `echo 1`)
25 |
--------------------------------------------------------------------------------
/test/examples/ruby/225NumberDotMethod.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# Float Literals{0}
2 | {4}12.34{0}
3 | {4}1234e{10}-{4}2{0}
4 | {4}1.234E1{0}
5 | {2}# Range Literals{0}
6 | {10}({4}1{10}..{4}2{10}){0}
7 | {10}({4}2.0{10}..{4}3{10}){0}
8 | {2}# Method on number{0}
9 | {4}1.5{10}.{11}ceil{0}
10 | {4}1ri{10}.{11}abs{0}
11 | {4}3{10}.{11}times{0} {10}{|{11}i{10}|{0} {11}puts{0} {11}i{10}}{0}
12 | {4}3{10}.{0} {11}times{0} {10}{|{11}i{10}|{0} {11}puts{0} {11}i{10}}{0}
13 |
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.octave.styled:
--------------------------------------------------------------------------------
1 | {1}% Ensure escape sequences still work in octave{0}
2 | {1}% Octave terminates string at 3rd ", Matlab at 4th{0}
3 | {7}i{6}={8}"\" "{6};{0} {1}% " %{0}
4 |
5 |
6 | {1}% Octave allows string continuation with an escape{0}
7 | {7}b{0} {6}={0} {8}"multi\
8 | line"{0}
9 |
10 | {1}% No escape so string ends at line end {0}
11 | {7}c{0} {6}={0} {8}"multi{0}
12 | {7}line{8}"{0}
13 |
14 | {1}% end{0}
15 |
--------------------------------------------------------------------------------
/test/examples/modula/128Endless.m3:
--------------------------------------------------------------------------------
1 | (* This file caused an infinite loop in the folder before #128 was fixed.*)
2 | MODULE Form;
3 | IMPORT
4 |
5 | PROCEDURE (bf: ButtonForm) InitializeComponent(), NEW;
6 | BEGIN
7 | bf.SuspendLayout();
8 | REGISTER(bf.button1.Click, bf.button1_Click);
9 | bf.get_Controls().Add(bf.button2);
10 | END InitializeComponent;
11 |
12 | BEGIN
13 | NEW(bf);
14 | Wfm.Application.Run(bf);
15 | END Form.
16 |
--------------------------------------------------------------------------------
/test/examples/batch/Issue222.bat:
--------------------------------------------------------------------------------
1 | rem Keywords with colon
2 |
3 | rem with spacing
4 | call file.bat arg1
5 | call "file.bat" arg1
6 | call :label arg1
7 | goto :label
8 | goto :eof
9 | goto label
10 | echo: %var%
11 | echo: text
12 | echo text
13 |
14 | rem no spacing
15 | call:label arg1
16 | goto:label
17 | goto:eof
18 | echo:%var%
19 | echo:text
20 | (call)
21 | (echo:)
22 | (goto)
23 |
24 | rem call internal commands
25 | call echo text
26 | call set "a=b"
27 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue252Tag.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 | = 'echo' ?>
10 |
11 |
12 |
13 | echo 'short'
14 | ?>
15 |
16 |
17 | <%@language=JScript%>
18 |
19 |
20 | <%
21 | Response.Write('short')
22 | %>
23 |
--------------------------------------------------------------------------------
/test/examples/mmixal/x.mms.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 % Some example code
2 | 0 400 0
3 | 0 400 0 % Set the address of the program initially to 0x100.
4 | 0 400 0 LOC #100
5 | 0 400 0
6 | 0 400 0 Main GETA $255,string
7 | 0 400 0
8 | 0 400 0 TRAP 0,Fputs,StdOut
9 | 0 400 0
10 | 0 400 0 TRAP 0,Halt,0
11 | 0 400 0
12 | 0 400 0 string BYTE "Hello, world!",#a,0
13 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/234HereDoc.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # encoding: utf-8
2 | 2 400 0 + puts < 0; i--)); do
6 | echo postfix dec $i
7 | done
8 | for ((i = 2; i > 0; --i)); do
9 | echo prefix dec $i
10 | done
11 | for ((i = 0; i < 2; i++)); do
12 | echo postfix inc $i
13 | done
14 | for ((i = 0; i < 2; ++i)); do
15 | echo prefix inc $i
16 | done
17 |
18 | # issue 215
19 | for ((i = 0; i < 2; i++)); do
20 | echo $((((1)) << i))
21 | done
22 |
--------------------------------------------------------------------------------
/test/examples/errorlist/BoldOrBright.err:
--------------------------------------------------------------------------------
1 | Escape Sequence 32m
2 | [32mColour 32 (Green)[0m
3 |
4 | Escape Sequence 1;32m
5 | [1;32mColour 32 (Green) + Bold[0m
6 |
7 | Escape Sequence 92m
8 | [92mColour 92 (Bright Green)[0m
9 |
10 | Escape Sequence 36m
11 | [36mColour 36 (Cyan)[0m
12 |
13 | Escape Sequence 1;36m
14 | [1;36mColour 36 (Cyan) + Bold[0m
15 |
16 | Escape Sequence 92m
17 | [96mColour 96 (Bright Cyan)[0m
18 |
19 | Escape Sequence 1m
20 | [1mBold[0m
21 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue272SGML.xml.styled:
--------------------------------------------------------------------------------
1 | {21}{31}
3 | {21}{31}
4 | {21}{31}
5 | {21}An ampersand (&) may be escaped
6 | numerically (&#38) or with a general entity (&)."{21} >{31}
7 | {21}]>{0}
8 | {2}{10}&example;{2}{0}
9 |
--------------------------------------------------------------------------------
/test/examples/latex/Feature1358.tex.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + \begin{lstlisting}[language=make]
2 | 0 401 0 | # If no BOARD is found in the environment, use this default:
3 | 0 401 0 | BOARD ?= bluepill
4 | 0 401 0 |
5 | 0 401 0 | # To use chinese st-link v2 and ch340 dongle with bluepill
6 | 0 401 0 | ifeq ($(BOARD),bluepill)
7 | 0 401 0 | STLINK_VERSION=2
8 | 0 401 0 | PORT_LINUX=/dev/ttyUSB0
9 | 0 401 0 | endif
10 | 0 401 0 | \end{lstlisting}
11 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/markdown/Issue117.md.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 The number:
2 | 0 400 0
3 | 0 400 0 338269006135764734700913562171
4 | 0 400 0
5 | 0 400 0 is prime. Therefore:
6 | 0 400 0
7 | 0 400 0 1. the only factors of 338269006135764734700913562171 are:
8 | 0 400 0
9 | 0 400 0 1
10 | 0 400 0 338269006135764734700913562171
11 | 0 400 0
12 | 0 400 0 2. 338269006135764734700913562171 is a natural number
13 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/CharacterTruncation.ps1.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 # -*- coding: utf-8 -*-
2 | 0 400 400 # Show problem with character value truncation causing U+0121 'ġ' (LATIN SMALL LETTER G WITH DOT ABOVE)
3 | 0 400 400 # to be styled as an operator as static_cast(0x121) = 0x21 == '!' which is an operator
4 | 1 400 400
5 | 0 400 400 # Isolate
6 | 0 400 400 ġ
7 | 1 400 400
8 | 0 400 400 # Continuing from operator
9 | 0 400 400 (ġ)
10 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/Pull92.ps1.styled:
--------------------------------------------------------------------------------
1 | {13}<# Tests for PowerShell #>{0}
2 |
3 | {13}<# Backticks should escape in double quoted strings #>{0}
4 | {5}$double_quote_str_esc_1{0} {6}={0} {2}"`"XXX`""{0}
5 | {5}$double_quote_str_esc_2{0} {6}={0} {2}"This `"string`" `$useses `r`n Backticks '``'"{0}
6 |
7 | {13}<# Backticks should be ignored in quoted strings #>{0}
8 | {5}$single_quote_str_esc_1{0} {6}={0} {3}'XXX`'{0}
9 | {5}$single_quote_str_esc_2{0} {6}={0} {3}'XXX```'{0}
10 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/attributes.py:
--------------------------------------------------------------------------------
1 | # attributes=20
2 | s = "thing thing".findall("thing")
3 | a.very.complicated.expression.findall("test")
4 | # fake out.
5 | b.very.complicated.expression.
6 | findall("test2")
7 | c.very.complicated.expression. \
8 | findall("test3")
9 | d.very.complicated.expression.\
10 | findall("test4")
11 | @staticmethod.attrtest
12 | @staticmethod.
13 | attrtest
14 | @staticmethod. \
15 | attrtest
16 | @staticmethod.\
17 | attrtest
18 |
--------------------------------------------------------------------------------
/test/examples/bash/continuation.bsh.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + # Tests for line continuation.
2 | 0 401 0 | # Issue #195.
3 | 1 400 0
4 | 0 400 0 #backslash1\
5 | 0 400 0 echo 1
6 | 0 400 0 #backslash2\\
7 | 0 400 0 echo 2
8 | 1 400 0
9 | 2 400 0 + if [ 1 ]; then
10 | 0 401 0 | backslash1=A\
11 | 0 401 0 | fi
12 | 0 401 0 | backslash2=B\\
13 | 0 401 0 | fi
14 | 1 400 0
15 | 0 400 0 echo $backslash1, $backslash2
16 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/cobol/229.cob:
--------------------------------------------------------------------------------
1 | * Fix string style to not continue to next line
2 |
3 | DISPLAY MESSAGE BOX
4 | "The following process must be applied to Earnings, Deduct
5 | - "ions and Company Contributions separately."
6 |
7 | LP61A DISPLAY MESSAGE BOX
8 | lp61b "S*** strives to continually develop and improve its pr
9 | LP61B - "oducts and services to deliver more value to our custo
10 | LP61B - "mers."
11 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue192.html.styled:
--------------------------------------------------------------------------------
1 | {2}&{0}
2 | {2}&1{0}
3 | {2}&A{0}
4 | {2}&{0}中
5 | {2}&{1}
{0}
6 | {2}&1{1}
{0}
7 | {2}&A{1}
{0}
8 | {2}&{0}中{1}
{0}
9 | {2}&{10}&{0}
10 | {10}{0}
11 | {10}{0}中
12 | {10}&A;{1}
{0}
13 | {10}{1}
{0}
14 | {10}{0}中{1}
{0}
15 | {2}&{0}
16 | {10}<{0}
17 | {10}<{1}
{0}
18 | {10}&b.eps;{0}
19 | {2}&b.eps{0}!
20 | {2}&{0}—;
21 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue273JavaScript.html.styled:
--------------------------------------------------------------------------------
1 | {1}{0}
18 |
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_0.md.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 H1
2 | 0 400 0 ==
3 | 0 400 0
4 | 0 400 0 H2
5 | 0 400 0 --
6 | 0 400 0
7 | 0 400 0 # H1
8 | 0 400 0
9 | 0 400 0 ## H2
10 | 0 400 0
11 | 0 400 0 H1
12 | 0 400 0 ==
13 | 0 400 0 H2
14 | 0 400 0 --
15 | 0 400 0 # H1
16 | 0 400 0 ## H2
17 | 0 400 0 ### H3
18 | 0 400 0 #### H4
19 | 0 400 0 ##### H5
20 | 0 400 0 ###### H6
21 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/markdown/HeaderEOLFill_1.md.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 H1
2 | 0 400 0 ==
3 | 0 400 0
4 | 0 400 0 H2
5 | 0 400 0 --
6 | 0 400 0
7 | 0 400 0 # H1
8 | 0 400 0
9 | 0 400 0 ## H2
10 | 0 400 0
11 | 0 400 0 H1
12 | 0 400 0 ==
13 | 0 400 0 H2
14 | 0 400 0 --
15 | 0 400 0 # H1
16 | 0 400 0 ## H2
17 | 0 400 0 ### H3
18 | 0 400 0 #### H4
19 | 0 400 0 ##### H5
20 | 0 400 0 ###### H6
21 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/props/example.session.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Default=0
2 | 0 400 0 a
3 | 1 400 0
4 | 0 400 0 # Comment=1
5 | 1 400 0
6 | 1 400 0
7 | 0 400 0 # Heading=2
8 | 2 400 0 + [heading]
9 | 1 401 0 |
10 | 1 401 0 |
11 | 0 401 0 | # Assignment=3
12 | 0 401 0 | =
13 | 1 401 0 |
14 | 0 401 0 | # Default Value=4
15 | 0 401 0 | @
16 | 1 401 0 |
17 | 0 401 0 | # Key=5
18 | 0 401 0 | key=
19 | 1 401 0 |
20 | 0 401 0 |
--------------------------------------------------------------------------------
/test/examples/gdscript/NodePath.gd:
--------------------------------------------------------------------------------
1 | # nodepath
2 |
3 | $Node
4 |
5 | %Node
6 |
7 | %node/"n o d e"/%'n o d e'
8 |
9 | %"No de"
10 |
11 |
12 | $/root/ThisNode/%Node % %test
13 |
14 | $MainMenuPanel/%Options % %test
15 |
16 | %Options % %test
17 |
18 | $Node % %test
19 |
20 |
21 | get_node("%Options") % %test
22 |
23 | $"Nod se" % %test
24 |
25 | $/test/"No % de"/test % %test
26 |
27 | %node/"n o d e"/'n o d e' % %"No De"
28 |
29 | "%010d" % 12345
30 |
31 | 1 % 1
32 |
33 | a % b
34 |
--------------------------------------------------------------------------------
/examples/CheckLexilla/makefile:
--------------------------------------------------------------------------------
1 | .PHONY: all check clean
2 |
3 | INCLUDES = -I ../../include
4 | EXE = $(if $(windir),CheckLexilla.exe,CheckLexilla)
5 |
6 | ifdef windir
7 | RM = $(if $(wildcard $(dir $(SHELL))rm.exe), $(dir $(SHELL))rm.exe -f, del /q)
8 | CC = gcc
9 | else
10 | LIBS += -ldl
11 | endif
12 |
13 | all: $(EXE)
14 |
15 | check: $(EXE)
16 | ./$(EXE)
17 |
18 | clean:
19 | $(RM) $(EXE)
20 |
21 | $(EXE): *.c
22 | $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $^ $(LIBS) $(LDLIBS) -o $@
23 |
--------------------------------------------------------------------------------
/test/examples/bash/203TestOption.bsh:
--------------------------------------------------------------------------------
1 | [[ $1 == -e* ]] && echo e
2 |
3 | if [[ -d /usr/bin &&
4 | -e /usr/bin/bash ]]; then
5 | echo find bash
6 | fi
7 |
8 | if [[ -d /usr/bin && -e /usr/bin/bash ]]; then
9 | echo find bash
10 | fi
11 |
12 | if [ -d /usr/bin && -e /usr/bin/bash ]; then
13 | echo find bash
14 | fi
15 |
16 | if [ -d /usr/bin &&
17 | -e /usr/bin/bash ]; then
18 | echo find bash
19 | fi
20 |
21 | if [ -d /usr/bin && \
22 | -e /usr/bin/bash ]; then
23 | echo find bash
24 | fi
25 |
--------------------------------------------------------------------------------
/test/examples/fsharp/Issue56.fs.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 // not folded
2 | 1 400 400
3 | 2 400 401 + // first line in comment fold
4 | 0 401 401 | // second . . .
5 | 0 401 400 | // third . . .
6 | 0 400 400 namespace Issue56
7 | 1 400 400
8 | 0 400 400 open System
9 | 1 400 400
10 | 0 400 400 module LineBasedFoldingCheck =
11 | 2 400 401 + open FSharp.Quotations
12 | 0 401 400 | open FSharp.Reflection
13 | 1 400 400
14 | 0 400 400 () |> ignore
15 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue250RegEx.html.styled:
--------------------------------------------------------------------------------
1 | {1}{0}
11 |
--------------------------------------------------------------------------------
/test/examples/makefile/x.mak:
--------------------------------------------------------------------------------
1 | # '# comment' comment=1
2 | # comment
3 |
4 | # '.SUFFIXES' target=5, ':' operator=4
5 | .SUFFIXES:
6 |
7 | # 'LD' identifier=3, '=' operator=4, 'link' default=0
8 | LD=link
9 |
10 | # '!IFDEF DEBUG' NMAKE preprocessor=2
11 | !IFDEF DEBUG
12 |
13 | # 'ifdef DEBUG' GNI make directive default=0
14 | ifdef DEBUG
15 |
16 | # '$(' ID EOL=9
17 | X=$(
18 |
19 | # Recipe with variable reference $(CXX)
20 | cake.o: cake.cxx
21 | $(CXX) -c $< -o $@
22 |
23 | # End of file
24 |
--------------------------------------------------------------------------------
/test/examples/rust/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.rs=rust
2 |
3 | keywords.*.rs= \
4 | alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self sizeof static struct super trait true type typeof unsafe unsized use virtual while yield
5 |
6 | keywords2.*.rs= \
7 | bool char f32 f64 i16 i32 i64 i128 i8 int str u16 u32 u64 u128 u8 uint
8 |
9 | keywords3.*.rs=Self
10 |
11 | fold=1
12 | fold.comment=1
13 |
--------------------------------------------------------------------------------
/test/examples/cobol/231.cob.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 * Comment preceded by 6 characters to be styled
2 | 0 400 0 * Include / to be styled as a comment
3 | 0 400 0
4 | 0 400 0 * Comment colored in green
5 | 0 400 0 ABCDE * Comment colored in green
6 | 0 400 0 ABCDEF* Comment NOT colored in green
7 | 0 400 0 / Comment NOT colored in green
8 | 0 400 0 ABCDE / Comment NOT colored in green
9 | 0 400 0 ABCDEF/ Comment NOT colored in green
10 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/comment.html.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 1 normal comment
2 | 0 400 0 2 valid comment
3 | 0 400 0 3 abrupt-closing-of-empty-comment
4 | 0 400 0 4 abrupt-closing-of-empty-comment
5 | 0 400 0 5 incorrectly-closed-comment
6 | 0 400 0 6 incorrectly-closed-comment
7 | 0 400 0 7 nested-comment
8 | 0 400 0 8 nested-comment
9 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/234HereDoc.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# encoding: utf-8{0}
2 | {11}puts{0} {10}<<{20}A中{22}
3 | {10}#{{4}1{10}+{4}2{10}}{22}
4 | {20}A中{0}
5 |
6 | {11}puts{0} {10}<<{20}中{22}
7 | {10}#{{4}1{10}+{4}2{10}}{22}
8 | {20}中{0}
9 |
10 | {5}def{0} {128}STDERR{10}::{9}error{10}({11}x{10}){0} {10}={0} {11}puts{10}({11}x{10}){0}
11 | {5}def{0} {128}STDERR{10}.{9}error{10}({11}x{10}){0} {10}={0} {11}puts{10}({11}x{10}){0}
12 |
13 | {128}STDERR{10}.{11}error{0} {10}<<{20}EOF{22}
14 | STDERR heredoc
15 | {20}EOF{0}
16 |
--------------------------------------------------------------------------------
/test/examples/hypertext/comment.html.styled:
--------------------------------------------------------------------------------
1 | {9}{1}{0}1 normal comment{1}
{0}
2 | {9}{1}{0}2 valid comment{1}
{0}
3 | {9}{1}{0}3 abrupt-closing-of-empty-comment{1}
{0}
4 | {9}{1}{0}4 abrupt-closing-of-empty-comment{1}
{0}
5 | {9}{1}{0}5 incorrectly-closed-comment{1}
{0}
6 | {9}{1}{0}6 incorrectly-closed-comment{1}
{0}
7 | {9}{1}{0}7 nested-comment{1}
{0}
8 | {9}{1}{0}8 nested-comment{1}
{0}
9 |
--------------------------------------------------------------------------------
/test/examples/powershell/Pull92.ps1.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 <# Tests for PowerShell #>
2 | 1 400 400
3 | 0 400 400 <# Backticks should escape in double quoted strings #>
4 | 0 400 400 $double_quote_str_esc_1 = "`"XXX`""
5 | 0 400 400 $double_quote_str_esc_2 = "This `"string`" `$useses `r`n Backticks '``'"
6 | 1 400 400
7 | 0 400 400 <# Backticks should be ignored in quoted strings #>
8 | 0 400 400 $single_quote_str_esc_1 = 'XXX`'
9 | 0 400 400 $single_quote_str_esc_2 = 'XXX```'
10 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/python/strings.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Simple raw string
2 | 0 400 0 r''
3 | 1 400 0
4 | 0 400 0 # Raw f-string
5 | 0 400 0 rf''
6 | 0 400 0 fr''
7 | 1 400 0
8 | 0 400 0 # Raw byte string
9 | 0 400 0 rb''
10 | 0 400 0 br''
11 | 1 400 0
12 | 0 400 0 # Raw unicode strings: ur'' is valid in 2.7 (but not in 3) -- always lexed as
13 | 0 400 0 # valid; ru'' is never valid
14 | 0 400 0 ru''
15 | 0 400 0 ur''
16 | 1 400 0
17 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/Issue136.rb.styled:
--------------------------------------------------------------------------------
1 | {11}a{0} {10}={0} {10}{{14}r:{0} {12}/\w+/{10},{0} {14}h:{0} {10}<<{20}EOF{22}
2 | heredoc
3 | {20}EOF{0}
4 | {10}}{0}
5 |
6 | {11}puts{0} {11}a{0}
7 |
8 | {5}def{0} {9}b{0} {2}# :nodoc:{0}
9 | {10}<<{20}EOF{22}
10 | heredoc
11 | {20}EOF{0}
12 | {5}end{0}
13 |
14 | {5}def{0} {9}c{0} {2}# :nodoc:{0}
15 | {12}/\w+/{0}
16 | {5}end{0}
17 |
18 | {11}puts{0} {11}b{0}
19 | {11}puts{0} {11}c{0}
20 |
21 | {13}$stdout{0} {10}.{0} {11}puts{0} {10}<<{20}EOF{22}
22 | heredoc
23 | {20}EOF{0}
24 |
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_0.cmake.styled:
--------------------------------------------------------------------------------
1 | {11}if{0}({6}MSVC80{0})
2 | {1}# 1{0}
3 | {11}elseif{0}({6}MSVC90{0})
4 | {1}# 2{0}
5 | {11}elseif{0}({6}APPLE{0})
6 | {1}# 3{0}
7 | {11}else{0}()
8 | {1}# 4{0}
9 | {11}endif{0}()
10 |
11 | {11}if{0}({6}MSVC80{0})
12 | {1}# 1{0}
13 | {11}elseif{0}({6}MSVC90{0})
14 | {1}# 2{0}
15 | {11}endif{0}()
16 |
17 | {11}if{0}({6}MSVC80{0})
18 | {1}# 1{0}
19 | {11}else{0}()
20 | {1}# 2{0}
21 | {11}endif{0}()
22 |
23 | {11}if{0}({6}MSVC80{0})
24 | {1}# 1{0}
25 | {11}endif{0}()
26 |
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_1.cmake.styled:
--------------------------------------------------------------------------------
1 | {11}if{0}({6}MSVC80{0})
2 | {1}# 1{0}
3 | {11}elseif{0}({6}MSVC90{0})
4 | {1}# 2{0}
5 | {11}elseif{0}({6}APPLE{0})
6 | {1}# 3{0}
7 | {11}else{0}()
8 | {1}# 4{0}
9 | {11}endif{0}()
10 |
11 | {11}if{0}({6}MSVC80{0})
12 | {1}# 1{0}
13 | {11}elseif{0}({6}MSVC90{0})
14 | {1}# 2{0}
15 | {11}endif{0}()
16 |
17 | {11}if{0}({6}MSVC80{0})
18 | {1}# 1{0}
19 | {11}else{0}()
20 | {1}# 2{0}
21 | {11}endif{0}()
22 |
23 | {11}if{0}({6}MSVC80{0})
24 | {1}# 1{0}
25 | {11}endif{0}()
26 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerBasic.aspx:
--------------------------------------------------------------------------------
1 | <%@ register tagprefix="uc1"
2 | tagname="CalendarUserControl"
3 | src="~/CalendarUserControl.ascx" %>
4 |
5 |
6 | <%@language=VBScript%>
7 | <%-- comment --%>
8 |
14 |
18 | Start
19 | <%response.write("1")%>
20 | <% 'comment%>
21 | <%dim x="2"'comment%>
22 | <%response.write(x)%>
23 | End
24 |
25 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue192.html.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 &
2 | 0 400 0 &1
3 | 0 400 0 &A
4 | 0 400 0 &中
5 | 0 400 0 &
6 | 0 400 0 &1
7 | 0 400 0 &A
8 | 0 400 0 &中
9 | 0 400 0 &&
10 | 0 400 0
11 | 0 400 0 中
12 | 0 400 0 &A;
13 | 0 400 0
14 | 0 400 0 中
15 | 0 400 0 &
16 | 0 400 0 <
17 | 0 400 0 <
18 | 0 400 0 &b.eps;
19 | 0 400 0 &b.eps!
20 | 0 400 0 &—;
21 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/matlab/NumericLiterals.m.matlab:
--------------------------------------------------------------------------------
1 | d = 123;
2 | x = 0x123ABC;
3 | b = 0b010101;
4 | xs64 = 0x2As64;
5 | xs32 = 0x2As32;
6 | xs16 = 0x2As16;
7 | xs8 = 0x2As8;
8 | xu64 = 0x2Au64;
9 | xu32 = 0x2Au32;
10 | xu16 = 0x2Au16;
11 | xu8 = 0x2Au8;
12 | bs64 = 0b10s64;
13 | bs32 = 0b10s32;
14 | bs16 = 0b10s16;
15 | bs8 = 0b10s8;
16 | bu64 = 0b10u64;
17 | bu32 = 0b10u32;
18 | bu16 = 0b10u16;
19 | bu8 = 0b10u8;
20 | c = .1;
21 | c = 1.1;
22 | c = .1e1;
23 | c = 1.1e1;
24 | c = 1e1;
25 | c = 1i;
26 | c = 1j;
27 | c = .1e2j;
28 | c = 1e2j;
29 |
--------------------------------------------------------------------------------
/test/examples/python/f-strings.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Simple nesting
2 | 0 400 0 f" { "" } "
3 | 1 400 0
4 | 0 400 0 # Multi-line field with comment
5 | 0 400 0 f" {
6 | 1 400 0
7 | 0 400 0 "" # comment
8 | 1 400 0
9 | 0 400 0 } "
10 | 1 400 0
11 | 0 400 0 # Single quoted continued with \
12 | 0 400 0 f" \
13 | 0 400 0 "
14 | 1 400 0
15 | 0 400 0 # 4 nested f-strings
16 | 0 400 0 f'Outer {f"nested {1} {f"nested {2} {f"nested {3} {f"nested {4}"}"}"}"}'
17 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/python/t-strings.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Simple nesting
2 | 0 400 0 t" { "" } "
3 | 1 400 0
4 | 0 400 0 # Multi-line field with comment
5 | 0 400 0 t" {
6 | 1 400 0
7 | 0 400 0 "" # comment
8 | 1 400 0
9 | 0 400 0 } "
10 | 1 400 0
11 | 0 400 0 # Single quoted continued with \
12 | 0 400 0 t" \
13 | 0 400 0 "
14 | 1 400 0
15 | 0 400 0 # 4 nested t-strings
16 | 0 400 0 t'Outer {t"nested {1} {t"nested {2} {t"nested {3} {t"nested {4}"}"}"}"}'
17 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/inno/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.iss=inno
2 | fold=1
3 | keywords.*.iss=code custommessages files ini messages registry setup
4 | keywords2.*.iss=appname appcopyright onlybelowversion wizardsmallimagefile
5 | keywords3.*.iss=destdir key onlybelowversion root source string valuetype
6 | keywords4.*.iss=define
7 | keywords5.*.iss=\
8 | and begin break case const continue do downto else end except exit \
9 | false finally for function if not of on or procedure repeat then to \
10 | true try type until uses var while with
11 | keywords6.*.iss=
12 |
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.octave.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 % Ensure escape sequences still work in octave
2 | 0 400 400 % Octave terminates string at 3rd ", Matlab at 4th
3 | 0 400 400 i="\" "; % " %
4 | 1 400 400
5 | 1 400 400
6 | 0 400 400 % Octave allows string continuation with an escape
7 | 0 400 400 b = "multi\
8 | 0 400 400 line"
9 | 1 400 400
10 | 0 400 400 % No escape so string ends at line end
11 | 0 400 400 c = "multi
12 | 0 400 400 line"
13 | 1 400 400
14 | 0 400 400 % end
15 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue273JavaScript.html.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
18 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/markdown/Bug2247.md:
--------------------------------------------------------------------------------
1 | # Checking resolution of bug 2247
2 |
3 | ~~~sql
4 | SELECT datetime() AS `date`;
5 | ~~~
6 |
7 | ```sql
8 | SELECT datetime() AS `date`;
9 | ```
10 |
11 | List of examples:
12 |
13 | - example *one*
14 |
15 | - example _two_
16 |
17 | - example `inline code without end
18 |
19 | In case of **AAA**:
20 |
21 | ```sql
22 | SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;
23 | ```
24 |
25 | or, in case of __BBB__:
26 | . . .
27 |
28 | - example *three*
29 |
30 | Last paragraph.
31 |
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.matlab:
--------------------------------------------------------------------------------
1 | a="""";
2 | b=1;
3 | c='\';
4 | d=2;
5 | e="\";
6 | f=3;
7 | %" this should be a comment (colored as such), instead it closes the string
8 | g="
9 | h=123;
10 | %" this is a syntax error in Matlab (about 'g'),
11 | % followed by a valid assignment (of 'h')
12 | % Instead, 'h' is colored as part of the string
13 |
14 | % Octave terminates string at 3rd ", Matlab at 4th
15 | i="\" "; % " %
16 |
17 | % Matlab (unlike Octave) does not allow string continuation with an escape
18 | b = "multi\
19 | line"
20 |
21 | % end
22 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue19.php:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/test/examples/python/matchcase.py:
--------------------------------------------------------------------------------
1 | # Match and case as keywords
2 | match (x):
3 | case +1:
4 | pass
5 | case -1:
6 | pass
7 | case []:
8 | pass
9 |
10 | # Match and case as identifiers
11 | match = 1
12 | def match():
13 | pass
14 | match.group()
15 | 1 + match
16 | case.attribute
17 |
18 | # Unfortunately wrong classifications; should be rare in real code because
19 | # non-call expressions usually don't begin lines, the exceptions are match(x)
20 | # and case(x)
21 | match(x)
22 | case(x)
23 | match + 1
24 | case + 1
25 | case[1]
26 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue69.rb:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # single character strings
4 | puts ?a
5 | puts ?\n
6 | puts ?\s
7 | puts ?\\#
8 | puts ?\u{41}
9 | puts ?\C-a
10 | puts ?\M-a
11 | puts ?\M-\C-a
12 | puts ?\C-\M-a
13 | puts ?あ
14 | puts ?"
15 | puts ?/
16 | puts ?[[1, 2]
17 | puts ?/\
18 |
19 | # symbol and ternary operator
20 | ab = /\d+/
21 | cd = /\w+/
22 | puts :ab, :cd, :/, :[]
23 | puts :/\
24 |
25 | # TODO: space after '?' and ':' is not needed
26 | puts true ?ab : cd
27 | puts true ? /\d+/ : /\w+/
28 | puts false ?ab : cd
29 | puts false ? /\d+/ : /\w+/
30 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue259CaseLower.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%@language=vbscript%>
4 | <%
5 | sub x 'comment
6 | peek 1024
7 | %>
8 |
9 |
10 | SinkWorld - Portability
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test/examples/lua/nonASCII242.lua.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 -- Tests behaviour with non-ASCII identifiers joined with '.' or ':'
2 | 0 400 0 输出栏选择夹:加入子夹("提示"):加入子夹("输出"):加入子夹("提示&输出"):加入子夹("Log")
3 | 0 400 0 支持库管理器:置坐标(0,工具栏:取高度() + 资源栏选择夹:取高度()):置宽高(分隔条_X.x,分隔条_Y:取坐标()):显示()
4 | 1 400 0
5 | 0 400 0 選択グリップ:に参加(10,"グリップ"):に参加("グリップ")
6 | 1 400 0
7 | 0 400 0 클립선택:가입("레이블")
8 | 0 400 0 δέλτα:ζήτα("δέλτα")
9 | 0 400 0 źdźbło.krnąbrność(0)
10 | 0 400 0 🍣😂:💮("😂")
11 | 1 400 0
12 | 0 400 0 string:rep("ddf"):gsub("ddf","ffd")
13 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/makefile/x.mak.styled:
--------------------------------------------------------------------------------
1 | {1}# '# comment' comment=1
2 | # comment
3 | {0}
4 | {1}# '.SUFFIXES' target=5, ':' operator=4
5 | {5}.SUFFIXES{4}:{0}
6 |
7 | {1}# 'LD' identifier=3, '=' operator=4, 'link' default=0
8 | {3}LD{4}={0}link
9 |
10 | {1}# '!IFDEF DEBUG' NMAKE preprocessor=2
11 | {2}!IFDEF DEBUG
12 | {0}
13 | {1}# 'ifdef DEBUG' GNI make directive default=0
14 | {2}ifdef{0} DEBUG
15 |
16 | {1}# '$(' ID EOL=9
17 | {3}X{4}={9}$(
18 | {0}
19 | {1}# Recipe with variable reference $(CXX)
20 | {5}cake.o{4}:{0} cake.cxx
21 | {3}$(CXX){0} -c $< -o $@
22 |
23 | {1}# End of file
24 |
--------------------------------------------------------------------------------
/test/unit/README:
--------------------------------------------------------------------------------
1 | The test/unit directory contains unit tests for Scintilla data structures.
2 |
3 | The tests can be run on Windows, macOS, or Linux using g++ and GNU make.
4 | The Catch test framework is used.
5 | https://github.com/philsquared/Catch
6 | The file catch.hpp is under the Boost Software License which is contained in LICENSE_1_0.txt
7 |
8 | To run the tests on macOS or Linux:
9 | make test
10 |
11 | To run the tests on Windows:
12 | mingw32-make test
13 |
14 | Visual C++ (2010+) and nmake can also be used on Windows:
15 | nmake -f test.mak test
16 |
--------------------------------------------------------------------------------
/test/examples/errorlist/BoldOrBright.err.styled:
--------------------------------------------------------------------------------
1 | {0}Escape Sequence 32m
2 | {23}[32m{42}Colour 32 (Green){23}[0m{0}
3 |
4 | Escape Sequence 1;32m
5 | {23}[1;32m{50}Colour 32 (Green) + Bold{23}[0m{0}
6 |
7 | Escape Sequence 92m
8 | {23}[92m{50}Colour 92 (Bright Green){23}[0m{0}
9 |
10 | Escape Sequence 36m
11 | {23}[36m{46}Colour 36 (Cyan){23}[0m{0}
12 |
13 | Escape Sequence 1;36m
14 | {23}[1;36m{54}Colour 36 (Cyan) + Bold{23}[0m{0}
15 |
16 | Escape Sequence 92m
17 | {23}[96m{54}Colour 96 (Bright Cyan){23}[0m{0}
18 |
19 | Escape Sequence 1m
20 | {23}[1m{48}Bold{23}[0m{0}
21 |
--------------------------------------------------------------------------------
/test/examples/json/AllStyles.json:
--------------------------------------------------------------------------------
1 | // Enumerate all styles: 0 to 13
2 |
3 | // default=0
4 |
5 |
6 | // number=1
7 | 1
8 |
9 | // string=2
10 | "2"
11 |
12 | // stringeol=3
13 | "3
14 |
15 | // propertyname=4
16 | "4":
17 |
18 | // escapesequence=5
19 | "\n"
20 |
21 | // linecomment=6
22 | // 6 Line Comment
23 |
24 | // blockcomment=7
25 | /* 7 Block Comment */
26 |
27 | // operator=8
28 | {}
29 |
30 | // uri=9
31 | "http://9.org"
32 |
33 | // compactiri=10
34 | "x:y"
35 |
36 | // keyword=11
37 | true
38 |
39 | // ldkeyword=12
40 | "@id"
41 |
42 | // error=13
43 | # 13 error
44 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue252Tag.php.styled:
--------------------------------------------------------------------------------
1 | {9}{0}
2 |
3 | {9}{0}
4 | {18}{0}
7 |
8 | {9}{0}
9 | {18}={118} {120}'echo'{118} {18}?>{0}
10 |
11 | {9}{0}
12 | {2}
13 | echo 'short'
14 | ?>{0}
15 |
16 | {9}{0}
17 | {2}<%@language=JScript%>{0}
18 |
19 | {9}{0}
20 | {2}<%
21 | Response.Write('short')
22 | %>{0}
23 |
--------------------------------------------------------------------------------
/lexlib/InList.h:
--------------------------------------------------------------------------------
1 | // Scintilla source code edit control
2 | /** @file InList.h
3 | ** Check if a string is in a list.
4 | **/
5 | // Copyright 2024 by Neil Hodgson
6 | // The License.txt file describes the conditions under which this software may be distributed.
7 |
8 | #ifndef INLIST_H
9 | #define INLIST_H
10 |
11 | namespace Lexilla {
12 |
13 | bool InList(std::string_view value, std::initializer_list list) noexcept;
14 | bool InListCaseInsensitive(std::string_view value, std::initializer_list list) noexcept;
15 |
16 | }
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue136.rb.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + a = {r: /\w+/, h: <
2 | 2 400 0 + <%
3 | 0 401 0 | #include
4 | 0 401 0 | serve x;
5 | 2 401 0 + function x() {
6 | 0 402 0 | }
7 | 0 401 0 | %>
8 | 0 400 0 <%@language=vbscript%>
9 | 2 400 0 + <%
10 | 0 401 0 | sub x 'comment
11 | 0 401 0 | peek 1024
12 | 0 401 0 | %>
13 | 0 400 0
14 | 0 400 0 <%@language=python%>
15 | 0 400 0 <%
16 | 0 400 0 import random
17 | 0 400 0 x = 'comment'
18 | 0 400 0 parse "x=8"
19 | 0 400 0 %>
20 | 2 3ff 0 +
21 | 0 400 0
22 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/x.asp.styled:
--------------------------------------------------------------------------------
1 | {15}<%@{16}language=javas{15}%>{0}
2 | {15}<%{56}
3 | #{61}include{56}
4 | {195}serve{56} {61}x{65};{56}
5 | {62}function{56} {61}x{65}(){56} {65}{{56}
6 | {65}}{56}
7 | {15}%>{0}
8 | {15}<%@{16}language=vbscript{15}%>{0}
9 | {15}<%{81}
10 | {84}sub{81} {86}x{81} {82}'comment {81}
11 | {196}peek{81} {83}1024{81}
12 | {15}%>{0}
13 | {9}{0}
14 | {15}<%@{16}language=python{15}%>{0}
15 | {15}<%{106}
16 | {111}import{106} {117}random{106}
17 | {117}x{106} {116}={106} {110}'comment'{106}
18 | {197}parse{106} {109}"x=8"{106}
19 | {15}%>{0}
20 | {1}{0}
21 | {1}{0}
22 |
--------------------------------------------------------------------------------
/test/examples/modula/128Endless.m3.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 (* This file caused an infinite loop in the folder before #128 was fixed.*)
2 | 0 400 400 MODULE Form;
3 | 0 400 400 IMPORT
4 | 1 400 400
5 | 0 400 400 PROCEDURE (bf: ButtonForm) InitializeComponent(), NEW;
6 | 2 400 401 + BEGIN
7 | 0 401 401 | bf.SuspendLayout();
8 | 0 401 401 | REGISTER(bf.button1.Click, bf.button1_Click);
9 | 0 401 401 | bf.get_Controls().Add(bf.button2);
10 | 0 401 400 | END InitializeComponent;
11 | 1 400 400
12 | 2 400 401 + BEGIN
13 | 0 401 401 | NEW(bf);
14 | 0 401 401 | Wfm.Application.Run(bf);
15 | 0 401 400 | END Form.
16 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_0.cmake.folded:
--------------------------------------------------------------------------------
1 | 2 400 401 + if(MSVC80)
2 | 0 401 401 | # 1
3 | 0 401 401 | elseif(MSVC90)
4 | 0 401 401 | # 2
5 | 0 401 401 | elseif(APPLE)
6 | 0 401 401 | # 3
7 | 0 401 401 | else()
8 | 0 401 401 | # 4
9 | 0 401 400 | endif()
10 | 0 400 400
11 | 2 400 401 + if(MSVC80)
12 | 0 401 401 | # 1
13 | 0 401 401 | elseif(MSVC90)
14 | 0 401 401 | # 2
15 | 0 401 400 | endif()
16 | 0 400 400
17 | 2 400 401 + if(MSVC80)
18 | 0 401 401 | # 1
19 | 0 401 401 | else()
20 | 0 401 401 | # 2
21 | 0 401 400 | endif()
22 | 0 400 400
23 | 2 400 401 + if(MSVC80)
24 | 0 401 401 | # 1
25 | 0 401 400 | endif()
26 | 0 400 400
--------------------------------------------------------------------------------
/test/examples/cmake/Bug77_1.cmake.folded:
--------------------------------------------------------------------------------
1 | 2 400 401 + if(MSVC80)
2 | 0 401 400 | # 1
3 | 2 400 401 + elseif(MSVC90)
4 | 0 401 400 | # 2
5 | 2 400 401 + elseif(APPLE)
6 | 0 401 400 | # 3
7 | 2 400 401 + else()
8 | 0 401 401 | # 4
9 | 0 401 400 | endif()
10 | 0 400 400
11 | 2 400 401 + if(MSVC80)
12 | 0 401 400 | # 1
13 | 2 400 401 + elseif(MSVC90)
14 | 0 401 401 | # 2
15 | 0 401 400 | endif()
16 | 0 400 400
17 | 2 400 401 + if(MSVC80)
18 | 0 401 400 | # 1
19 | 2 400 401 + else()
20 | 0 401 401 | # 2
21 | 0 401 400 | endif()
22 | 0 400 400
23 | 2 400 401 + if(MSVC80)
24 | 0 401 401 | # 1
25 | 0 401 400 | endif()
26 | 0 400 400
--------------------------------------------------------------------------------
/test/examples/markdown/AllStyles.md:
--------------------------------------------------------------------------------
1 | Text=0
2 | Line end characters=1
3 | **Strong Emphasis (bold) 1=2**
4 | __Strong Emphasis (bold) 2=3__
5 | *Emphasis (italic) 1=4*
6 | _Emphasis (italic) 2=5_
7 | # Heading level 1=6
8 | ## Heading level 2=7
9 | ### Heading level 3=8
10 | #### Heading level 4=9
11 | ##### Heading level 5=10
12 | ###### Heading level 6=11
13 | PreChar=12
14 | * Unordered list item=13
15 | 1. Ordered list item=14
16 | >Block Quote=15
17 | ~~Strike-out=16~~
18 |
19 | ***
20 | Previous line was horizontal rule=17
21 | [Link=18](https://18.com)
22 | `Inline Code=19`
23 | ``Inline Code=20``
24 |
25 | ~~~
26 | Block code=21
27 | ~~~
28 |
29 | ## Issue 23
30 | `
--------------------------------------------------------------------------------
/test/examples/mmixal/references.mms:
--------------------------------------------------------------------------------
1 | # Bug #2019 Buffer over-read in MMIXAL lexer
2 | label
3 | PREFIX Foo:
4 | % Relative reference (uses PREFIX)
5 | JMP label
6 | %
7 | JMP @label
8 | % Absolute reference (does not use PREFIX)
9 | JMP :label
10 | % In register list so treated as register
11 | JMP :rA
12 | % Too long for buffer so truncated
13 | JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
14 | % Too long for buffer so truncated then treated as absolute
15 | JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
16 | %
17 |
--------------------------------------------------------------------------------
/test/examples/mssql/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.tsql=mssql
2 | fold=1
3 | fold.comment=1
4 |
5 | # statement
6 | keywords.*.tsql=and as begin by create declare distinct drop else end exists from go if in insert into is inner \
7 | join like not null on order print procedure return select set table use values where while
8 |
9 | # data type
10 | keywords2.*.tsql=char int
11 |
12 | # System table
13 | keywords3.*.tsql=sysobjects
14 |
15 | # global variables
16 | keywords4.*.tsql=error
17 |
18 | # functions
19 | keywords5.*.tsql=ascii char object_id
20 |
21 | # System stored procedures
22 | keywords6.*.tsql=sp_fulltext_database
23 |
24 | # operators
25 | keywords7.*.tsql=intersect
26 |
--------------------------------------------------------------------------------
/test/unit/testInList.cxx:
--------------------------------------------------------------------------------
1 | /** @file testInList.cxx
2 | ** Unit Tests for Lexilla internal data structures
3 | **/
4 |
5 | #include
6 | #include
7 |
8 | #include
9 | #include
10 |
11 | #include "InList.h"
12 |
13 | #include "catch.hpp"
14 |
15 | using namespace Lexilla;
16 |
17 | // Test InList.
18 |
19 | TEST_CASE("InList") {
20 |
21 | SECTION("Basic") {
22 | REQUIRE(InList("dog", {"cat", "dog", "frog"}));
23 | REQUIRE(!InList("fly", {"cat", "dog", "frog"}));
24 |
25 | REQUIRE(InListCaseInsensitive("DOG", {"cat", "dog", "frog"}));
26 | REQUIRE(!InListCaseInsensitive("fly", {"cat", "dog", "frog"}));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/test/examples/matlab/FoldPoints.m.matlab:
--------------------------------------------------------------------------------
1 | % All the examples here should yield folding
2 |
3 | classdef
4 | % Some code
5 | end
6 |
7 | for
8 | % Some code
9 | end
10 |
11 | function
12 | % Some code
13 | end
14 |
15 | if
16 | % Some code
17 | elseif
18 | % Some code
19 | else
20 | % Some code
21 | end
22 |
23 | parfor
24 | % Some code
25 | end
26 |
27 | spmd
28 | % Some code
29 | end
30 |
31 | switch
32 | case
33 | % Some code
34 | case
35 | % Some code
36 | otherwise
37 | % Some code
38 | end
39 |
40 | try
41 | % Some code
42 | catch
43 | % Some code
44 | end
45 |
46 | while
47 | % Some code
48 | end
49 |
--------------------------------------------------------------------------------
/src/Lexilla.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/test/examples/vb/x.vb.styled:
--------------------------------------------------------------------------------
1 | {1}' String"
2 | {3}Dim{0} {7}a{0} {3}As{0} {3}String{0} {6}={0} {4}"hello, world"{0}
3 | {3}Dim{0} {7}b{0} {3}As{0} {3}String{0} {6}={0} {4}"hello world"{0}
4 | {3}Dim{0} {7}c{0} {3}As{0} {3}String{0} {6}={0} {4}"Joe said ""Hello"" to me"{0}
5 | {3}Dim{0} {7}d{0} {3}As{0} {3}String{0} {6}={0} {4}"\\\\server\\share\\file.txt"{0}
6 | {3}Dim{0} {7}e{0} {3}As{0} {3}String{0} {6}={0} {4}"The brown fox
7 | jumps over
8 | the lazy dog"{0}
9 | {1}' Character
10 | {4}""C{0} {4}"c"C{0} {4}"cc"C{0}
11 | {1}' Date
12 | {7}d{0} {6}={0} {8}#5/31/1993#{0} {3}or{0} {8}# 01/01/0001 12:00:00AM #{0}
13 | {1}' Number
14 | {2}123_456___789{0}
15 | {2}123_{0}
16 | {2}&b10101_01010{0}
17 |
--------------------------------------------------------------------------------
/test/examples/python/x.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Convert all punctuation characters except '_', '*', and '.' into spaces.
2 | 2 400 0 + def depunctuate(s):
3 | 0 408 0 | '''A docstring'''
4 | 0 408 0 | """Docstring 2"""
5 | 0 408 0 | d = ""
6 | 2 408 0 + for ch in s:
7 | 2 410 0 + if ch in 'abcde':
8 | 0 418 0 | d = d + ch
9 | 2 410 0 + else:
10 | 0 418 0 | d = d + " "
11 | 0 408 0 | return d
12 | 1 400 0
13 | 0 400 0 import contextlib
14 | 1 400 0
15 | 0 400 0 @contextlib.contextmanager
16 | 2 400 0 + def singleuse():
17 | 0 408 0 | print("Before")
18 | 0 408 0 | yield
19 | 0 400 0 with singleuse(): pass
20 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/d/x.d:
--------------------------------------------------------------------------------
1 | $
2 | // /++ +/ doccomments are not yet supported
3 | /* */
4 | /** */
5 | /// drdr
6 | /+ /+ +/ +/
7 | //keyword test
8 | keyword1
9 | keyword2
10 | keyword4
11 | keyword5
12 | keyword6
13 | keyword7
14 | //unicode identifier test
15 | вапёasdÓΘΣαԷԸՑהכ拉麺とひシマイ단결을
16 | //strings test
17 | 's
18 | '
19 | w's'w
20 | "multiline
21 | string"w
22 | e"zz"e
23 | r"asd\"e
24 | r"multiline
25 | string"c
26 | r`asd\`e
27 | `multiline
28 | string`d
29 | x"023 abc"e
30 | x"023
31 | abc"w
32 | //numbers test
33 | a[3..4]=3
34 | 2.stringof
35 | 2.0.stringof
36 | 2.
37 | 2.2e+2
38 | 2.2e-2
39 | .2e+2
40 | .2
41 | 2e+2
42 | 0x2e+2
43 | 0x2ep+10
44 | ,.2.stringof,
45 |
46 | end
47 |
48 |
--------------------------------------------------------------------------------
/test/examples/hypertext/x.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 | SinkWorld - Portability
15 | §
16 | SinkWorld - Portability
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/test/examples/modula/128Endless.m3.styled:
--------------------------------------------------------------------------------
1 | {1}(* This file caused an infinite loop in the folder before #128 was fixed.*){0}
2 | {4}MODULE{0} Form{16};{0}
3 | {4}IMPORT{0}
4 |
5 | {4}PROCEDURE{0} {16}({0}bf{16}:{0} ButtonForm{16}){0} InitializeComponent{16}(),{0} {5}NEW{16};{0}
6 | {4}BEGIN{0}
7 | bf{16}.{0}SuspendLayout{16}();{0}
8 | REGISTER{16}({0}bf{16}.{0}button1{16}.{0}Click{16},{0} bf{16}.{0}button1_Click{16});{0}
9 | bf{16}.{0}get_Controls{16}().{0}Add{16}({0}bf{16}.{0}button2{16});{0}
10 | {4}END{0} InitializeComponent{16};{0}
11 |
12 | {4}BEGIN{0}
13 | {5}NEW{16}({0}bf{16});{0}
14 | Wfm{16}.{0}Application{16}.{0}Run{16}({0}bf{16});{0}
15 | {4}END{0} Form{16}.{0}
16 |
--------------------------------------------------------------------------------
/test/unit/UnitTester.cxx:
--------------------------------------------------------------------------------
1 | /** @file UnitTester.cxx
2 | ** UnitTester.cpp : Defines the entry point for the console application.
3 | **/
4 |
5 | // Catch uses std::uncaught_exception which is deprecated in C++17.
6 | // This define silences a warning from Visual C++.
7 | #define _SILENCE_CXX17_UNCAUGHT_EXCEPTION_DEPRECATION_WARNING
8 |
9 | #include
10 | #include
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | #define CATCH_CONFIG_WINDOWS_CRTDBG
17 | #define CATCH_CONFIG_RUNNER
18 | #include "catch.hpp"
19 |
20 | int main(int argc, char* argv[]) {
21 | const int result = Catch::Session().run(argc, argv);
22 |
23 | return result;
24 | }
25 |
--------------------------------------------------------------------------------
/test/examples/lua/nonASCII242.lua.styled:
--------------------------------------------------------------------------------
1 | {2}-- Tests behaviour with non-ASCII identifiers joined with '.' or ':'
2 | {11}输出栏选择夹:加入子夹{10}({6}"提示"{10}):{11}加入子夹{10}({6}"输出"{10}):{11}加入子夹{10}({6}"提示&输出"{10}):{11}加入子夹{10}({6}"Log"{10}){0}
3 | {11}支持库管理器:置坐标{10}({4}0{10},{11}工具栏:取高度{10}(){0} {10}+{0} {11}资源栏选择夹:取高度{10}()):{11}置宽高{10}({11}分隔条_X.x{10},{11}分隔条_Y:取坐标{10}()):{11}显示{10}(){0}
4 |
5 | {11}選択グリップ:に参加{10}({4}10{10},{6}"グリップ"{10}):{11}に参加{10}({6}"グリップ"{10}){0}
6 |
7 | {11}클립선택:가입{10}({6}"레이블"{10}){0}
8 | {11}δέλτα:ζήτα{10}({6}"δέλτα"{10}){0}
9 | {11}źdźbło.krnąbrność{10}({4}0{10}){0}
10 | {11}🍣😂:💮{10}({6}"😂"{10}){0}
11 |
12 | {11}string:rep{10}({6}"ddf"{10}):{11}gsub{10}({6}"ddf"{10},{6}"ffd"{10}){0}
13 |
--------------------------------------------------------------------------------
/test/examples/fortran/AllStyles.f:
--------------------------------------------------------------------------------
1 | ! Enumerate all styles: 0 to 14
2 | ! This is not a viable source file, it just illustrates the different states in isolation.
3 |
4 | ! comment=1
5 | ! Comment
6 |
7 | ! default=0
8 | ! w
9 |
10 | ! number=2
11 | .37
12 |
13 | ! string1=3
14 | 'string'
15 |
16 | ! string2=4
17 | "string"
18 |
19 | ! stringeol=5
20 | " unclosed
21 |
22 | ! operator=6
23 | +
24 |
25 | ! identifier=7
26 | variable
27 |
28 | ! word=8
29 | program
30 |
31 | ! word2=9
32 | system_clock
33 |
34 | ! word3=10
35 | doublecomplex
36 |
37 | ! preprocessor=11
38 | !DEC$ ATTRIBUTES DLLEXPORT::sr1
39 |
40 | ! operator2=12
41 | .lt.
42 |
43 | ! label=13
44 | 999
45 |
46 | ! continuation=14
47 | &
48 |
--------------------------------------------------------------------------------
/test/examples/markdown/Bug2235.md.styled:
--------------------------------------------------------------------------------
1 | {0}Po spuštění modulu je zobrazen hlavní dialog modulu:{1}
2 |
3 | {18}{0}V tomto dialogu lze nastavit různé{1}
4 | {0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1}
5 | {0}případů ponechat přednastavené hodnoty.{1}
6 |
7 | {0}Základní parametry ne nacházejí v záložce {4}*Obecné*{0}:{1}
8 |
9 | {18}![SciTE224.png][]{0}V tomto dialogu lze nastavit různé{1}
10 | {0}parametry vykreslení výsledného schématu. Doporučujeme pro většinu{1}
11 | {0}případů ponechat přednastavené hodnoty.{1}
12 |
13 | {0}Základní parametry ne nacházejí v záložce {5}_Obecné_{1}
14 |
15 | {18}[SciTE224.png]:{0} https://www.scintilla.org/SciTE224.png{1}
16 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/attributes.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # attributes=20
2 | 0 400 0 s = "thing thing".findall("thing")
3 | 0 400 0 a.very.complicated.expression.findall("test")
4 | 0 400 0 # fake out.
5 | 2 400 0 + b.very.complicated.expression.
6 | 0 404 0 | findall("test2")
7 | 2 400 0 + c.very.complicated.expression. \
8 | 0 404 0 | findall("test3")
9 | 2 400 0 + d.very.complicated.expression.\
10 | 0 404 0 | findall("test4")
11 | 0 400 0 @staticmethod.attrtest
12 | 0 400 0 @staticmethod.
13 | 0 400 0 attrtest
14 | 0 400 0 @staticmethod. \
15 | 0 400 0 attrtest
16 | 0 400 0 @staticmethod.\
17 | 0 400 0 attrtest
18 | 1 400 0
--------------------------------------------------------------------------------
/scripts/PromoteNew.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | rem Promote new result files.
3 | rem Find all the *.new files under test\examples and copy them to their expected name without ".new".
4 | rem Run after RunTest.bat if ".new" result files are correct.
5 | pushd ..\test\examples
6 | for /R %%f in (*.new) do (call :moveFile %%f)
7 | popd
8 | goto :eof
9 |
10 | :moveFile
11 | set pathWithNew=%1
12 | set directory=%~dp1
13 | set fileWithNew=%~nx1
14 | set fileNoNew=%~n1
15 | set pathNoNew=%pathWithNew:~0,-4%
16 |
17 | if exist %pathNoNew% (
18 | echo Move %fileWithNew% to %fileNoNew% in %directory%
19 | ) else (
20 | echo New %fileWithNew% to %fileNoNew% in %directory%
21 | )
22 | move %pathWithNew% %pathNoNew%
23 | goto :eof
24 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue20Numbers.php:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerJavaScript.aspx.folded:
--------------------------------------------------------------------------------
1 | 0 400 0
2 | 2 400 0 +
3 | 0 401 0 | <%@language=JScript%>
4 | 0 401 0 | <%-- comment --%>
5 | 2 401 0 +
9 | 2 401 0 +
13 | 0 401 0 | Start
14 | 0 401 0 | <%Response.Write("1")%>
15 | 0 401 0 | <%var x=3;//comment%>
16 | 0 401 0 | <%x=3;//comment ?> %>
17 | 0 401 0 | <%Response.Write(x)%>
18 | 0 401 0 | <%Response.Write(`template ${2+2}`)%>
19 | 0 401 0 | End
20 | 0 401 0 |
21 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/markdown/Bug2247.md.styled:
--------------------------------------------------------------------------------
1 | {6}#{0} Checking resolution of bug 2247{1}
2 |
3 | {21}~~~sql
4 | SELECT datetime() AS `date`;
5 | ~~~{1}
6 |
7 | {20}```sql
8 | SELECT datetime() AS `date`;
9 | ```{1}
10 |
11 | {0}List of examples:{1}
12 |
13 | {13}-{0} example {4}*one*{1}
14 |
15 | {13}-{0} example {5}_two_{1}
16 |
17 | {13}-{0} example `inline code without end{1}
18 |
19 | {12} {0} In case of {2}**AAA**{0}:{1}
20 | {12} {0} {1}
21 | {12} {0} {20}```sql
22 | SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;
23 | ```{1}
24 | {12} {0} {1}
25 | {12} {0} or, in case of {3}__BBB__{0}:{1}
26 | {12} {0} . . .{1}
27 |
28 | {13}-{0} example {4}*three*{1}
29 |
30 | {0}Last paragraph.{1}
31 |
--------------------------------------------------------------------------------
/test/examples/gui4cli/AllStyles.gui:
--------------------------------------------------------------------------------
1 | /* Comment (2), followed by Default (0) */
2 |
3 | /* File does not include Line Comment (1) as that causes \r\n failures in test runner */
4 |
5 | /* Global (3) 'G4C' */
6 | G4C MyGui
7 |
8 | /* String (8) */
9 | Window 10 10 200 300 "My window"
10 |
11 | /* Event (4) */
12 | xOnLoad
13 | /* Command (7) */
14 | GuiOpen MyGui
15 |
16 | xButton 10 10 100 20 "Double it!"
17 | /* Attribute (5) */
18 | attr frame sunk
19 | Input "Enter a number" var
20 | /* Control (6) 'if', Operator (9) '$', '>', '=' */
21 | if $var > 9999
22 | var = 9999
23 | endif
24 | var2 = $($var * 2)
25 | MsgBox "$var times 2 equals $var2" OK/INFO
26 | GuiQuit #this
27 |
--------------------------------------------------------------------------------
/test/examples/markdown/Bug1216.md.styled:
--------------------------------------------------------------------------------
1 | {6}#{0} Checking resolution of bug 1216{1}
2 |
3 | {0}*This line is not emphasized{1}
4 |
5 | {0}This is plain text with {4}*inline emphasis*{1}
6 |
7 | {0}_This, too, is not emphasized{1}
8 |
9 | {0}And this is plain text with {5}_inline emphasis_{1}
10 |
11 | {0}**This line is not in bold{1}
12 |
13 | {0}But this is plain text with some words {2}**in bold**{1}
14 |
15 | {0}__This line is also not in bold{1}
16 |
17 | {0}And this is plain text with {3}__some words in bold__{1}
18 |
19 | {0}~~This line is not crossed out{1}
20 |
21 | {0}This is plain text with {16}~~some words crossed out~~{1}
22 |
23 | {21}~~~
24 | this is a code block
25 | ~~~{1}
26 |
27 | {0}This is a new paragraph{1}
28 |
--------------------------------------------------------------------------------
/test/examples/python/x.py.styled:
--------------------------------------------------------------------------------
1 | {1}# Convert all punctuation characters except '_', '*', and '.' into spaces.{0}
2 | {5}def{0} {9}depunctuate{10}({11}s{10}):{0}
3 | {6}'''A docstring'''{0}
4 | {7}"""Docstring 2"""{0}
5 | {11}d{0} {10}={0} {3}""{0}
6 | {5}for{0} {11}ch{0} {5}in{0} {11}s{10}:{0}
7 | {5}if{0} {11}ch{0} {5}in{0} {4}'abcde'{10}:{0}
8 | {11}d{0} {10}={0} {11}d{0} {10}+{0} {11}ch{0}
9 | {5}else{10}:{0}
10 | {11}d{0} {10}={0} {11}d{0} {10}+{0} {3}" "{0}
11 | {5}return{0} {11}d{0}
12 |
13 | {5}import{0} {11}contextlib{0}
14 |
15 | {15}@contextlib{10}.{11}contextmanager{0}
16 | {5}def{0} {9}singleuse{10}():{0}
17 | {5}print{10}({3}"Before"{10}){0}
18 | {5}yield{0}
19 | {5}with{0} {11}singleuse{10}():{0} {5}pass{0}
20 |
--------------------------------------------------------------------------------
/test/examples/bash/202LineStartOption.bsh:
--------------------------------------------------------------------------------
1 | -a
2 | #
3 | -b
4 | #
5 |
6 | declare -A optionSet=([--help]=0)
7 | for option in {-h,--help,--version,--verbose,-,--}; do
8 | case $option in
9 | -h|--help)
10 | optionSet[--help]=1
11 | echo help: $option
12 | ;;
13 | -*-version)
14 | echo version: $option
15 | ;;
16 | --)
17 | echo stop
18 | ;;
19 | -)
20 | echo stdin
21 | ;;
22 | -*[-a-zA-Z0-9])
23 | echo other: $option
24 | ;;
25 | esac
26 | done
27 |
28 | option=--help
29 | [[ $option == *-h* ]] && echo $option=${optionSet[$option]}
30 |
31 | for gcc in gcc{,-1{4..0..-1}}; do
32 | echo $gcc
33 | done
34 |
35 | for gcc in gcc{,{-14..-10}}; do
36 | echo $gcc
37 | done
38 |
39 | # Tilde-refix ~
40 | ~+/foo
41 | ~-/foo
42 |
--------------------------------------------------------------------------------
/test/examples/errorlist/BoldOrBright.err.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 Escape Sequence 32m
2 | 0 400 0 [32mColour 32 (Green)[0m
3 | 0 400 0
4 | 0 400 0 Escape Sequence 1;32m
5 | 0 400 0 [1;32mColour 32 (Green) + Bold[0m
6 | 0 400 0
7 | 0 400 0 Escape Sequence 92m
8 | 0 400 0 [92mColour 92 (Bright Green)[0m
9 | 0 400 0
10 | 0 400 0 Escape Sequence 36m
11 | 0 400 0 [36mColour 36 (Cyan)[0m
12 | 0 400 0
13 | 0 400 0 Escape Sequence 1;36m
14 | 0 400 0 [1;36mColour 36 (Cyan) + Bold[0m
15 | 0 400 0
16 | 0 400 0 Escape Sequence 92m
17 | 0 400 0 [96mColour 96 (Bright Cyan)[0m
18 | 0 400 0
19 | 0 400 0 Escape Sequence 1m
20 | 0 400 0 [1mBold[0m
21 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue338.html:
--------------------------------------------------------------------------------
1 |
21 |
51 |
--------------------------------------------------------------------------------
/test/examples/bash/197ArithmeticOperator.bsh.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 hello="hello, "
2 | 0 400 0 hello+=word
3 | 0 400 0 echo $hello
4 | 1 400 0
5 | 2 400 0 + for ((i = 2; i > 0; i--)); do
6 | 0 401 0 | echo postfix dec $i
7 | 0 401 0 | done
8 | 2 400 0 + for ((i = 2; i > 0; --i)); do
9 | 0 401 0 | echo prefix dec $i
10 | 0 401 0 | done
11 | 2 400 0 + for ((i = 0; i < 2; i++)); do
12 | 0 401 0 | echo postfix inc $i
13 | 0 401 0 | done
14 | 2 400 0 + for ((i = 0; i < 2; ++i)); do
15 | 0 401 0 | echo prefix inc $i
16 | 0 401 0 | done
17 | 1 400 0
18 | 0 400 0 # issue 215
19 | 2 400 0 + for ((i = 0; i < 2; i++)); do
20 | 0 401 0 | echo $((((1)) << i))
21 | 0 401 0 | done
22 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue252Tag.php.folded:
--------------------------------------------------------------------------------
1 | 0 400 0
2 | 1 400 0
3 | 0 400 0
4 | 2 400 0 +
7 | 1 400 0
8 | 0 400 0
9 | 0 400 0 = 'echo' ?>
10 | 1 400 0
11 | 0 400 0
12 | 0 400 0
13 | 0 400 0 echo 'short'
14 | 2 400 0 + ?>
15 | 1 401 0 |
16 | 0 401 0 |
17 | 2 401 0 + <%@language=JScript%>
18 | 1 402 0 |
19 | 0 402 0 |
20 | 0 402 0 | <%
21 | 0 402 0 | Response.Write('short')
22 | 2 402 0 + %>
23 | 0 403 0 |
--------------------------------------------------------------------------------
/test/examples/hypertext/x.php:
--------------------------------------------------------------------------------
1 |
2 | \n";
6 | /* ?> */
7 | ?>
8 | forif
9 | = 'short echo tag' ?>
10 | echo 'short tag' ?>
11 |
21 |
--------------------------------------------------------------------------------
/test/examples/gdscript/NodePath.gd.styled:
--------------------------------------------------------------------------------
1 | {1}# nodepath{0}
2 |
3 | {16}$Node{0}
4 |
5 | {16}%Node{0}
6 |
7 | {16}%node/"n o d e"/%'n o d e'{0}
8 |
9 | {16}%"No de"{0}
10 |
11 |
12 | {16}$/root/ThisNode/%Node{0} {10}%{0} {16}%test{0}
13 |
14 | {16}$MainMenuPanel/%Options{0} {10}%{0} {16}%test{0}
15 |
16 | {16}%Options{0} {10}%{0} {16}%test{0}
17 |
18 | {16}$Node{0} {10}%{0} {16}%test{0}
19 |
20 |
21 | {11}get_node{10}({3}"%Options"{10}){0} {10}%{0} {16}%test{0}
22 |
23 | {16}$"Nod se"{0} {10}%{0} {16}%test{0}
24 |
25 | {16}$/test/"No % de"/test{0} {10}%{0} {16}%test{0}
26 |
27 | {16}%node/"n o d e"/'n o d e'{0} {10}%{0} {16}%"No De"{0}
28 |
29 | {3}"%010d"{0} {10}%{0} {2}12345{0}
30 |
31 | {2}1{0} {10}%{0} {2}1{0}
32 |
33 | {11}a{0} {10}%{0} {11}b{0}
34 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerJavaScript.aspx.styled:
--------------------------------------------------------------------------------
1 | {21}{0}
2 | {1}{0}
3 | {15}<%@{16}language=JScript{15}%>{0}
4 | {15}<%--{20} comment --{15}%>{0}
5 | {1}{0}
9 | {1}{0}
13 | Start
14 | {15}<%{61}Response.Write{65}({63}"1"{65}){15}%>{0}
15 | {15}<%{62}var{56} {61}x{65}={60}3{65};{58}//comment{15}%>{0}
16 | {15}<%{61}x{65}={60}3{65};{58}//comment ?> {15}%>{0}
17 | {15}<%{61}Response.Write{65}({61}x{65}){15}%>{0}
18 | {15}<%{61}Response.Write{65}({68}`template ${2+2}`{65}){15}%>{0}
19 | End
20 | {1}{0}
21 |
--------------------------------------------------------------------------------
/test/examples/julia/x.jl.folded:
--------------------------------------------------------------------------------
1 | 0 400 400
2 | 0 400 400 # Comment here
3 | 0 400 400 const bar = '\n'
4 | 0 400 400
5 | 2 400 401 + """
6 | 0 401 401 | test_fun(a::Int)
7 | 0 401 401 | For test only
8 | 0 401 400 | """
9 | 2 400 401 + function test_fun(a::Int, b::T) where T <: Number
10 | 0 401 401 | println(a)
11 | 0 401 401 | println("foo $(bar)")
12 | 0 401 400 | end
13 | 0 400 400
14 | 0 400 400 @enum Unicode α=1 β=2
15 | 0 400 400
16 | 0 400 400 res = [√i for i in 1:10]
17 | 0 400 400 ∀=1; ∃=2; ∄=3;
18 | 0 400 400
19 | 0 400 400 t!'#'
20 | 0 400 400 t!='#'
21 | 0 400 400 t[]!='#'
22 | 0 400 400
23 | 0 400 400 #= Dummy function =#
24 | 0 400 400 test_fun²(:sym, true, raw"test", `echo 1`)
25 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.matlab.styled:
--------------------------------------------------------------------------------
1 | {7}a{6}={8}""""{6};{0}
2 | {7}b{6}={3}1{6};{0}
3 | {7}c{6}={5}'\'{6};{0}
4 | {7}d{6}={3}2{6};{0}
5 | {7}e{6}={8}"\"{6};{0}
6 | {7}f{6}={3}3{6};{0}
7 | {1}%" this should be a comment (colored as such), instead it closes the string{0}
8 | {7}g{6}={8}"{0}
9 | {7}h{6}={3}123{6};{0}
10 | {1}%" this is a syntax error in Matlab (about 'g'),{0}
11 | {1}% followed by a valid assignment (of 'h'){0}
12 | {1}% Instead, 'h' is colored as part of the string{0}
13 |
14 | {1}% Octave terminates string at 3rd ", Matlab at 4th{0}
15 | {7}i{6}={8}"\"{0} {8}"; % "{0} {1}%{0}
16 |
17 | {1}% Matlab (unlike Octave) does not allow string continuation with an escape{0}
18 | {7}b{0} {6}={0} {8}"multi\{0}
19 | {7}line{8}"{0}
20 |
21 | {1}% end{0}
22 |
--------------------------------------------------------------------------------
/test/examples/vb/AllStyles.vb:
--------------------------------------------------------------------------------
1 | ' coding: utf-8
2 | ' Enumerate all styles: 0 .. 12
3 |
4 | ' comment=1
5 |
6 | ' whitespace=0
7 | ' w
8 |
9 | ' number=2
10 | 37
11 | 54.3345612e7
12 | &B01111100
13 | &O1163
14 | &H_E635_9A60
15 |
16 | ' keyword=3
17 | string
18 |
19 | ' double-quoted-string=4
20 | "str"
21 | "a"c
22 |
23 | ' preprocessor=5
24 | #Const preproc = True
25 |
26 | ' operator=6
27 | - 1
28 |
29 | ' identifier=7
30 | identifier = 7
31 | ' non-ASCII
32 | π_is_pi_ω = 3.14
33 | ' vb may add a type character like $ to identifiers; vbscript doesn't have this
34 | identifier$ = "s"
35 |
36 | ' date=8
37 | d=#05/11/2003#
38 |
39 | ' unclosed-string=9
40 | " unclosed
41 |
42 | ' keyword2=10
43 | key2
44 |
45 | ' keyword3=11
46 | key3
47 |
48 | ' keyword4=12
49 | key4
50 |
--------------------------------------------------------------------------------
/test/examples/vb/AllStyles.vbs:
--------------------------------------------------------------------------------
1 | ' coding: utf-8
2 | ' Enumerate all styles: 0 .. 12
3 |
4 | ' comment=1
5 |
6 | ' whitespace=0
7 | ' w
8 |
9 | ' number=2
10 | 37
11 | 54.3345612e7
12 | &B01111100
13 | &O1163
14 | &H_E635_9A60
15 |
16 | ' keyword=3
17 | string
18 |
19 | ' double-quoted-string=4
20 | "str"
21 | "a"c
22 |
23 | ' preprocessor=5
24 | #Const preproc = True
25 |
26 | ' operator=6
27 | - 1
28 |
29 | ' identifier=7
30 | identifier = 7
31 | ' non-ASCII
32 | π_is_pi_ω = 3.14
33 | ' vb may add a type character like $ to identifiers; vbscript doesn't have this
34 | identifier$ = "s"
35 |
36 | ' date=8
37 | d=#05/11/2003#
38 |
39 | ' unclosed-string=9
40 | " unclosed
41 |
42 | ' keyword2=10
43 | key2
44 |
45 | ' keyword3=11
46 | key3
47 |
48 | ' keyword4=12
49 | key4
50 |
--------------------------------------------------------------------------------
/test/examples/json/AllStyles.json.styled:
--------------------------------------------------------------------------------
1 | {6}// Enumerate all styles: 0 to 13{0}
2 |
3 | {6}// default=0{0}
4 |
5 |
6 | {6}// number=1{0}
7 | {1}1{0}
8 |
9 | {6}// string=2{0}
10 | {2}"2"{0}
11 |
12 | {6}// stringeol=3{0}
13 | {3}"3
14 | {0}
15 | {6}// propertyname=4{0}
16 | {4}"4"{8}:{0}
17 |
18 | {6}// escapesequence=5{0}
19 | {2}"{5}\n{2}"{0}
20 |
21 | {6}// linecomment=6{0}
22 | {6}// 6 Line Comment{0}
23 |
24 | {6}// blockcomment=7{0}
25 | {7}/* 7 Block Comment */{0}
26 |
27 | {6}// operator=8{0}
28 | {8}{}{0}
29 |
30 | {6}// uri=9{0}
31 | {2}"{9}http://9.org{2}"{0}
32 |
33 | {6}// compactiri=10{0}
34 | {10}"x:y"{0}
35 |
36 | {6}// keyword=11{0}
37 | {11}true{0}
38 |
39 | {6}// ldkeyword=12{0}
40 | {2}"{12}@id{2}"{0}
41 |
42 | {6}// error=13{0}
43 | {13}# 13 error{0}
44 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue259CaseLower.html.folded:
--------------------------------------------------------------------------------
1 | 0 400 0
2 | 0 400 0
3 | 0 400 0 <%@language=vbscript%>
4 | 2 400 0 + <%
5 | 0 401 0 | sub x 'comment
6 | 0 401 0 | peek 1024
7 | 0 401 0 | %>
8 | 2 400 0 +
9 | 2 401 0 +
10 | 0 402 0 | SinkWorld - Portability
11 | 0 402 0 |
12 | 0 402 0 |
13 | 0 402 0 |
14 | 0 402 0 |
15 | 0 401 0 |
16 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/latex/AllStyles.tex:
--------------------------------------------------------------------------------
1 | % Enumerate all styles: 0 to 12
2 | % Not a valid laTeX file as entities are unbalanced and not semantically correct
3 | % comment=4
4 |
5 | % whitespace=0
6 | text %
7 |
8 | % command=1
9 | \documentclass
10 |
11 | % tag=2
12 | \begin{document}
13 |
14 | % tag closing=5
15 | \end{document}
16 |
17 | % math=3
18 | \begin{math}
19 | E &= mc^2
20 | \end{math}
21 |
22 | % math block=6
23 | \begin{align}
24 | E &= mc^2
25 | \end{align}
26 |
27 | % comment block=7
28 | \begin{comment}
29 | A block comment
30 | \end{comment}
31 |
32 | % verbatim=8
33 | \begin{verbatim}
34 | puts $foo
35 | \end{verbatim}
36 |
37 | % short command=9
38 | \(\)
39 |
40 | % special=10
41 | \#
42 |
43 | % command optional argument=11
44 | \x[12pt]
45 |
46 | % error=12
47 | \
48 |
--------------------------------------------------------------------------------
/test/examples/cobol/AllStyles.cob:
--------------------------------------------------------------------------------
1 | * Enumerate all styles: 0, 2 to 11, 16
2 | * SCE_C_COMMENTLINE=2
3 |
4 | * SCE_C_DEFAULT=0
5 |
6 |
7 | * SCE_C_IDENTIFIER=11
8 | identifier
9 |
10 | * SCE_C_NUMBER=4
11 | 4
12 |
13 | * SCE_C_WORD=5
14 | data
15 |
16 | * SCE_C_WORD2=16
17 | cancel
18 |
19 | * SCE_C_UUID=8
20 | remarks
21 |
22 | * SCE_C_COMMENTDOC=3 not implemented
23 | ** at line start
24 |
25 | * SCE_C_STRING=6
26 | "string"
27 |
28 | * SCE_C_CHARACTER=7
29 | 'c'
30 |
31 | * SCE_C_PREPROCESSOR=9
32 | ?preprocessor
33 |
34 | * SCE_C_OPERATOR=10
35 | +
36 |
--------------------------------------------------------------------------------
/test/examples/mssql/AllStyles.tsql:
--------------------------------------------------------------------------------
1 | -- Enumerate all styles: 0 to 16
2 |
3 | /* block comment = 1*/
4 |
5 | -- whitespace = 0
6 | -- spaces
7 |
8 | -- line comment = 2
9 |
10 | -- number = 3
11 | 376
12 |
13 | -- string = 4
14 | 'a string'
15 |
16 | -- operator = 5
17 | ()
18 | INTERSECT
19 |
20 | -- identifier = 6
21 | ProductID;
22 |
23 | -- variable = 7
24 | @Variable;
25 |
26 | -- column name = 8
27 | "COLUMN";
28 |
29 | -- statement = 9
30 | PRINT
31 |
32 | -- datatype = 10
33 | int
34 |
35 | -- systable = 11
36 | sysobjects
37 |
38 | -- global variable = 12
39 | @@ERROR
40 |
41 | -- function = 13
42 | object_id
43 |
44 | -- stored procedure = 14
45 | sp_fulltext_database
46 |
47 | -- default (preferencing data type) = 15
48 | x --
49 |
50 | -- column name 2 = 16
51 | [COLUMN];
52 |
53 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/attributes.py.styled:
--------------------------------------------------------------------------------
1 | {1}# attributes=20{0}
2 | {11}s{0} {10}={0} {3}"thing thing"{10}.{20}findall{10}({3}"thing"{10}){0}
3 | {11}a{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{20}findall{10}({3}"test"{10}){0}
4 | {1}# fake out.{0}
5 | {11}b{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0}
6 | {20}findall{10}({3}"test2"{10}){0}
7 | {11}c{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0} \
8 | {20}findall{10}({3}"test3"{10}){0}
9 | {11}d{10}.{20}very{10}.{20}complicated{10}.{20}expression{10}.{0}\
10 | {20}findall{10}({3}"test4"{10}){0}
11 | {15}@staticmethod{10}.{15}attrtest{0}
12 | {15}@staticmethod{10}.{0}
13 | {15}attrtest{0}
14 | {15}@staticmethod{10}.{0} \
15 | {15}attrtest{0}
16 | {15}@staticmethod{10}.{0}\
17 | {15}attrtest{0}
18 |
--------------------------------------------------------------------------------
/test/examples/makefile/x.mak.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # '# comment' comment=1
2 | 0 400 0 # comment
3 | 0 400 0
4 | 0 400 0 # '.SUFFIXES' target=5, ':' operator=4
5 | 0 400 0 .SUFFIXES:
6 | 0 400 0
7 | 0 400 0 # 'LD' identifier=3, '=' operator=4, 'link' default=0
8 | 0 400 0 LD=link
9 | 0 400 0
10 | 0 400 0 # '!IFDEF DEBUG' NMAKE preprocessor=2
11 | 0 400 0 !IFDEF DEBUG
12 | 0 400 0
13 | 0 400 0 # 'ifdef DEBUG' GNI make directive default=0
14 | 0 400 0 ifdef DEBUG
15 | 0 400 0
16 | 0 400 0 # '$(' ID EOL=9
17 | 0 400 0 X=$(
18 | 0 400 0
19 | 0 400 0 # Recipe with variable reference $(CXX)
20 | 0 400 0 cake.o: cake.cxx
21 | 0 400 0 $(CXX) -c $< -o $@
22 | 0 400 0
23 | 0 400 0 # End of file
24 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/mmixal/references.mms.styled:
--------------------------------------------------------------------------------
1 | {1}# Bug #2019 Buffer over-read in MMIXAL lexer
2 | {2}label{4}
3 | {0} {5}PREFIX{7} {10}Foo:{1}
4 | % Relative reference (uses PREFIX)
5 | {0} {5}JMP{7} {10}label{1}
6 | %
7 | {0} {5}JMP{7} {10}@label{1}
8 | % Absolute reference (does not use PREFIX)
9 | {0} {5}JMP{7} {10}:label{1}
10 | % In register list so treated as register
11 | {0} {5}JMP{7} {13}:rA{1}
12 | % Too long for buffer so truncated
13 | {0} {5}JMP{7} {10}l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1}
14 | % Too long for buffer so truncated then treated as absolute
15 | {0} {5}JMP{7} {10}:l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890{1}
16 | %
17 |
--------------------------------------------------------------------------------
/test/examples/batch/Issue222.bat.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 rem Keywords with colon
2 | 0 400 0
3 | 0 400 0 rem with spacing
4 | 0 400 0 call file.bat arg1
5 | 0 400 0 call "file.bat" arg1
6 | 0 400 0 call :label arg1
7 | 0 400 0 goto :label
8 | 0 400 0 goto :eof
9 | 0 400 0 goto label
10 | 0 400 0 echo: %var%
11 | 0 400 0 echo: text
12 | 0 400 0 echo text
13 | 0 400 0
14 | 0 400 0 rem no spacing
15 | 0 400 0 call:label arg1
16 | 0 400 0 goto:label
17 | 0 400 0 goto:eof
18 | 0 400 0 echo:%var%
19 | 0 400 0 echo:text
20 | 0 400 0 (call)
21 | 0 400 0 (echo:)
22 | 0 400 0 (goto)
23 | 0 400 0
24 | 0 400 0 rem call internal commands
25 | 0 400 0 call echo text
26 | 0 400 0 call set "a=b"
27 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/matlab/AllStyles.m.matlab:
--------------------------------------------------------------------------------
1 | % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug
2 |
3 | % White space=0
4 | %
5 |
6 | % Comment=1
7 | % Line comment
8 |
9 | % Next line is comment in Ocatve but not Matlab
10 | # Octave comment
11 |
12 | %{
13 | Block comment.
14 | %}
15 |
16 | % Command=2
17 |
18 | %{
19 | Omitted as this places a style transiton between \r and \n
20 | !rmdir oldtests
21 | %}
22 |
23 | % Number=3
24 | 33.3
25 |
26 | % Keyword=4
27 | global x
28 |
29 | % Single Quoted String=5
30 | 'string'
31 |
32 | % Operator=6
33 | [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);
34 |
35 | % Identifier=7
36 | identifier = 2
37 |
38 | % Double Quoted String=8
39 | "string"
40 |
41 | % This loop should fold
42 | for i = 1:5
43 | x(i) = 3 * i;
44 | end
45 |
--------------------------------------------------------------------------------
/test/examples/matlab/AllStyles.m.octave:
--------------------------------------------------------------------------------
1 | % Examples of each style 0..8 except for SCE_MATLAB_COMMAND(2) which has a line ending bug
2 |
3 | % White space=0
4 | %
5 |
6 | % Comment=1
7 | % Line comment
8 |
9 | % Next line is comment in Ocatve but not Matlab
10 | # Octave comment
11 |
12 | %{
13 | Block comment.
14 | %}
15 |
16 | % Command=2
17 |
18 | %{
19 | Omitted as this places a style transiton between \r and \n
20 | !rmdir oldtests
21 | %}
22 |
23 | % Number=3
24 | 33.3
25 |
26 | % Keyword=4
27 | global x
28 |
29 | % Single Quoted String=5
30 | 'string'
31 |
32 | % Operator=6
33 | [X,Y] = meshgrid(-10:0.25:10,-10:0.25:10);
34 |
35 | % Identifier=7
36 | identifier = 2
37 |
38 | % Double Quoted String=8
39 | "string"
40 |
41 | % This loop should fold
42 | for i = 1:5
43 | x(i) = 3 * i;
44 | end
45 |
--------------------------------------------------------------------------------
/test/examples/bash/203TestOption.bsh.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 [[ $1 == -e* ]] && echo e
2 | 1 400 0
3 | 2 400 0 + if [[ -d /usr/bin &&
4 | 0 401 0 | -e /usr/bin/bash ]]; then
5 | 0 401 0 | echo find bash
6 | 0 401 0 | fi
7 | 1 400 0
8 | 2 400 0 + if [[ -d /usr/bin && -e /usr/bin/bash ]]; then
9 | 0 401 0 | echo find bash
10 | 0 401 0 | fi
11 | 1 400 0
12 | 2 400 0 + if [ -d /usr/bin && -e /usr/bin/bash ]; then
13 | 0 401 0 | echo find bash
14 | 0 401 0 | fi
15 | 1 400 0
16 | 2 400 0 + if [ -d /usr/bin &&
17 | 0 401 0 | -e /usr/bin/bash ]; then
18 | 0 401 0 | echo find bash
19 | 0 401 0 | fi
20 | 1 400 0
21 | 2 400 0 + if [ -d /usr/bin && \
22 | 0 401 0 | -e /usr/bin/bash ]; then
23 | 0 401 0 | echo find bash
24 | 0 401 0 | fi
25 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/zig/SciTE.properties:
--------------------------------------------------------------------------------
1 | lexer.*.zig=zig
2 | fold=1
3 | keywords.*.zig=False None True _ and as assert async await break case class continue def del elif else except finally for from global if import in is lambda match nonlocal not or pass raise return try while with yield addrspace align allowzero and anyframe anytype asm async await break callconv catch comptime const continue defer else enum errdefer error export extern false fn for if inline linksection noalias noinline nosuspend null opaque or orelse packed pub resume return struct suspend switch test threadlocal true try undefined union unreachable usingnamespace var volatile while
4 | keywords2.*.zig=anyerror anyopaque bool f128 f16 f32 f64 f80 i128 i16 i32 i64 i8 isize noreturn type u128 u16 u32 u64 u8 usize void
5 | keywords3.*.zig=Timestamp
6 | keywords4.*.zig=Vec3
7 |
--------------------------------------------------------------------------------
/test/examples/julia/x.jl.styled:
--------------------------------------------------------------------------------
1 | {0}
2 | {1}# Comment here{0}
3 | {3}const{0} {9}bar{0} {7}={0} {6}'\n'{0}
4 |
5 | {14}"""
6 | test_fun(a::Int)
7 | For test only
8 | """{0}
9 | {3}function{0} {9}test_fun{8}({9}a{21}::{4}Int{7},{0} {9}b{21}::{9}T{8}){0} {3}where{0} {9}T{0} {21}<:{0} {4}Number{0}
10 | {9}println{8}({9}a{8}){0}
11 | {9}println{8}({10}"foo {13}$(bar){10}"{8}){0}
12 | {3}end{0}
13 |
14 | {12}@enum{0} {9}Unicode{0} {9}α{7}={2}1{0} {9}β{7}={2}2{0}
15 |
16 | {9}res{0} {7}={0} {8}[{7}√{9}i{0} {3}for{0} {9}i{0} {3}in{0} {2}1{7}:{2}10{8}]{0}
17 | {9}∀{7}={2}1{7};{0} {9}∃{7}={2}2{7};{0} {9}∄{7}={2}3{7};{0}
18 |
19 | {9}t!{7}'{1}#'{0}
20 | {9}t!{7}={6}'#'{0}
21 | {9}t{8}[]{7}!={6}'#'{0}
22 |
23 | {1}#= Dummy function =#{0}
24 | {9}test_fun²{8}({11}:sym{7},{0} {5}true{7},{0} {15}raw{10}"test"{7},{0} {16}`echo 1`{8}){0}
25 |
--------------------------------------------------------------------------------
/test/examples/markdown/Bug2235.md.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 Po spuštění modulu je zobrazen hlavní dialog modulu:
2 | 0 400 0
3 | 0 400 0 V tomto dialogu lze nastavit různé
4 | 0 400 0 parametry vykreslení výsledného schématu. Doporučujeme pro většinu
5 | 0 400 0 případů ponechat přednastavené hodnoty.
6 | 0 400 0
7 | 0 400 0 Základní parametry ne nacházejí v záložce *Obecné*:
8 | 0 400 0
9 | 0 400 0 ![SciTE224.png][]V tomto dialogu lze nastavit různé
10 | 0 400 0 parametry vykreslení výsledného schématu. Doporučujeme pro většinu
11 | 0 400 0 případů ponechat přednastavené hodnoty.
12 | 0 400 0
13 | 0 400 0 Základní parametry ne nacházejí v záložce _Obecné_
14 | 0 400 0
15 | 0 400 0 [SciTE224.png]: https://www.scintilla.org/SciTE224.png
16 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/python/attributes/attrib-id.py.styled:
--------------------------------------------------------------------------------
1 | {11}varname{0} {10}={0} {2}1{0}
2 | {1}# identifier in first line was mis-styled as attribute when bug existed{0}
3 |
4 | {1}# left comment ends with period. this was okay before bug.{0}
5 | {11}varname{0} {10}={0} {2}2{0}
6 |
7 | {11}x{0} {10}={0} {2}1{0} {1}# comment after code ends with period. this failed when bug existed.{0}
8 | {11}varname{0} {10}={0} {2}3{0}
9 |
10 | {5}def{0} {9}dummy{10}():{0}
11 | {1}# indented comment ends with period.this failed when bug existed.{0}
12 | {11}varname{0} {10}={0} {2}4{0}
13 |
14 | {11}x{0} {10}={0} {2}2{0} {12}## comment block is the same.{0}
15 | {11}varname{0} {10}={0} {2}5{0}
16 |
17 | {1}# per issue#294, identifiers were mis-styled as attributes when at beginning of file{0}
18 | {1}# and when after a non-left-justifed comment{0}
19 |
--------------------------------------------------------------------------------
/test/examples/lua/folding.lua:
--------------------------------------------------------------------------------
1 | --[[ coding:UTF-8
2 | folding structure examples ]]
3 |
4 | -- Use all the folding keywords:
5 | -- do end function if repeat until while
6 | function first()
7 | -- Comment
8 | if op == "+" then
9 | r = a + b
10 | elseif op == "-" then
11 | r = a - b
12 | elseif op == "*" then
13 | r = a*b
14 | elseif op == "/" then
15 | r = a/b
16 | else
17 | error("invalid operation")
18 | end
19 |
20 | for i=1,10 do
21 | print(i)
22 | end
23 |
24 | while a[i] do
25 | print(a[i])
26 | i = i + 1
27 | end
28 |
29 | -- print the first non-empty line
30 | repeat
31 | line = io.read()
32 | until line ~= ""
33 | print(line)
34 |
35 | end
36 |
37 | -- { ... } folds
38 | markers = {
39 | 256,
40 | 128,
41 | }
42 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerBasic.aspx.styled:
--------------------------------------------------------------------------------
1 | {15}<%@{16} register tagprefix="uc1"
2 | tagname="CalendarUserControl"
3 | src="~/CalendarUserControl.ascx" {15}%>{0}
4 | {21}{0}
5 | {1}{0}
6 | {15}<%@{16}language=VBScript{15}%>{0}
7 | {15}<%--{20} comment --{15}%>{0}
8 | {1}{0}
14 | {1}{0}
18 | Start
19 | {15}<%{86}response.write{81}({85}"1"{81}){15}%>{0}
20 | {15}<%{81} {82}'comment{15}%>{0}
21 | {15}<%{84}dim{81} {86}x{81}={85}"2"{82}'comment{15}%>{0}
22 | {15}<%{86}response.write{81}({86}x{81}){15}%>{0}
23 | End
24 | {1}{0}
25 |
--------------------------------------------------------------------------------
/test/examples/matlab/Issue18_EscapeSequence.m.matlab.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 a="""";
2 | 0 400 400 b=1;
3 | 0 400 400 c='\';
4 | 0 400 400 d=2;
5 | 0 400 400 e="\";
6 | 0 400 400 f=3;
7 | 0 400 400 %" this should be a comment (colored as such), instead it closes the string
8 | 0 400 400 g="
9 | 0 400 400 h=123;
10 | 0 400 400 %" this is a syntax error in Matlab (about 'g'),
11 | 0 400 400 % followed by a valid assignment (of 'h')
12 | 0 400 400 % Instead, 'h' is colored as part of the string
13 | 1 400 400
14 | 0 400 400 % Octave terminates string at 3rd ", Matlab at 4th
15 | 0 400 400 i="\" "; % " %
16 | 1 400 400
17 | 0 400 400 % Matlab (unlike Octave) does not allow string continuation with an escape
18 | 0 400 400 b = "multi\
19 | 0 400 400 line"
20 | 1 400 400
21 | 0 400 400 % end
22 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/powershell/NumericLiterals.ps1.styled:
--------------------------------------------------------------------------------
1 | {1}# Treat any leading [-+] as default to reduce match complexity{0}
2 | {1}# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_numeric_literals?view=powershell-7.3#examples{0}
3 | {4}100{0}
4 | {4}100u{0}
5 | {4}100D{0}
6 | {4}100l{0}
7 | {4}100uL{0}
8 | {4}100us{0}
9 | {4}100uy{0}
10 | {4}100y{0}
11 | {4}1e2{0}
12 | {4}1.e2{0}
13 | {4}0x1e2{0}
14 | {4}0x1e2L{0}
15 | {4}0x1e2D{0}
16 | {4}482D{0}
17 | {4}482gb{0}
18 | {4}482ngb{0}
19 | {4}0x1e2lgb{0}
20 | {4}0b1011011{0}
21 | {4}0xFFFFs{0}
22 | {4}0xFFFFFFFF{0}
23 | {6}-{4}0xFFFFFFFF{0}
24 | {4}0xFFFFFFFFu{0}
25 |
26 | {1}# Float{0}
27 | {4}0.5{0}
28 | {4}.5{0}
29 |
30 | {1}# Range{0}
31 | {4}1{6}..{4}100{0}
32 |
33 | {1}# Issue118: 7d is numeric while 7z is user defined keyword{0}
34 | {4}7d{0}
35 | {12}7z{0}
36 |
--------------------------------------------------------------------------------
/test/examples/hypertext/ServerBasic.aspx.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + <%@ register tagprefix="uc1"
2 | 0 401 0 | tagname="CalendarUserControl"
3 | 0 401 0 | src="~/CalendarUserControl.ascx" %>
4 | 0 400 0
5 | 2 400 0 +
6 | 0 401 0 | <%@language=VBScript%>
7 | 0 401 0 | <%-- comment --%>
8 | 2 401 0 +
14 | 2 401 0 +
18 | 0 401 0 | Start
19 | 0 401 0 | <%response.write("1")%>
20 | 0 401 0 | <% 'comment%>
21 | 0 401 0 | <%dim x="2"'comment%>
22 | 0 401 0 | <%response.write(x)%>
23 | 0 401 0 | End
24 | 0 401 0 |
25 | 0 400 0
--------------------------------------------------------------------------------
/test/unit/unitTest.cxx:
--------------------------------------------------------------------------------
1 | /** @file unitTest.cxx
2 | ** Unit Tests for Lexilla internal data structures
3 | **/
4 |
5 | /*
6 | Currently tested:
7 | WordList
8 | SparseState
9 | */
10 |
11 | #include
12 | #include
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | #if defined(__GNUC__)
19 | // Want to avoid misleading indentation warnings in catch.hpp but the pragma
20 | // may not be available so protect by turning off pragma warnings
21 | #pragma GCC diagnostic ignored "-Wunknown-pragmas"
22 | #pragma GCC diagnostic ignored "-Wpragmas"
23 | #if !defined(__clang__)
24 | #pragma GCC diagnostic ignored "-Wmisleading-indentation"
25 | #endif
26 | #endif
27 |
28 | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
29 | #include "catch.hpp"
30 |
--------------------------------------------------------------------------------
/test/examples/gdscript/AllStyles.gd:
--------------------------------------------------------------------------------
1 | # Enumerate all styles: 0 to 15
2 | # comment=1
3 |
4 | # whitespace=0
5 | # w
6 |
7 | # number=2
8 | 37
9 |
10 | # double-quoted-string=3
11 | "str"
12 |
13 | # single-quoted-string=4
14 | 'str'
15 |
16 | # keyword=5
17 | pass
18 |
19 | # triple-quoted-string=6
20 | '''str'''
21 |
22 | # triple-double-quoted-string=7
23 | """str"""
24 |
25 | # class-name=8
26 | class ClassName:
27 | pass
28 |
29 | # function-name=9
30 | func function_name():
31 | pass
32 |
33 | # operator=10
34 | 1 + 3
35 |
36 | # identifier=11
37 | var identifier = 2
38 |
39 | # comment-block=12
40 | ## block
41 |
42 | # unclosed-string=13
43 | " unclosed
44 |
45 | # highlighted-identifier=14
46 | var hilight = 2
47 |
48 | # annotation=15
49 | @onready
50 | var a = 3
51 | @onready var b = 3
52 |
53 | # node-identifier=16
54 | %node
55 | $node
56 |
--------------------------------------------------------------------------------
/test/examples/markdown/AllStyles.md.styled:
--------------------------------------------------------------------------------
1 | {0}Text=0{1}
2 | {0}Line end characters=1{1}
3 | {2}**Strong Emphasis (bold) 1=2**{1}
4 | {3}__Strong Emphasis (bold) 2=3__{1}
5 | {4}*Emphasis (italic) 1=4*{1}
6 | {5}_Emphasis (italic) 2=5_{1}
7 | {6}#{0} Heading level 1=6{1}
8 | {7}##{0} Heading level 2=7{1}
9 | {8}###{0} Heading level 3=8{1}
10 | {9}####{0} Heading level 4=9{1}
11 | {10}#####{0} Heading level 5=10{1}
12 | {11}######{0} Heading level 6=11{1}
13 | {12} {0}PreChar=12{1}
14 | {13}*{0} Unordered list item=13{1}
15 | {14}1.{0} Ordered list item=14{1}
16 | {15}>{0}Block Quote=15{1}
17 | {16}~~Strike-out=16~~{1}
18 |
19 | {17}***{1}
20 | {0}Previous line was horizontal rule=17{1}
21 | {18}[Link=18](https://18.com){1}
22 | {19}`Inline Code=19`{1}
23 | {20}``Inline Code=20``{1}
24 |
25 | {21}~~~
26 | Block code=21
27 | ~~~{1}
28 |
29 | {7}##{0} Issue 23{1}
30 | {0}`
--------------------------------------------------------------------------------
/src/Lexilla.pro:
--------------------------------------------------------------------------------
1 | # This Qt Creator project file is not meant for creating Lexilla libraries
2 | # but instead for easily running Clang-Tidy on lexers.
3 |
4 | QT += core
5 |
6 | TARGET = Lexilla
7 | TEMPLATE = lib
8 | CONFIG += lib_bundle
9 | CONFIG += c++1z
10 |
11 | VERSION = 5.1.3
12 |
13 | SOURCES += \
14 | Lexilla.cxx \
15 | $$files(../lexlib/*.cxx, false) \
16 | $$files(../lexers/*.cxx, false)
17 |
18 | HEADERS += \
19 | ../include/Lexilla.h \
20 | $$files(../lexlib/*.h, false) \
21 | $$files(../lexers/*.h, false)
22 |
23 | INCLUDEPATH += ../include ../lexlib ../../scintilla/include
24 |
25 | DEFINES += _CRT_SECURE_NO_DEPRECATE=1
26 | CONFIG(release, debug|release) {
27 | DEFINES += NDEBUG=1
28 | }
29 |
30 | DESTDIR = ../bin
31 |
32 | macx {
33 | QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
34 | }
35 |
--------------------------------------------------------------------------------
/test/examples/caml/AllStyles.ml:
--------------------------------------------------------------------------------
1 | (* Enumerate all styles: 0 to 15 *)
2 | (* comment=12 *)
3 |
4 | (* whitespace=0 *)
5 | (* w *)
6 |
7 | (* identifier=1 *)
8 | ident
9 |
10 | (* tagname=2 *)
11 | `ident
12 |
13 | (* keyword=3 *)
14 | and
15 |
16 | (* keyword2=4 *)
17 | None
18 |
19 | (* keyword3=5 *)
20 | char
21 |
22 | (* linenum=6 *)
23 | #12
24 |
25 | (* operator=7 *)
26 | *
27 |
28 | (* number=8 *)
29 | 12
30 |
31 | (* char=9 *)
32 | 'a'
33 |
34 | (* white=10 *)
35 | (* this state can not be reached in caml mode, only SML mode but that stops other states *)
36 | (* SML mode is triggered by "andalso" being in the keywords *)
37 | "\ \x"
38 |
39 | (* string=11 *)
40 | "string"
41 |
42 | (* comment1=13 *)
43 | (* (* comment 1 *) *)
44 |
45 | (* comment2=14 *)
46 | (* (* (* comment 2 *) *) *)
47 |
48 | (* comment3=15 *)
49 | (* (* (* (* comment 1 *) *) *) *)
50 |
--------------------------------------------------------------------------------
/test/examples/escseq/colourText0.ans:
--------------------------------------------------------------------------------
1 | [0u Seq Unknown
2 | [0m Seq 0
3 | [1m Seq 1
4 | [30m Seq 30
5 | [31m Seq 31
6 | [30;1m Seq 30;1
7 | [31;1m Seq 31;1
8 | [42m Seq 42
9 | [43m Seq 43
10 | [30;42m Seq 30;42
11 | [30;43m Seq 30;43
12 | [31;44m Seq 31;44
13 | [31;45m Seq 31;45
14 | [32;46m Seq 32;46
15 | [32;47m Seq 32;47
16 | [33;40m Seq 33;40
17 | [33;41m Seq 33;41
18 | [34;43m Seq 34;43
19 | [34;44m Seq 34;44
20 | [35;45m Seq 35;45
21 | [35;46m Seq 35;46
22 | [36;46m Seq 36;46
23 | [36;47m Seq 36;47
24 | [37;40m Seq 37;40
25 | [37;41m Seq 37;41
26 | [30;40;1m Seq 30;40;1
27 | [30;41;1m Seq 30;41;1
28 | [37;46;1m Seq 37;46;1
29 | [37;47;1m Seq 37;47;1
30 | [90;102m Seq 90;102
31 | [90;103m Seq 90;103
32 | [97;106m Seq 97;106
33 | [97;107m Seq 97;107
34 | [90;40m Seq 90;40
35 | [90;41m Seq 90;41
36 | [97;46m Seq 97;46
37 | [97;47m Seq 97;47
38 |
--------------------------------------------------------------------------------
/test/examples/escseq/colourText1.ans:
--------------------------------------------------------------------------------
1 | [0u Seq Unknown
2 | [0m Seq 0
3 | [1m Seq 1
4 | [30m Seq 30
5 | [31m Seq 31
6 | [30;1m Seq 30;1
7 | [31;1m Seq 31;1
8 | [42m Seq 42
9 | [43m Seq 43
10 | [30;42m Seq 30;42
11 | [30;43m Seq 30;43
12 | [31;44m Seq 31;44
13 | [31;45m Seq 31;45
14 | [32;46m Seq 32;46
15 | [32;47m Seq 32;47
16 | [33;40m Seq 33;40
17 | [33;41m Seq 33;41
18 | [34;43m Seq 34;43
19 | [34;44m Seq 34;44
20 | [35;45m Seq 35;45
21 | [35;46m Seq 35;46
22 | [36;46m Seq 36;46
23 | [36;47m Seq 36;47
24 | [37;40m Seq 37;40
25 | [37;41m Seq 37;41
26 | [30;40;1m Seq 30;40;1
27 | [30;41;1m Seq 30;41;1
28 | [37;46;1m Seq 37;46;1
29 | [37;47;1m Seq 37;47;1
30 | [90;102m Seq 90;102
31 | [90;103m Seq 90;103
32 | [97;106m Seq 97;106
33 | [97;107m Seq 97;107
34 | [90;40m Seq 90;40
35 | [90;41m Seq 90;41
36 | [97;46m Seq 97;46
37 | [97;47m Seq 97;47
38 |
--------------------------------------------------------------------------------
/test/examples/python/matchcase.py.styled:
--------------------------------------------------------------------------------
1 | {1}# Match and case as keywords{0}
2 | {5}match{0} {10}({11}x{10}):{0}
3 | {5}case{0} {10}+{2}1{10}:{0}
4 | {5}pass{0}
5 | {5}case{0} {10}-{2}1{10}:{0}
6 | {5}pass{0}
7 | {5}case{0} {10}[]:{0}
8 | {5}pass{0}
9 |
10 | {1}# Match and case as identifiers{0}
11 | {11}match{0} {10}={0} {2}1{0}
12 | {5}def{0} {9}match{10}():{0}
13 | {5}pass{0}
14 | {11}match{10}.{11}group{10}(){0}
15 | {2}1{0} {10}+{0} {11}match{0}
16 | {11}case{10}.{11}attribute{0}
17 |
18 | {1}# Unfortunately wrong classifications; should be rare in real code because{0}
19 | {1}# non-call expressions usually don't begin lines, the exceptions are match(x){0}
20 | {1}# and case(x){0}
21 | {5}match{10}({11}x{10}){0}
22 | {5}case{10}({11}x{10}){0}
23 | {5}match{0} {10}+{0} {2}1{0}
24 | {5}case{0} {10}+{0} {2}1{0}
25 | {5}case{10}[{2}1{10}]{0}
26 |
--------------------------------------------------------------------------------
/test/examples/python/attributes/attrib-id.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 varname = 1
2 | 0 400 0 # identifier in first line was mis-styled as attribute when bug existed
3 | 1 400 0
4 | 0 400 0 # left comment ends with period. this was okay before bug.
5 | 0 400 0 varname = 2
6 | 1 400 0
7 | 0 400 0 x = 1 # comment after code ends with period. this failed when bug existed.
8 | 0 400 0 varname = 3
9 | 1 400 0
10 | 2 400 0 + def dummy():
11 | 0 404 0 | # indented comment ends with period.this failed when bug existed.
12 | 0 404 0 | varname = 4
13 | 1 400 0
14 | 0 400 0 x = 2 ## comment block is the same.
15 | 0 400 0 varname = 5
16 | 1 400 0
17 | 0 400 0 # per issue#294, identifiers were mis-styled as attributes when at beginning of file
18 | 0 400 0 # and when after a non-left-justifed comment
19 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/bash/AllStyles.bsh:
--------------------------------------------------------------------------------
1 | # Enumerate all styles: 0 to 13
2 |
3 | # comment=2
4 |
5 | # whitespace=0
6 | # w
7 |
8 | # error=1
9 | 0#0000
10 |
11 | # number=3
12 | 123
13 |
14 | # keyword=4
15 | set
16 |
17 | # double-quoted-string=5
18 | "string"
19 |
20 | # single-quoted-string=6
21 | 'str'
22 |
23 | # operator=7
24 | +
25 |
26 | # identifier=8
27 | identifier
28 |
29 | # scalar=9
30 | $scalar
31 | $?Status
32 |
33 | # parameter-expansion=10
34 | ${parameter}
35 |
36 | # back-ticks=11
37 | `ls`
38 |
39 | # here-doc-delimiter=12, here-doc=13
40 | <{0}
2 | {9}{0}
3 | {15}<%@{16}language=vbscript{15}%>{0}
4 | {15}<%{81}
5 | {84}sub{81} {86}x{81} {82}'comment {81}
6 | {196}peek{81} {83}1024{81}
7 | {15}%>{0}
8 | {1}{0}
9 | {1}{0}
10 | {2}{0}SinkWorld - Portability{2}{0}
11 | {1}
{0}
12 | {1}{0}
13 | {192}{192}{0}
14 | {1}{0}
15 | {1}{0}
16 |
--------------------------------------------------------------------------------
/test/examples/mmixal/references.mms.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Bug #2019 Buffer over-read in MMIXAL lexer
2 | 0 400 0 label
3 | 0 400 0 PREFIX Foo:
4 | 0 400 0 % Relative reference (uses PREFIX)
5 | 0 400 0 JMP label
6 | 0 400 0 %
7 | 0 400 0 JMP @label
8 | 0 400 0 % Absolute reference (does not use PREFIX)
9 | 0 400 0 JMP :label
10 | 0 400 0 % In register list so treated as register
11 | 0 400 0 JMP :rA
12 | 0 400 0 % Too long for buffer so truncated
13 | 0 400 0 JMP l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
14 | 0 400 0 % Too long for buffer so truncated then treated as absolute
15 | 0 400 0 JMP :l1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
16 | 0 400 0 %
17 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/nim/x.nim:
--------------------------------------------------------------------------------
1 | # Tests for Nim
2 | let s = "foobar"
3 |
4 | # Feature #1260
5 | {.ident.}
6 | stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!")
7 |
8 | # Feature #1261
9 | # IsFuncName("proc") so style ticks as SCE_NIM_FUNCNAME:
10 | proc `$` (x: myDataType): string = ...
11 | # Style ticks as SCE_NIM_BACKTICKS:
12 | if `==`( `+`(3,4),7): echo "True"
13 |
14 | # Feature #1262
15 | # Standard raw string identifier:
16 | let standardDoubleLitRawStr = R"A raw string\"
17 | let standardTripleLitRawStr = R"""A triple-double raw string\""""
18 | # Style of 'customIdent' is determined by lexer.nim.raw.strings.highlight.ident. 16 if false, 6 or 10 if true
19 | let customDoubleLitRawStr = customIdent"A string\"
20 | let customTripleLitRawStr = customIdent"""A triple-double raw string\""""
21 |
22 | # Feature #1268
23 | 10_000
24 | 10__000
25 | 10_
26 | 1....5
27 | 1.ident
28 | 1._ident
29 |
--------------------------------------------------------------------------------
/test/examples/cpp/SciTE.properties:
--------------------------------------------------------------------------------
1 | # coding: utf-8
2 | lexer.*.cxx=cpp
3 | keywords.*.cxx=int let uuid var
4 | keywords2.*.cxx=charCodeAt second stringify Upper
5 | keywords3.*.cxx=file
6 | keywords4.*.cxx=global JSON
7 | keywords5.*.cxx=HAVE_COLOUR FEATURE=2 VERSION(a,b)=a+b
8 | keywords6.*.cxx=TODO
9 |
10 | substyles.cpp.11=2
11 | substylewords.11.1.*.cxx=map string vector
12 | substylewords.11.2.*.cxx=std gsl
13 |
14 | substyles.cpp.17=1
15 | substylewords.17.1.*.cxx=module
16 |
17 | lexer.cpp.track.preprocessor=1
18 | lexer.cpp.escape.sequence=1
19 | # Set options so that AllStyles.cxx can show every style
20 | styling.within.preprocessor=0
21 | lexer.cpp.triplequoted.strings=1
22 | lexer.cpp.hashquoted.strings=1
23 | lexer.cpp.backquoted.strings=2
24 |
25 | fold=1
26 | fold.preprocessor=1
27 | fold.comment=1
28 | fold.compact=1
29 |
30 | match 130NonAsciiKeyword.cxx
31 | keywords.*.cxx=cheese käse сыр
32 |
--------------------------------------------------------------------------------
/test/examples/fortran/AllStyles.f.styled:
--------------------------------------------------------------------------------
1 | {1}! Enumerate all styles: 0 to 14{0}
2 | {1}! This is not a viable source file, it just illustrates the different states in isolation.{0}
3 |
4 | {1}! comment=1{0}
5 | {1}! Comment{0}
6 |
7 | {1}! default=0{0}
8 | {1}! w{0}
9 |
10 | {1}! number=2{0}
11 | {2}.37{0}
12 |
13 | {1}! string1=3{0}
14 | {3}'string'{0}
15 |
16 | {1}! string2=4{0}
17 | {4}"string"{0}
18 |
19 | {1}! stringeol=5{0}
20 | {5}" unclosed
21 | {0}
22 | {1}! operator=6{0}
23 | {6}+{0}
24 |
25 | {1}! identifier=7{0}
26 | {7}variable{0}
27 |
28 | {1}! word=8{0}
29 | {8}program{0}
30 |
31 | {1}! word2=9{0}
32 | {9}system_clock{0}
33 |
34 | {1}! word3=10{0}
35 | {10}doublecomplex{0}
36 |
37 | {1}! preprocessor=11{0}
38 | {11}!DEC$ ATTRIBUTES DLLEXPORT::sr1{0}
39 |
40 | {1}! operator2=12{0}
41 | {12}.lt.{0}
42 |
43 | {1}! label=13{0}
44 | {13}999{0}
45 |
46 | {1}! continuation=14{0}
47 | {14}&{0}
48 |
--------------------------------------------------------------------------------
/test/examples/python/matchcase.py.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Match and case as keywords
2 | 2 400 0 + match (x):
3 | 2 404 0 + case +1:
4 | 0 408 0 | pass
5 | 2 404 0 + case -1:
6 | 0 408 0 | pass
7 | 2 404 0 + case []:
8 | 0 408 0 | pass
9 | 1 408 0 |
10 | 0 400 0 # Match and case as identifiers
11 | 0 400 0 match = 1
12 | 2 400 0 + def match():
13 | 0 404 0 | pass
14 | 0 400 0 match.group()
15 | 0 400 0 1 + match
16 | 0 400 0 case.attribute
17 | 1 400 0
18 | 0 400 0 # Unfortunately wrong classifications; should be rare in real code because
19 | 0 400 0 # non-call expressions usually don't begin lines, the exceptions are match(x)
20 | 0 400 0 # and case(x)
21 | 0 400 0 match(x)
22 | 0 400 0 case(x)
23 | 0 400 0 match + 1
24 | 0 400 0 case + 1
25 | 0 400 0 case[1]
26 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/cpp/94Template.cxx:
--------------------------------------------------------------------------------
1 | // Test JavaScript template expressions for issue 94
2 |
3 | // Basic
4 | var basic = `${identifier}`;
5 |
6 | // Nested
7 | var nested = ` ${ ` ${ 1 } ` } `;
8 |
9 | // With escapes
10 | var xxx = {
11 | '1': `\`\u0020\${a${1 + 1}b}`,
12 | '2': `\${a${ `b${1 + 2}c`.charCodeAt(2) }d}`,
13 | '3': `\${a${ `b${ `c${ JSON.stringify({
14 | '4': {},
15 | }) }d` }e` }f}`,
16 | };
17 |
18 | // Original request
19 | fetchOptions.body = `
20 | {
21 | "accountNumber" : "248796",
22 | "customerType" : "Shipper",
23 | "destinationCity" : "${order.destination.city}",
24 | "destinationState" : "${order.destination.stateProvince}",
25 | "destinationZip" : ${order.destination.postalCode},
26 | "paymentType" : "Prepaid",
27 | "shipmentInfo" :
28 | {
29 | "items" : [ { "shipmentClass" : "50", "shipmentWeight" : "${order.totalWeight.toString()}" } ]
30 | }
31 | }`;
32 |
--------------------------------------------------------------------------------
/test/examples/gui4cli/AllStyles.gui.styled:
--------------------------------------------------------------------------------
1 | {2}/* Comment (2), followed by Default (0) */{0}
2 |
3 | {2}/* File does not include Line Comment (1) as that causes \r\n failures in test runner */{0}
4 |
5 | {2}/* Global (3) 'G4C' */{0}
6 | {3}G4C{0} MyGui
7 |
8 | {2}/* String (8) */{0}
9 | {3}Window{0} 10 10 200 300 {8}"My window"{0}
10 |
11 | {2}/* Event (4) */{0}
12 | {4}xOnLoad{0}
13 | {2}/* Command (7) */{0}
14 | {7}GuiOpen{0} MyGui
15 |
16 | {3}xButton{0} 10 10 100 20 {8}"Double it!"{0}
17 | {2}/* Attribute (5) */{0}
18 | {5}attr{0} frame sunk
19 | {7}Input{0} {8}"Enter a number"{0} var
20 | {2}/* Control (6) 'if', Operator (9) '$', '>', '=' */{0}
21 | {6}if{0} {9}${0}var {9}>{0} 9999
22 | var {9}={0} 9999
23 | {6}endif{0}
24 | var2 {9}={0} {9}${0}({9}${0}var * 2)
25 | {7}MsgBox{0} {8}"$var times 2 equals $var2"{0} OK/INFO
26 | {7}GuiQuit{0} #this
27 |
--------------------------------------------------------------------------------
/test/examples/matlab/FoldPoints.m.matlab.styled:
--------------------------------------------------------------------------------
1 | {1}% All the examples here should yield folding{0}
2 |
3 | {4}classdef{0}
4 | {1}% Some code{0}
5 | {4}end{0}
6 |
7 | {4}for{0}
8 | {1}% Some code{0}
9 | {4}end{0}
10 |
11 | {4}function{0}
12 | {1}% Some code{0}
13 | {4}end{0}
14 |
15 | {4}if{0}
16 | {1}% Some code{0}
17 | {4}elseif{0}
18 | {1}% Some code{0}
19 | {4}else{0}
20 | {1}% Some code{0}
21 | {4}end{0}
22 |
23 | {4}parfor{0}
24 | {1}% Some code{0}
25 | {4}end{0}
26 |
27 | {4}spmd{0}
28 | {1}% Some code{0}
29 | {4}end{0}
30 |
31 | {4}switch{0}
32 | {4}case{0}
33 | {1}% Some code{0}
34 | {4}case{0}
35 | {1}% Some code{0}
36 | {4}otherwise{0}
37 | {1}% Some code{0}
38 | {4}end{0}
39 |
40 | {4}try{0}
41 | {1}% Some code{0}
42 | {4}catch{0}
43 | {1}% Some code{0}
44 | {4}end{0}
45 |
46 | {4}while{0}
47 | {1}% Some code{0}
48 | {4}end{0}
49 |
--------------------------------------------------------------------------------
/test/examples/matlab/NumericLiterals.m.matlab.folded:
--------------------------------------------------------------------------------
1 | 0 400 400 d = 123;
2 | 0 400 400 x = 0x123ABC;
3 | 0 400 400 b = 0b010101;
4 | 0 400 400 xs64 = 0x2As64;
5 | 0 400 400 xs32 = 0x2As32;
6 | 0 400 400 xs16 = 0x2As16;
7 | 0 400 400 xs8 = 0x2As8;
8 | 0 400 400 xu64 = 0x2Au64;
9 | 0 400 400 xu32 = 0x2Au32;
10 | 0 400 400 xu16 = 0x2Au16;
11 | 0 400 400 xu8 = 0x2Au8;
12 | 0 400 400 bs64 = 0b10s64;
13 | 0 400 400 bs32 = 0b10s32;
14 | 0 400 400 bs16 = 0b10s16;
15 | 0 400 400 bs8 = 0b10s8;
16 | 0 400 400 bu64 = 0b10u64;
17 | 0 400 400 bu32 = 0b10u32;
18 | 0 400 400 bu16 = 0b10u16;
19 | 0 400 400 bu8 = 0b10u8;
20 | 0 400 400 c = .1;
21 | 0 400 400 c = 1.1;
22 | 0 400 400 c = .1e1;
23 | 0 400 400 c = 1.1e1;
24 | 0 400 400 c = 1e1;
25 | 0 400 400 c = 1i;
26 | 0 400 400 c = 1j;
27 | 0 400 400 c = .1e2j;
28 | 0 400 400 c = 1e2j;
29 | 1 400 400
--------------------------------------------------------------------------------
/test/examples/gdscript/NodePath.gd.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # nodepath
2 | 1 400 0
3 | 0 400 0 $Node
4 | 1 400 0
5 | 0 400 0 %Node
6 | 1 400 0
7 | 0 400 0 %node/"n o d e"/%'n o d e'
8 | 1 400 0
9 | 0 400 0 %"No de"
10 | 1 400 0
11 | 1 400 0
12 | 0 400 0 $/root/ThisNode/%Node % %test
13 | 1 400 0
14 | 0 400 0 $MainMenuPanel/%Options % %test
15 | 1 400 0
16 | 0 400 0 %Options % %test
17 | 1 400 0
18 | 0 400 0 $Node % %test
19 | 1 400 0
20 | 1 400 0
21 | 0 400 0 get_node("%Options") % %test
22 | 1 400 0
23 | 0 400 0 $"Nod se" % %test
24 | 1 400 0
25 | 0 400 0 $/test/"No % de"/test % %test
26 | 1 400 0
27 | 0 400 0 %node/"n o d e"/'n o d e' % %"No De"
28 | 1 400 0
29 | 0 400 0 "%010d" % 12345
30 | 1 400 0
31 | 0 400 0 1 % 1
32 | 1 400 0
33 | 0 400 0 a % b
34 | 1 400 0
--------------------------------------------------------------------------------
/test/examples/powershell/AllStyles.ps1:
--------------------------------------------------------------------------------
1 | # Enumerate all styles: 0 to 16
2 |
3 | # line comment = 1
4 | # more comment
5 |
6 | # whitespace = 0
7 | # spaces
8 |
9 | # string = 2
10 | "a string"
11 |
12 | # character = 3
13 | 'c'
14 |
15 | # number = 4
16 | 123
17 |
18 | # variable = 5
19 | $variable
20 |
21 | # operator = 6
22 | ();
23 |
24 | # identifier = 7
25 | identifier
26 |
27 | # keyword = 8
28 | break
29 | ;
30 |
31 | # cmdlet = 9
32 | Write-Output "test output"
33 |
34 | # alias = 10
35 | chdir C:\Temp\
36 |
37 | # function = 11
38 | Get-Verb -Group Security
39 |
40 | # user-defined keyword = 12
41 | lexilla
42 |
43 | # multi-line comment = 13
44 | <#
45 | multi-line comment
46 | #>
47 |
48 | # here string = 14
49 | @"
50 | here string double
51 | "@
52 |
53 | # here string single quote = 15
54 | @'
55 | here string single
56 | '@
57 |
58 | # comment keyword = 16
59 | <#
60 | .synopsis
61 | End of file.
62 | #>
63 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | License for Lexilla, Scintilla, and SciTE
2 |
3 | Copyright 1998-2021 by Neil Hodgson
4 |
5 | All Rights Reserved
6 |
7 | Permission to use, copy, modify, and distribute this software and its
8 | documentation for any purpose and without fee is hereby granted,
9 | provided that the above copyright notice appear in all copies and that
10 | both that copyright notice and this permission notice appear in
11 | supporting documentation.
12 |
13 | NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
14 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15 | AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
16 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
20 | OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
/test/examples/cobol/AllStyles.cob.styled:
--------------------------------------------------------------------------------
1 | {0} {2}* Enumerate all styles: 0, 2 to 11, 16{0}
2 | {2}* SCE_C_COMMENTLINE=2{0}
3 |
4 | {2}* SCE_C_DEFAULT=0{0}
5 |
6 |
7 | {2}* SCE_C_IDENTIFIER=11{0}
8 | {11}identifier{0}
9 |
10 | {2}* SCE_C_NUMBER=4{0}
11 | {4}4{0}
12 |
13 | {2}* SCE_C_WORD=5{0}
14 | {5}data{0}
15 |
16 | {2}* SCE_C_WORD2=16{0}
17 | {16}cancel{0}
18 |
19 | {2}* SCE_C_UUID=8{0}
20 | {8}remarks{0}
21 |
22 | {2}* SCE_C_COMMENTDOC=3 not implemented{0}
23 | {3}** at line start{0}
24 |
25 | {2}* SCE_C_STRING=6{0}
26 | {6}"string"{0}
27 |
28 | {2}* SCE_C_CHARACTER=7{0}
29 | {7}'c'{0}
30 |
31 | {2}* SCE_C_PREPROCESSOR=9{0}
32 | {9}?preprocessor{0}
33 |
34 | {2}* SCE_C_OPERATOR=10{0}
35 | {10}+{0}
36 |
--------------------------------------------------------------------------------
/test/examples/rust/Issue268.rs:
--------------------------------------------------------------------------------
1 | // coding: utf-8
2 |
3 | b"foo"; br"foo" // foo
4 | b"\"foo\""; br#""foo""#; // "foo"
5 |
6 | b"foo #\"# bar";
7 | br##"foo #"# bar"##; // foo #"# bar
8 |
9 | b"\x52"; b"R"; br"R" // R
10 | b"\\x52"; br"\x52" // \x52
11 |
12 | c"æ" // LATIN SMALL LETTER AE (U+00E6)
13 | c"\u{00E6}";
14 | c"\xC3\xA6";
15 |
16 | c"foo"; cr"foo" // foo
17 | c"\"foo\""; cr#""foo""#; // "foo"
18 |
19 | c"foo #\"# bar";
20 | cr##"foo #"# bar"##; // foo #"# bar
21 |
22 | c"\x52"; c"R"; cr"R" // R
23 | c"\\x52"; cr"\x52" // \x52
24 |
25 | "foo"; r"foo" // foo
26 | "\"foo\""; r#""foo""#; // "foo"
27 |
28 | "foo #\"# bar";
29 | r##"foo #"# bar"##; // foo #"# bar
30 |
31 | "\x52"; "R"; r"R" // R
32 | "\\x52"; r"\x52" // \x52
33 |
34 | "æ" // LATIN SMALL LETTER AE (U+00E6)
35 | "\u{00E6}";
36 | "\xC3\xA6";
--------------------------------------------------------------------------------
/test/examples/batch/Issue115.bat:
--------------------------------------------------------------------------------
1 | rem remark and comment bug
2 |
3 | findstr /c:"rem this" "file"
4 | findstr /c:":: this" "file"
5 |
6 | :: SingleQuoted command string
7 | for /f %%A in ('rem this') do echo %%A
8 |
9 | :: DoubleQuoted string
10 | for /f %%A in ("rem this") do echo %%A
11 |
12 | :: BackQuote command string
13 | for /f "usebackq" %%A in (`rem this`) do echo %%A
14 |
15 | :: Test the handling of quotes ' and " and escape ^
16 | :: Comment
17 |
18 | :: With quotes
19 | ":: Text
20 | "":: Comment
21 | ':: Text
22 | '':: Comment
23 | :: Mixing quotes - likely incorrect as lexer tries ' and " separately, leaving an active quote
24 | "'":: Text
25 |
26 | :: With escapes
27 | ^:: Text
28 | ^":: Comment
29 | ^"":: Text
30 | ^""":: Comment
31 | ^^":: Text
32 | ^^"":: Comment
33 | ^^""":: Text
34 |
35 | :: With preceding command
36 | mkdir archive ":: Text
37 | mkdir archive "":: Comment
38 | mkdir archive ^":: Comment
39 | mkdir archive ^"":: Text
40 |
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue19.php.styled:
--------------------------------------------------------------------------------
1 | {18}{0}
31 |
--------------------------------------------------------------------------------
/test/examples/inno/x.iss:
--------------------------------------------------------------------------------
1 | #define app_copyright "Copyright 1999, app corporation"
2 |
3 | ; comment
4 |
5 | [Setup]
6 | AppName=MyApp
7 | AppCopyright={#app_copyright}
8 | WizardSmallImageFile=WizardSmallImageFile.bmp
9 | OnlyBelowVersion=6.01
10 |
11 | [Files]
12 | Source: "app.exe"; DestDir: "{tmp}"; OnlyBelowVersion: 6.01
13 |
14 | [INI]
15 | Key: "keyname1"; String: "unterminated
16 | Key: 'keyname2'; String: 'unterminated
17 |
18 | [Registry]
19 | Root: HKLM; ValueType: string
20 |
21 | [CustomMessages]
22 | keyname =Other tasks:'not string
23 |
24 | [Messages]
25 | keyname="{#app_copyright}"not string
26 |
27 | [Code]
28 |
29 | // comment
30 |
31 | (* comment *)
32 |
33 | { comment }
34 |
35 | { *) comment }
36 |
37 | (* } comment *)
38 |
39 | (*
40 | comment *)
41 |
42 | {
43 | comment }
44 |
45 | function ShouldInstallComCtlUpdate: Boolean;
46 | begin
47 | Result := False;
48 | Log('string');
49 | IsEscaped('''good''', ''bad');
50 | end;
51 |
--------------------------------------------------------------------------------
/test/examples/markdown/Bug2247.md.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # Checking resolution of bug 2247
2 | 0 400 0
3 | 0 400 0 ~~~sql
4 | 0 400 0 SELECT datetime() AS `date`;
5 | 0 400 0 ~~~
6 | 0 400 0
7 | 0 400 0 ```sql
8 | 0 400 0 SELECT datetime() AS `date`;
9 | 0 400 0 ```
10 | 0 400 0
11 | 0 400 0 List of examples:
12 | 0 400 0
13 | 0 400 0 - example *one*
14 | 0 400 0
15 | 0 400 0 - example _two_
16 | 0 400 0
17 | 0 400 0 - example `inline code without end
18 | 0 400 0
19 | 0 400 0 In case of **AAA**:
20 | 0 400 0
21 | 0 400 0 ```sql
22 | 0 400 0 SELECT strftime('%Y-%m-%d %H:%M:%S', 'now') AS `date`;
23 | 0 400 0 ```
24 | 0 400 0
25 | 0 400 0 or, in case of __BBB__:
26 | 0 400 0 . . .
27 | 0 400 0
28 | 0 400 0 - example *three*
29 | 0 400 0
30 | 0 400 0 Last paragraph.
31 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/ruby/Issue67.rb.styled:
--------------------------------------------------------------------------------
1 | {2}# heredoc method call, other argument{0}
2 | {11}puts{0} {10}<<{20}~EOT{10}.{11}chomp{22}
3 | squiggly heredoc
4 | {20}EOT{0}
5 |
6 | {11}puts{0} {10}<<{20}ONE{10},{0} {5}__FILE__{10},{0} {5}__LINE__{22}
7 | content for heredoc one
8 | {20}ONE{0}
9 |
10 | {2}# heredoc prevStyle == SCE_RB_GLOBAL{0}
11 | {13}$stdout{10}.{11}puts{0} {10}<<{20}~EOT{10}.{11}chomp{22}
12 | squiggly heredoc
13 | {20}EOT{0}
14 |
15 | {2}# Issue #236: modifier if, unless, while and until{0}
16 | {11}alias{0} {11}error{0} {11}puts{0}
17 |
18 | {11}error{0} {10}<<{20}EOF{0} {29}if{0} {5}true{22}
19 | heredoc if true
20 | {20}EOF{0}
21 |
22 | {11}error{0} {10}<<{20}EOF{0} {29}unless{0} {5}false{22}
23 | heredoc unless false
24 | {20}EOF{0}
25 |
26 | {11}error{0} {10}<<{20}EOF{0} {29}while{0} {5}false{22}
27 | heredoc while false
28 | {20}EOF{0}
29 |
30 | {11}error{0} {10}<<{20}EOF{0} {29}until{0} {5}true{22}
31 | heredoc until true
32 | {20}EOF{0}
33 |
--------------------------------------------------------------------------------
/test/examples/ruby/Issue69.rb.folded:
--------------------------------------------------------------------------------
1 | 0 400 0 # -*- coding: utf-8 -*-
2 | 1 400 0
3 | 0 400 0 # single character strings
4 | 0 400 0 puts ?a
5 | 0 400 0 puts ?\n
6 | 0 400 0 puts ?\s
7 | 0 400 0 puts ?\\#
8 | 0 400 0 puts ?\u{41}
9 | 0 400 0 puts ?\C-a
10 | 0 400 0 puts ?\M-a
11 | 0 400 0 puts ?\M-\C-a
12 | 0 400 0 puts ?\C-\M-a
13 | 0 400 0 puts ?あ
14 | 0 400 0 puts ?"
15 | 0 400 0 puts ?/
16 | 0 400 0 puts ?[[1, 2]
17 | 0 400 0 puts ?/\
18 | 1 400 0
19 | 0 400 0 # symbol and ternary operator
20 | 0 400 0 ab = /\d+/
21 | 0 400 0 cd = /\w+/
22 | 0 400 0 puts :ab, :cd, :/, :[]
23 | 0 400 0 puts :/\
24 | 1 400 0
25 | 0 400 0 # TODO: space after '?' and ':' is not needed
26 | 0 400 0 puts true ?ab : cd
27 | 0 400 0 puts true ? /\d+/ : /\w+/
28 | 0 400 0 puts false ?ab : cd
29 | 0 400 0 puts false ? /\d+/ : /\w+/
30 | 0 400 0
--------------------------------------------------------------------------------
/src/Lexilla/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 5.4.6
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSHumanReadableCopyright
22 | Copyright © 2020 Neil Hodgson. All rights reserved.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/test/examples/bash/NestedRich.bsh.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 + # Use lexer.bash.command.substitution=2 to style command substitution
2 | 0 401 0 | # so that both the scope of the command and the internal structure are visible.
3 | 1 400 0
4 | 0 400 0 # Nested command
5 | 0 400 0 $(ls -la$(ls *.c))
6 | 1 400 0
7 | 0 400 0 # Check strings and backticks in command
8 | 0 400 0 echo $('ls' "." `ls` $'.' $".")
9 | 1 400 0
10 | 0 400 0 PROJECT_DIR=$(rlwrap -S "Enter source path: " -e '' -i -o cat)
11 | 1 400 0
12 | 0 400 0 # Multiple nesting levels
13 | 0 400 0 $(ls -la$(ls $(c) $'*.c' ` $(${s})`))
14 | 1 400 0
15 | 0 400 0 # Multi-line
16 | 0 400 0 $(ls |
17 | 0 400 0 more)
18 | 1 400 0
19 | 0 400 0 $(
20 | 0 400 0 `x`
21 | 0 400 0 "x"
22 | 0 400 0 `ls`
23 | 0 400 0 $'x'
24 | 0 400 0 $"x"
25 | 0 400 0 )
26 | 0 400 0 #end -- checks termination of previous
27 | 0 400 0
--------------------------------------------------------------------------------
/test/examples/hypertext/Issue19.php.folded:
--------------------------------------------------------------------------------
1 | 2 400 0 +
31 | 0 400 0
--------------------------------------------------------------------------------
/scripts/LexFacer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # LexFacer.py - regenerate the SciLexer.h files from the LexicalStyles.iface interface
3 | # definition file.
4 | # Implemented 2000 by Neil Hodgson neilh@scintilla.org
5 | # Requires Python 3.6 or later
6 |
7 | import os, pathlib, sys
8 |
9 | sys.path.append(os.path.join("..", "..", "scintilla", "scripts"))
10 |
11 | import Face
12 | import FileGenerator
13 |
14 | def printLexHFile(f):
15 | out = []
16 | for name in f.order:
17 | v = f.features[name]
18 | if v["FeatureType"] in ["val"]:
19 | if "SCE_" in name or "SCLEX_" in name:
20 | out.append("#define " + name + " " + v["Value"])
21 | return out
22 |
23 | def RegenerateAll(root, _showMaxID):
24 | f = Face.Face()
25 | f.ReadFromFile(root / "include/LexicalStyles.iface")
26 | FileGenerator.Regenerate(root / "include/SciLexer.h", "/* ", printLexHFile(f))
27 |
28 | if __name__ == "__main__":
29 | RegenerateAll(pathlib.Path(__file__).resolve().parent.parent, True)
30 |
--------------------------------------------------------------------------------
/test/unit/test.mak:
--------------------------------------------------------------------------------
1 | # Build all the unit tests with Microsoft Visual C++ using nmake
2 | # Tested with Visual C++ 2022
3 |
4 | DEL = del /q
5 | EXE = unitTest.exe
6 |
7 | INCLUDEDIRS = /I../../include /I../../lexlib /I../../../scintilla/include
8 |
9 | CXXFLAGS = /MP /EHsc /std:c++17 /D_HAS_AUTO_PTR_ETC=1 /wd 4805 $(INCLUDEDIRS)
10 |
11 | # Files in this directory containing tests
12 | TESTSRC=test*.cxx
13 | # Files being tested from lexilla/lexlib directory
14 | TESTEDSRC=\
15 | ../../lexlib/Accessor.cxx \
16 | ../../lexlib/CharacterSet.cxx \
17 | ../../lexlib/InList.cxx \
18 | ../../lexlib/LexerBase.cxx \
19 | ../../lexlib/LexerModule.cxx \
20 | ../../lexlib/LexerSimple.cxx \
21 | ../../lexlib/PropSetSimple.cxx \
22 | ../../lexlib/WordList.cxx
23 |
24 | TESTS=$(EXE)
25 |
26 | all: $(TESTS)
27 |
28 | test: $(TESTS)
29 | $(EXE)
30 |
31 | clean:
32 | $(DEL) $(TESTS) *.o *.obj *.exe
33 |
34 | $(EXE): $(TESTSRC) $(TESTEDSRC) $(@B).cxx
35 | $(CXX) $(CXXFLAGS) /Fe$@ $**
36 |
--------------------------------------------------------------------------------
/test/examples/hypertext/x.html.folded:
--------------------------------------------------------------------------------
1 | 0 400 0
2 | 2 400 0 +
3 | 2 401 0 +
12 | 2 401 0 +
13 | 0 402 0 |
14 | 0 402 0 | SinkWorld - Portability
15 | 0 402 0 | §
16 | 0 402 0 | SinkWorld - Portability
17 | 0 402 0 |
18 | 0 402 0 |
19 | 0 402 0 |
20 | 0 402 0 |
21 | 0 401 0 |
22 | 0 400 0
--------------------------------------------------------------------------------