Preserve incomplete attributes for IntelliSense#3072
Open
VamsiModem wants to merge 3 commits into
Open
Conversation
Expose parsed attributes that are not yet attached to a user definition so hosts can provide IntelliSense while makers are mid-typing attribute arguments. Capture the attribute argument-list opening token to make empty and incomplete argument lists discoverable by consumers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0c0a930 to
ce42f2a
Compare
Contributor
|
✅ No public API change. |
Contributor
|
✅ No public API change. |
lesaltzm
reviewed
Jun 9, 2026
When an attribute group is incomplete (missing close bracket) or a trailing comma is followed by the next definition, move the pending attributes to IncompleteAttributes and resume at the next definition instead of attaching the broken attribute or consuming the next definition's name. Adds CanConsumeAttributeArgumentAfterComma to distinguish a real trailing argument from the next definition's identifier, and regression tests covering UDFs, named formulas, partial args, bracketed/commented bodies, and multi-attribute groups. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
✅ No public API change. |
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.
Summary
[RecordLink(.OpenParen,CloseParen,CloseBracket) so consumers can compute parser-backed replacement spans for[RecordLink(and[RecordLink()]without raw script scanning.IncompleteAttributesthrough Partial-attribute post-processing.Validation
dotnet test tests\.Net7.0\Microsoft.PowerFx.Core.Tests\Microsoft.PowerFx.Core.Tests.csproj --filter "FullyQualifiedName~AttributeParserTests" --nologo -v minimal