Skip to content

Commit

Permalink
fix js-gen of "if" where false branch not given; bump 0.3.39
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jun 13, 2021
1 parent 5bf6cb0 commit 6e16158
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "calcit_runner"
version = "0.3.38"
version = "0.3.39"
authors = ["jiyinyiyong <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
11 changes: 11 additions & 0 deletions calcit/snapshots/test-recursion.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
assert "|hole series numbers" $ = (map (range 1 20) hole-series)
[] 0 1 0 1 2 3 2 1 0 1 2 3 4 5 6 7 8 9 8

|*count-effects $ quote
defatom *count-effects 0

|test-loop $ quote
fn ()
assert= 55 $ apply
Expand All @@ -53,6 +56,14 @@
if (> from to) acc
recur (&+ acc from) (inc from) to

reset! *count-effects 0
loop ((x 3))
if (> x 0)
do
swap! *count-effects + x
recur (dec x)
assert= 6 @*count-effects

|main! $ quote
defn main! ()
log-title "|Testing hole series"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@calcit/procs",
"version": "0.3.38",
"version": "0.3.39",
"main": "./lib/calcit.procs.js",
"devDependencies": {
"@types/node": "^15.12.2",
Expand Down
2 changes: 1 addition & 1 deletion src/codegen/emit_js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ fn gen_if_code(
chunk.push_str(&format!("else {{ {} }}", false_code));
break;
} else {
chunk.push_str(&format!("\n{} null;", return_label.unwrap()));
chunk.push_str(&format!("else {{ {} null; }}", return_label.unwrap()));
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ts-src/calcit.procs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// CALCIT VERSION
export const calcit_version = "0.3.38";
export const calcit_version = "0.3.39";

import { overwriteComparator, initTernaryTreeMap } from "@calcit/ternary-tree";
import { parse } from "@cirru/parser.ts";
Expand Down

0 comments on commit 6e16158

Please sign in to comment.