From 8bba3c8a146bbcbf420c5ff560b270112f79ca30 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Thu, 30 May 2019 19:33:25 +0900 Subject: [PATCH] refactor: use literal instead of empty string so far, the error value of the lexer is just ignored because they are not readable (results from all the nested combinator are concatenated, so they are too redundant). those ones are replaced by a simple literal. --- toml/parser.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index bba7171..ffc5dd2 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -611,7 +611,7 @@ parse_local_date(location& loc) { throw internal_error(format_underline("[error]: " "toml::parse_local_date: invalid day format", - {{std::addressof(inner_loc), d.unwrap_err()}})); + {{std::addressof(inner_loc), "here"}})); } return ok(std::make_pair(local_date( static_cast(from_string(y.unwrap().str(), 0)), @@ -664,7 +664,7 @@ parse_local_time(location& loc) { throw internal_error(format_underline("[error]: " "toml::parse_local_time: invalid second format", - {{std::addressof(inner_loc), s.unwrap_err()}})); + {{std::addressof(inner_loc), "here"}})); } local_time time( static_cast(from_string(h.unwrap().str(), 0)), @@ -700,7 +700,7 @@ parse_local_time(location& loc) { throw internal_error(format_underline("[error]: " "toml::parse_local_time: invalid subsecond format", - {{std::addressof(inner_loc), secfrac.unwrap_err()}})); + {{std::addressof(inner_loc), "here"}})); } } return ok(std::make_pair(time, token.unwrap()));