summaryrefslogtreecommitdiff
path: root/pygments/lexers/rebol.py
diff options
context:
space:
mode:
authorAnteru <bitbucket@ca.sh13.net>2019-04-30 15:47:45 +0000
committerAnteru <bitbucket@ca.sh13.net>2019-04-30 15:47:45 +0000
commit83e159f05ec8dae7d6e52140b23b363d4c3b18f2 (patch)
tree1fa06af4657f37b48cc798a662a0986fb004ba52 /pygments/lexers/rebol.py
parent836d98cc163ea0dcb1b60ef1e536fdacb351d78a (diff)
parenta0fc52727aaed41c8e09c87996de842117872afb (diff)
downloadpygments-83e159f05ec8dae7d6e52140b23b363d4c3b18f2.tar.gz
Merged in Praetonus/pygments-main/pony (pull request #627)
Add lexer for the Pony language
Diffstat (limited to 'pygments/lexers/rebol.py')
-rw-r--r--pygments/lexers/rebol.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pygments/lexers/rebol.py b/pygments/lexers/rebol.py
index b844ad96..e58e01fa 100644
--- a/pygments/lexers/rebol.py
+++ b/pygments/lexers/rebol.py
@@ -5,7 +5,7 @@
Lexers for the REBOL and related languages.
- :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -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