You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt: preserve ') VALUES (' seams and !=/<> operator spellings
Two formatting fixes reported from running sqlc fmt on a real project:
The boundary before a bare VALUES list was decided by comparing the
source lines of the neighbouring nodes (the last column and the first
value), which always differ when both paren lists are multi-line — so
an authored ') VALUES (' seam broke apart. The seam now gets its own
group, and AttachComments reads the author's actual choice out of the
source by scanning back from the first value across '(' and the VALUES
keyword.
The parsers normalized inequality spellings: PostgreSQL's grammar turns
!= into <>, and the MySQL converter mapped opcode.NE to != regardless
of what was written. The format parsers now read the author's spelling
back out of the source — PostgreSQL via a new NewFormatParser that
rewrites A_Expr names at the operator's recorded location, MySQL via
the same source-scan approach SQLite already used. The compiler's
parsers keep the canonical names.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T4UpYmwPdxzePtsRXoL1H8
0 commit comments