unexpected complains about the token and terminates processing.
(token lex.Token, msg string)
| 244 | |
| 245 | // unexpected complains about the token and terminates processing. |
| 246 | func (t *tree) unexpected(token lex.Token, msg string) { |
| 247 | err := token.ErrMsg(t.Lexer(), msg) |
| 248 | panic(err.Error()) |
| 249 | } |
| 250 | |
| 251 | // recover is the handler that turns panics into returns from the top level of Parse. |
| 252 | func (t *tree) recover(errp *error) { |