comparison lwasm/parse.c @ 262:6d09310438a4 2.x

Fixed problem with local symbol context handling in the face of conditional assembly
author lost
date Thu, 07 Jan 2010 03:57:58 +0000
parents 6363b9ebf825
children
comparison
equal deleted inserted replaced
261:c79b3c88adbc 262:6d09310438a4
48 p = l -> text; 48 p = l -> text;
49 l -> sect = as -> csect; 49 l -> sect = as -> csect;
50 l -> inmod = as -> inmod; 50 l -> inmod = as -> inmod;
51 51
52 // blank lines are a no brainer 52 // blank lines are a no brainer
53 if (!*p) 53 if (as -> passnum == 2)
54 as -> context = l -> context;
55 else if (!*p)
54 { 56 {
55 as -> context = lwasm_next_context(as); 57 as -> context = lwasm_next_context(as);
56 return 0; 58 return 0;
57 } 59 }
58 60
113 // now skip any whitespace to find the opcode 115 // now skip any whitespace to find the opcode
114 while (*p && isspace(*p)) 116 while (*p && isspace(*p))
115 p++; 117 p++;
116 118
117 // is the line blank? 119 // is the line blank?
118 if (!*p && !sym) 120 if (!*p && !sym && as -> passnum == 1)
119 { 121 {
120 // nothing but white space *is* a context break 122 // nothing but white space *is* a context break
121 as -> context = lwasm_next_context(as); 123 as -> context = lwasm_next_context(as);
122 return; 124 return;
123 } 125 }