|
| 1 | +-- Numbers |
| 2 | + |
1 | 3 | float_var := <span class="hljs-number">1.0e10</span>
|
2 | 4 | complex_var := <span class="hljs-number">1.2e5</span>+<span class="hljs-number">2.3i</span>
|
3 | 5 | hex_int := <span class="hljs-number">0xcf3e4028ac084aea</span>
|
| 6 | + |
| 7 | +int_simple := <span class="hljs-number">42</span> |
| 8 | +int_underscore := <span class="hljs-number">4_2</span> |
| 9 | +octal := <span class="hljs-number">0600</span> |
| 10 | +octal_underscore := <span class="hljs-number">0_600</span> |
| 11 | +octal_o := <span class="hljs-number">0o600</span> |
| 12 | +octal_upper_o := <span class="hljs-number">0O600</span> |
| 13 | +hex_mixed_case := <span class="hljs-number">0xBadFace</span> |
| 14 | +hex_underscore := <span class="hljs-number">0xBad_Face</span> |
| 15 | +hex_many_underscore := <span class="hljs-number">0x_67_7a_2f_cc_40_c6</span> |
| 16 | +long_int := <span class="hljs-number">170141183460469231731687303715884105727</span> |
| 17 | +long_int_underscore := <span class="hljs-number">170_141183_460469_231731_687303_715884_105727</span> |
| 18 | + |
| 19 | +float_no_post := <span class="hljs-number">0.</span> |
| 20 | +float_simple := <span class="hljs-number">72.40</span> |
| 21 | +float_leading_zero := <span class="hljs-number">072.40</span> |
| 22 | +float_e := <span class="hljs-number">1.e+0</span> |
| 23 | +float_e_neg := <span class="hljs-number">6.67428e-11</span> |
| 24 | +float_e_no_decimal := <span class="hljs-number">1E6</span> |
| 25 | +float_no_pre := <span class="hljs-number">.25</span> |
| 26 | +float_e_no_pre := <span class="hljs-number">.12345E+5</span> |
| 27 | +float_underscore := <span class="hljs-number">1_5.</span> |
| 28 | +float_underscore_in_e := <span class="hljs-number">0.15e+0_2</span> |
| 29 | + |
| 30 | +float_hex_p := <span class="hljs-number">0x1p-2</span> |
| 31 | +float_hex_p_no_post := <span class="hljs-number">0x2.p10</span> |
| 32 | +float_hex_p_sign := <span class="hljs-number">0x1.Fp+0</span> |
| 33 | +float_hex_p_neg := <span class="hljs-number">0X.8p-0</span> |
| 34 | +float_hex_underscore := <span class="hljs-number">0X_1FFFP-16</span> |
| 35 | + |
| 36 | +complex_zero := <span class="hljs-number">0i</span> |
| 37 | +complex_leading_zero := <span class="hljs-number">0123i</span> |
| 38 | +complex_octal := <span class="hljs-number">0o123i</span> |
| 39 | +complex_hex := <span class="hljs-number">0xabci</span> |
| 40 | +complex_float_zero := <span class="hljs-number">0.i</span> |
| 41 | +complex_float_simple := <span class="hljs-number">2.71828i</span> |
| 42 | +complex_float_e := <span class="hljs-number">1.e+0i</span> |
| 43 | +complex_float_e_neg := <span class="hljs-number">6.67428e-11i</span> |
| 44 | +complex_float_e_no_decimal := <span class="hljs-number">1E6i</span> |
| 45 | +complex_float_no_pre := <span class="hljs-number">.25i</span> |
| 46 | +complex_float_e_no_pre := <span class="hljs-number">.12345E+5i</span> |
| 47 | +complex_float_hex_p := <span class="hljs-number">0x1p-2i</span> |
| 48 | + |
| 49 | +-- Non-numbers |
| 50 | + |
| 51 | +identifier := _42 |
| 52 | +trailing_underscore := <span class="hljs-number">42</span>_ |
| 53 | +multiple_underscore := <span class="hljs-number">4</span>__2 |
| 54 | +underscore_in_hex_prefix := <span class="hljs-number">0</span>_xBadFace |
| 55 | + |
| 56 | +float_minus_int := <span class="hljs-number">0x15e</span><span class="hljs-number">-2</span> |
| 57 | +no_mantissa_digits := <span class="hljs-number">0</span>x.p1 |
| 58 | +p_exponent_on_decimal := <span class="hljs-number">1</span>p<span class="hljs-number">-2</span> |
| 59 | +missing_p_exponent := <span class="hljs-number">0x1</span><span class="hljs-number">.5e-2</span> |
| 60 | +underscore_before_decimal := <span class="hljs-number">1</span>_<span class="hljs-number">.5</span> |
| 61 | +underscore_after_decimal := <span class="hljs-number">1.</span>_5 |
| 62 | +underscore_before_e := <span class="hljs-number">1.5</span>_e1 |
| 63 | +underscore_after_e := <span class="hljs-number">1.5</span>e_1 |
| 64 | +trailing_underscore_in_exponent := <span class="hljs-number">1.5e1</span>_ |
0 commit comments