Beispiel #1
0
 internal static Quasiquoted Quasiquoted(QuotedExpression expression)
 {
     return new Quasiquoted()
     {
         Expression = Serialize(expression.Expression),
     }.Apply(n => n.TypeHint = expression.TryType().Null(t => TypeRef.Serialize(t)));
 }
Beispiel #2
0
 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");
     }
 }