protected virtual void WriteName(CiBinaryResource resource) { Write("CiBinaryResource_"); foreach (char c in resource.Name) { Write(CiLexer.IsLetter(c) ? c : '_'); } }
protected override void WriteName(CiBinaryResource resource) { Write(this.CurrentClass.Name); Write(".CI_BINARY_RESOURCE_"); foreach (char c in resource.Name) { Write(CiLexer.IsLetter(c) ? char.ToUpperInvariant(c) : '_'); } }
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))); }
public CiDocParser(CiLexer ciLexer) : base(ciLexer) { }