private void WriteIdentifier(uint hash, MjoFlags flags, IColoredWriter writer) { writer.ForegroundColor = ConsoleColor.Red; char scope = flags.Scope() switch { MjoScope.Persistent => '#', MjoScope.SaveFile => '@', MjoScope.Thread => '%', MjoScope.Local => '_', _ => throw new ArgumentOutOfRangeException() }; string type = flags.Type() switch { MjoType.Int => "", MjoType.Float => "%", MjoType.String => "$", MjoType.IntArray => "#", MjoType.FloatArray => "%#", MjoType.StringArray => "$#", MjoType.Unknown => "?", _ => throw new ArgumentOutOfRangeException() }; writer.Write($"{scope}{{{hash:x8}}}{type}"); }