Repository navigation
fix: align Lua 5.2 printf rules and quoted numeric strings - #383
Merged
Merged
Conversation
akeit0
force-pushed
the
codex/pr-lua52-printf
branch
from
October 27, 2026 02:56
40527c1 to
8f5f178
Compare
akeit0
force-pushed
the
codex/pr-lua52-pattern-semantics
branch
from
October 27, 2026 02:56
af9d933 to
de564a8
Compare
5 tasks
akeit0
force-pushed
the
codex/pr-lua52-printf
branch
from
October 27, 2026 03:11
8f5f178 to
1c99995
Compare
akeit0
force-pushed
the
codex/pr-lua52-pattern-semantics
branch
from
October 27, 2026 03:11
de564a8 to
25d22c2
Compare
akeit0
marked this pull request as ready for review
October 27, 2026 03:28
akeit0
force-pushed
the
codex/pr-lua52-printf
branch
from
October 27, 2026 03:28
1c99995 to
d2d1fe5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apply Lua 5.2's finite printf defaults, precision, flags, sign/prefix padding and integer coercion, and support hexadecimal/octal conversions. Numeric %q now quotes the existing numeric text: loading string.format('%q',1.5) returns the string '1.5'. Reject unsupported %q types and ignore its width/precision/flags.
Malformed format suffixes now raise Lua errors instead of CLR indexing exceptions, and argument errors identify the correct conversion argument. Numeric precision and special-value spelling are handled separately in #384.
Validation: all 3,240 finite native-format comparisons agree; the full test suite passes on .NET 8/10; all four library targets build; CSharpier passes.