protected override void WriteResource(string name, int length) { if (length >= 0) // reference as opposed to definition { Write("Ci."); } foreach (char c in name) { Write(CiLexer.IsLetterOrDigit(c) ? c : '_'); } }
static bool IsIdentifier(string s) { return(s.Length > 0 && s[0] >= 'A' && s.All(c => CiLexer.IsLetterOrDigit(c))); }