Merge pull request #88 from benesch/hash

Implement Hash on all AST nodes
This commit is contained in:
Nikhil Benesch 2019-06-03 11:29:31 -04:00 committed by GitHub
commit 057518b377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 31 deletions

View file

@ -1031,7 +1031,7 @@ impl Parser {
}
},
Token::Number(ref n) if n.contains('.') => match n.parse::<f64>() {
Ok(n) => Ok(Value::Double(n)),
Ok(n) => Ok(Value::Double(n.into())),
Err(e) => parser_err!(format!("Could not parse '{}' as f64: {}", n, e)),
},
Token::Number(ref n) => match n.parse::<u64>() {