예제 #1
0
파일: Loops.cs 프로젝트: EkardNT/Roslyn
 public BoundDoStatement BindDo(DoStatementSyntax node)
 {
     var condition = BindBooleanExpression(node.Condition);
     var loopContext = this.containingMethod.BlockMap.GetValueOrDefault(node);
     Debug.Assert(loopContext != null);
     var analyzer = new SemanticAnalyzer(this.containingMethod, loopContext, this.diagnostics);
     var body = analyzer.BindStatement(node.Statement);
     return new BoundDoStatement(node, condition, body, loopContext.GetBreakLabel(), loopContext.GetContinueLabel());
 }
예제 #2
0
파일: Loops.cs 프로젝트: sperling/cskarp
        public BoundDoStatement BindDo(DoStatementSyntax node)
        {
            var condition   = BindBooleanExpression(node.Condition);
            var loopContext = this.containingMethod.BlockMap.GetValueOrDefault(node);

            Debug.Assert(loopContext != null);
            var analyzer = new SemanticAnalyzer(this.containingMethod, loopContext, this.diagnostics);
            var body     = analyzer.BindStatement(node.Statement);

            return(new BoundDoStatement(node, condition, body, loopContext.GetBreakLabel(), loopContext.GetContinueLabel()));
        }