diff lwasm/pass1.c @ 85:8fa52c3f2970

Make *pragma work correctly
author lost@l-w.ca
date Wed, 25 May 2011 21:59:58 -0600
parents 1830faeef332
children 5bf9edabd661
line wrap: on
line diff
--- a/lwasm/pass1.c	Wed May 25 21:42:01 2011 -0600
+++ b/lwasm/pass1.c	Wed May 25 21:59:58 2011 -0600
@@ -195,8 +195,8 @@
 		else
 			stspace = 0;
 
-		if (*p1 == '*' || *p1 == ';' || *p1 == '#')
-			goto nextline;
+//		if (*p1 == '*' || *p1 == ';' || *p1 == '#')
+//			goto nextline;
 		if (!*p1)
 		{
 			// nothing but whitespace - context break
@@ -210,6 +210,8 @@
 		
 		if (*p1 == ':' || *p1 == '=' || stspace == 0)
 		{
+			if (*tok == '*' || *tok == ';' || *tok == '#')
+				goto nextline;
 			// have a symbol here
 			sym = lw_strndup(tok, p1 - tok);
 			if (*p1 == ':')
@@ -255,6 +257,9 @@
 					break;
 			}
 			
+			if (instab[opnum].opcode == NULL && (*tok == '*' || *tok == ';' || *tok == '#'))
+				goto nextline;
+			
 			// p1 points to the start of the operand
 			
 			// if we're inside a macro definition and not at ENDM,