aboutsummaryrefslogtreecommitdiffstats
path: root/src/repl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-07 23:21:08 +0000
committerDavid Robillard <d@drobilla.net>2010-12-07 23:21:08 +0000
commit7682c4ceab935d39aafac369c9b110b658b1e575 (patch)
tree96fcddeb789f72419a5416201ee8944a58baac4e /src/repl.cpp
parent5e8c55c15f42aff343d0b6189a6c8f8c50d12775 (diff)
downloadresp-7682c4ceab935d39aafac369c9b110b658b1e575.tar.gz
resp-7682c4ceab935d39aafac369c9b110b658b1e575.tar.bz2
resp-7682c4ceab935d39aafac369c9b110b658b1e575.zip
Saner recursive descent lexer/parser.
git-svn-id: http://svn.drobilla.net/resp/resp@306 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/repl.cpp')
-rw-r--r--src/repl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/repl.cpp b/src/repl.cpp
index 4ea4d68..8b4faab 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -30,13 +30,13 @@ static bool
readParseType(CEnv& cenv, Cursor& cursor, istream& is, AST*& exp, const AST*& ast)
{
try {
- exp = readExpression(cursor, is);
+ exp = read_expression(cenv.penv, cursor, is);
} catch (Error e) {
is.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Skip REPL junk
throw e;
}
- if (exp->to_tuple() && exp->to_tuple()->empty())
+ if (!exp || (exp->to_tuple() && exp->to_tuple()->empty()))
return false;
ast = cenv.penv.parse(exp); // Parse input