MCPcopy Create free account
hub / github.com/SerenityOS/jakt / codegen_call

Method codegen_call

bootstrap/stage0/codegen.cpp:6672–6687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6670}
6671
6672ErrorOr<void> Jakt::codegen::CodeGenerator::codegen_call(Jakt::types::CheckedCall const call,ByteStringBuilder& output,bool const forward_error_with_try) {
6673{
6674ByteString const error_handler = [&]() -> ByteString { auto __jakt_enum_value = call.callee_throws;
6675if (__jakt_enum_value) {return this->current_error_handler(forward_error_with_try);}else if (!__jakt_enum_value) {return ByteString::from_utf8_without_validation(""sv);}VERIFY_NOT_REACHED();
6676
6677}();
6678if (!error_handler.is_empty()){
6679output.appendff(ByteString::from_utf8_without_validation("{}(("sv),error_handler);
6680}
6681TRY((this->codegen_call_unwrapped(call,output)));
6682if (!error_handler.is_empty()){
6683output.append(StringView::from_string_literal("))"sv));
6684}
6685}
6686return {};
6687}
6688
6689ErrorOr<void> Jakt::codegen::CodeGenerator::codegen_call_unwrapped(Jakt::types::CheckedCall const call,ByteStringBuilder& output) {
6690{

Callers 1

codegen_expressionMethod · 0.95

Calls 5

current_error_handlerMethod · 0.95
is_emptyMethod · 0.45
appendffMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected