Skip to content

fix(parser): support op-assign for interned lvalues in quoted path - #12257

Open
IrshadKohl51 wants to merge 2 commits into
noir-lang:masterfrom
IrshadKohl51:fix-parser-interned-lvalue-op-assign
Open

IrshadKohl51 wants to merge 2 commits into
noir-lang:masterfrom
IrshadKohl51:fix-parser-interned-lvalue-op-assign

Conversation

@IrshadKohl51

Copy link
Copy Markdown

Description

Problem

Resolves

Quoted::as_expr parses through parse_statement_or_expression_or_lvalue, where the InternedLValue branch handled = but not op-assign (like +=), while the regular statement parser already supported op-assign. This created inconsistent parsing behavior across the two paths.

Summary

  • Added op-assign parsing for InternedLValue in parse_statement_or_expression_or_lvalue.
  • Updated the InternedLValue branch in parse_statement to support op-assign before fallback = error recovery.
  • Changed next_is_op_assign visibility to pub(super) so both parser paths can reuse it.
  • Added parser tests covering InternedLValue += 1 in both entry points.

Additional Context

  • Scope is limited to parser consistency and tests.
  • Targeted parser tests pass locally.
  • Current branch still has unrelated pre-existing failures in full noirc_frontend test runs.

User Documentation

Check one:

  • No user documentation needed.
  • Changes in docs/ included in this PR.
  • [For Experimental Features] Changes in docs/ to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier (https://prettier.io/) and/or cargo fmt on default settings.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to the Noir language.

Please do not force push to this branch after the Noir team have started review of this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.

@IrshadKohl51 IrshadKohl51 changed the title parser: support op-assign for interned lvalues in quoted path fix(parser): support op-assign for interned lvalues in quoted path Apr 14, 2026

This branch has not been deployed

No deployments
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.

1 participant