Skip to content

Decode string literal escapes before semantic lowering - #1563

Merged
sbillig merged 2 commits into
masterfrom
fix-string-literal-escapes
Sep 23, 2026
Merged

sbillig merged 2 commits into
masterfrom
fix-string-literal-escapes

Conversation

@sbillig

@sbillig sbillig commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

String literals currently reach HIR with escape backslashes intact, giving escaped strings incorrect byte lengths and literal contents.

Decode quote, backslash, newline, carriage-return and tab escapes before interning semantic strings. Preserve source spelling in the syntax tree, diagnose invalid escapes at their source spans, and keep malformed literals out of semantic strings during recovery. Literal typing, constant evaluation and code generation share the decoded UTF-8 value.

Render decoded literals with Fe-specific escaping across HIR output and diagnostic hints so printing and reparsing preserves their contents. Align Tree-sitter with the same five supported escapes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 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-09-22T23:50:02.827462Z c2e2e88 Manual request
🔒 Security Review ✅ Completed 2026-09-22T23:57:12.740070Z c2e2e88 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 chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e51aebfc70

ℹ️ 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".

Comment thread crates/hir/src/core/lower/mod.rs Resolved
@sbillig
sbillig force-pushed the fix-string-literal-escapes branch from e51aebf to 82c9a35 Compare September 22, 2026 07:03
@sbillig
sbillig changed the base branch from fevm-native-integration to fevm-pr-native-modular September 22, 2026 07:03
@sbillig
sbillig added this pull request to stack #1577 September 22, 2026 20:12
@sbillig
sbillig force-pushed the fix-string-literal-escapes branch from 82c9a35 to 139b609 Compare September 22, 2026 20:32
@sbillig
sbillig removed this pull request from stack #1577 September 22, 2026 20:37
@sbillig
sbillig changed the base branch from fevm-pr-native-modular to master September 22, 2026 20:37
@sbillig

sbillig commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: c2e2e88ee4

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c2e2e88ee4

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@sbillig
sbillig merged commit 5680f1d into master Sep 23, 2026
7 checks passed
@sbillig
sbillig deleted the fix-string-literal-escapes branch September 23, 2026 06:15
cburgdorf added a commit that referenced this pull request Sep 30, 2026
Several user-facing changes merged after 26.3 were missing release notes
entries:

- Bugfixes: event ABI `anonymous` flag (#1562), string literal escapes
  (#1563), effect provider identity (#1564), shared calls on non-Copy
  fields (#1581), recursive raw pointer types (#1609).
- Performance: `DynArray::get` for static elements (#1559), constant
  string ABI encoding (#1560), compile-time caching (#1617, #1619, #1621).
- Native backend features: workspaces, native tests and `std::io`
  (#1565), process arguments and CPU timing (#1566), `ByteBuffer`
  (#1580).
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