token: Update functional interface and add token_copy(), token_equal().
[pspp] / src / language / lexer / token.h
index 67bc7ddc3b74753d587e4e1a29e4b356caf033d0..dca1452c6a32aed957ce98e8e9c129fc254fff32 100644 (file)
@@ -17,6 +17,7 @@
 #ifndef TOKEN_H
 #define TOKEN_H 1
 
+#include <stdbool.h>
 #include <stdio.h>
 #include "libpspp/assertion.h"
 #include "libpspp/str.h"
@@ -33,12 +34,11 @@ struct token
     struct substring string;
   };
 
-#define TOKEN_INITIALIZER(TYPE, NUMBER, STRING) \
-        { TYPE, NUMBER, SS_LITERAL_INITIALIZER (STRING) }
-
-void token_init (struct token *);
+void token_copy (struct token *, const struct token *);
 void token_uninit (struct token *);
 
+bool token_equal (const struct token *, const struct token *);
+
 char *token_to_string (const struct token *);
 
 void token_print (const struct token *, FILE *);