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(char accessSeparator, String fieldName) {
13 super(accessSeparator);
14 this.fieldName = fieldName;
18 public Expression asExpression() {
19 return new ELiteral(new StringConstant(fieldName));
23 public void setLocationDeep(long loc) {
24 if(location == Locations.NO_LOCATION)
29 public void accept(FieldAccessorVisitor visitor) {
34 public void forVariables(VariableProcedure procedure) {