Addressed PR comments

This commit is contained in:
Marvin Löbel 2015-02-19 14:36:58 +01:00
parent a641996796
commit c8dd2d066d
18 changed files with 237 additions and 90 deletions

View file

@ -2496,7 +2496,7 @@ impl<'a> Parser<'a> {
let fstr = n.as_str();
self.span_err(last_span,
&format!("unexpected token: `{}`", n.as_str()));
if fstr.chars().all(|x| "0123456789.".contains_char(x)) {
if fstr.chars().all(|x| "0123456789.".contains(x)) {
let float = match fstr.parse::<f64>().ok() {
Some(f) => f,
None => continue,