aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/cmake.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-12-24 13:29:32 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-12-24 13:29:32 +0300
commitef897b418a4487196e1dbc18a97046f8f0aea2e8 (patch)
tree264b026de6ce805f1bf371d1b01371c4ba1aed0c /lib/lexers/cmake.tes
parente5d1253d363a209ecd1288278808e38ac87b34d9 (diff)
downloadsciteco-ef897b418a4487196e1dbc18a97046f8f0aea2e8.tar.gz
introduced true block and EOL comments
* 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.
Diffstat (limited to 'lib/lexers/cmake.tes')
-rw-r--r--lib/lexers/cmake.tes6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lexers/cmake.tes b/lib/lexers/cmake.tes
index 3b7c5f7..198ad32 100644
--- a/lib/lexers/cmake.tes
+++ b/lib/lexers/cmake.tes
@@ -1,4 +1,4 @@
-! CMake Lexing !
+!* CMake Lexing *!
@[lexer.test.cmake]{
:EN*/CMakeLists.txtQ*"S -1 '
@@ -8,7 +8,7 @@
@[lexer.set.cmake]{
ESSETILEXERcmake
- ! Commands !
+ !* Commands *!
0ESSETKEYWORDS
add_custom_command add_custom_target add_definitions add_dependencies
add_executable add_library add_subdirectory add_test aux_source_directory build_command
@@ -25,7 +25,7 @@
site_name source_group string subdir_depends subdirs target_link_libraries try_compile
try_run use_mangled_mesa utility_source variable_requires vtk_make_instantiator
vtk_wrap_java vtk_wrap_python vtk_wrap_tcl while write_file
- ! Special command arguments !
+ !* Special command arguments *!
1ESSETKEYWORDS
ABSOLUTE ABSTRACT ADDITIONAL_MAKE_CLEAN_FILES ALL AND APPEND ARGS ASCII
BEFORE CACHE CACHE_VARIABLES CLEAR COMMAND COMMANDS COMMAND_NAME COMMENT COMPARE