From a63e076bfc3e090edc4876e5ced36963d0868842 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Tue, 19 Oct 2010 16:56:38 -0400 Subject: [PATCH] improve type highlighting --HG-- branch : pmacs2 --- mode/scala.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mode/scala.py b/mode/scala.py index 6c0e2d0..ef358a1 100644 --- a/mode/scala.py +++ b/mode/scala.py @@ -39,10 +39,14 @@ class ScalaGrammar(Grammar): RegionRule('scala.comment', r'/\*', NestedCommentGrammar, r'\*/'), RegionRule('scala.script', r'#!.+$', ShGrammar, r'!#'), - PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)([a-zA-Z0-9_]+)', + PatternMatchRule('x', r'(:)([a-zA-Z0-9_]+)', 'delimiter', 'scala.type'), - PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)( +)([a-zA-Z0-9_]+)', + PatternMatchRule('x', r'(:)( +)([a-zA-Z0-9_]+)', 'delimiter', 'spaces', 'scala.type'), + #PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)([a-zA-Z0-9_]+)', + # 'delimiter', 'scala.type'), + #PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)( +)([a-zA-Z0-9_]+)', + # 'delimiter', 'spaces', 'scala.type'), PatternMatchRule('x', r'(extends)( +)([a-zA-Z0-9_]+)', 'scala.reserved', 'spaces', 'scala.type'),