diff options
-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 |