diff options
author | Vincent Sanders <vince@kyllikki.org> | 2013-01-02 21:47:13 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2013-01-02 21:47:13 +0000 |
commit | 2b722f1ccfecc75ed93651543c9ba22a849396a1 (patch) | |
tree | 23c681240e72b15aa65f418ce78b385c2d13f33a /doc | |
parent | 3b19d1d1ad88ba63ae821b2aedd4005466ed52fa (diff) | |
download | nsgenbind-2b722f1ccfecc75ed93651543c9ba22a849396a1.tar.gz nsgenbind-2b722f1ccfecc75ed93651543c9ba22a849396a1.tar.bz2 |
extend binding DSL with prologue and epilogue stanzas
Diffstat (limited to 'doc')
-rw-r--r-- | doc/example.bnd | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/doc/example.bnd b/doc/example.bnd index 6bd051c..690eace 100644 --- a/doc/example.bnd +++ b/doc/example.bnd @@ -11,12 +11,6 @@ * http://www.opensource.org/licenses/mit-license */ -/* additional binding fragments may be included - * Note: this is not preprocessed despite the #include name, the - * parser will simply switch input to the included file and carry on - * cosntructing the bindings Abstract Syntax Tree (AST) - */ -#include "dom.bnd" /* directive to read WebIDL file and add its contents to the webidl AST */ webidlfile "html.idl"; @@ -43,6 +37,22 @@ preamble %{ %} +/* code block emitted immediately before the binding function bodies */ +prologue %{ +%} + +/* code block emmitted at the end of the output */ +epilogue %{ +%} + +/* additional binding fragments may be included + * Note: this is not preprocessed despite the #include name, the + * parser will simply switch input to the included file and carry on + * cosntructing the bindings Abstract Syntax Tree (AST) + */ +#include "dom.bnd" + + /* this block describes the binding to be generated * * Depending on the type of binding being generated multiple blocks |