From 1ce7bb6ac8143b37b1923916c4da00c6bf18c930 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 Dec 2010 18:40:55 +0000 Subject: Fix parsing of #f. git-svn-id: http://svn.drobilla.net/resp/resp@393 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/parse.cpp | 3 ++- src/resp.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/parse.cpp b/src/parse.cpp index 2d3ea02..4f2c723 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -116,6 +116,7 @@ read_special(Cursor& cur, istream& in) eat_char(cur, in, 't'); return new ALiteral(T_BOOL, true, cur); case 'f': + eat_char(cur, in, 'f'); return new ALiteral(T_BOOL, false, cur); default: throw Error(cur, (format("unknown special lexeme `%1%'") % in.peek()).str()); @@ -159,7 +160,7 @@ read_symbol(PEnv& penv, Cursor& cur, istream& in) /// Read an expression from @a in const AST* -PEnv::parse(Cursor& cur, istream& in) +PEnv::parse(Cursor& cur, istream& in) throw(Error) { while (!cin.eof()) { skip_space(cur, in); diff --git a/src/resp.hpp b/src/resp.hpp index 2ae556c..4217f6d 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -507,7 +507,7 @@ struct PEnv : private map { } } - const AST* parse(Cursor& cur, std::istream& in); + const AST* parse(Cursor& cur, std::istream& in) throw(Error); const AST* expand(const AST* exp); typedef std::set Primitives; -- cgit v1.2.1