diff options
Diffstat (limited to 'src/token.cc')
-rw-r--r-- | src/token.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/token.cc b/src/token.cc index d0ec185b..aa78cd5a 100644 --- a/src/token.cc +++ b/src/token.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013, John Wiegley. All rights reserved. + * Copyright (c) 2003-2014, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -522,7 +522,8 @@ void expr_t::token_t::expected(const char wanted, char c) void expr_t::token_t::expected(const kind_t wanted) { try { - if (wanted == '\0' || wanted == -1) + if (wanted == expr_t::token_t::ERROR || + wanted == expr_t::token_t::UNKNOWN) throw_(parse_error, _f("Invalid token '%1%'") % *this); else throw_(parse_error, |