Remove {unser} and add tests

This commit is contained in:
Ivan Shalganov
2013-09-15 16:05:18 +04:00
parent 7c038e0ba9
commit f9d9f098b7
7 changed files with 35 additions and 62 deletions

View File

@@ -25,10 +25,6 @@ class UnexpectedTokenException extends \RuntimeException
}
if (!$tokens->curr) {
$this->message = "Unexpected end of " . ($where ? : "expression") . "$expect";
} elseif ($tokens->curr[0] === T_WHITESPACE) {
$this->message = "Unexpected whitespace$expect";
} elseif ($tokens->curr[0] === T_BAD_CHARACTER) {
$this->message = "Unexpected bad characters (below ASCII 32 except \\t, \\n and \\r) in " . ($where ? : "expression") . "$expect";
} else {
$this->message = "Unexpected token '" . $tokens->current() . "' in " . ($where ? : "expression") . "$expect";
}