new bransch

This commit is contained in:
Martin Plümicke 2017-06-30 13:04:56 +02:00
parent 3173cccefa
commit 05e4968adb
4 changed files with 14 additions and 3 deletions

View File

@ -33,7 +33,11 @@ public class JavaTXParser {
}
//TODO: Wieso muss man das händisch anhängen?
ret.add("java.lang.Object");
ret.add("java.lang.Long");
ret.add("java.lang.Integer");
ret.add("java.lang.Boolean");
ret.add("java.lang.String");
ret.add("java.lang.Class");
return ret;
}
}

View File

@ -23,4 +23,6 @@ public abstract class Expression extends SyntaxTreeNode
}
public abstract void accept(StatementVisitor visitor);
public String toString() { return this.getClass().getName() + ":" + type.toString(); }
}

View File

@ -1,8 +1,12 @@
class Faculty {
Integer mul(Integer x, Integer y) {
return x;
}
m () {
auto fact = (Integer x) -> {
return fact.apply(x);
return mul(x, fact.apply(x));
};
return fact;
}

View File

@ -26,7 +26,8 @@ public class JavaTXCompilerTest {
@Test
public void test() throws IOException, ClassNotFoundException {
filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
filesToTest.add(new File(rootDirectory+"Faculty.jav"));
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));