69 lines
1.2 KiB
C
69 lines
1.2 KiB
C
|
|
#include <stddef.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <stringtree/new.h>
|
|
#include <stringtree/println.h>
|
|
#include <stringtree/free.h>
|
|
|
|
#include <value/prettyprint.h>
|
|
#include <value/lazy/unlazy.h>
|
|
#include <value/free.h>
|
|
|
|
#include <statement/execute.h>
|
|
|
|
#include "struct.h"
|
|
#include "execute.h"
|
|
|
|
void error_statement_execute(
|
|
struct statement* super,
|
|
struct environment** environment,
|
|
struct booleans* booleans,
|
|
struct wcostream* ostream,
|
|
bool print_value,
|
|
bool print_with_color)
|
|
{
|
|
ENTER;
|
|
|
|
TODO;
|
|
#if 0
|
|
struct error_statement* this = (void*) super;
|
|
|
|
struct value* value = error_evaluate(
|
|
/* error: */ this->error,
|
|
/* environment: */ *environment,
|
|
/* booleans: */ booleans);
|
|
|
|
struct value* vvalue = lazy_value_unlazy(value, booleans);
|
|
|
|
if (print_value)
|
|
{
|
|
struct stringtree* tree = value_prettyprint(
|
|
/* outgoing chosen color: */ NULL,
|
|
/* value: */ vvalue,
|
|
/* print with color? */ print_with_color);
|
|
|
|
stringtree_println(tree, ostream);
|
|
|
|
free_stringtree(tree);
|
|
}
|
|
|
|
free_value(vvalue);
|
|
|
|
free_value(value);
|
|
#endif
|
|
|
|
EXIT;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|