github.com/AndrienkoAleksandr/go@v0.0.19/src/go/printer/testdata/go2numbers.norm (about) 1 package p 2 3 const ( 4 // 0-octals 5 _ = 0 6 _ = 0123 7 _ = 0123456 8 9 _ = 0_123 10 _ = 0123_456 11 12 // decimals 13 _ = 1 14 _ = 1234 15 _ = 1234567 16 17 _ = 1_234 18 _ = 1_234_567 19 20 // hexadecimals 21 _ = 0x0 22 _ = 0x1234 23 _ = 0xcafef00d 24 25 _ = 0x0 26 _ = 0x1234 27 _ = 0xCAFEf00d 28 29 _ = 0x_0 30 _ = 0x_1234 31 _ = 0x_CAFE_f00d 32 33 // octals 34 _ = 0o0 35 _ = 0o1234 36 _ = 0o01234567 37 38 _ = 0o0 39 _ = 0o1234 40 _ = 0o01234567 41 42 _ = 0o_0 43 _ = 0o_1234 44 _ = 0o0123_4567 45 46 _ = 0o_0 47 _ = 0o_1234 48 _ = 0o0123_4567 49 50 // binaries 51 _ = 0b0 52 _ = 0b1011 53 _ = 0b00101101 54 55 _ = 0b0 56 _ = 0b1011 57 _ = 0b00101101 58 59 _ = 0b_0 60 _ = 0b10_11 61 _ = 0b_0010_1101 62 63 // decimal floats 64 _ = 0. 65 _ = 123. 66 _ = 0123. 67 68 _ = .0 69 _ = .123 70 _ = .0123 71 72 _ = 0e0 73 _ = 123e+0 74 _ = 0123e-1 75 76 _ = 0e-0 77 _ = 123e+0 78 _ = 0123e123 79 80 _ = 0.e+1 81 _ = 123.e-10 82 _ = 0123.e123 83 84 _ = .0e-1 85 _ = .123e+10 86 _ = .0123e123 87 88 _ = 0.0 89 _ = 123.123 90 _ = 0123.0123 91 92 _ = 0.0e1 93 _ = 123.123e-10 94 _ = 0123.0123e+456 95 96 _ = 1_2_3. 97 _ = 0_123. 98 99 _ = 0_0e0 100 _ = 1_2_3e0 101 _ = 0_123e0 102 103 _ = 0e-0_0 104 _ = 1_2_3e+0 105 _ = 0123e1_2_3 106 107 _ = 0.e+1 108 _ = 123.e-1_0 109 _ = 01_23.e123 110 111 _ = .0e-1 112 _ = .123e+10 113 _ = .0123e123 114 115 _ = 1_2_3.123 116 _ = 0123.01_23 117 118 // hexadecimal floats 119 _ = 0x0.p+0 120 _ = 0xdeadcafe.p-10 121 _ = 0x1234.p123 122 123 _ = 0x.1p-0 124 _ = 0x.deadcafep2 125 _ = 0x.1234p+10 126 127 _ = 0x0p0 128 _ = 0xdeadcafep+1 129 _ = 0x1234p-10 130 131 _ = 0x0.0p0 132 _ = 0xdead.cafep+1 133 _ = 0x12.34p-10 134 135 _ = 0xdead_cafep+1 136 _ = 0x_1234p-10 137 138 _ = 0x_dead_cafe.p-10 139 _ = 0x12_34.p1_2_3 140 _ = 0x1_2_3_4.p-1_2_3 141 142 // imaginaries 143 _ = 0i 144 _ = 0i 145 _ = 8i 146 _ = 0i 147 _ = 123i 148 _ = 123i 149 _ = 56789i 150 _ = 1234i 151 _ = 1234567i 152 153 _ = 0i 154 _ = 0i 155 _ = 8i 156 _ = 0i 157 _ = 123i 158 _ = 123i 159 _ = 56_789i 160 _ = 1_234i 161 _ = 1_234_567i 162 163 _ = 0.i 164 _ = 123.i 165 _ = 0123.i 166 _ = 000123.i 167 168 _ = 0e0i 169 _ = 123e0i 170 _ = 0123e0i 171 _ = 000123e0i 172 173 _ = 0.e+1i 174 _ = 123.e-1_0i 175 _ = 01_23.e123i 176 _ = 00_01_23.e123i 177 178 _ = 0b1010i 179 _ = 0b1010i 180 _ = 0o660i 181 _ = 0o660i 182 _ = 0xabcDEFi 183 _ = 0xabcDEFi 184 _ = 0xabcDEFp0i 185 _ = 0xabcDEFp0i 186 )