modified: ../../../../main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java

this wird nicht als Field betrachtet

	new file:   ../../javFiles/packageTest/Pair2.jav
	new file:   ../../javFiles/packageTest/de/test/Pair.jav
This commit is contained in:
pl@gohorb.ba-horb.de 2021-06-04 00:52:50 +02:00
parent 33d6adf899
commit 0aab2d9f53
3 changed files with 29 additions and 1 deletions

View File

@ -272,8 +272,10 @@ public class StatementGenerator {
whole+="."; whole+=".";
} }
if(parts.length < 2){ if(parts.length < 2 || parts[0].contentEquals("this") ){
receiver = new This(offset); receiver = new This(offset);
} else if (parts[0].contentEquals("super")) {
receiver = new Super(offset);
}else if(receiver == null){ //Handelt es sich um keinen Statischen Klassennamen: }else if(receiver == null){ //Handelt es sich um keinen Statischen Klassennamen:
String part = expression.substring(0,expression.length() - (1 + parts[parts.length-1].length())); String part = expression.substring(0,expression.length() - (1 + parts[parts.length-1].length()));
receiver = generateLocalOrFieldVarOrClassName(part, offset); receiver = generateLocalOrFieldVarOrClassName(part, offset);

View File

@ -0,0 +1,14 @@
import de.test.Pair;
class Pairs {
setfst(fst) {
return new Pair<>(snd, fst);
}
swap () {
return new Pair<> (snd, fst); }
polyrec(p) {
return polyrec (p.swap());
}
}

View File

@ -0,0 +1,12 @@
package de.test;
class Pair {
fst;
snd;
Pair(fst, snd) {
this.fst = fst;
this.snd = snd;
}
}