diff options
Diffstat (limited to 'src/webidl-parser.y')
-rw-r--r-- | src/webidl-parser.y | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/webidl-parser.y b/src/webidl-parser.y index c4cfa56..f0f1830 100644 --- a/src/webidl-parser.y +++ b/src/webidl-parser.y @@ -134,8 +134,10 @@ webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str) %type <node> AttributeOrOperation %type <node> StringifierAttributeOrOperation %type <node> Const + %type <node> Operation %type <node> OperationRest +%type <node> OptionalIdentifier %% @@ -501,13 +503,20 @@ Special: OperationRest: ReturnType OptionalIdentifier '(' ArgumentList ')' ';' { - $$=NULL; + struct webidl_node *ident = NULL; + if ($2 != NULL) { + ident = webidl_node_new(WEBIDL_NODE_TYPE_IDENT, NULL, $2); + } + $$ = webidl_node_new(WEBIDL_NODE_TYPE_OPERATION, NULL, ident); } ; /* [40] */ OptionalIdentifier: /* empty */ + { + $$=NULL; + } | TOK_IDENTIFIER ; |