diff options
author | David Robillard <d@drobilla.net> | 2010-12-09 04:08:51 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-09 04:08:51 +0000 |
commit | c27e97b2294951e5db6e9c9fa6f6f0de2c5243e6 (patch) | |
tree | 076d0121abfd7c38914cb666e239672389b11a25 /src/parse.cpp | |
parent | f8bb745beb481846e715cd1e455b3d688fe34d65 (diff) | |
download | resp-c27e97b2294951e5db6e9c9fa6f6f0de2c5243e6.tar.gz resp-c27e97b2294951e5db6e9c9fa6f6f0de2c5243e6.tar.bz2 resp-c27e97b2294951e5db6e9c9fa6f6f0de2c5243e6.zip |
read_expression => PEnv::parse.
git-svn-id: http://svn.drobilla.net/resp/resp@325 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/parse.cpp')
-rw-r--r-- | src/parse.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parse.cpp b/src/parse.cpp index e0948fe..8b563cf 100644 --- a/src/parse.cpp +++ b/src/parse.cpp @@ -95,7 +95,7 @@ read_list(PEnv& penv, Cursor& cur, istream& in) eat_char(cur, in, ')'); return list.head; } else { - list.push_back(read_expression(penv, cur, in)); + list.push_back(penv.parse(cur, in)); } } assert(false); @@ -156,7 +156,7 @@ read_symbol(PEnv& penv, Cursor& cur, istream& in) /// Read an expression from @a in const AST* -read_expression(PEnv& penv, Cursor& cur, istream& in) +PEnv::parse(Cursor& cur, istream& in) { while (!cin.eof()) { skip_space(cur, in); @@ -170,7 +170,7 @@ read_expression(PEnv& penv, Cursor& cur, istream& in) case '"': return read_string(cur, in); case '(': - return read_list(penv, cur, in); + return read_list(*this, cur, in); case ')': throw Error(cur, "unexpected `)'"); case '#': @@ -188,13 +188,13 @@ read_expression(PEnv& penv, Cursor& cur, istream& in) return read_number(cur, in); } else { in.putback(c); - return read_symbol(penv, cur, in); + return read_symbol(*this, cur, in); } default: if (isdigit(c)) return read_number(cur, in); else - return read_symbol(penv, cur, in); + return read_symbol(*this, cur, in); } } return NULL; |