comparison lwcc/cpp.h @ 298:6112c67728ba ccdev

Add stringification and token concatenation Add support for # and ## in macro expansion by the preprocessor (stringification and token concatenation). Totally untested.
author William Astle <lost@l-w.ca>
date Sat, 14 Sep 2013 22:42:53 -0600
parents 83fcc1ed6ad6
children 8d6c47395653
comparison
equal deleted inserted replaced
297:310df72c641d 298:6112c67728ba
61 int else_level; // for counting #else directives 61 int else_level; // for counting #else directives
62 int else_skip_level; // ditto 62 int else_skip_level; // ditto
63 struct symtab_e *sh; // the preprocessor's symbol table 63 struct symtab_e *sh; // the preprocessor's symbol table
64 struct token *sourcelist; // for expanding a list of tokens 64 struct token *sourcelist; // for expanding a list of tokens
65 struct expand_e *expand_list; // record of which macros are currently being expanded 65 struct expand_e *expand_list; // record of which macros are currently being expanded
66 66 char *lexstr; // for lexing a string (token pasting)
67 int lexstrloc; // ditto
67 }; 68 };
68 69
69 extern struct preproc_info *preproc_init(const char *); 70 extern struct preproc_info *preproc_init(const char *);
70 extern struct token *preproc_next_token(struct preproc_info *); 71 extern struct token *preproc_next_token(struct preproc_info *);
71 extern struct token *preproc_next_processed_token(struct preproc_info *); 72 extern struct token *preproc_next_processed_token(struct preproc_info *);