@@ -234,7 +234,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
234
234
if (! spec.wasmOmitNsAlias && ! spec.wasmNamespace.isEmpty) {
235
235
w.wl(
236
236
s """ ::djinni::djinni_register_name_in_ns(" ${fullyQualifiedName}", " ${spec.wasmNamespace.get}. ${idJs
237
- .ty(ident)}"); """
237
+ .ty(ident)}"); """
238
238
)
239
239
}
240
240
w.wl(s " }); " )
@@ -249,7 +249,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
249
249
}
250
250
}
251
251
252
- // ------------------------------------------------------------------------------
252
+ // ------------------------------------------------------------------------------
253
253
254
254
override def generateEnum (origin : String , ident : Ident , doc : Doc , e : Enum ) {
255
255
val refs = new WasmRefs (ident.name)
@@ -306,7 +306,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
306
306
if (! spec.wasmOmitNsAlias && ! spec.wasmNamespace.isEmpty) {
307
307
w.wl(
308
308
s """ ::djinni::djinni_register_name_in_ns(" ${fullyQualifiedName}", " ${spec.wasmNamespace.get}. ${idJs
309
- .ty(ident)}"); """
309
+ .ty(ident)}"); """
310
310
)
311
311
}
312
312
w.wl(s " }); " )
@@ -484,7 +484,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
484
484
w.wl(" ;" )
485
485
m.ret.fold(())(r =>
486
486
w.wl(s " return ${helperClass(r.resolved)}::fromCpp( ${cppMarshal
487
- .maybeMove(" r" , r)}); " )
487
+ .maybeMove(" r" , r)}); " )
488
488
)
489
489
}
490
490
w.w(" catch(const std::exception& e)" ).braced {
@@ -506,7 +506,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
506
506
val constModifier = if (m.const) " const" else " "
507
507
w.w(
508
508
s " ${cppMarshal.fqReturnType(m.ret)} ${helper}::JsProxy:: ${idCpp
509
- .method(m.ident)}( "
509
+ .method(m.ident)}( "
510
510
)
511
511
w.w(
512
512
m.params
@@ -526,7 +526,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
526
526
s " ) " ,
527
527
p => {
528
528
s " ${helperClass(p.ty.resolved)}::fromCpp( ${cppMarshal
529
- .maybeMove(idCpp.local(p.ident), p.ty)}) "
529
+ .maybeMove(idCpp.local(p.ident), p.ty)}) "
530
530
}
531
531
)
532
532
w.wl(" ;" )
@@ -556,7 +556,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
556
556
val classRegister =
557
557
if (! spec.wasmOmitNsAlias && ! spec.wasmNamespace.isEmpty) {
558
558
s """ ::djinni::DjinniClass_< $cls>(" ${fullyQualifiedJsName}", " ${spec.wasmNamespace.get}. ${idJs
559
- .ty(ident.name)}") """
559
+ .ty(ident.name)}") """
560
560
} else {
561
561
s """ em::class_< $cls>(" ${fullyQualifiedJsName}") """
562
562
}
@@ -566,13 +566,13 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
566
566
s """ .smart_ptr<std::shared_ptr< $cls>>(" ${fullyQualifiedJsName}") """
567
567
)
568
568
w.wl(s """ .function(" ${idJs
569
- .method(" native_destroy" )}", & $helper::nativeDestroy) """ )
569
+ .method(" native_destroy" )}", & $helper::nativeDestroy) """ )
570
570
if (i.ext.cpp) {
571
571
for (m <- i.methods.filter(m => ! m.static || m.lang.js)) {
572
572
val funcType = if (m.static) " class_function" else " function"
573
573
w.wl(s """ . $funcType(" ${idJs.method(
574
- m.ident.name
575
- )}", $helper:: ${idCpp.method(m.ident)}) """ )
574
+ m.ident.name
575
+ )}", $helper:: ${idCpp.method(m.ident)}) """ )
576
576
}
577
577
}
578
578
w.wl(" ;" )
@@ -661,7 +661,7 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
661
661
" }" ,
662
662
f => {
663
663
s """ ${helperClass(f.ty.resolved)}::Boxed::toCpp(j[" ${idJs
664
- .field(f.ident.name)}"]) """
664
+ .field(f.ident.name)}"]) """
665
665
}
666
666
)
667
667
w.wl(" ;" )
@@ -670,9 +670,9 @@ class WasmGenerator(spec: Spec) extends Generator(spec) {
670
670
w.wl(" em::val js = em::val::object();" )
671
671
for (f <- r.fields) {
672
672
w.wl(s """ js.set(" ${idJs.field(f.ident.name)}", ${helperClass(
673
- f.ty.resolved
674
- )}::Boxed::fromCpp( ${cppMarshal
675
- .maybeMove(" c." + idCpp.field(f.ident), f.ty)})); """ )
673
+ f.ty.resolved
674
+ )}::Boxed::fromCpp( ${cppMarshal
675
+ .maybeMove(" c." + idCpp.field(f.ident), f.ty)})); """ )
676
676
}
677
677
w.wl(" return js;" )
678
678
}
0 commit comments