pretty printer mais en mieu
This commit is contained in:
@@ -9,12 +9,29 @@ public class ASD_Turtle implements TurtleASD {
|
||||
sealed interface Complement{}
|
||||
sealed interface Entity{}
|
||||
|
||||
record TurtleImp(List<PhraseImp> phrases) implements Turtle{}
|
||||
record TurtleImp(List<PhraseImp> phrases) implements Turtle{
|
||||
public String toString(){
|
||||
String str = "";
|
||||
for (PhraseImp phrase : this.phrases) {
|
||||
str+= phrase.toString();
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
record PhraseImp(EntityImp entity, List<AffectationImp> affs) implements Phrase{}
|
||||
record AffectationImp(EntityImp entity, List<Complement> complements) implements Affectation{}
|
||||
record Complement_EntityImp(EntityImp entity) implements Complement{}
|
||||
record Complement_TextImp(String string) implements Complement{}
|
||||
record EntityImp(String string) implements Entity{}
|
||||
record Complement_TextImp(String string) implements Complement{
|
||||
public String toString(){
|
||||
return " \" " + this.string + " \"";
|
||||
|
||||
}
|
||||
}
|
||||
record EntityImp(String string) implements Entity{
|
||||
public String toString(){
|
||||
return this.string;
|
||||
}
|
||||
}
|
||||
|
||||
public void prettyPrinter(TurtleImp t){
|
||||
for (PhraseImp phrase : t.phrases) {
|
||||
|
||||
Reference in New Issue
Block a user