parent
8a24c92379
commit
d03d3b247f
|
@ -50,10 +50,14 @@ class ScalaGrammar(Grammar):
|
|||
#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'),
|
||||
PatternMatchRule('x', r'(with)( +)([a-zA-Z0-9_.]+)',
|
||||
PatternMatchRule('x', r'(extends|with|new)( +)([a-zA-Z0-9_.]+)',
|
||||
'scala.reserved', 'spaces', 'scala.type'),
|
||||
#PatternMatchRule('x', r'(with)( +)([a-zA-Z0-9_.]+)',
|
||||
# 'scala.reserved', 'spaces', 'scala.type'),
|
||||
#PatternMatchRule('x', r'(new)( +)([a-zA-Z0-9_.]+)',
|
||||
# 'scala.reserved', 'spaces', 'scala.type'),
|
||||
|
||||
PatternRule('scala.def', '(?<=(?<![a-zA-Z0-9_])def )[^0-9:\[\( ][^:\[\( ]*'),
|
||||
|
||||
#PatternRule('delimiter', r'(?:;|{|}|\[|\]|\(|\)|,|\.|<(?![a-zA-Z_])|>|:|/|\+|-|\*|=)'),
|
||||
RegionRule('sub', r'(?<=:)\(', SubTypeGrammar, r'\)'),
|
||||
|
@ -64,7 +68,8 @@ class ScalaGrammar(Grammar):
|
|||
PatternRule('spaces', r'(?:\t| )+'),
|
||||
PatternRule('eol', r'\n'),
|
||||
|
||||
PatternRule('scala.def', '(?<=(?<![a-zA-Z0-9_])def )[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
#PatternRule('scala.def', '(?<=(?<![a-zA-Z0-9_])def )[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
#PatternRule('scala.def', '(?<=(?<![a-zA-Z0-9_])def )[^0-9\[\( ][^\[\( ]*'),
|
||||
|
||||
PatternRule('scala.class', '(?<=(?<![a-zA-Z0-9_])class )[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
PatternRule('scala.object', '(?<=(?<![a-zA-Z0-9_])object )[a-zA-Z_][a-zA-Z0-9_]*'),
|
||||
|
|
Loading…
Reference in New Issue