diff options
author | Anteru <bitbucket@ca.sh13.net> | 2018-12-21 16:23:58 +0000 |
---|---|---|
committer | Anteru <bitbucket@ca.sh13.net> | 2018-12-21 16:23:58 +0000 |
commit | 5e5f02aa70471bafc6f4b61101e2099514596b91 (patch) | |
tree | df0cc3084d797532d585780b3b9f4793da1b263b /pygments/lexers/rebol.py | |
parent | ead0ddfe75a8ae8e051d3c4cbc780a472e107654 (diff) | |
parent | 2fcf07e09ccb72b7b2e73cffa8492fa0d5cb23db (diff) | |
download | pygments-5e5f02aa70471bafc6f4b61101e2099514596b91.tar.gz |
Merged in bgcook/pygments-main (pull request #760)
add Slurm script parser
Diffstat (limited to 'pygments/lexers/rebol.py')
-rw-r--r-- | pygments/lexers/rebol.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pygments/lexers/rebol.py b/pygments/lexers/rebol.py index f3d00200..e58e01fa 100644 --- a/pygments/lexers/rebol.py +++ b/pygments/lexers/rebol.py @@ -102,12 +102,12 @@ class RebolLexer(RegexLexer): yield match.start(), Generic.Heading, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match('(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', + elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', word): yield match.start(), Operator, word - elif re.match(".*\?$", word): + elif re.match(r".*\?$", word): yield match.start(), Keyword, word - elif re.match(".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word @@ -239,7 +239,7 @@ class RebolLexer(RegexLexer): if re.match(r'^\s*REBOL\s*\[', text, re.IGNORECASE): # The code starts with REBOL header return 1.0 - elif re.search(r'\s*REBOL\s*[', text, re.IGNORECASE): + elif re.search(r'\s*REBOL\s*\[', text, re.IGNORECASE): # The code contains REBOL header but also some text before it return 0.5 @@ -297,10 +297,10 @@ class RedLexer(RegexLexer): yield match.start(), Keyword.Namespace, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match('(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' - '<<<|>>>|<<|>>|<|>%)$', word): + elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' + r'<<<|>>>|<<|>>|<|>%)$', word): yield match.start(), Operator, word - elif re.match(".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word |