From 508ff930eef4e744b13a3ffdf369c5460a369a12 Mon Sep 17 00:00:00 2001 From: PWBENNETT Date: Sun, 10 Nov 2013 00:34:48 -0500 Subject: [PATCH] Update mop.tmLanguage Better handling of optional args to a trait invocation. --- inc/mop.tmLanguage | 53 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/inc/mop.tmLanguage b/inc/mop.tmLanguage index a20d5be..a8c3b27 100644 --- a/inc/mop.tmLanguage +++ b/inc/mop.tmLanguage @@ -14,7 +14,7 @@ applyEndPatternLast 1 begin - ^\s*(class|role)\s+([^;\s]+) + ^\s*(class|role|trait)\s+([^;\s]+) end ^\s*\}$\n? name @@ -34,6 +34,10 @@ patterns + + include + #is + match ^\s*(method)\s+([-a-zA-Z0-9_]+)\s*(\([\$\@\*;]*\))? @@ -64,7 +68,7 @@ match - \b(extends|with|is|does)\s+([^;\s]+) + \b(extends|with|does)\s+([^;\s]+) name keyword.control.mop captures @@ -99,6 +103,51 @@ + repository + + is + + match + \s(is)\s+([^;\(\s]+) + captures + + 1 + + name + keyword.control.mop + + 2 + + name + entity.name.function.mop + + + patterns + + + match + \((.+)\) + captures + + 0 + + name + punctuation.perl + + 1 + + name + text.perl.embedded.mop + + + + + include + source.perl + + + + scopeName source.mop uuid