Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aed7af7c68
Binary file not shown.
Binary file not shown.
BIN
ClassOne.class
BIN
ClassOne.class
Binary file not shown.
BIN
ClassTwo.class
BIN
ClassTwo.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
DivMethod.class
BIN
DivMethod.class
Binary file not shown.
BIN
Fakultaet.class
BIN
Fakultaet.class
Binary file not shown.
BIN
FieldVar.class
BIN
FieldVar.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
emptyClass.class
BIN
emptyClass.class
Binary file not shown.
BIN
getI.class
BIN
getI.class
Binary file not shown.
@ -22,10 +22,11 @@ public class Compiler {
|
||||
|
||||
if (args.length < 1) {
|
||||
System.out.println("Usage: java -jar Compiler.jar <file_path> [--suppress-details]");
|
||||
return;
|
||||
//return;
|
||||
}
|
||||
|
||||
String filePath = args[0];
|
||||
//String filePath = args[0];
|
||||
String filePath = "src/CharArgument.java";
|
||||
|
||||
boolean suppressDetails = false;
|
||||
|
||||
@ -101,6 +102,7 @@ public class Compiler {
|
||||
System.out.println("No TypeCheck errors found.");
|
||||
|
||||
abstractSyntaxTree.codeGen();//todo remove
|
||||
|
||||
try {
|
||||
abstractSyntaxTree.codeGen();
|
||||
}catch (Exception e){
|
||||
|
@ -1,3 +0,0 @@
|
||||
class EmptyClass {
|
||||
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
class FieldAccessAndMethodCalls {
|
||||
public static void main(String[] args) {
|
||||
Class1 c1 = new Class1();
|
||||
int i = c1.c2.c3.m3(1).m2().m1();
|
||||
System.out.println(i);
|
||||
}
|
||||
}
|
||||
|
||||
class Class1{
|
||||
int i1;
|
||||
Class2 c2;
|
||||
public Class1() {
|
||||
this.c2 = new Class2();
|
||||
}
|
||||
public int m1(){
|
||||
return i1;
|
||||
}
|
||||
}
|
||||
|
||||
class Class2{
|
||||
int i2;
|
||||
Class3 c3;
|
||||
public Class2(){
|
||||
this.c3 = new Class3();
|
||||
}
|
||||
public Class1 m2(){
|
||||
Class1 c1 = new Class1();
|
||||
c1.i1 = i2;
|
||||
return c1;
|
||||
}
|
||||
}
|
||||
|
||||
class Class3{
|
||||
int i3;
|
||||
public Class2 m3(int i){
|
||||
Class2 c2 = new Class2();
|
||||
c2.i2 = i;
|
||||
return c2;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user