Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
work on #5635 for JS
Browse files Browse the repository at this point in the history
  • Loading branch information
chochos committed Sep 23, 2015
1 parent 100fc5f commit 283ea40
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
function($mpt) {
console.log("IMPL OpenClassWithConstructors.annotatedConstructorDeclarations");
return empty();
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
function(m,i) {
return ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.annotatedMemberDeclarations.call(this,m,i);
var r=ClassOrInterfaceDeclaration$meta$declaration.$$.prototype.annotatedMemberDeclarations.call(this,m,i);
if (extendsType(m.Kind$annotatedMemberDeclarations,{t:ConstructorDeclaration$meta$declaration})) {
var callablesOnly=extendsType(m.Kind$annotatedMemberDeclarations,{t:CallableConstructorDeclaration$meta$declaration});
var valuesOnly=extendsType(m.Kind$annotatedMemberDeclarations,{t:ValueConstructorDeclaration$meta$declaration});
var mm=getrtmm$$(this.tipo);
var prefix=mm.d[mm.d.length-1]+'_';
var ccc=[];
for (k in this.tipo) {
if (k.startsWith(prefix)) {
mm=getrtmm$$(this.tipo[k]);
if (mm.d[mm.d.length-2]==='$cn') {
if (!valuesOnly) {
ccc.push(OpenCallableConstructor$jsint(this.package,this.tipo[k]));
}
} else if (!callablesOnly) {
ccc.push(OpenValueConstructor$jsint(this.package, this.tipo[k]));
}
}
}
return r.append(ArraySequence(ccc,{Element$ArraySequence:m.Kind$annotatedMemberDeclarations}),{Other$append:m.Kind$annotatedMemberDeclarations});
}
return r;
}

0 comments on commit 283ea40

Please sign in to comment.