aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/cpp.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:02:31 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-05-25 22:02:31 +0200
commitbae8cd712c167522a95a093296453a54dde4a524 (patch)
tree1523fcf738c9dbd0b6d96222ccd693faa2938060 /lib/lexers/cpp.tes
parent83f18d2578288fe71fca409e4f03434346b0d5b7 (diff)
downloadsciteco-bae8cd712c167522a95a093296453a54dde4a524.tar.gz
extended <EN> command and used it to optimize "lexer.test..." macros
* 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.
Diffstat (limited to 'lib/lexers/cpp.tes')
-rw-r--r--lib/lexers/cpp.tes17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/lexers/cpp.tes b/lib/lexers/cpp.tes
index a080c7c..6a77c95 100644
--- a/lib/lexers/cpp.tes
+++ b/lib/lexers/cpp.tes
@@ -1,8 +1,19 @@
! C/C++ Lexing !
-@[lexer.test.cpp]{ [_
- _.[c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,m,mm,sma]M[lexer.checkname]
-]_ }
+@[lexer.test.cpp]{
+ :EN*.cQ*U.r
+ Q.r"F :EN*.ccQ*U.r '
+ Q.r"F :EN*.cppQ*U.r '
+ Q.r"F :EN*.cxxQ*U.r '
+ Q.r"F :EN*.hQ*U.r '
+ Q.r"F :EN*.hhQ*U.r '
+ Q.r"F :EN*.hppQ*U.r '
+ Q.r"F :EN*.hxxQ*U.r '
+ Q.r"F :EN*.ippQ*U.r '
+ Q.r"F :EN*.mQ*U.r '
+ Q.r"F :EN*.mmQ*U.r '
+ Q.r"F :EN*.smaQ*U.r '
+Q.r}
@[lexer.set.cpp]{
ESSETLEXER,SCLEX_CPP