Skip to content

Commit 45d339c

Browse files
committed
refactor(fe): inline references to Lexer::diag_reporter_
1 parent 96a5206 commit 45d339c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/quick-lint-js/fe/lex.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,8 +1240,7 @@ Lexer_Transaction Lexer::begin_transaction() {
12401240
/*old_last_token=*/this->last_token_,
12411241
/*old_last_last_token_end=*/this->last_last_token_end_,
12421242
/*old_input=*/this->input_,
1243-
/*diag_list=*/
1244-
&this->diag_reporter_->diags());
1243+
/*diag_list=*/&this->diags_);
12451244
}
12461245

12471246
void Lexer::commit_transaction(Lexer_Transaction&&) {
@@ -1257,7 +1256,7 @@ void Lexer::roll_back_transaction(Lexer_Transaction&& transaction) {
12571256
}
12581257

12591258
bool Lexer::transaction_has_lex_diagnostics(const Lexer_Transaction& transaction) const {
1260-
return this->diag_reporter_->diags().reported_any_diagnostic_except_since({}, transaction.diag_list_rewind);
1259+
return this->diags_.reported_any_diagnostic_except_since({}, transaction.diag_list_rewind);
12611260
}
12621261

12631262
void Lexer::insert_semicolon() {

src/quick-lint-js/fe/lex.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ class Lexer {
351351
Diag_List_Diag_Reporter diag_list_ =
352352
Diag_List_Diag_Reporter(&this->allocator_);
353353
Diag_List& diags_ = diag_list_.diags();
354-
Diag_List_Diag_Reporter* diag_reporter_ = &this->diag_list_;
355354

356355
friend struct Lex_Tables;
357356
};

0 commit comments

Comments
 (0)