Start isolating names into their own thing.

This commit is contained in:
2024-04-29 21:38:17 -07:00
parent 52d5c9252b
commit 4c2850427a
12 changed files with 176 additions and 111 deletions

View File

@@ -67,7 +67,7 @@ impl Expression {
.nest(2)
.braces(),
),
Expression::Reference(_, var) => allocator.text(var.to_string()),
Expression::Reference(var) => allocator.text(var.to_string()),
Expression::FieldRef(_, val, field) => val
.pretty(allocator)
.append(allocator.text("."))
@@ -76,7 +76,7 @@ impl Expression {
.text(t.clone())
.angles()
.append(e.pretty(allocator)),
Expression::Primitive(_, op) => allocator.text(op.name.clone()),
Expression::Primitive(_, op) => allocator.text(op.original_name().to_string()),
Expression::Call(_, fun, args) => {
let args = args.iter().map(|x| x.pretty(allocator));
let comma_sepped_args = allocator.intersperse(args, allocator.text(","));