diff --git a/mode/scala.py b/mode/scala.py index b6d3ebf..3330029 100644 --- a/mode/scala.py +++ b/mode/scala.py @@ -1,11 +1,9 @@ -#import commands from tab import StackTabber2 -#from method import Method from mode import Fundamental from lex import Grammar, PatternRule, RegionRule, PatternMatchRule -from mode.python import StringGrammar1, StringGrammar2 -#from mode.pipe import Pipe -#from method.shell import Interact +from mode.xml import XMLGrammar +from mode.pipe import Pipe +from method.shell import Interact chr1 = '[a-zA-Z_]' chr2 = '[a-zA-Z_0-9]' @@ -28,11 +26,11 @@ class ScalaGrammar(Grammar): PatternRule('scala.comment', '//.*$'), RegionRule('scala.comment', r'/\*', NestedCommentGrammar, r'\*/'), + PatternRule('delimiter', r'(?:;|{|}|\[|\]|\(|\)|,|\.|<(?![a-zA-Z_])|>|:|/|\+|-|\*|=)'), + PatternRule('spaces', r'(?:\t| )+'), PatternRule('eol', r'\n'), - PatternRule('delimiter', r'(?:;|{|}|\[|\]|\(|\)|,|\.|<|>|:|/|\+|-|\*|=)'), - PatternRule('scala.def', '(?<=(?