Skip to content

Commit

Permalink
Small update
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryAWE committed Jan 17, 2024
1 parent adeafad commit 23c7e5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion example/info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ int main()
println("Papilio Charontis version {0[0]}.{0[1]}.{0[2]}", get_version());

println();
println("__cpluscplus = {}", __cplusplus);
println("__cplusplus = {}", __cplusplus);

#ifdef PAPILIO_COMPILER_MSVC
println("PAPILIO_COMPILER_MSVC = {}", PAPILIO_COMPILER_MSVC);
Expand Down
14 changes: 7 additions & 7 deletions example/playground/ipapilio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace detail
{
std::string input(std::istream& is, std::string_view prefix = "")
static std::string input(std::istream& is, std::string_view prefix = "")
{
if(prefix.empty())
papilio::print("> ");
Expand Down Expand Up @@ -199,13 +199,13 @@ void ipapilio::run()
utf::string_ref parsed(fmt.begin(), e.get_iter());

script::script_error_code ec = e.error_code();
std::size_t len = parsed.length();
std::size_t pos = parsed.length() + 1;
papilio::println("{}", fmt);
papilio::println("{:~>{}}", '^', len + 1);
papilio::println("{:~>{}}", '^', pos);
papilio::println(
"{: >{}} (0x{:X})",
to_string(ec),
len + 1,
pos,
static_cast<std::underlying_type_t<decltype(ec)>>(ec)
);
return;
Expand All @@ -215,13 +215,13 @@ void ipapilio::run()
if(e.error_code() == script::script_error_code::end_of_string)
{
const script::script_error_code ec = script::script_error_code::end_of_string;
std::size_t len = fmt.length();
std::size_t pos = fmt.length() + 1;
papilio::println("{}", fmt);
papilio::println("{:~>{}}", '^', len + 1);
papilio::println("{:~>{}}", '^', pos);
papilio::println(
"{: >{}} (0x{:X})",
to_string(ec),
len + 1,
pos,
static_cast<std::underlying_type_t<decltype(ec)>>(ec)
);
}
Expand Down

0 comments on commit 23c7e5e

Please sign in to comment.