/// <summary> /// load template from string /// </summary> /// <param name="name">name of template</param> /// <param name="data">string containg code for template</param> /// <returns></returns> public static Template FromString(string name, string data) { TemplateLexer lexer = new TemplateLexer(data); TemplateParser parser = new TemplateParser(lexer); List<Element> elems = parser.Parse(); TagParser tagParser = new TagParser(elems); elems = tagParser.CreateHierarchy(); return new Template(name, elems); }
public TemplateParser(TemplateLexer lexer) { this.lexer = lexer; this.elements = new List<Element>(); }
public TemplateParser(TemplateLexer lexer) { this.lexer = lexer; this.elements = new List <Element>(); }