scan: Get rid of scan token types in favor of new scan result state.
[pspp] / src / language / control / define.c
index 3a7f535c86d46917ded79962fc7ec44896b6200f..23a58fe8f931e5e01e44f930f712055ae3e89112 100644 (file)
@@ -65,8 +65,8 @@ parse_quoted_token (struct lexer *lexer, struct token *token)
   struct string_lexer slex;
   string_lexer_init (&slex, s.string, s.length, SEG_MODE_INTERACTIVE, true);
   struct token another_token = { .type = T_STOP };
-  if (!string_lexer_next (&slex, token)
-      || string_lexer_next (&slex, &another_token))
+  if (string_lexer_next (&slex, token) != SLR_TOKEN
+      || string_lexer_next (&slex, &another_token) != SLR_END)
     {
       token_uninit (token);
       token_uninit (&another_token);