diff options
author | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-09-14 19:57:09 +0100 |
---|---|---|
committer | Vincent Sanders <vincent.sanders@collabora.co.uk> | 2012-09-14 19:57:09 +0100 |
commit | cdd39954a238ec07224c3c9cff66a4f8f101d71c (patch) | |
tree | db822cce0b40536d0c5a9fbd0354264cfb6f1f09 /src/webidl-parser.y | |
parent | 6ccbb7e3fe88c9a6ddb232c43f71b9c8cb80a884 (diff) | |
download | nsgenbind-cdd39954a238ec07224c3c9cff66a4f8f101d71c.tar.gz nsgenbind-cdd39954a238ec07224c3c9cff66a4f8f101d71c.tar.bz2 |
add preamble output
add operation nodes to webidl ast
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 ; |