protected override void HandleStatement(HandleContext context)
        {
            AssignmentStatement assignmentStatement = (AssignmentStatement) context.Statement;
              if(!CoversAssignment(assignmentStatement))
            return;

              Method assignedMethod = GetAssignedDelegateMethod (assignmentStatement);
              DelegateNode sourceDelegateType = (DelegateNode) assignmentStatement.Source.Type;
              Fragment returnFragment = GetDelegateTypesReturnFragment (sourceDelegateType);
              ISymbolTable environment = GetDelegatesEnvironment (sourceDelegateType);

              IMethodGraphAnalyzer methodParser = new MethodGraphAnalyzer (_blockParserContext.ProblemPipe);
              IMethodGraphBuilder methodGraphBuilder = new MethodGraphBuilder (assignedMethod, _blockParserContext.BlacklistManager, _blockParserContext.ProblemPipe, returnFragment);
              IInitialSymbolTableBuilder parameterSymbolTableBuilder = new EmbeddedInitialSymbolTableBuilder (assignedMethod, _blockParserContext.BlacklistManager, environment);
              methodParser.Parse (methodGraphBuilder, parameterSymbolTableBuilder);
        }
Beispiel #2
0
 public void Parse(Method method)
 {
     ArgumentUtility.CheckNotNull ("method", method);
       IMethodGraphAnalyzer methodParser = new MethodGraphAnalyzer (_problemFilter);
       IMethodGraphBuilder methodGraphBuilder = new MethodGraphBuilder (method, _blacklistManager, _problemFilter);
       IInitialSymbolTableBuilder parameterSymbolTableBuilder = new InitialSymbolTableBuilder (method, _blacklistManager);
       methodParser.Parse (methodGraphBuilder, parameterSymbolTableBuilder);
 }