Skip to content

Commit

Permalink
fix semantics of first nil; tag 0.5.13
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Dec 6, 2021
1 parent 60d675e commit e44cbc3
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 126 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
with:
toolchain: stable

- uses: Swatinem/rust-cache@v1

- run: cargo test
- run: cargo run --bin cr calcit/editor/compact.cirru --once
- run: cargo run --bin cr calcit/test.cirru --once
Expand Down
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.5.12"
version = "0.5.13"
authors = ["jiyinyiyong <jiyinyiyong@gmail.com>"]
edition = "2018"
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions calcit/test-list.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
assert= (conj a 4 5 6 7) $ [] 1 2 3 4 5 6 7
assert= 1 (first a)
assert= 3 (last a)
assert= nil (first nil)
assert= nil (last nil)
assert-detect nil? (first $ [])
assert-detect nil? (last $ [])
assert= (rest a) $ [] 2 3
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@calcit/procs",
"version": "0.5.12",
"version": "0.5.13",
"main": "./lib/calcit.procs.js",
"devDependencies": {
"@types/node": "^16.11.6",
"esbuild": "^0.13.12",
"typescript": "^4.4.4"
"@types/node": "^16.11.11",
"esbuild": "^0.14.2",
"typescript": "^4.5.2"
},
"scripts": {
"compile": "rm -rfv lib/* && tsc",
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.5.12";
export const calcit_version = "0.5.13";

import { overwriteComparator, initTernaryTreeMap } from "@calcit/ternary-tree";
import { parse, ICirruNode } from "@cirru/parser.ts";
Expand Down
3 changes: 3 additions & 0 deletions ts-src/js-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export class CalcitList {
return listLen(this.value);
}
get(idx: number) {
if (this.len() === 0) {
return null;
}
return listGet(this.value, idx);
}
assoc(idx: number, v: CalcitValue) {
Expand Down
238 changes: 119 additions & 119 deletions yarn.lock

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

0 comments on commit e44cbc3

Please sign in to comment.