toScript method
Export the Statement to its equivalent textual representation in a typed language.
Implementation
@override
String toScript({
DartBlockTypedLanguage language = DartBlockTypedLanguage.java,
}) {
switch (language) {
case DartBlockTypedLanguage.java:
if (isDoWhile) {
return "do {\n${bodyStatements.map((e) => "\t\t\t${e.toScript(language: language)}").join("\n\t")}\n\t} while (${condition.toScript(language: language)});";
}
return "while (${condition.toScript(language: language)}) {\n${bodyStatements.map((e) => "\t\t\t${e.toScript(language: language)}").join("\n\t")}\n\t}";
}
}