mirror of
https://github.com/peklaiho/madlisp.git
synced 2024-11-26 07:04:27 +00:00
improve error from unterminated string
This commit is contained in:
parent
6d6754a09d
commit
33f4cecbbf
@ -84,14 +84,14 @@ class Tokenizer
|
||||
$addCurrent();
|
||||
|
||||
// Check for errors
|
||||
if ($parens[0] != 0) {
|
||||
if ($isString) {
|
||||
throw new MadLispException("unterminated string");
|
||||
} elseif ($parens[0] != 0) {
|
||||
throw new MadLispException("missing closing )");
|
||||
} elseif ($parens[1] != 0) {
|
||||
throw new MadLispException("missing closing ]");
|
||||
} elseif ($parens[2] != 0) {
|
||||
throw new MadLispException("missing closing }");
|
||||
} elseif ($isString) {
|
||||
throw new MadLispException("unterminated string");
|
||||
}
|
||||
|
||||
return $tokens;
|
||||
|
Loading…
Reference in New Issue
Block a user