More DataSpec tweaks

This commit is contained in:
str4d
2013-06-12 02:12:44 +00:00
parent 6d206a117f
commit faf12aadbe
2 changed files with 9 additions and 7 deletions

View File

@ -31,12 +31,14 @@ class DataSpecLexer(RegexLexer):
],
'expression': [
(r'(\s*)(\))', bygroups(Text, Punctuation), '#pop'),
(r'(\s*)(\+)', bygroups(Text, Punctuation)),
(r'(\s*)([+-])', bygroups(Text, Operator)),
(r'(\s*)(\$\w+)', bygroups(Text, Name.Tag)),
(r'(\s*)(\w+)', bygroups(Text, Name)),
],
'definition': [
(r'(\s*)([\w=;]+)(\s)(::)(\s)', bygroups(Text, Name.Tag, Text, Operator, Text)),
(r'(\s*)((?:[A-Z][a-z]+)+)', bygroups(Text, Name.Class)),
(r'(\s*)([A-Z]{2,})', bygroups(Text, Name.Constant)),
(r'(\s*)([\[\]])', bygroups(Text, Punctuation)),
(r'(\s*)(\$\w+)', bygroups(Text, Name.Tag)),
(r'(\s*)([0-9]+)(\+)?', bygroups(Text, Number, Punctuation)),