track f64 offsets in Literal (#1190)

This commit is contained in:
Mark Thom
2022-05-04 21:54:46 -06:00
parent 0f502fff84
commit 6030fae685
13 changed files with 163 additions and 71 deletions

View File

@@ -949,9 +949,9 @@ impl<'a, R: CharRead> Parser<'a, R> {
self.negate_number(n, negate_rc, |r, _| Literal::Rational(r))
}
Token::Literal(Literal::Float(n)) => self.negate_number(
**n,
**n.as_ptr(),
|n| -n,
|n, arena| Literal::Float(float_alloc!(n, arena))
|n, arena| Literal::from(float_alloc!(n, arena)),
),
Token::Literal(c) => {
if let Some(name) = atomize_constant(&mut self.lexer.machine_st.atom_tbl, c) {