diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-10 00:14:58 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-10 00:14:58 -0500 |
commit | 46404ea1b6ad634a0a6b815dc0b2d43234433149 (patch) | |
tree | 195c01395292968aba14322444e2c98c5b4fc4f3 | |
parent | 34a22822fb34224d8c49685e602d218a0efa6cfa (diff) | |
download | dimension-46404ea1b6ad634a0a6b815dc0b2d43234433149.tar.xz |
Fix directives test.
-rw-r--r-- | dimension/lexer.l | 2 | ||||
-rwxr-xr-x | tests/dimension/directives.sh | 2 |
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") |