public Stringish RenderTrace(Stringish prefix) { var writer = new System.IO.StringWriter(); var seen = new Dictionary <SourceReference, bool>(); SourceReference.Write(writer, prefix.ToString(), seen); return(new SimpleStringish(writer.ToString())); }
private static bool VerifySymbol(Stringish strish, ReportError error) { var str = strish.ToString(); if (str.Length < 1) { error("An attribute name cannot be empty."); return(false); } switch (Char.GetUnicodeCategory(str[0])) { case UnicodeCategory.LowercaseLetter: case UnicodeCategory.OtherLetter: break; default: error(String.Format("The name “{0}” is unbecoming of an attribute; it cannot start with “{1}”.", str, str[0])); return(false); } for (var it = 1; it < str.Length; it++) { if (str[it] == '_') { continue; } switch (Char.GetUnicodeCategory(str[it])) { case UnicodeCategory.DecimalDigitNumber: case UnicodeCategory.LetterNumber: case UnicodeCategory.LowercaseLetter: case UnicodeCategory.OtherLetter: case UnicodeCategory.OtherNumber: case UnicodeCategory.TitlecaseLetter: case UnicodeCategory.UppercaseLetter: continue; default: error(String.Format("The name “{0}” is unbecoming of an attribute; it cannot contain “{1}”.", str, str[it])); return(false); } } return(true); }
public ComputeValue Get(Stringish name) { return(this[name.ToString()]); }
public bool Has(Stringish name) { return(Has(name.ToString())); }
public bool VerifySymbol(SourceReference source_reference, Stringish strish) { return(VerifySymbol(source_reference, strish.ToString())); }
public static bool VerifySymbol(Stringish strish) { return(VerifySymbol(strish.ToString())); }