Finish implementation of printing

Now readds all syntax sugar and quotes strings properly.

Removed automatic line breaking and indenting since it is complicated.

Removed #ifndef since it stopped making any sense.
This commit is contained in:
2017-05-25 18:57:01 +02:00
parent 76df28e492
commit 5ae69c1cfc
3 changed files with 101 additions and 39 deletions

View File

@@ -38,11 +38,6 @@ main (int argc, char *argv[]) {
parser_init (&parser, buf.s, buf.len - 1);
const char *e = NULL;
struct item *program = parser_run (&parser, &e);
#ifndef NDEBUG
printf ("\x1b[1m%s\x1b[0m\n", buf.s);
print_tree (program, 0);
printf ("\n\n");
#endif
free (buf.s);
if (e) {
printf ("%s: %s\n", "parse error", e);