Пример #1
0
 private static object MakeQuoteConstant(object expr, Sympl symplRuntime)
 {
     if (expr is SymplListExpr)
     {
         SymplListExpr listexpr = (SymplListExpr)expr;
         int           len      = listexpr.Elements.Length;
         var           exprs    = new object[len];
         for (int i = 0; i < len; i++)
         {
             exprs[i] = MakeQuoteConstant(listexpr.Elements[i], symplRuntime);
         }
         return(Cons._List(exprs));
     }
     else if (expr is IdOrKeywordToken)
     {
         return(symplRuntime.MakeSymbol(((IdOrKeywordToken)expr).Name));
     }
     else if (expr is LiteralToken)
     {
         return(((LiteralToken)expr).Value);
     }
     else
     {
         throw new InvalidOperationException(
                   "Internal: quoted list has -- " + expr.ToString());
     }
 }
Пример #2
0
        public AnalysisScope(AnalysisScope parent,
                             string name,
                             Sympl runtime,
                             ParameterExpression runtimeParam,
                             ParameterExpression moduleParam)
        {
            _parent       = parent;
            _name         = name;
            _runtime      = runtime;
            _runtimeParam = runtimeParam;
            _moduleParam  = moduleParam;

            _names    = new Dictionary <string, ParameterExpression>();
            _isLambda = false;
        }