1 package org.simantics.scl.compiler.elaboration.expressions.block;
\r
3 import org.simantics.scl.compiler.common.exceptions.InternalCompilerError;
\r
4 import org.simantics.scl.compiler.elaboration.contexts.EnvironmentalContext;
\r
5 import org.simantics.scl.compiler.elaboration.contexts.ReplaceContext;
\r
6 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
\r
7 import org.simantics.scl.compiler.elaboration.expressions.Expression;
\r
8 import org.simantics.scl.compiler.internal.parsing.Symbol;
\r
10 public abstract class Statement extends Symbol {
\r
12 public abstract Expression toExpression(EnvironmentalContext context, boolean monadic, Expression in);
\r
13 public abstract void setLocationDeep(long loc);
\r
14 public abstract void resolvePattern(TranslationContext context);
\r
15 public abstract boolean mayBeRecursive();
\r
17 public Statement replace(ReplaceContext context) {
\r
18 throw new InternalCompilerError(getClass().getSimpleName() + " does not support replace.");
\r
21 public Statement copy() {
\r
22 return replace(new ReplaceContext(null));
\r
25 public abstract void accept(StatementVisitor visitor);
\r