add better docs for tokenize errors

This commit is contained in:
Veetaha 2020-01-27 01:38:16 +02:00
parent ffe00631d5
commit c6d0881382

View file

@ -107,9 +107,9 @@ pub fn first_token(text: &str) -> Option<ParsedToken> {
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum TokenizeError {
/// Base prefix was provided, but there were no digits
/// after it, e.g. `0x`.
/// after it, e.g. `0x`, `0b`.
EmptyInt,
/// Float exponent lacks digits e.g. `e+`, `E+`, `e-`, `E-`,
/// Float exponent lacks digits e.g. `12.34e+`, `12.3E+`, `12e-`, `1_E-`,
EmptyExponent,
/// Block comment lacks trailing delimiter `*/`