X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FDecoratingExpression.java;h=3d2031ee5af6154cb9a1f89b071358a4c91410b3;hp=95b18efd62abd266e90af0b7a6237172899302d2;hb=862c09c9608329f326404342d12da61792eece2c;hpb=3303fe4a3b363e88662ac75a4f7e873ddb3ab352 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/DecoratingExpression.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/DecoratingExpression.java index 95b18efd6..3d2031ee5 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/DecoratingExpression.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/DecoratingExpression.java @@ -3,12 +3,12 @@ package org.simantics.scl.compiler.elaboration.expressions; import java.util.ArrayList; import org.simantics.scl.compiler.common.exceptions.InternalCompilerError; +import org.simantics.scl.compiler.compilation.CompilationContext; import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext; import org.simantics.scl.compiler.elaboration.contexts.TranslationContext; import org.simantics.scl.compiler.elaboration.contexts.TypingContext; import org.simantics.scl.compiler.elaboration.errors.NotPatternException; import org.simantics.scl.compiler.elaboration.expressions.lhstype.LhsType; -import org.simantics.scl.compiler.environment.Environment; 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; @@ -84,8 +84,8 @@ public abstract class DecoratingExpression extends SimplifiableExpression { } @Override - public int getFunctionDefinitionArity() throws NotPatternException { - return expression.getFunctionDefinitionArity(); + public int getFunctionDefinitionPatternArity() throws NotPatternException { + return expression.getFunctionDefinitionPatternArity(); } @Override @@ -113,7 +113,7 @@ public abstract class DecoratingExpression extends SimplifiableExpression { } @Override - public IVal toVal(Environment env, CodeWriter w) { + public IVal toVal(CompilationContext context, CodeWriter w) { throw new InternalCompilerError("Cannot generate code for " + getClass().getSimpleName() + "."); } @@ -134,4 +134,9 @@ public abstract class DecoratingExpression extends SimplifiableExpression { expression = expression.checkIgnoredType(context); return this; } + + @Override + public int getSyntacticFunctionArity() { + return expression.getSyntacticFunctionArity(); + } }