Sha256: a9d112861c90a2f512af31dbd5c9278515183c28554a5477901c5c2c603ee4c0
Contents?: true
Size: 927 Bytes
Versions: 8
Compression:
Stored size: 927 Bytes
Contents
// js -m -n -e "load('relooper.js')" test.js function test() { print("-- If shape --\n"); //Relooper.setDebug(1); { Relooper.init(); var b_a = Relooper.addBlock("// block A\n"); var b_b = Relooper.addBlock("// block B\n"); var b_c = Relooper.addBlock("// block C\n"); Relooper.addBranch(b_a, b_b, "check == 10", "atob();"); Relooper.addBranch(b_a, b_c, 0, "atoc();"); Relooper.addBranch(b_b, b_c, 0, "btoc();"); var output = Relooper.render(b_a); print(output); } { Relooper.init(); var b_a = Relooper.addBlock("// block A\n"); var b_b = Relooper.addBlock("// block B\n"); var b_c = Relooper.addBlock("// block C\n"); Relooper.addBranch(b_a, b_b, "check == fee()"); Relooper.addBranch(b_a, b_c, 0, 0); Relooper.addBranch(b_c, b_b); var output = Relooper.render(b_a); print(output); } } test(); // TODO: wrap the relooper itself
Version data entries
8 entries across 8 versions & 1 rubygems