summaryrefslogtreecommitdiff
path: root/doc/example.bnd
diff options
context:
space:
mode:
Diffstat (limited to 'doc/example.bnd')
-rw-r--r--doc/example.bnd22
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