diff options
author | Thomas Kluyver <takowl@gmail.com> | 2016-07-12 20:00:52 +0100 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2016-07-12 20:00:52 +0100 |
commit | 346229c9c36d45086db283f1c5612355e55d6efe (patch) | |
tree | e7e21f7e16099ef37adb59d13aaf24a6128ba7ef | |
parent | 421263e90981c08119640d280af96550e9f5fd05 (diff) | |
download | pygments-346229c9c36d45086db283f1c5612355e55d6efe.tar.gz |
Add '1e6' as float token for Python3Lexer
The parent class (PythonLexer) has this, but it's missing from the subclass.
1e6 is a valid float token in Python 3 as well.
-rw-r--r-- | pygments/lexers/python.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index 35635ed1..d41dd08d 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -362,6 +362,7 @@ class Python3Lexer(RegexLexer): ] tokens['numbers'] = [ (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float), + (r'\d+[eE][+-]?[0-9]+j?', Number.Float), (r'0[oO][0-7]+', Number.Oct), (r'0[bB][01]+', Number.Bin), (r'0[xX][a-fA-F0-9]+', Number.Hex), |