Skip to content

Preserve incomplete attributes for IntelliSense#3072

Open
VamsiModem wants to merge 3 commits into
mainfrom
vmodem/recordlink-attribute-intellisense-parser
Open

Preserve incomplete attributes for IntelliSense#3072
VamsiModem wants to merge 3 commits into
mainfrom
vmodem/recordlink-attribute-intellisense-parser

Conversation

@VamsiModem

@VamsiModem VamsiModem commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve parsed attributes that are not yet attached to a UDF or named formula so hosts can provide IntelliSense while makers are mid-typing attribute arguments, e.g. [RecordLink(.
  • Capture attribute delimiter tokens (OpenParen, CloseParen, CloseBracket) so consumers can compute parser-backed replacement spans for [RecordLink( and [RecordLink()] without raw script scanning.
  • Preserve IncompleteAttributes through 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

@VamsiModem VamsiModem requested a review from a team as a code owner June 8, 2026 16:59
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>
@VamsiModem VamsiModem force-pushed the vmodem/recordlink-attribute-intellisense-parser branch from 0c0a930 to ce42f2a Compare June 8, 2026 17:11
@jas-valgotar

Copy link
Copy Markdown
Contributor

✅ No public API change.

@jas-valgotar

Copy link
Copy Markdown
Contributor

✅ No public API change.

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>
@jas-valgotar

Copy link
Copy Markdown
Contributor

✅ No public API change.

@VamsiModem VamsiModem requested a review from lesaltzm June 9, 2026 22:56
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.

3 participants