Improve the way we handle the various parsing "states". Until now
[pspp-builds.git] / src / language / dictionary / value-labels.c
index 976d54790965ff26ab6598216ea9de72ecb9ca00..8479fe7fa74218feeb0c462aed2e86fa1c5df692 100644 (file)
@@ -92,17 +92,14 @@ do_value_labels (int erase)
       free (vars);
     }
 
-  if (token != '.')
-    {
-      lex_error (NULL);
-      return CMD_TRAILING_GARBAGE;
-    }
+  if (parse_err)
+    return CMD_FAILURE;
 
-  return parse_err ? CMD_PART_SUCCESS_MAYBE : CMD_SUCCESS;
+  return lex_end_of_command ();
 
  lossage:
   free (vars);
-  return CMD_PART_SUCCESS_MAYBE;
+  return CMD_FAILURE;
 }
 
 /* Verifies that none of the VAR_CNT variables in VARS are long