private function error($message = "Unexpected '%s'") { list(, $line, $col) = self::$tokenizer->getOffset($this->n); $token = isset(self::$tokenizer->tokens[$this->n]) ? str_replace("\n", '<new line>', NStrings::truncate(self::$tokenizer->tokens[$this->n], 40)) : 'end'; throw new NNeonException(str_replace('%s', $token, $message) . " on line $line, column $col."); }