diff options
author | jfbu <jfbu@free.fr> | 2018-12-16 18:34:05 +0100 |
---|---|---|
committer | jfbu <jfbu@free.fr> | 2018-12-16 18:34:05 +0100 |
commit | 30ec4b6bba3cb256b700ca1d7438ddd01b3e948c (patch) | |
tree | 83eeba01a4accfffc5e8f878767e897642fa23b1 /sphinx/domains/cpp.py | |
parent | 6461ea233b393abb12a800213e03f12b0b963f3e (diff) | |
parent | 73a8b7e6581d094cc88c36cbeccab56031351d27 (diff) | |
download | sphinx-git-30ec4b6bba3cb256b700ca1d7438ddd01b3e948c.tar.gz |
Merge branch '1.8'
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r-- | sphinx/domains/cpp.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 40dfd5df9..380a9e98a 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -293,7 +293,18 @@ _octal_literal_re = re.compile(r'0[0-7]*') _hex_literal_re = re.compile(r'0[xX][0-7a-fA-F][0-7a-fA-F]*') _binary_literal_re = re.compile(r'0[bB][01][01]*') _integer_suffix_re = re.compile(r'') -_float_literal_re = re.compile(r'[+-]?[0-9]*\.[0-9]+') +_float_literal_re = re.compile(r'''(?x) + [+-]?( + # decimal + ([0-9]+[eE][+-]?[0-9]+) + | ([0-9]*\.[0-9]+([eE][+-]?[0-9]+)?) + | ([0-9]+\.([eE][+-]?[0-9]+)?) + # hex + | (0[xX][0-9a-fA-F]+[pP][+-]?[0-9a-fA-F]+) + | (0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+([pP][+-]?[0-9a-fA-F]+)?) + | (0[xX][0-9a-fA-F]+\.([pP][+-]?[0-9a-fA-F]+)?) + ) +''') _char_literal_re = re.compile(r'''(?x) ((?:u8)|u|U|L)? '( |