diff --git a/crates/web/src/lib.rs b/crates/web/src/lib.rs index e83993a..ec26335 100644 --- a/crates/web/src/lib.rs +++ b/crates/web/src/lib.rs @@ -330,13 +330,13 @@ pub fn pprint(f: &Func) -> Result { writeln!(&mut s, "x{}[x{}]", array.var(), index.var())? } rose::Expr::Member { tuple, member } => { - writeln!(&mut s, "x{}.{}", tuple.var(), member.member())? + writeln!(&mut s, "x{}[{}]", tuple.var(), member.member())? } rose::Expr::Slice { array, index } => { writeln!(&mut s, "x{}![x{}]", array.var(), index.var())? } rose::Expr::Field { tuple, member } => { - writeln!(&mut s, "x{}!.{}", tuple.var(), member.member())? + writeln!(&mut s, "x{}![{}]", tuple.var(), member.member())? } rose::Expr::Unary { op, arg } => match op { rose::Unop::Not => writeln!(&mut s, "not x{}", arg.var())?,