Skip to content

Track Parens<T>'s span#2291

Open
xitep wants to merge 7 commits intoapache:mainfrom
xitep:parens
Open

Track Parens<T>'s span#2291
xitep wants to merge 7 commits intoapache:mainfrom
xitep:parens

Conversation

@xitep
Copy link
Copy Markdown
Contributor

@xitep xitep commented Mar 31, 2026

  • this suggests Parens<T>. hopefully advancing [EPIC] Complete Span (source location) information / feature #1548 a bit and being the foundation for Inconsistent spans for function calls #2050
  • it is (a bit) wasteful to store the parens' location as a Span (since a paren is just a single character, the start location would fully suffice); i simply decided for consistency with the rest of the AST.
  • with this PR (so far), it's used only by Value so that i can properly determine the end of an insert statement and distinguish between "... VALUES ('foo' /\*xyz\*/) and ... VALUES('foo') /\*xyz\*/
  • of course, many more places in the AST could be covered, e.g. function params/args, subqueries, etc. if this PR is OK as is, i can put in some more time and expand on the coverage. (just let me know.)

@xitep xitep changed the title Parens Track Parens<T>'s span Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant