示例#1
0
        public static bool SetupTicForUserFunction(
            UserFunctionDefinitionSyntaxNode userFunctionNode,
            GraphBuilder ticGraph,
            IFunctionDictionary functions,
            IConstantList constants,
            TypeInferenceResultsBuilder results)
        {
            var visitor = new TicSetupVisitor(ticGraph, functions, constants, results, AprioriTypesMap.Empty);

            return(userFunctionNode.Accept(visitor));
        }
示例#2
0
        public static bool SetupTicForBody(
            SyntaxTree tree,
            GraphBuilder ticGraph,
            IFunctionDictionary functions,
            IConstantList constants,
            AprioriTypesMap aprioriTypes,
            TypeInferenceResultsBuilder results)
        {
            var visitor = new TicSetupVisitor(ticGraph, functions, constants, results, aprioriTypes);

            foreach (var syntaxNode in tree.Children)
            {
                if (syntaxNode is UserFunctionDefinitionSyntaxNode)
                {
                    continue;
                }

                if (!syntaxNode.Accept(visitor))
                {
                    return(false);
                }
            }
            return(true);
        }