comparison lwasm/parse.c @ 236:a58f49a77441

Added os9 target, pragma to control whether $ localizes a symbol, and fixed some condition nesting bugs
author lost
date Fri, 14 Aug 2009 03:22:26 +0000
parents 0df2a39a268c
children c8bcc396ec59 3010e24bb9c5
comparison
equal deleted inserted replaced
235:aa0056ca7319 236:a58f49a77441
45 if (l -> badop) 45 if (l -> badop)
46 return; 46 return;
47 47
48 p = l -> text; 48 p = l -> text;
49 l -> sect = as -> csect; 49 l -> sect = as -> csect;
50 l -> inmod = as -> inmod;
50 51
51 // blank lines are a no brainer 52 // blank lines are a no brainer
52 if (!*p) 53 if (!*p)
53 { 54 {
54 as -> context = lwasm_next_context(as); 55 as -> context = lwasm_next_context(as);
184 if (instab[opnum].fn && !(as -> no6309 && instab[opnum].is6309)) 185 if (instab[opnum].fn && !(as -> no6309 && instab[opnum].is6309))
185 { 186 {
186 (instab[opnum].fn)(as, l, &p2, opnum); 187 (instab[opnum].fn)(as, l, &p2, opnum);
187 188
188 // if we didn't end on a "space" character or EOL, throw error 189 // if we didn't end on a "space" character or EOL, throw error
189 if (*p2 && !isspace(*p2) && !(l -> err)) 190 if (*p2 && !isspace(*p2) && !(l -> err) && as -> passnum == 1)
190 register_error(as, l, 1, "Bad operand"); 191 register_error(as, l, 1, "Bad operand: %s (%d)", p2, as -> passnum);
191 } 192 }
192 else 193 else
193 { 194 {
194 // carp about unimplemented operation 195 // carp about unimplemented operation
195 if (instab[opnum].is6309) 196 if (instab[opnum].is6309)