Fixed test functions and pretty printer. Also fixed bug in parse_sequence. Wrote whitespace parser

This commit is contained in:
Dan Hirsch 2012-05-12 01:28:52 +01:00
parent 4b31f327cd
commit 57e1e20db0
3 changed files with 42 additions and 37 deletions

View file

@ -99,7 +99,7 @@ static void unamb_sub(const parsed_token_t* tok, struct result_buf *buf) {
append_buf(buf, tmpbuf, len);
break;
case TT_UINT:
len = asprintf(&tmpbuf, "s%#lx\n", tok->uint);
len = asprintf(&tmpbuf, "s%#lx", tok->uint);
append_buf(buf, tmpbuf, len);
break;
case TT_SEQUENCE: {
@ -117,8 +117,10 @@ static void unamb_sub(const parsed_token_t* tok, struct result_buf *buf) {
unamb_sub(subtok, buf);
}
append_buf_c(buf, ')');
} // TODO: implement this
}
break;
default:
fprintf(stderr, "Unexpected token type %d\n", tok->token_type);
g_assert_not_reached();
}
}