Skip to content

fix(lexer): a < doesn't end a @let value - #600

Merged
Brooooooklyn merged 1 commit into
voidzero-dev:mainfrom
encharm:fix/let-value-less-than
Oct 22, 2026
Merged

Brooooooklyn merged 1 commit into
voidzero-dev:mainfrom
encharm:fix/let-value-less-than

Conversation

@Rush

@Rush Rush commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@let small = count < 10; was cut at the <, which the HTML lexer took for the start of a tag, and reported as an incomplete @let declaration, so the component was left uncompiled.

Angular's _consumeLetDeclarationValue ends the value only at a ; outside quotes (or EOF), so a < is part of the expression. The lexer now does the same; the quote handling it already had is unchanged.

Tests: two lexer cases next to the existing @let ones (html_lexer_test.rs), and tests/let_value_less_than_test.rs, which compiles

@let small = count < 10; @let both = a < b && b < c;
<span>{{ small }} {{ both }}</span>

to const small_r1 = (ctx.count < 10); and const both_r2 = ((ctx.a < ctx.b) && (ctx.b < ctx.c));, as @angular/compiler-cli 21.0.1 does (without the parentheses). The lexer tests fail without the change.

`@let small = count < 10;` was cut at the `<`, which the lexer took for a tag,
and reported as an incomplete @let declaration, so the component wasn't
compiled. Like Angular's `_consumeLetDeclarationValue`, only a `;` outside
quotes (or EOF) ends the value now.
@Brooooooklyn

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T08:30:52.532365Z 79b7438 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 79b7438def

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Brooooooklyn
Brooooooklyn merged commit d31094e into voidzero-dev:main Oct 22, 2026
9 checks passed
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