diff options
author | Tim Hatch <tim@timhatch.com> | 2012-11-06 06:59:44 -0800 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2012-11-06 06:59:44 -0800 |
commit | 0bf214af2c0ff6f8fe2dced934231cd243064dd3 (patch) | |
tree | 7bde9619f241f3c5d30f0fdc720b53f9d8b9742f | |
parent | d05900c5b736f41ee1aa8b88c6bc4286f4899005 (diff) | |
download | pygments-0bf214af2c0ff6f8fe2dced934231cd243064dd3.tar.gz |
Fix operator highlighting in Monkey lexer.
-rw-r--r-- | pygments/lexers/compiled.py | 2 | ||||
-rw-r--r-- | tests/examplefiles/example.monkey | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index e7982052..2ea74439 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -3129,7 +3129,7 @@ class MonkeyLexer(RegexLexer): # Array (r'[\[\]]', Punctuation), # Other - (r'<=|>=|<>|[*]=|/=|[+]=|-=|&=|~=|\[|\]=|[-&*/^+=<>]', Operator), + (r'<=|>=|<>|\*=|/=|\+=|-=|&=|~=|\|=|[-&*/^+=<>|~]', Operator), (r'(?i)(?:Not|Mod|Shl|Shr|And|Or)', Operator.Word), (r'[\(\){}!#,.:]', Punctuation), # catch the rest diff --git a/tests/examplefiles/example.monkey b/tests/examplefiles/example.monkey index c0567ed4..facd3a73 100644 --- a/tests/examplefiles/example.monkey +++ b/tests/examplefiles/example.monkey @@ -141,4 +141,12 @@ DoOtherStuff() #SOMETHING = True #Print SOMETHING #If SOMETHING -#End
\ No newline at end of file +#End + +' operators +Global a = 32 +Global b = 32 ~ 0 +b ~= 16 +b |= 16 +b &= 16 +Global c = a | b |