Mercurial > hg > index.cgi
comparison lwasm/os9.c @ 144:86d097dceebc
Make os9 directives not throw spurious bad operand errors
author | lost@l-w.ca |
---|---|
date | Sat, 20 Aug 2011 09:59:45 -0600 |
parents | 697bc543368c |
children | 244f1227f2b5 |
comparison
equal
deleted
inserted
replaced
143:42a7a16a058f | 144:86d097dceebc |
---|---|
69 int i; | 69 int i; |
70 | 70 |
71 if (as -> output_format != OUTPUT_OS9) | 71 if (as -> output_format != OUTPUT_OS9) |
72 { | 72 { |
73 lwasm_register_error(as, l, "mod directive only valid for OS9 target"); | 73 lwasm_register_error(as, l, "mod directive only valid for OS9 target"); |
74 skip_operand(p); | |
74 return; | 75 return; |
75 } | 76 } |
76 | 77 |
77 if (as -> inmod) | 78 if (as -> inmod) |
78 { | 79 { |
79 lwasm_register_error(as, l, "Already in a module!"); | 80 lwasm_register_error(as, l, "Already in a module!"); |
81 skip_operand(p); | |
80 return; | 82 return; |
81 } | 83 } |
82 | 84 |
83 // parse 6 expressions... | 85 // parse 6 expressions... |
84 for (i = 0; i < 5; i++) | 86 for (i = 0; i < 5; i++) |
166 lwasm_emitexpr(l, lwasm_fetch_expr(l, 5), 2); | 168 lwasm_emitexpr(l, lwasm_fetch_expr(l, 5), 2); |
167 } | 169 } |
168 | 170 |
169 PARSEFUNC(pseudo_parse_emod) | 171 PARSEFUNC(pseudo_parse_emod) |
170 { | 172 { |
173 skip_operand(p); | |
171 if (as -> output_format != OUTPUT_OS9) | 174 if (as -> output_format != OUTPUT_OS9) |
172 { | 175 { |
173 lwasm_register_error(as, l, "emod directive only valid for OS9 target"); | 176 lwasm_register_error(as, l, "emod directive only valid for OS9 target"); |
174 return; | 177 return; |
175 } | 178 } |