public override void VisitWhileLoopCPPModel(WhileLoopCPPModel model)
        {
            var condition = Invoke <ExpressionBuilder>(model.Condition).Expression;

            AppendLine($"while({condition})");
            OpenBlock();
            VisitChildren(model.Members);
            CloseBlock();
        }
Exemplo n.º 2
0
        public override void VisitWhileStatement(WhileStatementSyntax node)
        {
            var _while = new WhileLoopCPPModel()
            {
                Condition = Invoke <ExpressionVisitor>(node.Condition).Expression
            };

            using (Context.WithCodeContainer(_while))
            {
                Visit(node.Statement);
            }
        }