Add support for the structure of function-like macros.

We accept the structure of arguments in both macro definition and
macro invocation, but we don't yet expand those arguments. This is
just enough code to pass the recently-added tests, but does not yet
provide any sort of useful function-like macro.
This commit is contained in:
Carl Worth
2010-05-13 09:36:23 -07:00
parent 4abc3dec72
commit fcbbb46886
4 changed files with 214 additions and 34 deletions
+9 -3
View File
@@ -52,9 +52,15 @@ glcpp_parser_parse (glcpp_parser_t *parser);
void
glcpp_parser_destroy (glcpp_parser_t *parser);
int
glcpp_parser_macro_defined (glcpp_parser_t *parser,
const char *identifier);
typedef enum {
MACRO_TYPE_UNDEFINED,
MACRO_TYPE_OBJECT,
MACRO_TYPE_FUNCTION
} macro_type_t;
macro_type_t
glcpp_parser_macro_type (glcpp_parser_t *parser,
const char *identifier);
/* Generated by glcpp-lex.l to glcpp-lex.c */