From 4d35ead2a4504f38d301c7867db74cac9e7cec7d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 04:12:52 +0200 Subject: [PATCH] Say prints is handed to proveNumber, and give shortestDecimals its own const --- builtins.go | 5 +++-- format.go | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/builtins.go b/builtins.go index 4523b11..f4be6ea 100644 --- a/builtins.go +++ b/builtins.go @@ -16,10 +16,11 @@ import ( const ( maxLen = 1 << 20 maxDecimals = 1024 - // shortestDecimals prints the fewest digits that read back as the same float64. - shortestDecimals = -1 ) +// shortestDecimals prints the fewest digits that read back as the same float64. +const shortestDecimals = -1 + // builtins is the registry of {name(args)} functions. Derivations read the digits // emitted so far in the current expansion (place them after their payload); // samples read only the rng. A time-based id (uuid v7, ulid) draws its timestamp diff --git a/format.go b/format.go index b448968..cce7f09 100644 --- a/format.go +++ b/format.go @@ -129,9 +129,9 @@ type builtin struct { // datatypes that text is not; set it where every render reads as a finite number, which // makes the call a calc operand, and leave it nil otherwise. proveNumber func(token string, prints DataType, args []string) proven - // prints is the datatype every render's text is, which a typed column holds the call to: - // DataTypeString where it reads as a number but no column should type it, as digits' - // leading zeros; unset where proveNumber is nil. + // prints is the datatype a call's text is, handed to proveNumber: DataTypeString where it + // reads as a number no column should type, as digits' leading zeros; unset where + // proveNumber is nil. prints DataType }