MCPcopy Create free account
hub / github.com/WebAssembly/wabt / wabt_format_text_errors

Function wabt_format_text_errors

src/emscripten-helpers.cc:261–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261wabt::OutputBuffer* wabt_format_text_errors(wabt::Errors* errors,
262 wabt::WastLexer* lexer) {
263 auto line_finder = lexer->MakeLineFinder();
264 std::string string_result = FormatErrorsToString(
265 *errors, wabt::Location::Type::Text, line_finder.get());
266
267 wabt::OutputBuffer* result = new wabt::OutputBuffer();
268 std::copy(string_result.begin(), string_result.end(),
269 std::back_inserter(result->data));
270 return result;
271}
272
273wabt::OutputBuffer* wabt_format_binary_errors(wabt::Errors* errors) {
274 std::string string_result =

Callers

nothing calls this directly

Calls 5

FormatErrorsToStringFunction · 0.85
MakeLineFinderMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected