public static IEnumerable<CodeCommentStatement> ConvertFirstStringToComments(List<Statement> statements)
{
var nothing = new CodeCommentStatement[0];
if (statements.Count == 0)
return nothing;
var suiteStmt = statements[0] as SuiteStatement;
if (suiteStmt == null)
return nothing;
var expStm = suiteStmt.stmts[0] as ExpStatement;
if (expStm == null)
return nothing;
var str = expStm.Expression as Str;
if (str == null)
return nothing;
statements.RemoveAt(0);
return str.s.Replace("\r\n", "\n").Split('\r', '\n').Select(line => new CodeCommentStatement(" " + line));
}