1 package org.simantics.scl.compiler.elaboration.query;
3 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
4 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
5 import org.simantics.scl.compiler.elaboration.expressions.Variable;
6 import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
7 import org.simantics.scl.compiler.errors.Locations;
9 import gnu.trove.map.hash.TObjectIntHashMap;
10 import gnu.trove.set.hash.THashSet;
11 import gnu.trove.set.hash.TIntHashSet;
13 public abstract class QAbstractModifier extends Query {
16 public QAbstractModifier(Query query) {
20 public void collectFreeVariables(THashSet<Variable> vars) {
21 query.collectFreeVariables(vars);
25 public Query resolve(TranslationContext context) {
26 query = query.resolve(context);
31 public void checkType(TypingContext context) {
32 query.checkType(context);
36 public void collectRefs(TObjectIntHashMap<Object> allRefs,
38 query.collectRefs(allRefs, refs);
42 public void collectVars(TObjectIntHashMap<Variable> allVars,
44 query.collectVars(allVars, vars);
48 public void setLocationDeep(long loc) {
49 if(location == Locations.NO_LOCATION) {
51 query.setLocationDeep(loc);
56 public void forVariables(VariableProcedure procedure) {
57 query.forVariables(procedure);