Парсер шаблонов готов

This commit is contained in:
micialware committed 2025-03-23 19:32:41 +03:00
1 parent e93a028bc4
commit b58bddc1a3
19 files changed
+352 -22

No files matched your search

@@ -0,0 +1,24 @@
using System.Linq;
namespace mROA.CodegenTools
{
public class InsertSectionReader : LeadingTextSectionReader
{
public InsertSectionReader() : base("<!I")
{
}
public override ITemplateSection ExtractSection(ref int index, TemplateDocument document)
{
var from = index;
var to = PassCaretToCloseSymbol();
index = to;
var tagText = GetTagValue(from, to);
var parts = tagText.Split(' ');
return new InsertTemplatePart(parts[0], document, parts.Skip(1).ToArray());
}
}
}