public Constant Get(int offset, Scope scope) { Constant current = Parts[0]; if (current is Variable currentVariable) { current = scope.GetVariable(currentVariable.Name); } for (var i = 1; i < Parts.Count - offset; i++) { current = current.GetProperty(Parts[i], scope); } return(current); }
public override Constant GetValue(Scope scope) { return(scope.GetVariable(Name)); }