summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dimension/lexer.l2
-rwxr-xr-xtests/dimension/directives.sh2
2 files changed, 3 insertions, 1 deletions
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")