public override void Process() { //TODO: debug List<string> tokens = Helper.ExtractTokens(processedContents, "{", "(", ")", "}" , ";"); templateName = tokens[0]; if (tokens.Count > 1) //we have an argument list too { string argsString = tokens[1]; string[] args = argsString.Split(','); foreach (string arg in args) { argValues.Add(arg.Trim()); } } targetTemplate = TemplateManager.GetInstance().LookupTemplate(templateName); List<ScriptNode> myLines = targetTemplate.Instantiate(argValues); foreach (ScriptNode child in myLines) { children.Add(child); } base.Process(); }
public void RegisterTemplate(string key, DefineNode node) { templates[key] = node; }