Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java')
-rw-r--r--plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java b/plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java
new file mode 100644
index 00000000..a5fdd46d
--- /dev/null
+++ b/plugins/org.eclipse.xpand/src/org/eclipse/internal/xpand2/ast/ErrorStatement.java
@@ -0,0 +1,49 @@
+/*
+ * <copyright>
+ *
+ * Copyright (c) 2005-2006 Sven Efftinge (http://www.efftinge.de) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sven Efftinge (http://www.efftinge.de) - Initial API and implementation
+ *
+ * </copyright>
+ */
+package org.eclipse.internal.xpand2.ast;
+
+import java.util.Set;
+
+import org.eclipse.internal.xtend.expression.ast.Expression;
+import org.eclipse.xpand2.XpandExecutionContext;
+import org.eclipse.xtend.expression.AnalysationIssue;
+
+/**
+ * *
+ *
+ * @author Sven Efftinge (http://www.efftinge.de) *
+ */
+public class ErrorStatement extends Statement {
+
+ private Expression message;
+
+ public ErrorStatement( final Expression msg) {
+ message = msg;
+ }
+
+ public Expression getMessage() {
+ return message;
+ }
+
+ public void analyzeInternal(final XpandExecutionContext ctx, final Set<AnalysationIssue> issues) {
+ message.analyze(ctx, issues);
+ }
+
+ @Override
+ public void evaluateInternal(final XpandExecutionContext ctx) {
+ System.err.println(message.evaluate(ctx));
+ }
+
+}

Back to the top