| @@ 179-183 (lines=5) @@ | ||
| 176 | ||
| 177 |         if ($code === 48) { // 0 | |
| 178 | $code = $this->charCodeAt(++$position); | |
| 179 |         } elseif ($code >= 49 && $code <= 57) { // 1 - 9 | |
| 180 |             do { | |
| 181 | $code = $this->charCodeAt(++$position); | |
| 182 | } while ($code >= 48 && $code <= 57); // 0 - 9 | |
| 183 |         } else { | |
| 184 | // @todo Throw proper exception. | |
| 185 |             throw new \Exception('Invalid number.'); | |
| 186 | } | |
| @@ 192-199 (lines=8) @@ | ||
| 189 | $type = Token::FLOAT_TYPE; | |
| 190 | ||
| 191 | $code = $this->charCodeAt(++$position); | |
| 192 |             if ($code >= 48 && $code <= 57) { // 0 - 9 | |
| 193 |                 do { | |
| 194 | $code = $this->charCodeAt(++$position); | |
| 195 | } while ($code >= 48 && $code <= 57); // 0 - 9 | |
| 196 |             } else { | |
| 197 | // @todo Throw proper exception. | |
| 198 |                 throw new \Exception('Invalid number.'); | |
| 199 | } | |
| 200 | ||
| 201 |             if ($code === 69 || $code === 101) { // E e | |
| 202 | $code = $this->charCodeAt(++$position); | |
| @@ 206-213 (lines=8) @@ | ||
| 203 |                 if ($code === 43 || $code === 45) { // + - | |
| 204 | $code = $this->charCodeAt(++$position); | |
| 205 | } | |
| 206 |                 if ($code >= 48 && $code <= 57) { // 0 - 9 | |
| 207 |                     do { | |
| 208 | $code = $this->charCodeAt(++$position); | |
| 209 | } while ($code >= 48 && $code <= 57); // 0 - 9 | |
| 210 |                 } else { | |
| 211 | // @todo Throw proper exception. | |
| 212 |                     throw new \Exception('Invalid number.'); | |
| 213 | } | |
| 214 | } | |
| 215 | } | |
| 216 | ||