Пример #1
0
 private static void WriteConditionalGotoStatement(BoundConditionalGotoStatment node, IndentedTextWriter writer)
 {
     writer.WriteKeyword("goto ");
     writer.WriteIdentifier(node.Label.Name);
     writer.WriteKeyword(node.JumpIfTrue ? " if " : " unless ");
     node.Condition.WriteTo(writer);
     writer.WriteLine();
 }
Пример #2
0
        protected virtual BoundStatement RewriteConditionalGotoStatment(BoundConditionalGotoStatment node)
        {
            var condition = RewriteExpression(node.Condition);

            if (condition == node.Condition)
            {
                return(node);
            }
            return(new BoundConditionalGotoStatment(node.Label, condition, node.JumpIfTrue));
        }