diff options
Diffstat (limited to 'src/genjsbind-parser.y')
-rw-r--r-- | src/genjsbind-parser.y | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/genjsbind-parser.y b/src/genjsbind-parser.y index ce8a1fd..c3122ea 100644 --- a/src/genjsbind-parser.y +++ b/src/genjsbind-parser.y @@ -43,6 +43,7 @@ int genjsbind_wrap() %token TOK_INTERFACE %token TOK_TYPE %token TOK_EXTRA +%token TOK_NODE %token <text> TOK_IDENTIFIER @@ -101,7 +102,7 @@ HdrStrings Preamble : - TOK_PREAMBLE CBlock + TOK_PREAMBLE CBlock ';' ; CBlock @@ -123,12 +124,39 @@ Binding ; BindingArgs -: -; + : + BindingArg + | + BindingArgs BindingArg + ; + +BindingArg + : + Type + | + Extra + | + Interface + ; + +Type + : + TOK_TYPE TOK_IDENTIFIER '{' TypeArgs '}' ';' + ; + +TypeArgs + : + TOK_NODE TOK_IDENTIFIER ';' + ; + +Extra + : + TOK_EXTRA TOK_STRING_LITERAL ';' + ; Interface : - TOK_INTERFACE TOK_STRING_LITERAL ';' + TOK_INTERFACE TOK_IDENTIFIER ';' { genjsbind_interface($2); } |