mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
Make sure float suffixes are parsed out after can
Before we hit mono, we need to make sure the suffixes of numeric literals are parsed out from the literal string, so that we don't try to parse something whose type we already know but has the extraneous suffix. Co'ed with @tagraves
This commit is contained in:
parent
19c02aa087
commit
9fbc525d02
6 changed files with 22 additions and 13 deletions
|
@ -315,12 +315,7 @@ pub fn canonicalize_expr<'a>(
|
|||
(answer, Output::default())
|
||||
}
|
||||
&ast::Expr::Float(str) => {
|
||||
let answer = float_expr_from_result(
|
||||
var_store,
|
||||
finish_parsing_float(str).map(|(f, bound)| (str, f, bound)),
|
||||
region,
|
||||
env,
|
||||
);
|
||||
let answer = float_expr_from_result(var_store, finish_parsing_float(str), region, env);
|
||||
|
||||
(answer, Output::default())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue