/* * Copyright (c) 2020, Stephan Unverwerth * Copyright (c) 2021-2022, David Tuin * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace JS { struct ParserError { ByteString message; Optional position; String to_string() const; ByteString to_byte_string() const; ByteString source_location_hint(StringView source, char const spacer = ' ', char const indicator = '^') const; }; }