Skip to content

Tags: sqlc-dev/marino

Tags

v0.3.1

Toggle v0.3.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
parser: record scanned comments and stamp table/column positions (#46)

Record the comments the lexer skips — '-- ' and '#' line comments and
'/* */' block comments — as byte-offset spans on the Scanner, exposed
through Scanner.Comments and Parser.Comments. Executable comments and
optimizer hints are lexed as SQL, so they are not recorded, and
recording is gated on strictly increasing positions because the
scanner's lookaheads re-read source text.

Stamp OriginTextPosition on FROM-clause table factors, INSERT/REPLACE
table references and INSERT column lists, which goyacc left unstamped
(it stamped only <expr> symbols). Consumers placing comments or errors
need these positions; only Accept-reachable nodes are stamped so the
restore round-trip tests can keep resetting them.

This gives sqlc's MySQL engine what its ParseFile needs to power
sqlc fmt: statements and comments from one lexer pass, with enough
positions to anchor comments and the author's line breaks.


Claude-Session: https://claude.ai/code/session_01C48orUYrL7xE989UGLTVqi

Co-authored-by: Claude <noreply@anthropic.com>

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Optimize parser hot paths: token window, lexer scanning, and allocati…

…ons (#45)

v0.2.0

Toggle v0.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Support the MySQL spatial types, SRID attribute, SPATIAL constraint, …

…and CHAR/VARCHAR attributes (#42)

v0.1.0

Toggle v0.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Inline parser driver into ast package (#13)