private static string ToTreeFormat(string text, Dictionary <ElementType, Func <object, Formatter.Tag> > translations) { return(Formatter.ToTreeFormat(Formatter.Parse(text), translations)); }
public static string ToPlaintext(string text) { return(Formatter.ToTreeFormat(text, new Dictionary <ElementType, Func <object, Formatter.Tag> >())); }
public static string ToTerraria(string text) { string str = text; Dictionary <ElementType, Func <object, Formatter.Tag> > elementTypes = new Dictionary <ElementType, Func <object, Formatter.Tag> >(); elementTypes[ElementType.Color] = (object c) => new Formatter.Tag(string.Concat("[c/", Formatter.RGBAtoRGB(c), ":"), "]"); return(Formatter.ToTreeFormat(str, elementTypes)); }
public static List <Element> Parse(string text) { return(Formatter.Parse(Formatter.Lexer.Lex(text))); }