@@ -132,8 +132,8 @@ void token::report_errors_for_escape_sequences_in_template(
132132 diag_reporter* reporter) const {
133133 QLJS_ASSERT (this ->type == token_type::complete_template ||
134134 this ->type == token_type::incomplete_template);
135- if (this ->template_escape_sequence_errors ) {
136- this ->template_escape_sequence_errors ->move_into (reporter);
135+ if (this ->template_escape_sequence_diagnostics ) {
136+ this ->template_escape_sequence_diagnostics ->move_into (reporter);
137137 }
138138}
139139
@@ -575,8 +575,8 @@ bool lexer::try_parse_current_token() {
575575 this ->input_ += 1 ;
576576 parsed_template_body body = this ->parse_template_body (
577577 this ->input_ , this ->last_token_ .begin , this ->diag_reporter_ );
578- this ->last_token_ .template_escape_sequence_errors =
579- body.escape_sequence_errors ;
578+ this ->last_token_ .template_escape_sequence_diagnostics =
579+ body.escape_sequence_diagnostics ;
580580 this ->last_token_ .type = body.type ;
581581 this ->input_ = body.end ;
582582 this ->last_token_ .end = this ->input_ ;
@@ -679,7 +679,7 @@ bool lexer::test_for_regexp(const char8* regexp_begin) {
679679 this ->last_token_ .begin = this ->input_ ;
680680 this ->reparse_as_regexp ();
681681
682- bool parsed_ok = !this ->transaction_has_lex_errors (transaction);
682+ bool parsed_ok = !this ->transaction_has_lex_diagnostics (transaction);
683683 this ->roll_back_transaction (std::move (transaction));
684684 return parsed_ok;
685685}
@@ -868,16 +868,16 @@ void lexer::skip_in_template(const char8* template_begin) {
868868 parsed_template_body body = this ->parse_template_body (
869869 this ->input_ , template_begin, this ->diag_reporter_ );
870870 this ->last_token_ .type = body.type ;
871- this ->last_token_ .template_escape_sequence_errors =
872- body.escape_sequence_errors ;
871+ this ->last_token_ .template_escape_sequence_diagnostics =
872+ body.escape_sequence_diagnostics ;
873873 this ->input_ = body.end ;
874874 this ->last_token_ .end = body.end ;
875875}
876876
877877lexer::parsed_template_body lexer::parse_template_body (
878878 const char8* input, const char8* template_begin,
879879 diag_reporter* diag_reporter) {
880- buffering_diag_reporter* escape_sequence_errors = nullptr ;
880+ buffering_diag_reporter* escape_sequence_diagnostics = nullptr ;
881881 const char8* c = input;
882882 for (;;) {
883883 switch (*c) {
@@ -886,7 +886,7 @@ lexer::parsed_template_body lexer::parse_template_body(
886886 diag_reporter->report (
887887 diag_unclosed_template{source_code_span (template_begin, c)});
888888 return parsed_template_body{token_type::complete_template, c,
889- escape_sequence_errors };
889+ escape_sequence_diagnostics };
890890 } else {
891891 ++c;
892892 break ;
@@ -895,7 +895,7 @@ lexer::parsed_template_body lexer::parse_template_body(
895895 case ' `' :
896896 ++c;
897897 return parsed_template_body{token_type::complete_template, c,
898- escape_sequence_errors };
898+ escape_sequence_diagnostics };
899899
900900 case ' \\ ' : {
901901 const char8* escape_sequence_start = c;
@@ -906,19 +906,19 @@ lexer::parsed_template_body lexer::parse_template_body(
906906 diag_reporter->report (
907907 diag_unclosed_template{source_code_span (template_begin, c)});
908908 return parsed_template_body{token_type::complete_template, c,
909- escape_sequence_errors };
909+ escape_sequence_diagnostics };
910910 } else {
911911 ++c;
912912 break ;
913913 }
914914 case ' u' : {
915- if (!escape_sequence_errors ) {
916- escape_sequence_errors =
915+ if (!escape_sequence_diagnostics ) {
916+ escape_sequence_diagnostics =
917917 this ->allocator_ .new_object <buffering_diag_reporter>(
918918 &this ->allocator_ );
919919 }
920920 c = this ->parse_unicode_escape (escape_sequence_start,
921- escape_sequence_errors )
921+ escape_sequence_diagnostics )
922922 .end ;
923923 break ;
924924 }
@@ -933,7 +933,7 @@ lexer::parsed_template_body lexer::parse_template_body(
933933 if (c[1 ] == ' {' ) {
934934 c += 2 ;
935935 return parsed_template_body{token_type::incomplete_template, c,
936- escape_sequence_errors };
936+ escape_sequence_diagnostics };
937937 }
938938 ++c;
939939 break ;
@@ -1110,9 +1110,9 @@ lexer_transaction lexer::begin_transaction() {
11101110}
11111111
11121112void lexer::commit_transaction (lexer_transaction&& transaction) {
1113- buffering_diag_reporter* buffered_errors =
1113+ buffering_diag_reporter* buffered_diagnostics =
11141114 static_cast <buffering_diag_reporter*>(this ->diag_reporter_ );
1115- buffered_errors ->move_into (transaction.old_diag_reporter );
1115+ buffered_diagnostics ->move_into (transaction.old_diag_reporter );
11161116
11171117 this ->diag_reporter_ = transaction.old_diag_reporter ;
11181118}
@@ -1124,11 +1124,11 @@ void lexer::roll_back_transaction(lexer_transaction&& transaction) {
11241124 this ->diag_reporter_ = transaction.old_diag_reporter ;
11251125}
11261126
1127- bool lexer::transaction_has_lex_errors (const lexer_transaction&) const
1127+ bool lexer::transaction_has_lex_diagnostics (const lexer_transaction&) const
11281128 noexcept {
1129- buffering_diag_reporter* buffered_errors =
1129+ buffering_diag_reporter* buffered_diagnostics =
11301130 static_cast <buffering_diag_reporter*>(this ->diag_reporter_ );
1131- return !buffered_errors ->empty ();
1131+ return !buffered_diagnostics ->empty ();
11321132}
11331133
11341134void lexer::insert_semicolon () {
0 commit comments