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.elaboration.utils.ExpressionDecorator;
10 import org.simantics.scl.compiler.internal.parsing.Symbol;
12 import gnu.trove.map.hash.TObjectIntHashMap;
13 import gnu.trove.set.hash.THashSet;
14 import gnu.trove.set.hash.TIntHashSet;
16 public abstract class FieldAccessor extends Symbol {
17 public char accessSeparator;
19 public FieldAccessor(char accessSeparator) {
20 this.accessSeparator = accessSeparator;
23 public void collectRefs(TObjectIntHashMap<Object> allRefs,
27 public void collectVars(TObjectIntHashMap<Variable> allVars,
31 public void collectFreeVariables(THashSet<Variable> vars) {
34 public void simplify(SimplificationContext context) {
37 public void resolve(TranslationContext context) {
40 public void decorate(ExpressionDecorator decorator) {
43 public void checkType(TypingContext context) {
46 public abstract Expression asExpression();
48 public boolean isVariableId() {
52 public abstract void setLocationDeep(long loc);
54 public abstract void accept(FieldAccessorVisitor visitor);
56 public abstract void forVariables(VariableProcedure procedure);