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:
parent
37c2c6a121
commit
eb4a511355
4 changed files with 7 additions and 5 deletions
|
|
@ -7,10 +7,11 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||||
<AssemblyName>CSMic.Core</AssemblyName>
|
<AssemblyName>CSMic.Core</AssemblyName>
|
||||||
<Version>2.0.2</Version>
|
<Version>2.1.0</Version>
|
||||||
<PackageId>CSMic</PackageId>
|
<PackageId>CSMic</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ namespace CSMic
|
||||||
if (parser.errors.count > 0)
|
if (parser.errors.count > 0)
|
||||||
{
|
{
|
||||||
// Soft error: set numeric to 0 and report a parse error message
|
// Soft error: set numeric to 0 and report a parse error message
|
||||||
ProduceOutput(0m, parser.errors.errMsgFormat);
|
ProduceOutput(0m, Interpreter.Errors.errMsgFormat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,8 @@ public class Parser {
|
||||||
|
|
||||||
public class Errors {
|
public class Errors {
|
||||||
public int count = 0; // number of errors detected
|
public int count = 0; // number of errors detected
|
||||||
public System.IO.TextWriter errorStream = Console.Out; // error messages go to this stream
|
public static System.IO.TextWriter errorStream = Console.Error; // error messages go to this stream
|
||||||
public string errMsgFormat = "-- line {0} col {1}: {2}"; // 0=line, 1=column, 2=text
|
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) {
|
public virtual void SynErr (int line, int col, int n) {
|
||||||
string s;
|
string s;
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,11 @@
|
||||||
<AssemblyName>CSMic.StandardLibrary</AssemblyName>
|
<AssemblyName>CSMic.StandardLibrary</AssemblyName>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.1.1</Version>
|
||||||
<PackageId>CSMic.StandardLibrary</PackageId>
|
<PackageId>CSMic.StandardLibrary</PackageId>
|
||||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
|
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue