From 9e636855b582d1499a87fb73f55d85102ce95a58 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Tue, 12 Dec 2023 20:28:40 -0800 Subject: [Parser] Parse the remaining array operations (#6158) Parse `array.new_elem`, `array.init_data`, and `array.init_elem`. Accidentally also includes: * [Parser] Parse string types and operations (#6161) --- src/parser/input-impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parser/input-impl.h') diff --git a/src/parser/input-impl.h b/src/parser/input-impl.h index 7ee358f12..0f8fc2e86 100644 --- a/src/parser/input-impl.h +++ b/src/parser/input-impl.h @@ -226,11 +226,11 @@ inline std::optional ParseInput::takeF32() { return std::nullopt; } -inline std::optional ParseInput::takeString() { +inline std::optional ParseInput::takeString() { if (auto t = peek()) { if (auto s = t->getString()) { ++lexer; - return s; + return std::string(*s); } } return {}; -- cgit v1.2.3