diff lwasm/lwasm.h @ 345:7416c3f9c321

Basic macro processor ported forward; added context break handling for local symbols
author lost@starbug
date Thu, 25 Mar 2010 23:17:54 -0600
parents 0215a0fbf61b
children a82c55070624
line wrap: on
line diff
--- a/lwasm/lwasm.h	Thu Mar 25 22:06:50 2010 -0600
+++ b/lwasm/lwasm.h	Thu Mar 25 23:17:54 2010 -0600
@@ -104,6 +104,15 @@
 	struct symtabe *head;				// start of symbol table
 } symtab_t;
 
+typedef struct macrotab_s macrotab_t;
+struct macrotab_s
+{
+	char *name;							// name of macro
+	char **lines;						// macro lines
+	int numlines;						// number lines in macro
+	macrotab_t *next;					// next macro in list
+};
+
 typedef struct
 {
 	int output_format;					// output format
@@ -112,13 +121,18 @@
 	int flags;							// assembly flags
 	int pragmas;						// pragmas currently in effect
 	int errorcount;						// number of errors encountered
+	int inmacro;						// are we in a macro?
+	int skipcond;						// skipping a condition?
+	int skipmacro;						// are we skipping in a macro?	
 
 	line_t *line_head;					// start of lines list
 	line_t *line_tail;					// tail of lines list
 	
 	int context;						// the current "context"
-
+	int nextcontext;					// the next available context
+	
 	symtab_t symtab;					// meta data for the symbol table
+	macrotab_t *macros;					// macro table
 
 	char *list_file;					// name of file to list to
 	char *output_file;					// output file name	
@@ -138,6 +152,7 @@
 #ifndef ___lwasm_c_seen___
 
 extern void lwasm_register_error(asmstate_t *as, line_t *cl, const char *msg, ...);
+extern int lwasm_next_context(asmstate_t *as);
 
 #endif