From a7a2a0a3698c3b42e62bc29d0e34d52b94d631f7 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Sat, 8 Mar 2025 01:45:54 +0800 Subject: [PATCH] :memo: fix typo --- src/cli/cli.cpp | 2 +- src/natives/regex_lib.cpp | 8 ++++---- src/natives/regex_lib.h | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index 9961467..b2fe453 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -105,7 +105,7 @@ std::ostream& logo(std::ostream& out) { << " - http://fgprc.org\n" << " - http://fgprc.org.cn\n" << "\n" - << "input to get help.\n\n"; + << "input to get help.\n\n"; return out; } diff --git a/src/natives/regex_lib.cpp b/src/natives/regex_lib.cpp index 4b606cb..7e42f30 100644 --- a/src/natives/regex_lib.cpp +++ b/src/natives/regex_lib.cpp @@ -2,7 +2,7 @@ namespace nasal { -var builtin_regex_match(context* ctx, gc* ngc) { +var builtin_regex_match(context* ctx, gc* ngc) noexcept { auto source = ctx->localr[1]; auto reg_str = ctx->localr[2]; if (!source.is_str()) { @@ -20,7 +20,7 @@ var builtin_regex_match(context* ctx, gc* ngc) { return zero; } -var builtin_regex_search(context* ctx, gc* ngc) { +var builtin_regex_search(context* ctx, gc* ngc) noexcept { auto source = ctx->localr[1]; auto reg_str = ctx->localr[2]; if (!source.is_str()) { @@ -38,7 +38,7 @@ var builtin_regex_search(context* ctx, gc* ngc) { return nil; } -var builtin_regex_replace(context* ctx, gc* ngc) { +var builtin_regex_replace(context* ctx, gc* ngc) noexcept { auto source = ctx->localr[1]; auto reg_str = ctx->localr[2]; auto fmt = ctx->localr[3]; @@ -64,7 +64,7 @@ var builtin_regex_replace(context* ctx, gc* ngc) { return ngc->newstr(source.str()); } -var builtin_regex_match_all(context* ctx, gc* ngc) { +var builtin_regex_match_all(context* ctx, gc* ngc) noexcept { auto source = ctx->localr[1]; auto reg_str = ctx->localr[2]; if (!source.is_str()) { diff --git a/src/natives/regex_lib.h b/src/natives/regex_lib.h index 5e471f5..e912777 100644 --- a/src/natives/regex_lib.h +++ b/src/natives/regex_lib.h @@ -8,10 +8,10 @@ namespace nasal { -var builtin_regex_match(context*, gc*); -var builtin_regex_search(context*, gc*); -var builtin_regex_replace(context*, gc*); -var builtin_regex_match_all(context*, gc*); +var builtin_regex_match(context*, gc*) noexcept; +var builtin_regex_search(context*, gc*) noexcept; +var builtin_regex_replace(context*, gc*) noexcept; +var builtin_regex_match_all(context*, gc*) noexcept; extern nasal_builtin_table regex_lib_native[];