aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/lexers/cpp.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-20 01:31:24 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-11-20 01:31:24 +0100
commitc80c632ed2e844a66207da5fb462960ecca219f5 (patch)
tree820c0cb5549cde5079951cfbb19ede3a7dcdf65d /lib/lexers/cpp.tes
parent4282e7d6b2f2cd73e93bf478a4aae4ce92481808 (diff)
downloadsciteco-c80c632ed2e844a66207da5fb462960ecca219f5.tar.gz
lexer library: added M[lexer.checkheader] and M[lexer.checkname] for matching a pattern
against the first line of a buffer or its filename. This simplifies the "lexer.test..." macros and allows us to select lexers based on the #! line.
Diffstat (limited to 'lib/lexers/cpp.tes')
-rw-r--r--lib/lexers/cpp.tes4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lexers/cpp.tes b/lib/lexers/cpp.tes
index f979153..f07555a 100644
--- a/lib/lexers/cpp.tes
+++ b/lib/lexers/cpp.tes
@@ -1,7 +1,7 @@
! C/C++ Lexing !
@[lexer.test.cpp]{
- [_ :S.[c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,m,mm,sma] ]_
+ [_ _.[c,cc,cpp,cxx,h,hh,hpp,hxx,ipp,m,mm,sma]M[lexer.checkname] ]_
}
@[lexer.set.cpp]{
@@ -39,5 +39,5 @@
}
@:[lexer.auto]{
- :M[lexer.test.cpp]"S Q.fEB :M[lexer.set.cpp] Oend '
+ :M[lexer.test.cpp]"S :M[lexer.set.cpp] Oend '
}