Permalink
Browse files

Merge branch 'master' of github.com:ceylon/ceylon-js

Conflicts:
	src/test/ceylon/flow/flow.ceylon
  • Loading branch information...
2 parents c7f5a44 + c7461d5 commit b801e1d4cf94ebaef55337c35220f68bdf765317 @chochos chochos committed May 2, 2012
View
@@ -6,12 +6,18 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.ebayopensource.vjet.eclipse.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.ebayopensource.vjet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
View
@@ -21,8 +21,6 @@ JAVA_CP="$JAVA_CP:$CEYLON_REPO/com/redhat/ceylon/typechecker/$CEYLON_VERSION/com
JAVA_CP="$JAVA_CP:$CEYLON_REPO/com/redhat/ceylon/module-resolver/$CEYLON_VERSION/com.redhat.ceylon.module-resolver-$CEYLON_VERSION.jar"
JAVA_CP="$JAVA_CP:$CEYLON_HOME/../../ceylon-compiler/lib/antlr-3.4-complete.jar"
-echo classpath es $JAVA_CP
-
java \
-enableassertions \
-Xbootclasspath/p:"$JAVA_CP:$(dirname "$PRG")/../lib/jscompiler-${CEYLON_VERSION}.jar" \
@@ -1312,16 +1312,15 @@ public void visit(InvocationExpression that) {
that.getNamedArgumentList().visit(this);
out("return ");
that.getPrimary().visit(this);
- out("(");
if (that.getPrimary() instanceof Tree.MemberOrTypeExpression) {
Tree.MemberOrTypeExpression mte = (Tree.MemberOrTypeExpression) that.getPrimary();
if (mte.getDeclaration() instanceof Functional) {
Functional f = (Functional) mte.getDeclaration();
- if (!f.getParameterLists().isEmpty()) {
+ for (com.redhat.ceylon.compiler.typechecker.model.ParameterList plist : f.getParameterLists()) {
List<String> argNames = that.getNamedArgumentList().getNamedArgumentList().getArgumentNames();
boolean first=true;
- for (com.redhat.ceylon.compiler.typechecker.model.Parameter p:
- f.getParameterLists().get(0).getParameters()) {
+ out("(");
+ for (com.redhat.ceylon.compiler.typechecker.model.Parameter p : plist.getParameters()) {
if (!first) out(",");
if (p.isSequenced() && that.getNamedArgumentList().getSequencedArgument()==null && that.getNamedArgumentList().getNamedArguments().isEmpty()) {
out(clAlias, ".empty");
@@ -1332,10 +1331,11 @@ public void visit(InvocationExpression that) {
}
first = false;
}
+ out(")");
}
}
}
- out(")}())");
+ out("}())");
}
else {
super.visit(that);
@@ -2335,7 +2335,10 @@ public void generate(BinaryOpTermGenerator termgen) {
}
@Override public void visit(ForStatement that) {
- if (comment) out("//'for' statement at ", that.getUnit().getFilename(), " (", that.getLocation(), ")");
+ if (comment) {
+ out("//'for' statement at ", that.getUnit().getFilename(), " (", that.getLocation(), ")");
+ if (that.getExits()) out("//EXITS!");
+ }
endLine();
ForIterator foriter = that.getForClause().getForIterator();
SpecifierExpression iterable = foriter.getSpecifierExpression();
@@ -88,12 +88,12 @@ void testIfExists() {
}
variable Integer cnt := 0;
String? s5 { ++cnt; return "ok"; }
- if (exists _s5=s5) {
- assert(_s5=="ok", "if (exists x) with getter [value: " _s5 "]");
+ if (exists x = s5) {
+ assert(x=="ok", "if (exists x=y) with getter [value: " x "]");
} else {
- fail("if (exists x) with getter [exists]");
+ fail("if (exists x=y) with getter [exists]");
}
- assert(cnt==1, "if (exists x) with getter [calls: " cnt "]");
+ assert(cnt==1, "if (exists x=y) with getter [calls: " cnt "]");
}
void testWhileExists() {
@@ -42,11 +42,13 @@ class TestIs2(Integer|String x) {
shared void test() {
value enums = {1, 2.0};
//is cases
- switch(enums[0])
+ value e0 = enums[0];
+ switch(e0)
case(is Integer) {}
else { fail("FLOAT? WTF?"); }
- switch(enums[1])
+ value e1 = enums[1];
+ switch(e1)
case(is Integer) { fail("INTEGER? WTF?"); }
case(is Float) {}
else { fail("Nothing!!! WTF?"); }

0 comments on commit b801e1d

Please sign in to comment.