import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.codegen.references.IVal;
import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
-import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator;
import org.simantics.scl.compiler.internal.interpreted.IExpression;
import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
import org.simantics.scl.compiler.types.Type;
}
@Override
public Expression resolve(TranslationContext context) {
+ if(context.currentRuleset != null) {
+ context.getErrorLog().log(location, "Current version of SCL compiler does not support nested rulesets.");
+ return this;
+ }
+ context.currentRuleset = ruleset;
+
context.pushFrame();
context.pushCHRConstraintFrame();
ruleset.resolve(context);
in = in.resolve(context);
context.popCHRConstraintFrame(ruleset.constraints);
context.popFrame();
+
+ context.currentRuleset = null;
+
return this;
}
@Override
}
}
@Override
- public Expression decorate(ExpressionDecorator decorator) {
- in = in.decorate(decorator);
- return this;
- }
- @Override
public void collectEffects(THashSet<Type> effects) {
ruleset.collectEffects(effects);
in.collectEffects(effects);