Mercurial > hg > CbC > old > device
comparison mc-macro.c @ 705:0554b7f985ee parse-mode
parse mode done.
author | kono |
---|---|
date | Wed, 24 Oct 2007 10:39:57 +0900 |
parents | 5d3b4669854c |
children | 35e6841ba01a |
comparison
equal
deleted
inserted
replaced
704:6e6dc2d644ed | 705:0554b7f985ee |
---|---|
24 #include "mc.h" | 24 #include "mc.h" |
25 #include "mc-parse.h" | 25 #include "mc-parse.h" |
26 #include "mc-macro.h" | 26 #include "mc-macro.h" |
27 #include "mc-codegen.h" | 27 #include "mc-codegen.h" |
28 #include "mc-code.h" | 28 #include "mc-code.h" |
29 #include "mc-inline.h" | |
29 | 30 |
30 extern struct {int fd,ln;char *name0;int inc;FILE *fcb;} *filep,filestack[FILES]; | 31 extern struct {int fd,ln;char *name0;int inc;FILE *fcb;} *filep,filestack[FILES]; |
31 | 32 |
32 int in_macro_if = 0; | 33 int in_macro_if = 0; |
33 char *chinput; | 34 char *chinput; |
466 in_macro_if = 1; // makes undefined symbol==list2(CONST,0) | 467 in_macro_if = 1; // makes undefined symbol==list2(CONST,0) |
467 check_macro_eof(); | 468 check_macro_eof(); |
468 getsym(0); | 469 getsym(0); |
469 /* i=cexpr(expr(1)); #if allow undefined symbols.. */ | 470 /* i=cexpr(expr(1)); #if allow undefined symbols.. */ |
470 i=expr(1); | 471 i=expr(1); |
472 if (inmode) i = pexpr(i); // it contain const value only | |
471 in_macro_if = 0; | 473 in_macro_if = 0; |
472 if (car(i)==CONST) i=cadr(i); | 474 if (car(i)==CONST) i=cadr(i); |
473 else i=0; | 475 else i=0; |
474 if (ch) { | 476 if (ch) { |
475 if (chptr[-1]==ch) { | 477 if (chptr[-1]==ch) { |