Skip to content

Commit 7c14963

Browse files
committed
clean up
1 parent a1d09ad commit 7c14963

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/tml/parser.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,13 @@ void parser::process_char_in_unicode_sequence(char c, listener& listener)
343343
if (this->sequence_index == this->sequence.size()) {
344344
uint32_t value = 0;
345345
auto span = utki::make_span(this->sequence);
346-
auto res = std::from_chars(span.data(), span.end_pointer(), value, utki::to_int(utki::integer_base::hex));
346+
auto res = std::from_chars(
347+
span.data(), //
348+
utki::end_pointer(span),
349+
value,
350+
utki::to_int(utki::integer_base::hex)
351+
);
352+
347353
if (res.ec == std::errc::invalid_argument) {
348354
std::stringstream ss;
349355
ss << "malformed document: could not parse hexadecimal number of unicode escape sequence at line: "

tests/unit/src/parser.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ enum class action_enum{
1818
namespace{
1919
class test_listener : public tml::listener{
2020
void on_children_parse_finished(tml::location)override{
21-
// TRACE(<< "}" << std::endl)
2221
tst::check(this->actions.size() > 0, SL);
2322
tst::check(this->actions.front().first == action_enum::children_end, SL) << "first = " << unsigned(this->actions.front().first) << " second = " << this->actions.front().second;
2423
this->actions.pop_front();
2524
}
2625

2726
void on_children_parse_started(tml::location)override{
28-
// TRACE(<< "{" << std::endl)
2927
tst::check(this->actions.size() > 0, SL);
3028
tst::check(this->actions.front().first == action_enum::children_start, SL) << "first = " << unsigned(this->actions.front().first) << " second = " << this->actions.front().second;
3129
this->actions.pop_front();

tool-configs

0 commit comments

Comments
 (0)