X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Felaboration%2Fexpressions%2FASTExpression.java;h=fbc0a79014dcb107c3b17842ef5bbb06fddaac8b;hb=f5c5f79bf2a62515c8c81103a4c8932fc0dcf79d;hp=af0a43d0896c495f31b0c1d9280ff46dc4dce483;hpb=eecd74faded034bd067094b42bbac0d286d8d9fa;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ASTExpression.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ASTExpression.java old mode 100755 new mode 100644 index af0a43d08..fbc0a7901 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ASTExpression.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/expressions/ASTExpression.java @@ -1,78 +1,78 @@ -package org.simantics.scl.compiler.elaboration.expressions; - -import org.simantics.scl.compiler.common.exceptions.InternalCompilerError; -import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext; -import org.simantics.scl.compiler.elaboration.contexts.TypingContext; -import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator; -import org.simantics.scl.compiler.types.Type; -import org.simantics.scl.compiler.types.exceptions.MatchException; - -import gnu.trove.map.hash.TObjectIntHashMap; -import gnu.trove.set.hash.THashSet; -import gnu.trove.set.hash.TIntHashSet; - -public abstract class ASTExpression extends SimplifiableExpression { - public ASTExpression() { - } - - @Override - final public Expression simplify(SimplificationContext context) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support simplify."); - } - - @Override - final public void collectFreeVariables(THashSet vars) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectFreeVariables."); - - } - - @Override - final public void collectRefs(TObjectIntHashMap allRefs, - TIntHashSet refs) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectRefs."); - } - - @Override - final public void collectVars(TObjectIntHashMap allVars, - TIntHashSet vars) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectVars."); - } - - @Override - final protected void updateType() throws MatchException { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support updateType."); - } - - @Override - final public Expression decorate(ExpressionDecorator decorator) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support decorate."); - } - - @Override - final public void collectEffects(THashSet effects) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectEffects."); - } - - @Override - final public void accept(ExpressionVisitor visitor) { - throw new InternalCompilerError(getClass().getSimpleName() + " does not support accept."); - } - - @Override - public Expression checkBasicType(TypingContext context, Type requiredType) { - throw new InternalCompilerError("Class " + - getClass().getSimpleName() + " does not implement method checkBasicType."); - } - - @Override - public Expression inferType(TypingContext context) { - throw new InternalCompilerError("Class " + - getClass().getSimpleName() + " does not implement method inferType."); - } - - @Override - public void forVariables(VariableProcedure procedure) { - throw new InternalCompilerError("Class " + - getClass().getSimpleName() + " does not implement method forVariables."); - } -} +package org.simantics.scl.compiler.elaboration.expressions; + +import org.simantics.scl.compiler.common.exceptions.InternalCompilerError; +import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext; +import org.simantics.scl.compiler.elaboration.contexts.TypingContext; +import org.simantics.scl.compiler.internal.elaboration.utils.ExpressionDecorator; +import org.simantics.scl.compiler.types.Type; +import org.simantics.scl.compiler.types.exceptions.MatchException; + +import gnu.trove.map.hash.TObjectIntHashMap; +import gnu.trove.set.hash.THashSet; +import gnu.trove.set.hash.TIntHashSet; + +public abstract class ASTExpression extends SimplifiableExpression { + public ASTExpression() { + } + + @Override + final public Expression simplify(SimplificationContext context) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support simplify."); + } + + @Override + final public void collectFreeVariables(THashSet vars) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectFreeVariables."); + + } + + @Override + final public void collectRefs(TObjectIntHashMap allRefs, + TIntHashSet refs) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectRefs."); + } + + @Override + final public void collectVars(TObjectIntHashMap allVars, + TIntHashSet vars) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectVars."); + } + + @Override + final protected void updateType() throws MatchException { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support updateType."); + } + + @Override + final public Expression decorate(ExpressionDecorator decorator) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support decorate."); + } + + @Override + final public void collectEffects(THashSet effects) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support collectEffects."); + } + + @Override + public void accept(ExpressionVisitor visitor) { + throw new InternalCompilerError(getClass().getSimpleName() + " does not support accept."); + } + + @Override + public Expression checkBasicType(TypingContext context, Type requiredType) { + throw new InternalCompilerError("Class " + + getClass().getSimpleName() + " does not implement method checkBasicType."); + } + + @Override + public Expression inferType(TypingContext context) { + throw new InternalCompilerError("Class " + + getClass().getSimpleName() + " does not implement method inferType."); + } + + @Override + public void forVariables(VariableProcedure procedure) { + throw new InternalCompilerError("Class " + + getClass().getSimpleName() + " does not implement method forVariables."); + } +}