Skip to content

Convert delimiters using RAII semantics#34

Merged
nunoplopes merged 4 commits intoCpp2Rust:masterfrom
lucic71:raii-delimiters
Apr 28, 2026
Merged

Convert delimiters using RAII semantics#34
nunoplopes merged 4 commits intoCpp2Rust:masterfrom
lucic71:raii-delimiters

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented Apr 28, 2026

PushBrace, PushParen and PushBracket push the open delimiter in the constructor and the closing delimiter in the destructor.

They replace the following very common pattern:

StrCat(token::kOpenParen);
...
StrCat(token::kCloseParen);

with:

PushParen push(*this);
...

@nunoplopes nunoplopes merged commit 56dc655 into Cpp2Rust:master Apr 28, 2026
9 checks passed
@lucic71 lucic71 deleted the raii-delimiters branch April 29, 2026 13:18
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