From c6d0881382548da9e6f8a8362306e7c3948b84b8 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Mon, 27 Jan 2020 01:38:16 +0200 Subject: add better docs for tokenize errors --- crates/ra_syntax/src/parsing/lexer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs index 7cd7110de..bf6b4d637 100644 --- a/crates/ra_syntax/src/parsing/lexer.rs +++ b/crates/ra_syntax/src/parsing/lexer.rs @@ -107,9 +107,9 @@ pub fn first_token(text: &str) -> Option { #[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 `*/` -- cgit v1.2.3