Пример #1
0
 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 : '_');
     }
 }
Пример #2
0
 static bool IsIdentifier(string s)
 {
     return(s.Length > 0 &&
            s[0] >= 'A' &&
            s.All(c => CiLexer.IsLetterOrDigit(c)));
 }