@calcit/procs 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var _a;
2
2
  // CALCIT VERSION
3
- export const calcit_version = "0.6.4";
3
+ export const calcit_version = "0.6.6";
4
4
  import { parse } from "@cirru/parser.ts";
5
5
  import { writeCirruCode } from "@cirru/writer.ts";
6
6
  import "./js-primes.mjs";
@@ -20,7 +20,7 @@ import { CalcitList, CalcitSliceList, foldl } from "./js-list.mjs";
20
20
  import { CalcitMap, CalcitSliceMap } from "./js-map.mjs";
21
21
  import { CalcitSet } from "./js-set.mjs";
22
22
  import { CalcitTuple } from "./js-tuple.mjs";
23
- import { to_calcit_data, extract_cirru_edn } from "./js-cirru.mjs";
23
+ import { to_calcit_data, extract_cirru_edn, CalcitCirruQuote } from "./js-cirru.mjs";
24
24
  let inNodeJs = typeof process !== "undefined" && ((_a = process === null || process === void 0 ? void 0 : process.release) === null || _a === void 0 ? void 0 : _a.name) === "node";
25
25
  export let type_of = (x) => {
26
26
  if (typeof x === "string") {
@@ -56,6 +56,9 @@ export let type_of = (x) => {
56
56
  if (x instanceof CalcitRecord) {
57
57
  return kwd("record");
58
58
  }
59
+ if (x instanceof CalcitCirruQuote) {
60
+ return kwd("cirru-quote");
61
+ }
59
62
  if (x === true || x === false) {
60
63
  return kwd("bool");
61
64
  }
@@ -1063,7 +1066,7 @@ export let write_file = (path, content) => {
1063
1066
  }
1064
1067
  };
1065
1068
  export let parse_cirru = (code) => {
1066
- return to_calcit_data(parse(code), true);
1069
+ return new CalcitCirruQuote(parse(code));
1067
1070
  };
1068
1071
  // for JavaScript, it's same as parse_cirru
1069
1072
  export let parse_cirru_list = (code) => {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
- "@types/node": "^18.6.1",
7
- "typescript": "^4.7.4"
6
+ "@types/node": "^18.7.18",
7
+ "typescript": "^4.8.3"
8
8
  },
9
9
  "scripts": {
10
10
  "compile": "rm -rfv lib/* && tsc",
@@ -1,5 +1,5 @@
1
1
  // CALCIT VERSION
2
- export const calcit_version = "0.6.4";
2
+ export const calcit_version = "0.6.6";
3
3
 
4
4
  import { parse, ICirruNode } from "@cirru/parser.ts";
5
5
  import { writeCirruCode } from "@cirru/writer.ts";
@@ -75,6 +75,9 @@ export let type_of = (x: any): CalcitKeyword => {
75
75
  if (x instanceof CalcitRecord) {
76
76
  return kwd("record");
77
77
  }
78
+ if (x instanceof CalcitCirruQuote) {
79
+ return kwd("cirru-quote");
80
+ }
78
81
  if (x === true || x === false) {
79
82
  return kwd("bool");
80
83
  }
@@ -1162,8 +1165,8 @@ export let write_file = (path: string, content: string): void => {
1162
1165
  }
1163
1166
  };
1164
1167
 
1165
- export let parse_cirru = (code: string): CalcitList => {
1166
- return to_calcit_data(parse(code), true) as CalcitList;
1168
+ export let parse_cirru = (code: string): CalcitCirruQuote => {
1169
+ return new CalcitCirruQuote(parse(code));
1167
1170
  };
1168
1171
 
1169
1172
  // for JavaScript, it's same as parse_cirru