Клинап

This commit is contained in:
2025-03-29 19:31:10 +03:00
parent 361b4cd3f6
commit 5cc53d72fd
18 changed files with 359 additions and 390 deletions
@@ -1,23 +1,17 @@
using System;
namespace mROA.CodegenTools
namespace mROA.Codegen.Tools.Reading
{
public abstract class LeadingTextSectionReader : ISectionReader
{
private readonly string _tagLeading;
protected int _currentCaretPosition;
private string _tagLeading;
protected LeadingTextSectionReader(string tagLeading)
{
_tagLeading = tagLeading + " ";
}
protected int PassCaretToCloseSymbol()
{
_currentCaretPosition = TemplateText.IndexOf(">", _currentCaretPosition, StringComparison.Ordinal) + 1;
return _currentCaretPosition;
}
public string TemplateText { get; set; }
public int GetNextSectionIndex(int currentIndex)
@@ -30,6 +24,12 @@ namespace mROA.CodegenTools
public abstract ITemplateSection ExtractSection(ref int index, TemplateDocument document);
protected int PassCaretToCloseSymbol()
{
_currentCaretPosition = TemplateText.IndexOf(">", _currentCaretPosition, StringComparison.Ordinal) + 1;
return _currentCaretPosition;
}
protected string GetTagValue(int from, int to)
{
var realStart = from + 4;