JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
php.vim: make sure bogus-curly doesn't over-match
authorJason Woofenden <jason@jasonwoof.com>
Fri, 29 Jul 2011 06:53:28 +0000 (02:53 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 29 Jul 2011 06:53:28 +0000 (02:53 -0400)
php.vim

diff --git a/php.vim b/php.vim
index 0d4342b..2c49c64 100644 (file)
--- a/php.vim
+++ b/php.vim
@@ -297,10 +297,10 @@ syn region  phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contai
 " Interpolated indentifiers (inside strings)
        syn match phpBrackets "[][}{]" contained display
        " errors
-               syn match phpInterpSimpleError "\[[^]]*\]" contained display
+               syn match phpInterpSimpleError "\[[^]]*\]" contained display  " fallback (if nothing else matches)
                syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display
                " make sure these stay above the correct DollarCurlies so they don't take priority
-               syn match phpInterpBogusDollarCurley "${.*}" contained display
+               syn match phpInterpBogusDollarCurley "${[^}]*}" contained display  " fallback (if nothing else matches)
        syn match phpinterpSimpleBracketsInner "\w\+" contained
        syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
        syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner