Skip to content

Generic: Include closing parentheses in function spans - #2723

Open
subotac wants to merge 1 commit into
apache:mainfrom
subotac:fix/function-closing-spans
Open

subotac wants to merge 1 commit into
apache:mainfrom
subotac:fix/function-closing-spans

Conversation

@subotac

@subotac subotac commented Oct 25, 2026

Copy link
Copy Markdown

Dialects: Generic

Fixes #2050.

SELECT foo() currently gives the function a span ending before (), and calls with arguments omit the closing parenthesis.

Retain the closing token in FunctionArgumentList and include it in span computation. Add all-dialect regressions for empty, nonempty, nested and comment-containing calls, plus a minimal fuzz seed.

The new public AST field defaults to an empty token when deserializing older data. Rust struct literals must supply the new field.

Tested on Windows with Rust 1.97.1 (GNU): cargo test --all-features with RUST_MIN_STACK=16777216 (1824 passed, 7 ignored); formatting and strict all-target/all-feature Clippy passed.

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.

Inconsistent spans for function calls

1 participant