1 package org.simantics.scl.compiler.elaboration.expressions.accessor;
3 import org.simantics.scl.compiler.constants.StringConstant;
4 import org.simantics.scl.compiler.elaboration.expressions.ELiteral;
5 import org.simantics.scl.compiler.elaboration.expressions.Expression;
6 import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
7 import org.simantics.scl.compiler.errors.Locations;
9 public class StringAccessor extends FieldAccessor {
10 public final String fieldName;
12 public StringAccessor(String fieldName) {
13 this.fieldName = fieldName;
17 public Expression asExpression() {
18 return new ELiteral(new StringConstant(fieldName));
22 public void setLocationDeep(long loc) {
23 if(location == Locations.NO_LOCATION)
28 public void accept(FieldAccessorVisitor visitor) {
33 public void forVariables(VariableProcedure procedure) {