Dataspec: handle hex, x^y, ?

This commit is contained in:
str4d
2015-06-27 14:23:50 +00:00
parent 414efb636f
commit 3faf8fe6cf

View File

@@ -17,10 +17,11 @@ class DataSpecLexer(RegexLexer):
(r'(\s*)([A-Z]{2,})', bygroups(Text, Name.Constant)),
(r'(\s*)([\[\]])', bygroups(Text, Punctuation)),
(r'(\s*)(\$\w+)', bygroups(Text, Name.Tag)),
(r'(\s*)(0x[0-9a-f]+)', bygroups(Text, Number.Hex)),
(r'(\s*)([0-9]+)(\+)?', bygroups(Text, Number, Punctuation)),
(r'(-)([0-9]+)', bygroups(Punctuation, Number)),
(r'(\s*)(->|<=|>=|\*)', bygroups(Text, Operator)),
(r'(\s*)([\w()-=\'<>]+)', bygroups(Text, Comment)),
(r'(\s*)(->|<=|>=|\*|\^)', bygroups(Text, Operator)),
(r'(\s*)([\w()-=\'<>?]+)', bygroups(Text, Comment)),
],
'boundary': [
(r'-{3,}\+$', Text, '#pop'),