Improve XML documentation coverage across src modules and sync generated analysis artifacts.

This commit is contained in:
Joseph Doherty
2026-03-14 03:56:58 -04:00
parent ba0d65317a
commit 46ead5ea9f
152 changed files with 2821 additions and 11284 deletions
@@ -36,6 +36,13 @@ public sealed class PedanticToken
private readonly bool _usedVariable;
private readonly string _sourceFile;
/// <summary>
/// Creates a parser token wrapper that preserves resolved value and source metadata.
/// </summary>
/// <param name="item">Raw lexer token captured from the configuration source.</param>
/// <param name="value">Optional parsed value override when token text has been normalized.</param>
/// <param name="usedVariable">Indicates whether this token originated from variable substitution.</param>
/// <param name="sourceFile">Source file path associated with this token, when available.</param>
public PedanticToken(Token item, object? value = null, bool usedVariable = false, string sourceFile = "")
{
_item = item;
@@ -44,15 +51,33 @@ public sealed class PedanticToken
_sourceFile = sourceFile ?? string.Empty;
}
/// <summary>
/// Serializes the token value into JSON, matching Go parser diagnostics formatting.
/// </summary>
public string MarshalJson() => JsonSerializer.Serialize(Value());
/// <summary>
/// Returns the resolved token value, or raw token text when no typed value is stored.
/// </summary>
public object? Value() => _value ?? _item.Value;
/// <summary>
/// Returns the 1-based source line where the token was parsed.
/// </summary>
public int Line() => _item.Line;
/// <summary>
/// Returns whether variable interpolation contributed to this token.
/// </summary>
public bool IsUsedVariable() => _usedVariable;
/// <summary>
/// Returns the source file path associated with this token.
/// </summary>
public string SourceFile() => _sourceFile;
/// <summary>
/// Returns the 1-based character position of the token on its source line.
/// </summary>
public int Position() => _item.Position;
}