From 4b043613d1a20980b13a6e9b0c8a7ff91c035b2f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 24 Sep 2012 20:29:25 +0100 Subject: add interface function return type --- src/webidl-parser.y | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/webidl-parser.y') diff --git a/src/webidl-parser.y b/src/webidl-parser.y index c3bb609..69fbef5 100644 --- a/src/webidl-parser.y +++ b/src/webidl-parser.y @@ -151,6 +151,7 @@ webidl_error(YYLTYPE *locp, struct webidl_node **winbind_ast, const char *str) %type Ellipsis %type Type +%type ReturnType %type SingleType %type UnionType %type NonAnyType @@ -581,6 +582,8 @@ OperationRest: { struct webidl_node *operation = $4; /* argument list */ + operation = webidl_node_prepend(operation, $1); /* return type */ + operation = webidl_node_prepend(operation, $2); /* identifier */ $$ = webidl_node_new(WEBIDL_NODE_TYPE_OPERATION, NULL, operation); @@ -1119,6 +1122,12 @@ ReturnType: Type | TOK_VOID + { + struct webidl_node *type; + type = webidl_node_new(WEBIDL_NODE_TYPE_TYPE_BASE, NULL, (void *)WEBIDL_TYPE_VOID); + $$ = webidl_node_new(WEBIDL_NODE_TYPE_TYPE, NULL, type); + } + ; %% -- cgit v1.2.3