Esempio n. 1
0
            public ExpressionParserExprResult ParseExpr(IVariableTypeProvider VariableTypeProvider, TextRange Body)
            {
                var br = BindExpr(VariableTypeProvider, Body);

                var epr = new ExpressionParserExprResult
                {
                    Body      = br.Semantics,
                    TypeDict  = br.TypeDict,
                    Positions = Positions
                };

                return(epr);
            }
Esempio n. 2
0
            public ExpressionParserExprResult ParseBody(IVariableTypeProvider VariableTypeProvider, FunctionDecl Declaration, TextRange Body)
            {
                var d           = Declaration;
                var dParameters = d.Parameters.ToDictionary(p => p.Name, p => p.Type);
                var vtp         = new VariableTypeProviderCombiner(new SimpleVariableTypeProvider(dParameters), VariableTypeProvider);
                var br          = BindExpr(vtp, d.ReturnValue, Body);

                var epr = new ExpressionParserExprResult
                {
                    Body      = br.Semantics,
                    TypeDict  = br.TypeDict,
                    Positions = Positions
                };

                return(epr);
            }