@@ -233,10 +233,10 @@ fn to_js_code(
233
233
match & * * info {
234
234
ImportInfo :: Core { at_ns } => {
235
235
if & * * at_ns == calcit:: CORE_NS {
236
- // functions under core uses built $calcit module entry
236
+ // functions under core uses built $clt module entry
237
237
Ok ( escape_var ( def) )
238
238
} else {
239
- Ok ( format ! ( "$calcit .{}" , escape_var( def) ) )
239
+ Ok ( format ! ( "$clt .{}" , escape_var( def) ) )
240
240
}
241
241
}
242
242
ImportInfo :: NsAs { .. } => {
@@ -313,7 +313,7 @@ fn gen_call_code(
313
313
return_label : Option < & str > ,
314
314
) -> Result < String , String > {
315
315
let return_code = return_label. unwrap_or ( "" ) ;
316
- let var_prefix = if ns == calcit:: CORE_NS { "" } else { "$calcit ." } ;
316
+ let var_prefix = if ns == calcit:: CORE_NS { "" } else { "$clt ." } ;
317
317
let proc_prefix = get_proc_prefix ( ns) ;
318
318
if ys. is_empty ( ) {
319
319
println ! ( "[Warn] Unexpected empty list inside {xs}" ) ;
@@ -629,7 +629,7 @@ struct PassedDefs<'a> {
629
629
630
630
fn gen_symbol_code ( s : & str , def_ns : & str , at_def : & str , xs : & Calcit , passed_defs : & PassedDefs ) -> Result < String , String > {
631
631
// println!("gen symbol: {} {} {} {:?}", s, def_ns, ns, resolved);
632
- let var_prefix = if passed_defs. ns == calcit:: CORE_NS { "" } else { "$calcit ." } ;
632
+ let var_prefix = if passed_defs. ns == calcit:: CORE_NS { "" } else { "$clt ." } ;
633
633
if has_ns_part ( s) {
634
634
unreachable ! ( "unknown feature: {s} {def_ns} {at_def} {xs}" ) ;
635
635
}
@@ -887,7 +887,7 @@ fn gen_args_code(
887
887
tags : & RefCell < HashSet < EdnTag > > ,
888
888
) -> Result < String , String > {
889
889
let mut result = String :: from ( "" ) ;
890
- let var_prefix = if ns == "calcit.core" { "" } else { "$calcit ." } ;
890
+ let var_prefix = if ns == "calcit.core" { "" } else { "$clt ." } ;
891
891
let mut spreading = false ;
892
892
for x in body {
893
893
match x {
@@ -974,7 +974,7 @@ fn gen_js_func(
974
974
tags : & RefCell < HashSet < EdnTag > > ,
975
975
at_ns : & str ,
976
976
) -> Result < String , String > {
977
- let var_prefix = if passed_defs. ns == "calcit.core" { "" } else { "$calcit ." } ;
977
+ let var_prefix = if passed_defs. ns == "calcit.core" { "" } else { "$clt ." } ;
978
978
let mut local_defs = passed_defs. local_defs . to_owned ( ) ;
979
979
let mut spreading_code = String :: from ( "" ) ; // js list and calcit-js list are different, need to convert
980
980
let mut args_code = String :: from ( "" ) ;
@@ -1268,7 +1268,7 @@ pub fn emit_js(entry_ns: &str, emit_path: &str) -> Result<(), String> {
1268
1268
let mut import_code = if & * ns == "calcit.core" {
1269
1269
snippets:: tmpl_import_procs ( wrap_js_str ( "@calcit/procs" ) )
1270
1270
} else {
1271
- format ! ( "\n import * as $calcit from {core_lib};" )
1271
+ format ! ( "\n import * as $clt from {core_lib};" )
1272
1272
} ;
1273
1273
1274
1274
let mut def_names: HashSet < Arc < str > > = HashSet :: new ( ) ; // multiple parts of scoped defs need to be tracked
@@ -1288,7 +1288,7 @@ pub fn emit_js(entry_ns: &str, emit_path: &str) -> Result<(), String> {
1288
1288
continue ;
1289
1289
}
1290
1290
if is_preferred_js_proc ( & def) {
1291
- writeln ! ( defs_code, "\n var {} = $calcit_procs .{};" , escape_var( & def) , escape_var( & def) ) . expect ( "write" ) ;
1291
+ writeln ! ( defs_code, "\n var {} = $procs .{};" , escape_var( & def) , escape_var( & def) ) . expect ( "write" ) ;
1292
1292
continue ;
1293
1293
}
1294
1294
}
@@ -1298,7 +1298,7 @@ pub fn emit_js(entry_ns: &str, emit_path: &str) -> Result<(), String> {
1298
1298
match & f {
1299
1299
// probably not work here
1300
1300
Calcit :: Proc ( ..) => {
1301
- writeln ! ( defs_code, "\n var {} = $calcit_procs .{};" , escape_var( & def) , escape_var( & def) ) . expect ( "write" ) ;
1301
+ writeln ! ( defs_code, "\n var {} = $procs .{};" , escape_var( & def) , escape_var( & def) ) . expect ( "write" ) ;
1302
1302
}
1303
1303
Calcit :: Fn { info, .. } => {
1304
1304
gen_stack:: push_call_stack ( & info. def_ns , & info. name , StackKind :: Codegen , f. to_owned ( ) , & [ ] ) ;
@@ -1393,7 +1393,7 @@ pub fn emit_js(entry_ns: &str, emit_path: &str) -> Result<(), String> {
1393
1393
}
1394
1394
}
1395
1395
1396
- let tag_prefix = if & * ns == "calcit.core" { "" } else { "$calcit ." } ;
1396
+ let tag_prefix = if & * ns == "calcit.core" { "" } else { "$clt ." } ;
1397
1397
let mut tag_arr = String :: from ( "[" ) ;
1398
1398
let mut ordered_tags: Vec < EdnTag > = vec ! [ ] ;
1399
1399
for k in collected_tags. borrow ( ) . iter ( ) {
@@ -1445,7 +1445,7 @@ fn is_cirru_string(s: &str) -> bool {
1445
1445
1446
1446
#[ inline( always) ]
1447
1447
fn get_proc_prefix ( ns : & str ) -> & str {
1448
- if ns == calcit:: CORE_NS { "$calcit_procs ." } else { "$calcit ." }
1448
+ if ns == calcit:: CORE_NS { "$procs ." } else { "$clt ." }
1449
1449
}
1450
1450
1451
1451
fn cirru_to_js ( code : & Cirru ) -> Result < String , String > {
0 commit comments