aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/d.tes
AgeCommit message (Collapse)AuthorFilesLines
2024-12-24introduced true block and EOL commentsRobin Haberkorn1-1/+1
* The previous convention of !* ... *! are now true block comments, i.e. they are parsed faster, don't spam the goto table and allow embedding of exclamation marks - only "*!" terminates the comment. * It is therefore now forbidden to have goto labels beginning with "*". * Also support "!!" to introduce EOL comments (like C++'s //). This disallows empty labels, but they weren't useful anyway. This is the shortest way to begin a comment. * All comment labels have been converted to true comments, to ensure that syntax highlighting works correctly. EOL comments are used for single line commented-out code, since it's easiest to uncomment - you don't have to jump to the line end. This is a pure convention / coding style. Other people might do it differently. * It's of course still possible to abuse goto labels as comments as TECO did for ages. * In lexing / syntax highlighting, labels and comments are highlighted differently. * When syntax highlighting, a single "!" will first be highlighted as a label since it's not yet unambiguous. Once you type the second character (* or !), the first character is retroactively styled as a comment as well.
2021-10-11upgraded to Scintilla 5.1.3 and Scinterm 3.1Robin Haberkorn1-1/+1
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches). All of the patches are now either irrelevant or have been merged upstream. * Since Scintilla 5 requires C++17, this increases the minimum GCC version at least to 5.0. We may actually require even newer versions. * I could not upgrade the scintilla-mirror (which was imported from Mercurial), so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0, master was deleted and I reimported the entire Scintilla repo using git-remote-hg. This means that scintilla-mirror now contains two entirely separate trees. But it is still possible to clone old SciTECO repos. * The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed. Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced), we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3). This branch is never rebased or deleted. Therefore, we are guaranteed to be able to clone arbitrary SciTECO repo commits - not only releases. Releases no longer have to be tagged in scintilla-mirror. On the downside, fixup commits may accumulate in these new branches. They can only be squashed once a new branch for a new Scintilla release is created (e.g. by cherry-picking followed by rebase). * Scinterm does no longer have to reside in the Scintilla subdirectory, so we added it as a regular submodule. There are no more recursive submodules. The Scinterm build system has not been improved at all, but we use a trick based on VPATH to build Scinterm in scintilla/bin/. * Scinterm is now in Git and we reference the upstream repo for the time being. We might mirror it and apply the same branching workflow as with Scintilla if necessary. The scinterm-mirror repository still exists but has not been touched. We will also have to rewrite its master branch as it was a non-reproducible Mercurial import. * Scinterm now also comes with patches for Scintilla which we simply applied on our sciteco-rel-5-1-3 branch. * Scintilla 5 outsourced its lexers into the Lexilla project. We added it as yet another submodule. * All submodules have been moved into contrib/. * The Scintilla API for setting lexers has consequently changed. We now have to call SCI_SETILEXER(0, CreateLexer(name)). As I did not want to introduce a separate command for setting lexers, <ES> has been extended to allow setting lexers by name with the SCI_SETILEXER message which effectively replaces SCI_SETLEXERLANGUAGE. * The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used in the SciTECO standard library anyway - and have consequently been removed from symbols-scilexer.c. The style macros from SciLexer.h (SCE_...) are theoretically still useful - even though they are not used by our current color schemes - and have therefore been retained. They can be specified as wParam in <ES>. * <ES> no longer allows symbolic constants for lParam. This never made any sense since all supported symbols were always wParam. * Scinterm supports new native cursor modes. They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER caret style is configured by default. It makes no sense to enable native cursor modes now since the command line should have a native cursor but is not yet a Scintilla view. * The Scintilla upgrade performed much worse than before, so some optimizations will be necessary.
2016-02-15lexer library: avoid unnecessary argument discards after SETLEXERLANGUAGERobin Haberkorn1-1/+1
* causes problems with the $$ command implemented * was already fixed in scite2co.lua but the existing code was manually updated and generated with an earlier version of scite2co.lua
2015-07-21fixed scite2co.lua: use SCI_SETLEXERLANGUAGE instead of SCI_SETLEXERRobin Haberkorn1-1/+1
* the lexer names used in SciTE property files are not SCLEX constants but the internal LexerModule names, so auto-generated SciTECO lexer configurations can only be set by name, i.e. via SETLEXERLANGUAGE, since we cannot easily map those names to SCLEX constants. * should be about as fast as using SCI_SETLEXER (since SciTECO has to look up symbolic names as well at runtime). * this especially fixes opening *.mak files -- often Makefiles but identified as "Mako" files. The macro "lexer.set.mako" used the wrong SCLEX_ symbol. * will also fix the HTML and all other lexers that use the SCLEX_HTML/hypertext lexer. * all lexer files have been updated, to be more compatible with scite2co.lua's output. This eases lexer updates in the future.
2015-05-25extended <EN> command and used it to optimize "lexer.test..." macrosRobin Haberkorn1-3/+3
* EN may now be used for matching file names (similar to fnmatch(3)). This is used to check the current buffers file extension in the lexer configuration macros instead of using expensive Q-Register manipulations. This halves the overall startup time - it is now acceptable even with the current amount of lexer configurations. * EN may now be used for checking file types. session.tes has been simplified. * BREAKS macro portability (EN now has 2 string arguments). * The Globber class has been extended to allow filtering of glob results by file type.
2015-03-24added new lexer configs auto-generated by scite2co.luaRobin Haberkorn1-0/+78
* these are still not all languages supported by Scintilla. scite2co.lua does not do a good job of generating styles when SciTE's property files use hardcoded colors/fonts. This commit only includes reasonably good conversion results. The remaining languages need some additional manual labor. * Even these lexers are not perfect and should be revised by comparing them with SciTE's properties. * So many lexers make the "lexer.auto" macro too slow. We need some optimization. E.g. the search-command optimization described in TODO, or an extended EN command for globbing manually specified file names.