diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-20 01:31:24 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-20 01:31:24 +0100 |
commit | c80c632ed2e844a66207da5fb462960ecca219f5 (patch) | |
tree | 820c0cb5549cde5079951cfbb19ede3a7dcdf65d /lib/lexers/batch.tes | |
parent | 4282e7d6b2f2cd73e93bf478a4aae4ce92481808 (diff) | |
download | sciteco-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/batch.tes')
-rw-r--r-- | lib/lexers/batch.tes | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lexers/batch.tes b/lib/lexers/batch.tes index 9453628..7175a6c 100644 --- a/lib/lexers/batch.tes +++ b/lib/lexers/batch.tes @@ -1,7 +1,7 @@ ! DOS, Windows, OS/2 Batch Files ! @[lexer.test.batch]{ - [_ :S.[bat,cmd,nt] ]_ + [_ _.[bat,cmd,nt]M[lexer.checkname] ]_ } @[lexer.set.batch]{ @@ -23,5 +23,5 @@ } @:[lexer.auto]{ - :M[lexer.test.batch]"S Q.fEB :M[lexer.set.batch] Oend ' + :M[lexer.test.batch]"S :M[lexer.set.batch] Oend ' } |