Skip to content

Syntax for absolute qualified identifiers - #1095

Open
bocchino wants to merge 11 commits into
absolute-qual-id-specfrom
absolute-qual-id-syntax
Open

Syntax for absolute qualified identifiers#1095
bocchino wants to merge 11 commits into
absolute-qual-id-specfrom
absolute-qual-id-syntax

Conversation

@bocchino

@bocchino bocchino commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

This PR represents the second step of #990.

Add isAbsolute argument to qualified identifiers
Update call sites to match
Allow leading dot in qualified identifier
Add isAbsolute to ExprIdent
Revise uses to match
Add tests for fpp-syntax and fpp-format
Add initial dots to qualified identifiers in state machines
@bocchino
bocchino requested a review from Kronos3 September 1, 2026 22:31

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One integration concern with landing the syntax phase independently: the semantic visitors currently discard isAbsolute (Unqualified(name, _), ExprIdent(id, _)), so .a is accepted but can silently resolve exactly like relative a. Could absolute nodes be rejected until the semantics step lands, or should syntax and resolution merge atomically to avoid wrong-symbol binding?

@bocchino

bocchino commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

This is a PR into a PR into a feature branch. The feature branch won't be merged into main until everything is implemented and tested.

@bocchino

bocchino commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

In working on the semantics, I realized that in the AST, we should store the isAbsolute information only in the first unqualified name of the qualified identifier, not at every position. Update coming soon.

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.

2 participants