changeset 169:99300be2d3bd

Allow lines starting with # to be ignored
author lost
date Sun, 08 Feb 2009 03:00:44 +0000
parents 2dd050293be6
children bf69160da467
files ChangeLog lwasm/parse.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 31 18:59:53 2009 +0000
+++ b/ChangeLog	Sun Feb 08 03:00:44 2009 +0000
@@ -20,6 +20,8 @@
 [+] accept "*" has a prefix for base page addressing mode
 [+] sections named "bss" or ".bss" in any case are now assumed to be
     BSS sections. The "!bss" flag can be used to remove that assumption.
+[+] ignore lines starting with # to permit C pre-processor output to be used
+    as input to lwasm
 [b] actually show assembly errors when no list requested
 [b] pragma and --pragma now actually take multiple pragmas as documented
 
--- a/lwasm/parse.c	Sat Jan 31 18:59:53 2009 +0000
+++ b/lwasm/parse.c	Sun Feb 08 03:00:44 2009 +0000
@@ -63,6 +63,10 @@
 	if (*p == '*' || *p == ';')
 		return;
 	
+	// if we have C pre-processor directives/output, ignore it
+	if (*p == '#')
+		return;
+	
 	// if we start with a non-space character, it's a symbol
 	if (!isspace(*p))
 	{