protected override void Visit(UseContentChunk chunk) { _source.Write("if Content.ContainsKey(\"").Write(chunk.Name).WriteLine("\"):"); _source.Indent++; _source.Write("OutputWriteAdapter(Content[\"").Write(chunk.Name).WriteLine("\"])"); _source.Indent--; if (chunk.Default.Count != 0) { _source.WriteLine("else:"); _source.Indent++; Accept(chunk.Default); _source.WriteLine("pass"); _source.Indent--; } }
protected override void Visit(UseContentChunk chunk) { _source.Write("if content.contains_key(\"").Write(chunk.Name).WriteLine("\")"); _source.Indent++; _source.Write("output_write_adapter content.get_Item(\"").Write(chunk.Name).WriteLine("\")"); _source.Indent--; if (chunk.Default.Count != 0) { _source.WriteLine("else"); _source.Indent++; Accept(chunk.Default); _source.Indent--; } _source.WriteLine("end"); }