summaryrefslogtreecommitdiff
path: root/src/token.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-11-10 00:48:19 -0600
committerJohn Wiegley <johnw@newartisans.com>2011-11-10 00:48:19 -0600
commit37e9ec8030a2634cbe9b2727f4d5530a582292c7 (patch)
tree7fb3a1ece2c97c6b034a56b7e47b5754c0150e9b /src/token.h
parentd493f79651d124481aa49bd0eeea1fdea11e477b (diff)
downloadfork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.tar.gz
fork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.tar.bz2
fork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.zip
Report an error in the case of '(1' (missing rparen)
Fixes #557
Diffstat (limited to 'src/token.h')
-rw-r--r--src/token.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/token.h b/src/token.h
index 13a799cb..cbdf1258 100644
--- a/src/token.h
+++ b/src/token.h
@@ -123,13 +123,16 @@ struct expr_t::token_t : public noncopyable
int parse_reserved_word(std::istream& in);
void parse_ident(std::istream& in);
- void next(std::istream& in, const parse_flags_t& flags,
- const char expecting = '\0');
+ void next(std::istream& in, const parse_flags_t& flags);
void rewind(std::istream& in);
void unexpected(const char wanted = '\0');
- void expected(const char wanted, char c = '\0');
+ void expected(const char wanted, const char c = '\0');
+ void expected(const kind_t wanted);
};
+std::ostream& operator<<(std::ostream& out, const expr_t::token_t::kind_t& kind);
+std::ostream& operator<<(std::ostream& out, const expr_t::token_t& token);
+
} // namespace ledger
#endif // _TOKEN_H