aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-09 23:01:13 +0000
committerDavid Robillard <d@drobilla.net>2010-12-09 23:01:13 +0000
commitc06034464c9f0465224b46775b771b175429c9c1 (patch)
tree64cfb82ed7680bdfdf7017846c562e839100df95 /src/resp.cpp
parentfbdc2906df3ca629cad86b20492cb5f7546fd4b5 (diff)
downloadresp-c06034464c9f0465224b46775b771b175429c9c1.tar.gz
resp-c06034464c9f0465224b46775b771b175429c9c1.tar.bz2
resp-c06034464c9f0465224b46775b771b175429c9c1.zip
Remove trailing whitespace.
git-svn-id: http://svn.drobilla.net/resp/resp@339 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/resp.cpp')
-rw-r--r--src/resp.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/resp.cpp b/src/resp.cpp
index 3f9766c..e3c956f 100644
--- a/src/resp.cpp
+++ b/src/resp.cpp
@@ -39,11 +39,11 @@ is_form(const AST* ast, const std::string& form)
const ATuple* call = ast->to_tuple();
if (!call)
return false;
-
+
const ASymbol* const sym = call->head()->to_symbol();
if (!sym)
return false;
-
+
return form == sym->sym();
}
@@ -151,7 +151,7 @@ main(int argc, char** argv)
const AST* exp = cenv->penv.parse(loc, is);
if (!exp || (exp->to_tuple() && exp->to_tuple()->tup_len() == 1))
break;
-
+
const AST* ast = penv.expand(exp);
pprint(os, ast, cenv, false);
is.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Skip newlines
@@ -161,7 +161,7 @@ main(int argc, char** argv)
is.close();
}
ret = 0;
-
+
} else if (args.find("-e") != args.end()) { // Evaluate argument as expression
if (files.size() > 0) {
std::cerr << "Illegal options: both -e and files given" << std::endl;
@@ -169,20 +169,20 @@ main(int argc, char** argv)
delete engine;
return print_usage(argv[0], true);
}
-
+
std::istringstream is(a->second);
Cursor cursor("(command line)");
ret = eval(*cenv, cursor, is, !batch);
-
+
} else if (files.size() == 0) { // Neither -e nor files given, run repl
ret = repl(*cenv);
-
+
} else { // Evalute (or just type check if -T, or just compile if -S all files
for (list<string>::iterator f = files.begin(); f != files.end(); ++f) {
const string& filename = *f;
if (!batch)
output = filename + ".out";
-
+
ifstream is(f->c_str());
if (is.good()) {
Cursor cursor(*f);