1 package org.simantics.scl.compiler.elaboration.expressions.accessor;
3 import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext;
4 import org.simantics.scl.compiler.elaboration.contexts.TranslationContext;
5 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
6 import org.simantics.scl.compiler.elaboration.expressions.Expression;
7 import org.simantics.scl.compiler.elaboration.expressions.Variable;
8 import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
9 import org.simantics.scl.compiler.internal.parsing.Symbol;
11 import gnu.trove.map.hash.TObjectIntHashMap;
12 import gnu.trove.set.hash.THashSet;
13 import gnu.trove.set.hash.TIntHashSet;
15 public abstract class FieldAccessor extends Symbol {
16 public char accessSeparator;
18 public FieldAccessor(char accessSeparator) {
19 this.accessSeparator = accessSeparator;
22 public void collectRefs(TObjectIntHashMap<Object> allRefs,
26 public void collectVars(TObjectIntHashMap<Variable> allVars,
30 public void collectFreeVariables(THashSet<Variable> vars) {
33 public void simplify(SimplificationContext context) {
36 public void resolve(TranslationContext context) {
39 public void checkType(TypingContext context) {
42 public abstract Expression asExpression();
44 public boolean isVariableId() {
48 public abstract void setLocationDeep(long loc);
50 public abstract void accept(FieldAccessorVisitor visitor);
52 public abstract void forVariables(VariableProcedure procedure);