public string Convert(string source, SupportedLanguage language) { CompilationUnit compilationUnit = this.GenerateCompilationUnit(source, language); SpecialOutputVisitor specialOutputVisitor = new SpecialOutputVisitor(this); this.specialNodesInserter = new SpecialNodesInserter(compilationUnit.UserData as List<ISpecial>, specialOutputVisitor); this.entryPointMethods = new List<MethodDeclaration>(); this.codeBuilder = new PythonCodeBuilder() { IndentString = this.indentString }; compilationUnit.AcceptVisitor(this, null); return this.codeBuilder.ToString().Trim(); }
public void IncreaseIndent() { PythonCodeBuilder pythonCodeBuilder = this; pythonCodeBuilder.indent = pythonCodeBuilder.indent + 1; }