summaryrefslogtreecommitdiff
path: root/glcpp.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-13 09:36:23 -0700
committerCarl Worth <cworth@cworth.org>2010-05-13 09:36:23 -0700
commitfcbbb4688641e46270ba0cd531639df9b964f697 (patch)
tree9116a800bc5a1778efe398cafdacc92abb090fd5 /glcpp.h
parent4abc3dec720933e78a266417cffb2ea7b16d497f (diff)
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.
Diffstat (limited to 'glcpp.h')
-rw-r--r--glcpp.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/glcpp.h b/glcpp.h
index 39d6d5d0eb..69b3b840ae 100644
--- a/glcpp.h
+++ b/glcpp.h
@@ -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 */