private static Value NewValue(string value, string access = null) { var newValue = new Value {Base = new Literal {Value = value}}; if (access != null) newValue.Properties.Add(new Access {Name = new Literal {Value = access}}); return newValue; }
public static Expression CompileValue(Value node, Scope scope) { var curExpr = Compile(node.Base, scope); foreach (var name in CompileToNames(node.Properties)) { curExpr = Expression.Dynamic(scope.GetRuntime().GetMemberBinders.Get(name), typeof (object), curExpr ); } Helper.IsNotNull(curExpr); return curExpr; }