Error Logging + Documentation

Exposing error logging and changing the default output stream. Setting projects to include documentation files generated from XMLDocs.
This commit is contained in:
Jordan Wages 2026-06-30 01:39:36 -05:00
commit eb4a511355
4 changed files with 7 additions and 5 deletions

View file

@ -7,10 +7,11 @@
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<AssemblyName>CSMic.Core</AssemblyName>
<Version>2.0.2</Version>
<Version>2.1.0</Version>
<PackageId>CSMic</PackageId>
<PackageReadmeFile>README.md</PackageReadmeFile>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>

View file

@ -313,7 +313,7 @@ namespace CSMic
if (parser.errors.count > 0)
{
// Soft error: set numeric to 0 and report a parse error message
ProduceOutput(0m, parser.errors.errMsgFormat);
ProduceOutput(0m, Interpreter.Errors.errMsgFormat);
}
else
{

View file

@ -118,8 +118,8 @@ public class Parser {
public class Errors {
public int count = 0; // number of errors detected
public System.IO.TextWriter errorStream = Console.Out; // error messages go to this stream
public string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
public static System.IO.TextWriter errorStream = Console.Error; // error messages go to this stream
public static string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
public virtual void SynErr (int line, int col, int n) {
string s;

View file

@ -6,10 +6,11 @@
<AssemblyName>CSMic.StandardLibrary</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<PackageId>CSMic.StandardLibrary</PackageId>
<PackageReadmeFile>README.md</PackageReadmeFile>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>