diff --git a/srcgen2/xats2js/srcgen1/DATS/js1emit_decl00.dats b/srcgen2/xats2js/srcgen1/DATS/js1emit_decl00.dats index 42247ce88..f5fc1d8c7 100644 --- a/srcgen2/xats2js/srcgen1/DATS/js1emit_decl00.dats +++ b/srcgen2/xats2js/srcgen1/DATS/js1emit_decl00.dats @@ -126,11 +126,11 @@ dimp.node() of |DIMPLone1 ( dcst ) => ( - d2cstfpr(filr, dcst)) + d2cstjs1(filr, dcst)) |DIMPLone2 (dcst, svts) => ( - d2cstfpr(filr, dcst)) + d2cstjs1(filr, dcst)) |DIMPLall1 (dqid, d2cs) => ( diff --git a/srcgen2/xats2js/srcgen1/DATS/js1emit_dynexp.dats b/srcgen2/xats2js/srcgen1/DATS/js1emit_dynexp.dats index c64bbb0bd..1abda3472 100644 --- a/srcgen2/xats2js/srcgen1/DATS/js1emit_dynexp.dats +++ b/srcgen2/xats2js/srcgen1/DATS/js1emit_dynexp.dats @@ -897,13 +897,13 @@ ival.node() of ( itnm ) => i1tnmjs1(filr,itnm) (* ****** ****** *) |I1Vcon -( dcon ) => d2confpr(filr,dcon) +( dcon ) => d2conjs1(filr,dcon) (* ****** ****** *) |I1Vcst -( dcst ) => d2cstfpr(filr,dcst) +( dcst ) => d2cstjs1(filr,dcst) (* ****** ****** *) |I1Vvar -( dvar ) => d2varfpr(filr,dvar) +( dvar ) => d2varjs1(filr,dvar) (* ****** ****** *) (* ****** ****** *) // diff --git a/srcgen2/xats2js/srcgen1/DATS/js1emit_utils0.dats b/srcgen2/xats2js/srcgen1/DATS/js1emit_utils0.dats index 94da4fbfa..615b15915 100644 --- a/srcgen2/xats2js/srcgen1/DATS/js1emit_utils0.dats +++ b/srcgen2/xats2js/srcgen1/DATS/js1emit_utils0.dats @@ -62,6 +62,20 @@ Authoremail: gmhwxiATgmailDOTcom "./../../../SATS/lexing0.sats" // (* ****** ****** *) +// +#staload // S2E = +"./../../../SATS/staexp2.sats" +#staload // T2P = +"./../../../SATS/statyp2.sats" +#staload // D2E = +"./../../../SATS/dynexp2.sats" +// +(* ****** ****** *) +// +#staload // GLO = +"./../../../SATS/xglobal.sats" +// +(* ****** ****** *) (* ****** ****** *) // #staload "./../SATS/intrep0.sats" @@ -70,6 +84,7 @@ Authoremail: gmhwxiATgmailDOTcom #staload "./../SATS/js1emit.sats" // (* ****** ****** *) +(* ****** ****** *) // #staload _(*DATS*)="./../DATS/js1emit.dats" @@ -77,6 +92,142 @@ _(*DATS*)="./../DATS/js1emit.dats" (* ****** ****** *) (* ****** ****** *) // +#symload lctn with d2con_get_lctn +#symload lctn with d2cst_get_lctn +#symload lctn with d2var_get_lctn +// +#symload name with d2con_get_name +#symload name with d2cst_get_name +#symload name with d2var_get_name +// +(* ****** ****** *) +#symload lctn with d2exp_get_lctn +#symload node with d2exp_get_node +(* ****** ****** *) +(* ****** ****** *) +// +fun +xsymjs1 +( filr: FILR +, xsym: symbl): void = +symbl_fprint(filr, xsym) +// +(* ****** ****** *) +(* ****** ****** *) +// +#implfun +d2conjs1 +(filr, dcon) = +(* +d2confpr(filr, dcon) +*) +let +// +val name = dcon.name((*0*)) +// +in//let +( +xsymjs1 +(filr, name); +strnfpr(filr, "_"); +fprint_loctn_as_stamp +(filr, dcon.lctn((*void*)))) +end(*let*)//end-of-[d2conjs1(env0,dcon)] +// +(* ****** ****** *) +// +#implfun +d2cstjs1 +(filr, dcst) = +(* +d2cstfpr(filr, dcst) +*) +let +// +val stmp = +d2cst_get_stmp(dcst) +val xopt = +the_d2cstmap_xnmfind(stmp) +// +in//let +( +case+ +xopt of +| ~ +optn_vt_nil + ( (*0*) ) => f0_none(dcst) +| ~ +optn_vt_cons + ( xnam ) => +( +case+ xnam of +|X2NAMnone + ( (*0*) ) => f0_none(dcst) +|X2NAMsome + ( dexp ) => f0_some(dcst, dexp) +) +) where +{ +// +fun +f0_none +(dcst: d2cst): void = +let +val lctn = dcst.lctn((*0*)) +val name = dcst.name((*0*)) +// +in//let +xsymjs1 +(filr, name); +strnfpr(filr, "_"); +fprint_loctn_as_stamp(filr, lctn) +end//let//end-of-[f0_none] +// +fun +f0_some +(dcst: d2cst +,dexp: d2exp): void = +let +// +val name = dcst.name((*0*)) +// +val- +D2Eextnam +(tknd, gnam) = dexp.node((*0*)) +// +in//let +case+ gnam of +| +_(* else *) => xsymjs1(filr, name) +end(*let*)//end-of-[f0_some(dcst,dexp)] +// +}(*where*) +end(*let*)//end-of-[d2cstjs1(env0,dcst)] +// +(* ****** ****** *) +// +#implfun +d2varjs1 +(filr, dvar) = +(* +d2varfpr(filr, dvar) +*) +let +// +val name = dvar.name((*0*)) +// +in//let +( +xsymjs1 +(filr, name); +strnfpr(filr, "_"); +fprint_loctn_as_stamp +(filr, dvar.lctn((*void*)))) +end(*let*)//end-of-[d2varjs1(env0,dvar)] +// +(* ****** ****** *) +(* ****** ****** *) +// #implfun i1tnmjs1 ( filr,itnm ) = diff --git a/srcgen2/xats2js/srcgen1/SATS/js1emit.sats b/srcgen2/xats2js/srcgen1/SATS/js1emit.sats index ab9cce203..526c9e9ea 100644 --- a/srcgen2/xats2js/srcgen1/SATS/js1emit.sats +++ b/srcgen2/xats2js/srcgen1/SATS/js1emit.sats @@ -57,6 +57,23 @@ XATSOPT "./../../.." (* ****** ****** *) // fun +d2conjs1 +(filr +:FILR, dcon: d2con): void +fun +d2cstjs1 +(filr +:FILR, dcst: d2cst): void +// +fun +d2varjs1 +(filr +:FILR, dvar: d2var): void +// +(* ****** ****** *) +(* ****** ****** *) +// +fun i1tnmjs1 (filr:FILR,itnm:i1tnm): void // diff --git a/srcgen2/xats2py/srcgen1/SATS/py1emit.sats b/srcgen2/xats2py/srcgen1/SATS/py1emit.sats index 6fef4a6e7..5c371f198 100644 --- a/srcgen2/xats2py/srcgen1/SATS/py1emit.sats +++ b/srcgen2/xats2py/srcgen1/SATS/py1emit.sats @@ -70,6 +70,7 @@ d2varpy1 :FILR, dvar: d2var): void // (* ****** ****** *) +(* ****** ****** *) // fun i1tnmpy1