1 package org.simantics.scl.compiler.elaboration.query;
3 import gnu.trove.map.hash.TObjectIntHashMap;
4 import gnu.trove.set.hash.THashSet;
5 import gnu.trove.set.hash.TIntHashSet;
7 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
8 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
9 import org.simantics.scl.compiler.elaboration.expressions.Variable;
10 import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
11 import org.simantics.scl.compiler.errors.Locations;
12 import org.simantics.scl.compiler.types.Type;
14 public abstract class QAbstractModifier extends Query {
17 public QAbstractModifier(Query query) {
21 public void collectFreeVariables(THashSet<Variable> vars) {
22 query.collectFreeVariables(vars);
26 public Query resolve(TranslationContext context) {
27 query = query.resolve(context);
32 public void checkType(TypingContext context) {
33 query.checkType(context);
37 public void collectRefs(TObjectIntHashMap<Object> allRefs,
39 query.collectRefs(allRefs, refs);
43 public void collectVars(TObjectIntHashMap<Variable> allVars,
45 query.collectVars(allVars, vars);
49 public void setLocationDeep(long loc) {
50 if(location == Locations.NO_LOCATION) {
52 query.setLocationDeep(loc);
57 public void forVariables(VariableProcedure procedure) {
58 query.forVariables(procedure);