36 lines
674 B
C
36 lines
674 B
C
|
|
#include <debug.h>
|
|
|
|
#include <stringtree/new.h>
|
|
#include <stringtree/append.h>
|
|
|
|
#include <statement/prettyprint_errors.h>
|
|
|
|
#include "struct.h"
|
|
#include "prettyprint_errors.h"
|
|
|
|
struct stringtree* error_statement_prettyprint_errors(
|
|
struct statement* super)
|
|
{
|
|
ENTER;
|
|
|
|
struct error_statement* this = (void*) super;
|
|
|
|
struct stringtree* tree = NULL;
|
|
|
|
if (this->substatement)
|
|
{
|
|
tree = statement_prettyprint_errors(this->substatement);
|
|
}
|
|
|
|
if (!tree)
|
|
{
|
|
tree = new_stringtree();
|
|
}
|
|
|
|
stringtree_append_cstr(tree, this->message);
|
|
stringtree_append_cstr(tree, L"\n");
|
|
|
|
EXIT;
|
|
return tree;
|
|
}
|