namespace AIStudio.Tools.DocumentSegments.Latex;
///
/// A part of a LaTeX document, with where it lies in the source.
///
/// What the part is.
/// Where the part starts in the source.
/// Where the part ends in the source, exclusive.
internal sealed record LatexNode(LatexNodeKind Kind, int Start, int End)
{
///
/// The name of a command or an environment, without a star, e.g., "section"; the character of a special one.
///
public string Name { get; init; } = string.Empty;
///
/// The words which escaped markup stands for.
///
public string Words { get; init; } = string.Empty;
///
/// The arguments of a command or of the start of an environment, in their order.
///
public IReadOnlyList Arguments { get; init; } = [];
///
/// The content of a group or of an environment.
///
public IReadOnlyList Children { get; init; } = [];
}