diff options
author | Georg Brandl <georg@python.org> | 2015-10-17 08:13:41 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2015-10-17 08:13:41 +0200 |
commit | 6d788f6655e464b49fab41e5ebb1ea71f6feacfa (patch) | |
tree | 31ee511f43fad69de0a62bea48bb6019413219f0 /pygments/lexers/dsls.py | |
parent | 2a23ca2d327465b8542471b36edb97249283ce90 (diff) | |
download | pygments-6d788f6655e464b49fab41e5ebb1ea71f6feacfa.tar.gz |
Crmsh/dsls: style fixes
Diffstat (limited to 'pygments/lexers/dsls.py')
-rw-r--r-- | pygments/lexers/dsls.py | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/pygments/lexers/dsls.py b/pygments/lexers/dsls.py index 01aad058..c0671130 100644 --- a/pygments/lexers/dsls.py +++ b/pygments/lexers/dsls.py @@ -472,19 +472,22 @@ class PanLexer(RegexLexer): ], 'basic': [ (words(( - 'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final', 'prefix', - 'unique', 'object', 'foreach', 'include', 'template', 'function', 'variable', - 'structure', 'extensible', 'declaration'), prefix=r'\b', suffix=r'\s*\b'), + 'if', 'for', 'with', 'else', 'type', 'bind', 'while', 'valid', 'final', + 'prefix', 'unique', 'object', 'foreach', 'include', 'template', + 'function', 'variable', 'structure', 'extensible', 'declaration'), + prefix=r'\b', suffix=r'\s*\b'), Keyword), (words(( - 'file_contents', 'format', 'index', 'length', 'match', 'matches', 'replace', - 'splice', 'split', 'substr', 'to_lowercase', 'to_uppercase', 'debug', 'error', - 'traceback', 'deprecated', 'base64_decode', 'base64_encode', 'digest', 'escape', - 'unescape', 'append', 'create', 'first', 'nlist', 'key', 'list', 'merge', 'next', - 'prepend', 'is_boolean', 'is_defined', 'is_double', 'is_list', 'is_long', - 'is_nlist', 'is_null', 'is_number', 'is_property', 'is_resource', 'is_string', - 'to_boolean', 'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists', - 'path_exists', 'if_exists', 'return', 'value'), prefix=r'\b', suffix=r'\s*\b'), + 'file_contents', 'format', 'index', 'length', 'match', 'matches', + 'replace', 'splice', 'split', 'substr', 'to_lowercase', 'to_uppercase', + 'debug', 'error', 'traceback', 'deprecated', 'base64_decode', + 'base64_encode', 'digest', 'escape', 'unescape', 'append', 'create', + 'first', 'nlist', 'key', 'list', 'merge', 'next', 'prepend', 'is_boolean', + 'is_defined', 'is_double', 'is_list', 'is_long', 'is_nlist', 'is_null', + 'is_number', 'is_property', 'is_resource', 'is_string', 'to_boolean', + 'to_double', 'to_long', 'to_string', 'clone', 'delete', 'exists', + 'path_exists', 'if_exists', 'return', 'value'), + prefix=r'\b', suffix=r'\s*\b'), Name.Builtin), (r'#.*', Comment), (r'\\[\w\W]', String.Escape), @@ -543,8 +546,8 @@ class CrmshLexer(RegexLexer): acl_mod = (r'(?:tag|ref|reference|attribute|type|xpath)') bin_ops = (r'(?:lt|gt|lte|gte|eq|ne)') val_qual = (r'(?:string|version|number)') - rsc_role_action=(r'(?:Master|Started|Slave|Stopped|' - r'start|promote|demote|stop)') + rsc_role_action = (r'(?:Master|Started|Slave|Stopped|' + r'start|promote|demote|stop)') tokens = { 'root': [ @@ -564,8 +567,7 @@ class CrmshLexer(RegexLexer): (sub, Keyword), (acl, Keyword), # binary operators - (r'(?:%s:)?(%s)(?![\w#$-])' % (val_qual,bin_ops), - Operator.Word), + (r'(?:%s:)?(%s)(?![\w#$-])' % (val_qual, bin_ops), Operator.Word), # other operators (bin_rel, Operator.Word), (un_ops, Operator.Word), @@ -574,11 +576,11 @@ class CrmshLexer(RegexLexer): (r'#[a-z]+(?![\w#$-])', Name.Builtin), # acl_mod:blah (r'(%s)(:)("(?:""|[^"])*"|\S+)' % acl_mod, - bygroups(Keyword, Punctuation, Name)), + bygroups(Keyword, Punctuation, Name)), # rsc_id[:(role|action)] # NB: this matches all other identifiers (r'([\w#$-]+)(?:(:)(%s))?(?![\w#$-])' % rsc_role_action, - bygroups(Name, Punctuation, Operator.Word)), + bygroups(Name, Punctuation, Operator.Word)), # punctuation (r'(\\(?=\n)|[[\](){}/:@])', Punctuation), (r'\s+|\n', Whitespace), |