Beispiel #1
0
 internal override void AppendCodeStringStmt(StringBuilder res, PythonAst ast, CodeFormattingOptions format)
 {
     format.ReflowComment(res, this.GetPreceedingWhiteSpace(ast));
     res.Append("raise");
     if (ExceptType != null)
     {
         ExceptType.AppendCodeString(res, ast, format);
     }
     if (this.IsAltForm(ast))
     {
         res.Append(this.GetSecondWhiteSpace(ast));
         res.Append("from");
         Cause.AppendCodeString(res, ast, format);
     }
     else
     {
         if (Value != null)
         {
             res.Append(this.GetSecondWhiteSpace(ast));
             res.Append(',');
             Value.AppendCodeString(res, ast, format);
             if (Traceback != null)
             {
                 res.Append(this.GetThirdWhiteSpace(ast));
                 res.Append(',');
                 Traceback.AppendCodeString(res, ast, format);
             }
         }
     }
 }