|
|
@@ -47,12 +47,14 @@ main(int argc, const char *argv[])
|
|
|
str = str_from_cstr(src, src_size);
|
|
|
|
|
|
l = lexer_create(str);
|
|
|
+ t = lexer_next_token(&l);
|
|
|
for ( ; t.typ.code != TT_EOF; t = lexer_next_token(&l) ) {
|
|
|
+ printf("%ld -> %s\n", ts_size, t.typ.name);
|
|
|
ts[ts_size++] = t;
|
|
|
}
|
|
|
|
|
|
for ( i = 0; i < ts_size; ++i ) {
|
|
|
- printf("%d - %s -> `%.*s`\n",
|
|
|
+ printf("%ld, %d - %s -> `%.*s`\n", i,
|
|
|
ts[i].typ.code, ts[i].typ.name,
|
|
|
(int) ts[i].lit.size, ts[i].lit.data);
|
|
|
}
|