From b85782ac69f1ef0d145d7dd2e95c555fab3f8694 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Thu, 28 Nov 2019 12:23:46 -0800 Subject: allow backtick literals to have an end quote. Rather than exclude ? + and *, exclude ` from literals and allow backtick literals to be end quoted. Allows us to follow the literal with an operator without using a space between the two, which is very unnatural. Can write: [`,`?]. If we forget to the end quote it we end up with literal that (probably) does not exist. It should generate an error, rather than silently give us something we don't want. Note that ] is still excluded from literals in positions 2+. --- colm.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'colm.vim') diff --git a/colm.vim b/colm.vim index 94ec8842..d05aacbb 100644 --- a/colm.vim +++ b/colm.vim @@ -40,8 +40,7 @@ syntax match char "\\." contained syntax match otLit "\~.*$" syntax match otLit "'\(\\.\|[^'\\]\)*\('[i]*\)\?" -syntax match otLit "`[^ \t\r\]]\+" -syntax match otLit "`\]" +syntax match otLit "`[^ \t\r][^ \t\r\]`]*`\?" " " Other stuff -- cgit v1.2.1