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