summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/python.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-06-07 14:40:21 +0000
committermurphy <murphy@rubychan.de>2009-06-07 14:40:21 +0000
commit7f62e450f4c5d7688133fecd10572cb0c54e6dce (patch)
tree0f2df3aae1ad20c0ecb90bf37cdfac9b97732b2c /lib/coderay/scanners/python.rb
parent0db86ecbd49ce957d5d27ae98607e83aa95c951b (diff)
downloadcoderay-7f62e450f4c5d7688133fecd10572cb0c54e6dce.tar.gz
Fixed an issue with predefined idents in the Python Scanner.
* @file=@ should not be recognized as the predefined method @file@.
Diffstat (limited to 'lib/coderay/scanners/python.rb')
-rw-r--r--lib/coderay/scanners/python.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/coderay/scanners/python.rb b/lib/coderay/scanners/python.rb
index 6e86b88..f72a29e 100644
--- a/lib/coderay/scanners/python.rb
+++ b/lib/coderay/scanners/python.rb
@@ -129,6 +129,7 @@ module Scanners
# TODO: keyword arguments
kind = :ident if last_token_dot
kind = check(/\(/) ? :ident : :keyword if kind == :old_keyword
+ kind = :ident if kind == :predefined && check(/=/)
elsif scan(/@[a-zA-Z0-9_.]+[lL]?/)
kind = :decorator