fix: add lexError calls for invalid string literals and unterminated strings in wren_compiler.c

Replace TODO comments with proper error reporting for unterminated strings, incomplete Unicode escapes, and invalid escape sequences. Add five new test files covering each error case.
This commit is contained in:
Bob Nystrom
2014-02-02 18:31:46 +00:00
parent ae19742ceb
commit 19e362f977
6 changed files with 48 additions and 9 deletions
@@ -0,0 +1,2 @@
// expect error line 2
"\u00"
@@ -0,0 +1,2 @@
// expect error line 2
"\u004
+2
View File
@@ -0,0 +1,2 @@
// expect error line 2
"not a \m real escape"
+2
View File
@@ -0,0 +1,2 @@
// expect error line 2
"\u00no"
+2
View File
@@ -0,0 +1,2 @@
// expect error line 2
"this string has no close quote