mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 19:05:06 +00:00
JSSpecCompiler: Make -xspec capable of parsing the whole specification
... in theory. In practice, we fail to parse all of the functions.
This commit is contained in:
parent
483e195e48
commit
14ee25b8ba
9 changed files with 255 additions and 58 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "Parser/ParseError.h"
|
||||
#include "DiagnosticEngine.h"
|
||||
|
||||
namespace JSSpecCompiler {
|
||||
|
||||
|
@ -27,7 +28,7 @@ NonnullRefPtr<ParseError> ParseError::create(ErrorOr<String> message, XML::Node
|
|||
String ParseError::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.appendff("error: {}\n", m_message);
|
||||
builder.appendff("{}\n", m_message);
|
||||
|
||||
XML::Node const* current = m_node;
|
||||
while (current != nullptr) {
|
||||
|
@ -48,4 +49,9 @@ String ParseError::to_string() const
|
|||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
XML::Offset ParseError::offset() const
|
||||
{
|
||||
return m_node->offset;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue