!LENGTH and !BLANKS work
[pspp] / src / language / lexer / token.c
index 454bd518684154ee7a6f8bbad6ac972e913d5fae..7becaaffad0ddbffdb5466f03293442eb2511ce7 100644 (file)
@@ -176,7 +176,7 @@ token_to_string (const struct token *token)
       return string_representation (token->string);
 
     default:
-      return xstrdup_if_nonnull (token_type_to_name (token->type));
+      return xstrdup_if_nonnull (token_type_to_string (token->type));
     }
 }
 
@@ -229,3 +229,10 @@ tokens_add (struct tokens *tokens, const struct token *t)
 
   token_copy (&tokens->tokens[tokens->n++], t);
 }
+
+void
+tokens_print (const struct tokens *tokens, FILE *stream)
+{
+  for (size_t i = 0; i < tokens->n; i++)
+    token_print (&tokens->tokens[i], stream);
+}