Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Mar 14, 2025

closes #9770

@Boshen Boshen requested a review from overlookmotel March 14, 2025 08:32
@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 14, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-parser Area - Parser A-codegen Area - Code Generation C-bug Category - Bug labels Mar 14, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 14, 2025

CodSpeed Performance Report

Merging #9777 will not alter performance

Comparing 03-14-fix_parser_error_for_and_in_jsxtext_ (a113f7e) with main (ea7e3f0)

Summary

✅ 33 untouched benchmarks

@Boshen Boshen force-pushed the 03-14-fix_parser_error_for_and_in_jsxtext_ branch from 39a9569 to 93bfe63 Compare March 14, 2025 08:58
@github-actions github-actions bot added the A-linter Area - Linter label Mar 14, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Mar 17, 2025
Copy link
Member

overlookmotel commented Mar 17, 2025

Merge activity

  • Mar 17, 9:31 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 17, 9:31 AM EDT: A user added this pull request to the Graphite merge queue.
  • Mar 17, 9:37 AM EDT: A user merged this pull request with the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 03-14-fix_parser_error_for_and_in_jsxtext_ branch from 93bfe63 to a113f7e Compare March 17, 2025 13:32
@overlookmotel
Copy link
Member

I had to remind myself how the byte_search! macro works!

@Boshen Was confused by the change to this method. Was this an unrelated bug in codegen?

fn r#gen(&self, p: &mut Codegen, _ctx: Context) {
p.print_str("{...");
p.print_expression(&self.expression);
p.print_ascii_byte(b'}');
}

@graphite-app graphite-app bot merged commit a113f7e into main Mar 17, 2025
26 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 17, 2025
@graphite-app graphite-app bot deleted the 03-14-fix_parser_error_for_and_in_jsxtext_ branch March 17, 2025 13:37
graphite-app bot pushed a commit that referenced this pull request Mar 17, 2025
…9831)

Tiny optimization to lexer, after #9777. Mark the branch for unterminated `JSText` as cold branch to hint to compiler than it shouldn't usually happen.
graphite-app bot pushed a commit that referenced this pull request Mar 17, 2025
…generation (#9832)

#9777 made `>` or `}` in `JSXText` a parser error, so `react/no_unescaped_entities` rule can be simplified.

Speed it up a little by:

* Using `raw` field instead of slicing source.
* Iterating over the string as bytes, instead of `char`s.
* Using static strings for errors.
This was referenced Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation A-linter Area - Linter A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No error or warning on potentially invalid JSX syntax

3 participants