]> git.sur5r.net Git - cc65/blobdiff - src/ca65/toklist.h
More lineinfo usage.
[cc65] / src / ca65 / toklist.h
index 642469521ac6823d47ea8f9dae56f73f3496ecef..b31df38afea130ad4834abce7b59510774d900ec 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000-2004 Ullrich von Bassewitz                                       */
-/*               Römerstraße 52                                              */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2000-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+/* common */
+#include "strbuf.h"
+
+/* ca65 */
 #include "scanner.h"
 
 
 /*****************************************************************************/
 /*                                          Data                                    */
 /*****************************************************************************/
-
+                                
 
 
 /* Struct holding a token */
 typedef struct TokNode TokNode;
 struct TokNode {
     TokNode*   Next;                   /* For single linked list */
-    enum Token Tok;                    /* Token value */
-    int                WS;                     /* Whitespace before token? */
-    long               IVal;                   /* Integer token attribute */
-    char               SVal [1];               /* String attribute, dyn. allocated */
+    Token       T;                      /* Token value */
 };
 
 /* Struct holding a token list */
@@ -91,13 +92,13 @@ enum TC {
 TokNode* NewTokNode (void);
 /* Create and return a token node with the current token value */
 
-void FreeTokNode (TokNode* T);
+void FreeTokNode (TokNode* N);
 /* Free the given token node */
 
-void TokSet (TokNode* T);
+void TokSet (TokNode* N);
 /* Set the scanner token from the given token node */
 
-enum TC TokCmp (const TokNode* T);
+enum TC TokCmp (const TokNode* N);
 /* Compare the token given as parameter against the current token */
 
 void InitTokList (TokList* T);
@@ -109,7 +110,7 @@ TokList* NewTokList (void);
 void FreeTokList (TokList* T);
 /* Delete the token list including all token nodes */
 
-enum Token GetTokListTerm (enum Token Term);
+token_t GetTokListTerm (token_t Term);
 /* Determine if the following token list is enclosed in curly braces. This is
  * the case if the next token is the opening brace. If so, skip it and return
  * a closing brace, otherwise return Term.