aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-21 18:39:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-21 18:39:06 -0400
commite2449c99d2831799f86bf530d1add0ea5537e96f (patch)
tree8053c3dc49ad11feb039176c6f19667e780d08ea /src/ast.c
parent43f8f0f62aebdc08702ae346944a7063c8fc123d (diff)
Preserve original number literal in s-expression
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ast.c b/src/ast.c
index 5350abba..65aa572a 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -147,8 +147,8 @@ CORD ast_to_sexp(ast_t *ast)
T(None, "(None)")
T(Bool, "(Bool %s)", data.b ? "yes" : "no")
T(Var, "(Var %r)", CORD_quoted(data.name))
- T(Int, "(Int %r)", CORD_quoted(data.str))
- T(Num, "(Num %.20g)", data.n)
+ T(Int, "(Int %r)", CORD_quoted(ast_source(ast)))
+ T(Num, "(Num %r)", CORD_quoted(ast_source(ast)))
T(TextLiteral, "%r", CORD_quoted(data.cord))
T(TextJoin, "(Text%r%r)", data.lang ? CORD_all(" :lang ", CORD_quoted(data.lang)) : CORD_EMPTY, ast_list_to_sexp(data.children))
T(Path, "(Path %r)", CORD_quoted(data.path))