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.errors.Locations;
8 import gnu.trove.map.hash.TObjectIntHashMap;
9 import gnu.trove.set.hash.THashSet;
10 import gnu.trove.set.hash.TIntHashSet;
12 public abstract class QAbstractModifier extends Query {
15 public QAbstractModifier(Query query) {
19 public void collectFreeVariables(THashSet<Variable> vars) {
20 query.collectFreeVariables(vars);
24 public Query resolve(TranslationContext context) {
25 query = query.resolve(context);
30 public void checkType(TypingContext context) {
31 query.checkType(context);
35 public void collectRefs(TObjectIntHashMap<Object> allRefs,
37 query.collectRefs(allRefs, refs);
41 public void collectVars(TObjectIntHashMap<Variable> allVars,
43 query.collectVars(allVars, vars);
47 public void setLocationDeep(long loc) {
48 if(location == Locations.NO_LOCATION) {
50 query.setLocationDeep(loc);