~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/Misc/SharpRefactoring/Project/Src/Visitors/HasReturnStatementVisitor.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using ICSharpCode.NRefactory.Ast;
 
6
using ICSharpCode.NRefactory.Visitors;
 
7
 
 
8
namespace SharpRefactoring.Visitors
 
9
{
 
10
        public class HasReturnStatementVisitor : AbstractAstVisitor
 
11
        {
 
12
                bool hasReturn;
 
13
                
 
14
                public bool HasReturn {
 
15
                        get { return hasReturn; }
 
16
                }
 
17
                
 
18
                public HasReturnStatementVisitor()
 
19
                {
 
20
                }
 
21
                
 
22
                public override object VisitReturnStatement(ReturnStatement returnStatement, object data)
 
23
                {
 
24
                        this.hasReturn = true;
 
25
                        return base.VisitReturnStatement(returnStatement, data);
 
26
                }
 
27
        }
 
28
}