aboutsummaryrefslogtreecommitdiff
path: root/gcc/objcp
diff options
context:
space:
mode:
authorMike Stump <mikestump@comcast.net>2011-02-13 10:28:45 +0000
committerMike Stump <mrs@gcc.gnu.org>2011-02-13 10:28:45 +0000
commita4404ff533a012bcec898aa14ac7ab14257edb97 (patch)
tree63023467e4490fa79e58db3174acea581a773a30 /gcc/objcp
parent88a3b649093d440125ae2547835eea6943bfab50 (diff)
downloadgcc-a4404ff533a012bcec898aa14ac7ab14257edb97.zip
gcc-a4404ff533a012bcec898aa14ac7ab14257edb97.tar.gz
gcc-a4404ff533a012bcec898aa14ac7ab14257edb97.tar.bz2
parser.h: Add arguments to all plugins.
objcp: * plugin/parser.h: Add arguments to all plugins. cp: * parser.c (cp_parser_primary_expression): Add arguments to all the plugins. From-SVN: r170105
Diffstat (limited to 'gcc/objcp')
-rw-r--r--gcc/objcp/ChangeLog1
-rw-r--r--gcc/objcp/plugin/parser.h24
2 files changed, 13 insertions, 12 deletions
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index 92f6b7d..1100daa 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,5 +1,6 @@
2011-02-13 Mike Stump <mikestump@comcast.net>
+ * plugin/parser.h: Add arguments to all plugins.
* plugin/lex.h: Plugify.
2011-02-12 Mike Stump <mikestump@comcast.net>
diff --git a/gcc/objcp/plugin/parser.h b/gcc/objcp/plugin/parser.h
index e41e30b..a834454 100644
--- a/gcc/objcp/plugin/parser.h
+++ b/gcc/objcp/plugin/parser.h
@@ -127,7 +127,7 @@ static tree cp_parser_objc_struct_declaration
break;@)
-#define PLUGIN_DECLARATION @(
+#define PLUGIN_DECLARATION(token1, attributes) @(
/* Objective-C++ declaration/definition. */
else if (c_dialect_objc () && OBJC_IS_AT_KEYWORD (token1.keyword))
cp_parser_objc_declaration (parser, NULL_TREE);
@@ -136,7 +136,7 @@ static tree cp_parser_objc_struct_declaration
&& cp_parser_objc_valid_prefix_attributes (parser, &attributes))
cp_parser_objc_declaration (parser, attributes);@)
-#define PLUGIN_SIMPLE_TYPE_SPECIFIER @(
+#define PLUGIN_SIMPLE_TYPE_SPECIFIER(parser, type, decl_specs) @(
do {
/* See if TYPE is an Objective-C type, and if so, parse and
accept any protocol references following it. Do this before
@@ -160,7 +160,7 @@ static tree cp_parser_objc_struct_declaration
} while (0)@)
-#define PLUGIN_NONCLASS_NAME1 @(
+#define PLUGIN_NONCLASS_NAME1(parser, type_decl, identifier) @(
do {
if (TREE_CODE (type_decl) != TYPE_DECL
&& (objc_is_id (identifier) || objc_is_class_name (identifier)))
@@ -173,7 +173,7 @@ static tree cp_parser_objc_struct_declaration
}
} while (0)@)
-#define PLUGIN_NONCLASS_NAME @(
+#define PLUGIN_NONCLASS_NAME(parser, type_decl, cp_lexer_peek_token) @(
/* In Objective-C, we have the complication that class names are
normally type names and start declarations (eg, the
"NSObject" in "NSObject *object;"), but can be used in an
@@ -183,14 +183,14 @@ static tree cp_parser_objc_struct_declaration
|| (objc_is_class_name (TREE_TYPE (type_decl))
&& cp_lexer_peek_token (parser->lexer)->type == CPP_DOT)@)
-#define PLUGIN_CLASS_NAME @(
+#define PLUGIN_CLASS_NAME(parser, cp_lexer_peek_token, CPP_DOT) @(
/* In Objective-C 2.0, a classname followed by '.' starts a
dot-syntax expression, and it's not a type-name. */
|| (c_dialect_objc ()
&& cp_lexer_peek_token (parser->lexer)->type == CPP_DOT
&& objc_is_class_name (decl))@)
-#define PLUGIN_MEMBER_DECLARATION @(
+#define PLUGIN_MEMBER_DECLARATION(parser, cp_lexer_next_token_is_keyword, finish_member_declaration) @(
do {
/* Check for @defs. */
if (cp_lexer_next_token_is_keyword (parser->lexer, RID_AT_DEFS))
@@ -217,11 +217,11 @@ static tree cp_parser_objc_struct_declaration
#define PLUGIN_PRIMARY_EXPRESSION(parser, decl, cp_lexer_consume_token, cp_lexer_peek_token)
#define PLUGIN_TOKEN_STARTS_CAST_EXPR
#define PLUGIN_STATEMENT
-#define PLUGIN_DECLARATION
-#define PLUGIN_SIMPLE_TYPE_SPECIFIER
-#define PLUGIN_NONCLASS_NAME1
-#define PLUGIN_NONCLASS_NAME
-#define PLUGIN_CLASS_NAME
-#define PLUGIN_MEMBER_DECLARATION
+#define PLUGIN_DECLARATION(token1, attributes)
+#define PLUGIN_SIMPLE_TYPE_SPECIFIER(parser, type, decl_specs)
+#define PLUGIN_NONCLASS_NAME1(parser, type_decl, identifier)
+#define PLUGIN_NONCLASS_NAME(parser, type_decl, cp_lexer_peek_token)
+#define PLUGIN_CLASS_NAME(parser, cp_lexer_peek_token, CPP_DOT)
+#define PLUGIN_MEMBER_DECLARATION(parser, cp_lexer_next_token_is_keyword, finish_member_declaration)
#endif