From 46404ea1b6ad634a0a6b815dc0b2d43234433149 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 10 Feb 2010 00:14:58 -0500 Subject: Fix directives test. --- dimension/lexer.l | 2 ++ tests/dimension/directives.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dimension/lexer.l b/dimension/lexer.l index d635bd1..d206605 100644 --- a/dimension/lexer.l +++ b/dimension/lexer.l @@ -355,6 +355,8 @@ dmnsn_print_token(FILE *file, dmnsn_token token) tname = "\\("; } else if (token.type == DMNSN_T_RPAREN) { tname = "\\)"; + } else if (token.type == DMNSN_T_LEX_ERROR) { + tname = "(error)"; } else { tname = dmnsn_token_string(token.type); } diff --git a/tests/dimension/directives.sh b/tests/dimension/directives.sh index 3893acc..7f15cb5 100755 --- a/tests/dimension/directives.sh +++ b/tests/dimension/directives.sh @@ -36,7 +36,7 @@ directives_exp="$(echo -n \ #declare (identifier "Counter") = (integer "0") ; #while \( (identifier "Counter") < (integer "2") \) #if \( #if \( (integer "1") = (integer "1") \) (integer "0") #end = (integer "0") & (integer "0") \) - error (identifier "Illegal") + (error) (identifier "Illegal") #else sphere { (identifier "Center") + < (integer "0") , (identifier "Counter") , (integer "0") > , (identifier "R") -- cgit v1.2.3