Skip to content

Avoid reparsing attribute syntax to resolve canonical names #102

@jonathanvdc

Description

@jonathanvdc

The Binder currently resolves attribute definition names by converting the syntax node back to text and reparsing it:

TryGetAttributeDefinitionName(syntaxNode.ToString())

That is brittle and unnecessary. This path only applies to custom attributes, so we should extract the name directly from the syntax node instead of round-tripping through text.

File: src/MLIR/Semantics/Binder.cs
Context: the attribute binding path near the canonicalName lookup.

Suggested follow-up:

  • inspect the custom attribute syntax node shape directly
  • derive the canonical name without ToString()
  • keep the lookup logic aligned with the actual parsed syntax tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions