diff options
author | Marshall Ward <marshall.ward@gmail.com> | 2018-01-06 11:39:40 +1100 |
---|---|---|
committer | Marshall Ward <marshall.ward@gmail.com> | 2018-01-06 11:39:40 +1100 |
commit | 1c98199b06c059434b7b16c85b6568b6e6d6c9a7 (patch) | |
tree | fbdf3e1dcd652caa96b87ad07152f0f21e663289 /pygments | |
parent | 0db8e281af377923115b894703b2b8beb8f1e9d5 (diff) | |
download | pygments-1c98199b06c059434b7b16c85b6568b6e6d6c9a7.tar.gz |
Fortran E-notation float without decimal
Added a regex to parse Fortran floating points which identify floating point
values with exponents but without decimals (e.g. 1e4 vs 1.e4 or 1.0e4)
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/fortran.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py index 1a611c9d..61b8aaeb 100644 --- a/pygments/lexers/fortran.py +++ b/pygments/lexers/fortran.py @@ -158,6 +158,7 @@ class FortranLexer(RegexLexer): (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer), (r'[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float), (r'[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float), + (r'[+-]?\d+(\.\d*)?([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float), ], } |