commit c68887a9d589fcbd27ac1c1aa1270785246cba73
parent e8acfc7a6d6ea1c08ebc5d34e7226a0909a12a44
Author: sin <sin@2f30.org>
Date: Fri, 9 May 2014 17:13:31 +0100
Change debug output a bit
Diffstat:
M | debug.c | | | 24 | ++++++++++++------------ |
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/debug.c b/debug.c
@@ -14,40 +14,40 @@ printtok(struct tok *t)
return;
switch (t->type) {
case Error:
- printf("Error: '%s'", s);
+ printf("token: error, value: '%s'", s);
break;
case Eof:
- printf("Eof");
+ printf("token: eof");
break;
case Identifier:
- printf("Identifier: '%s'", s);
+ printf("token: identifier, value: '%s'", s);
break;
case Boolean:
- printf("Boolean: '%s'", s);
+ printf("token: boolean, value: '%s'", s);
break;
case Number:
- printf("Number: '%s'", s);
+ printf("token number, value: '%s'", s);
break;
case Character:
- printf("Character: '%s'", s);
+ printf("token character, value: '%s'", s);
break;
case String:
- printf("String: '%s'", s);
+ printf("token string, value: '%s'", s);
break;
case Lparen:
- printf("Lparen: '%s'", s);
+ printf("token: lparen, value: '%s'", s);
break;
case Rparen:
- printf("Rparen: '%s'", s);
+ printf("token rparen, value: '%s'", s);
break;
case Quote:
- printf("Quote: '%s'", s);
+ printf("token quote, value: '%s'", s);
break;
case Dot:
- printf("Dot: '%s'", s);
+ printf("token dot, value: '%s'", s);
break;
default:
- printf("Unknown ten type: %d", t->type);
+ printf("unknown token type: %d", t->type);
break;
}
free(s);