private void ParseMmlFile(string filename) { Song = new SongData(); Song.Error = Error; var m = new MmlFileReader(); Error.SetFileReader(m); if (!m.Load(filename)) { Error.Add(ErrorData.Type.FileNotFound); return; } while (!m.IsEof() && !Error.HasError) { // 行頭 var ct = m.FetchType(); // コメントブロック終了時の行は読み飛ばす if (ct == MmlCharactorType.CommentEnd) { m.SkipType(); m.StepNextLine(); } if (m.IsComment(ct)) { m.SkipType(); continue; } if (ct == MmlCharactorType.NextLine || ct == MmlCharactorType.Eof) { m.SkipType(); continue; } if (ct != MmlCharactorType.GeneralChanacter) { Error.Add(ErrorData.Type.LineHeaderIsWrong); continue; } ReadItem(m); } }