comparison lwasm/pseudo.c @ 370:6b33faa21a0a

Debugging output and bugfixing pass 0
author lost@starbug
date Tue, 20 Apr 2010 21:59:58 -0600
parents d96c30e60ddf
children eacdae8a1575
comparison
equal deleted inserted replaced
369:898a41f7eb59 370:6b33faa21a0a
33 PARSEFUNC(pseudo_parse_end) 33 PARSEFUNC(pseudo_parse_end)
34 { 34 {
35 lw_expr_t addr; 35 lw_expr_t addr;
36 36
37 as -> endseen = 1; 37 as -> endseen = 1;
38 l -> len = 0;
38 39
39 if (as -> output_format != OUTPUT_DECB) 40 if (as -> output_format != OUTPUT_DECB)
40 { 41 {
41 skip_operand(p); 42 skip_operand(p);
42 return; 43 return;
43 } 44 }
44 45
45 addr = lwasm_parse_expr(as, p); 46 if (!**p)
47 {
48 addr = lw_expr_build(lw_expr_type_int, 0);
49 }
50 else
51 {
52 addr = lwasm_parse_expr(as, p);
53 }
46 if (!addr) 54 if (!addr)
47 { 55 {
48 lwasm_register_error(as, l, "Bad expression"); 56 lwasm_register_error(as, l, "Bad expression");
49 addr = lw_expr_build(lw_expr_type_int, 0); 57 addr = lw_expr_build(lw_expr_type_int, 0);
50 } 58 }