aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.cpp')
-rw-r--r--src/parse.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parse.cpp b/src/parse.cpp
index b61b971..ce69a72 100644
--- a/src/parse.cpp
+++ b/src/parse.cpp
@@ -96,7 +96,11 @@ read_list(PEnv& penv, Cursor& cur, istream& in)
skip_space(cur, in);
if (in.peek() == ')') {
eat_char(cur, in, ')');
- list.head->loc = loc;
+ if (!list.head) {
+ list.head = new ATuple(cur);
+ } else {
+ list.head->loc = loc;
+ }
return list.head;
} else {
list.push_back(penv.parse(cur, in));