comparison lwasm/instab.c @ 384:6ee9c67a0f8d

Add conditional for testing if a pragma is in effect An obvious addition that took someone else to notice... Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 21:20:30 -0600
parents 04e11f6faead
children 4fd16faa4d93
comparison
equal deleted inserted replaced
383:04e11f6faead 384:6ee9c67a0f8d
241 #define pseudo_emit_ifdef NULL 241 #define pseudo_emit_ifdef NULL
242 242
243 PARSEFUNC(pseudo_parse_ifndef); 243 PARSEFUNC(pseudo_parse_ifndef);
244 #define pseudo_resolve_ifndef NULL 244 #define pseudo_resolve_ifndef NULL
245 #define pseudo_emit_ifndef NULL 245 #define pseudo_emit_ifndef NULL
246
247 PARSEFUNC(pseudo_parse_ifpragma);
248 #define pseudo_resolve_ifpragma NULL
249 #define pseudo_emit_ifpragma NULL
246 250
247 PARSEFUNC(pseudo_parse_ifstr); 251 PARSEFUNC(pseudo_parse_ifstr);
248 #define pseudo_resolve_ifstr NULL 252 #define pseudo_resolve_ifstr NULL
249 #define pseudo_emit_ifstr NULL 253 #define pseudo_emit_ifstr NULL
250 254
655 { "endc", { -1, -1, -1, -1}, pseudo_parse_endc, pseudo_resolve_endc, pseudo_emit_endc, lwasm_insn_cond}, 659 { "endc", { -1, -1, -1, -1}, pseudo_parse_endc, pseudo_resolve_endc, pseudo_emit_endc, lwasm_insn_cond},
656 { "endif", { -1, -1, -1, -1}, pseudo_parse_endc, pseudo_resolve_endc, pseudo_emit_endc, lwasm_insn_cond}, 660 { "endif", { -1, -1, -1, -1}, pseudo_parse_endc, pseudo_resolve_endc, pseudo_emit_endc, lwasm_insn_cond},
657 { "else", { -1, -1, -1, -1}, pseudo_parse_else, pseudo_resolve_else, pseudo_emit_else, lwasm_insn_cond}, 661 { "else", { -1, -1, -1, -1}, pseudo_parse_else, pseudo_resolve_else, pseudo_emit_else, lwasm_insn_cond},
658 { "ifdef", { -1, -1, -1, -1}, pseudo_parse_ifdef, pseudo_resolve_ifdef, pseudo_emit_ifdef, lwasm_insn_cond}, 662 { "ifdef", { -1, -1, -1, -1}, pseudo_parse_ifdef, pseudo_resolve_ifdef, pseudo_emit_ifdef, lwasm_insn_cond},
659 { "ifndef", { -1, -1, -1, -1}, pseudo_parse_ifndef, pseudo_resolve_ifndef, pseudo_emit_ifndef, lwasm_insn_cond}, 663 { "ifndef", { -1, -1, -1, -1}, pseudo_parse_ifndef, pseudo_resolve_ifndef, pseudo_emit_ifndef, lwasm_insn_cond},
664 { "ifpragma", { -1, -1, -1, -1}, pseudo_parse_ifpragma, pseudo_resolve_ifpragma, pseudo_emit_ifpragma, lwasm_insn_cond},
665 { "ifopt", { -1, -1, -1, -1}, pseudo_parse_ifpragma, pseudo_resolve_ifpragma, pseudo_emit_ifpragma, lwasm_insn_cond},
660 666
661 // string operations, mostly useful in macros 667 // string operations, mostly useful in macros
662 { "ifstr", { -1, -1, -1, -1}, pseudo_parse_ifstr, pseudo_resolve_ifstr, pseudo_emit_ifstr, lwasm_insn_cond}, 668 { "ifstr", { -1, -1, -1, -1}, pseudo_parse_ifstr, pseudo_resolve_ifstr, pseudo_emit_ifstr, lwasm_insn_cond},
663 669
664 { "macro", { -1, -1, -1, -1}, pseudo_parse_macro, pseudo_resolve_macro, pseudo_emit_macro, lwasm_insn_cond | lwasm_insn_setsym}, 670 { "macro", { -1, -1, -1, -1}, pseudo_parse_macro, pseudo_resolve_macro, pseudo_emit_macro, lwasm_insn_cond | lwasm_insn_setsym},