UNPKG

capnp-js-plugin

Version:

Capnproto implementation for Javascript

3 lines 4.87 kB
var dust = require("capnp-js-plugin-dust");(function(){dust.register("throwOnInactive",body_0);function body_0(chk,ctx){return chk.h("ne",ctx,{"block":body_1},{"key":ctx.getPath(true, ["discriminantValue"]),"value":65535});}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.w("if (!this.").h("fieldIser",ctx,{},{"name":ctx.getPath(true, ["name"])}).w("()) {throw new Error(\"").f(ctx.get(["error"], false),ctx,"h").w("\");}");}body_1.__dustBody=!0;return body_0;})(); (function(){dust.register("generic/bind",body_0);function body_0(chk,ctx){return chk.x(ctx.getPath(true, ["hash"]),ctx,{"else":body_1,"block":body_4},{});}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.w("_bindParams([").s(ctx.getPath(true, ["parameters"]),ctx,{"block":body_2},{}).w("])");}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.p("generic/scope",ctx,{}).h("sep",ctx,{"block":body_3},{});}body_2.__dustBody=!0;function body_3(chk,ctx){return chk.w(", ");}body_3.__dustBody=!0;function body_4(chk,ctx){return chk.w("_memoize(\"").f(ctx.getPath(true, ["hash"]),ctx,"h").w("\",[").s(ctx.getPath(true, ["parameters"]),ctx,{"block":body_5},{}).w("])");}body_4.__dustBody=!0;function body_5(chk,ctx){return chk.p("generic/scope",ctx,{}).h("sep",ctx,{"block":body_6},{});}body_5.__dustBody=!0;function body_6(chk,ctx){return chk.w(", ");}body_6.__dustBody=!0;return body_0;})(); (function(){dust.register("generic/scope",body_0);function body_0(chk,ctx){return chk.x(ctx.getPath(true, ["generic"]),ctx,{"else":body_1,"block":body_11},{});}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.x(ctx.getPath(true, ["meta"]),ctx,{"else":body_2,"block":body_5},{});}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.h("eq",ctx,{"block":body_3},{"key":ctx.get(["source"], false),"value":"reader"}).h("eq",ctx,{"block":body_4},{"key":ctx.get(["source"], false),"value":"builder"});}body_2.__dustBody=!0;function body_3(chk,ctx){return chk.w("reader.").f(ctx.getPath(true, ["type"]),ctx,"h");}body_3.__dustBody=!0;function body_4(chk,ctx){return chk.w("builder.").f(ctx.getPath(true, ["type"]),ctx,"h");}body_4.__dustBody=!0;function body_5(chk,ctx){return chk.h("eq",ctx,{"block":body_6},{"key":ctx.getPath(true, ["meta"]),"value":"struct"}).h("eq",ctx,{"block":body_7},{"key":ctx.getPath(true, ["meta"]),"value":"enum"}).h("eq",ctx,{"block":body_8},{"key":ctx.getPath(true, ["meta"]),"value":"list"});}body_5.__dustBody=!0;function body_6(chk,ctx){return chk.f(ctx.get(["index"], false),ctx,"h").w("[\"").f(ctx.getPath(true, ["id"]),ctx,"h").w("\"]");}body_6.__dustBody=!0;function body_7(chk,ctx){return chk.f(ctx.get(["index"], false),ctx,"h").w("[\"").f(ctx.getPath(true, ["id"]),ctx,"h").w("\"]");}body_7.__dustBody=!0;function body_8(chk,ctx){return chk.h("eq",ctx,{"block":body_9},{"key":ctx.get(["source"], false),"value":"reader"}).h("eq",ctx,{"block":body_10},{"key":ctx.get(["source"], false),"value":"builder"});}body_8.__dustBody=!0;function body_9(chk,ctx){return chk.p("readers/list",ctx,{});}body_9.__dustBody=!0;function body_10(chk,ctx){return chk.p("builders/list",ctx,{});}body_10.__dustBody=!0;function body_11(chk,ctx){return chk.s(ctx.getPath(true, ["generic"]),ctx,{"block":body_12},{});}body_11.__dustBody=!0;function body_12(chk,ctx){return chk.x(ctx.getPath(true, ["scopeDistance"]),ctx,{"else":body_13,"block":body_19},{});}body_12.__dustBody=!0;function body_13(chk,ctx){return chk.s(ctx.getPath(true, ["path","0"]),ctx,{"block":body_14},{}).h("provide",ctx,{"nonroot":body_15,"block":body_16},{});}body_13.__dustBody=!0;function body_14(chk,ctx){return chk.f(ctx.get(["index"], false),ctx,"h").w("[\"").f(ctx.getPath(true, ["id"]),ctx,"h").w("\"].").p("generic/bind",ctx,{"parent":"null"});}body_14.__dustBody=!0;function body_15(chk,ctx){return chk.h("slice",ctx,{},{"arr":ctx.getPath(true, ["path"]),"begin":1});}body_15.__dustBody=!0;function body_16(chk,ctx){return chk.s(ctx.getPath(true, ["nonroot"]),ctx,{"block":body_17},{});}body_16.__dustBody=!0;function body_17(chk,ctx){return chk.w(".").f(ctx.get(["name"], false),ctx,"h").x(ctx.getPath(true, ["parameters"]),ctx,{"block":body_18},{});}body_17.__dustBody=!0;function body_18(chk,ctx){return chk.w(".").p("generic/bind",ctx,{});}body_18.__dustBody=!0;function body_19(chk,ctx){return chk.f(ctx.get(["current"], false),ctx,"h").h("repeat",ctx,{"block":body_20},{"times":ctx.getPath(true, ["scopeDistance"])}).s(ctx.getPath(true, ["path"]),ctx,{"block":body_21},{});}body_19.__dustBody=!0;function body_20(chk,ctx){return chk.w("._PARENT");}body_20.__dustBody=!0;function body_21(chk,ctx){return chk.w(".").f(ctx.getPath(true, ["name"]),ctx,"h").x(ctx.getPath(true, ["parameters"]),ctx,{"block":body_22},{});}body_21.__dustBody=!0;function body_22(chk,ctx){return chk.w(".").p("generic/bind",ctx,{"parent":ctx.get(["current"], false)});}body_22.__dustBody=!0;return body_0;})();