summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-01-23 13:57:16 (EST)
committerahaase2008-01-23 13:57:16 (EST)
commit3aeeae4ce41636b5bc6dab8a8566e8299173a9a5 (patch)
tree63e84e6cfbe5755d3a3ec8236265e754fca6fdbb
parentfcad1d53d87a88a3b43ae2260600bbc958e921cc (diff)
downloadorg.eclipse.xpand-3aeeae4ce41636b5bc6dab8a8566e8299173a9a5.zip
org.eclipse.xpand-3aeeae4ce41636b5bc6dab8a8566e8299173a9a5.tar.gz
org.eclipse.xpand-3aeeae4ce41636b5bc6dab8a8566e8299173a9a5.tar.bz2
implemented isDeleteLine
-rw-r--r--plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
index c48c092..dd06ecc 100644
--- a/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
+++ b/plugins/org.eclipse.xtend.middleend.old/src/org/eclipse/xtend/middleend/old/OldDefinitionConverter.java
@@ -336,7 +336,14 @@ final class OldDefinitionConverter {
final ExpressionBase append = new LiteralExpression (outlet.isAppend(), getSourcePos(stmt));
//TODO register the outlets
- return new InvocationOnObjectExpression (SysLibNames.WRITE_TO_FILE, Arrays.asList(outletName, filename, append, body), getSourcePos (stmt));
+
+ final List<ExpressionBase> emptyParamList = Collections.emptyList();
+ final ExpressionBase initIsDeleteLineExpression = new InvocationOnObjectExpression (XtendLibNames.DELETE_LINE_INIT, emptyParamList, getSourcePos (stmt));
+
+ final ExpressionBase postprocessIsDeleteLineExpression = new InvocationOnObjectExpression (XtendLibNames.DELETE_LINE_POSTPROCESS, Arrays.asList(body), getSourcePos (stmt));
+ final ExpressionBase writeToFileExpression = new InvocationOnObjectExpression (SysLibNames.WRITE_TO_FILE, Arrays.asList(outletName, filename, append, postprocessIsDeleteLineExpression), getSourcePos (stmt));
+
+ return new SequenceExpression (Arrays.asList (initIsDeleteLineExpression, writeToFileExpression), getSourcePos (stmt));
}
private ExpressionBase convertProtectStatement (ProtectStatement stmt, Set<XpandDefinitionName> referencedDefinitions) {