Updated dataspec lexer
This commit is contained in:
@ -11,8 +11,8 @@ class DataSpecLexer(RegexLexer):
|
||||
(r'(\s*)(\+-)', bygroups(Text, Text), 'boundary'),
|
||||
(r'(\s+)([\+|])', bygroups(Text, Text), 'content'),
|
||||
(r'(\s*)(~)', bygroups(Text, Generic.Strong), 'content'),
|
||||
(r'(\s*)([\w=;]+)(\s)(::)(\s)', bygroups(Text, Name.Tag, Text, Operator, Text)),
|
||||
(r'(\s*)((?:[A-Z][a-z]+)+)', bygroups(Text, Name.Class)),
|
||||
(r'(\s*)([\w=;]+)(\s[\w=;]+)*(\s)(::)(\s)', bygroups(Text, Name.Tag, Name.Tag, Text, Operator, Text)),
|
||||
(r'(\s*)`((?:[A-Z][a-z]+)(?:[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)),
|
||||
@ -34,8 +34,8 @@ class DataSpecLexer(RegexLexer):
|
||||
(r'(\s*)(\.\.\.)(\s)', bygroups(Text, Generic.Strong, Text)),
|
||||
(r'(\s*)(\.\.\.)$', bygroups(Text, Generic.Strong), '#pop'),
|
||||
(r'(\s*)(~)$', bygroups(Text, Generic.Strong), '#pop'),
|
||||
(r'(\s*)([\w=;]+)$', bygroups(Text, Name.Tag), '#pop'),
|
||||
(r'(\s*)([\w=;]+)', bygroups(Text, Name.Tag)),
|
||||
(r'(\s*)([\w=;]+)(\s[\w=;]+)*$', bygroups(Text, Name.Tag, Name.Tag), '#pop'),
|
||||
(r'(\s*)([\w=;]+)(\s[\w=;]+)*', bygroups(Text, Name.Tag, Name.Tag)),
|
||||
(r'(\s*)(\|)', bygroups(Text, Text)),
|
||||
(r'(\s*)(\()', bygroups(Text, Punctuation), 'expression'),
|
||||
],
|
||||
|
Reference in New Issue
Block a user