mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +00:00
LibJS: Add to_string definitions to CodeGenerationError and ParserError
This commit is contained in:
parent
f7458b3e17
commit
93ad25fbe5
5 changed files with 30 additions and 0 deletions
|
@ -8,7 +8,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibJS/SourceRange.h>
|
||||
|
||||
namespace JS {
|
||||
|
@ -17,6 +19,7 @@ struct ParserError {
|
|||
DeprecatedString message;
|
||||
Optional<Position> position;
|
||||
|
||||
ErrorOr<String> to_string() const;
|
||||
DeprecatedString to_deprecated_string() const;
|
||||
DeprecatedString source_location_hint(StringView source, char const spacer = ' ', char const indicator = '^') const;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue