internal static Quasiquoted Quasiquoted(QuotedExpression expression) { return new Quasiquoted() { Expression = Serialize(expression.Expression), }.Apply(n => n.TypeHint = expression.TryType().Null(t => TypeRef.Serialize(t))); }
internal static Quoted Quoted(QuotedExpression expression) { switch (expression.QuoteType) { case QuoteType.Quote: return new Quoted() { Expression = Serialize(expression.Expression), }.Apply(n => n.TypeHint = expression.TryType().Null(t => TypeRef.Serialize(t))); case QuoteType.Quasiquote: return Quasiquoted(expression); default: throw new ArgumentOutOfRangeException("expression.QuoteType"); } }