Less braces in error messages

master
Richard van Velzen 2011-12-29 14:12:08 +01:00
parent 1725a0cb66
commit 41598e9840
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ class parse_bug extends Exception {}
class parse_unexpected_token extends parse_error { class parse_unexpected_token extends parse_error {
public function __construct($type, $state) { public function __construct($type, $state) {
parent::__construct("Unexpected token of type ({$type})"); parent::__construct("Unexpected token of type {$type}");
$this->type = $type; $this->type = $type;
$this->state = $state; $this->state = $state;
@ -322,7 +322,7 @@ class parse_engine {
} }
} else { } else {
// If that didn't work, give up: // If that didn't work, give up:
throw new parse_error("Parse Error: ({$type})({$semantic}) not expected, expected {" . implode(', ', $expected) . '}'); throw new parse_error("Parse Error: {$type} ({$semantic}) not expected, expected {" . implode(', ', $expected) . '}');
} }
break; break;
default: default: