about summary refs log tree commit diff stats
path: root/011load.cc
diff options
context:
space:
mode:
Diffstat (limited to '011load.cc')
-rw-r--r--011load.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/011load.cc b/011load.cc
index 620d6f40..6fee184e 100644
--- a/011load.cc
+++ b/011load.cc
@@ -171,14 +171,15 @@ string next_word(istream& in) {
 }
 
 void slurp_word(istream& in, ostream& out) {
+  static string terminators(",()[]{}");
   char c;
-  if (!in.eof() && in.peek() == ',') {
+  if (!in.eof() && terminators.find(in.peek()) != string::npos) {
     in >> c;
     out << c;
     return;
   }
   while (in >> c) {
-    if (isspace(c) || c == ',') {
+    if (isspace(c) || terminators.find(c) != string::npos) {
       in.putback(c);
       break;
     }