diff --git a/application.py b/application.py index ab80a92..33ce5ef 100755 --- a/application.py +++ b/application.py @@ -661,11 +661,13 @@ class Application(object): # create directories under the application path def mkdirs(self, *parts): - path = self.getpath() - for part in parts: - path = os.path.join(path, part) - if not os.path.exists(path): - os.mkdir(path) + path = os.path.join(self.getpath(), *parts) + if not os.path.exists(path): + os.makedirs(path) + #for part in parts: + # path = os.path.join(path, part) + # if not os.path.exists(path): + # os.mkdir(path) # load user configuration NOW def loadrc(self): diff --git a/mode/scala.py b/mode/scala.py index a37ab18..1215e62 100644 --- a/mode/scala.py +++ b/mode/scala.py @@ -7,6 +7,7 @@ from method.shell import Interact from method import Method, arg import default import urllib2 +import os chr1 = '[a-zA-Z_]' chr2 = '[a-zA-Z_0-9]' @@ -29,6 +30,11 @@ class ScalaGrammar(Grammar): PatternRule('scala.comment', '//.*$'), RegionRule('scala.comment', r'/\*', NestedCommentGrammar, r'\*/'), + 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'), + PatternRule('delimiter', r'(?:;|{|}|\[|\]|\(|\)|,|\.|<(?![a-zA-Z_])|>|:|/|\+|-|\*|=)'), RegionRule('scala.inline', r'(?:^| )(?=<[a-zA-Z_])', XMLGrammar, '^[ \t]*$'), @@ -36,10 +42,14 @@ class ScalaGrammar(Grammar): PatternRule('eol', r'\n'), PatternRule('scala.def', '(?<=(?