-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rbergen/netcsharp-updates
Bump Lib and Assember to .NET 8, apply heaps of C# 12 improvements
- Loading branch information
Showing
91 changed files
with
444 additions
and
780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
using MixLib.Misc; | ||
using MixLib.Misc; | ||
|
||
namespace MixAssembler.Finding | ||
{ | ||
public class AssemblyError : ValidationFinding | ||
public class AssemblyError(int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: ValidationFinding(Severity.Error, lineNumber, lineSection, causeStartIndex, causeLength, error) | ||
{ | ||
public AssemblyError(int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: base(Severity.Error, lineNumber, lineSection, causeStartIndex, causeLength, error) { } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
using MixLib.Misc; | ||
using MixLib.Misc; | ||
|
||
namespace MixAssembler.Finding | ||
{ | ||
|
||
public abstract class AssemblyFinding | ||
{ | ||
public int Length { get; private set; } | ||
public int LineNumber { get; private set; } | ||
public LineSection LineSection { get; private set; } | ||
public Severity Severity { get; private set; } | ||
public int StartCharIndex { get; private set; } | ||
public abstract class AssemblyFinding(Severity severity, int lineNumber, LineSection section, int startCharIndex, int length) | ||
{ | ||
public int Length => length; | ||
public int LineNumber => lineNumber; | ||
public LineSection LineSection => section; | ||
public Severity Severity => severity; | ||
public int StartCharIndex => startCharIndex; | ||
|
||
public const int NoNumber = int.MinValue; | ||
|
||
protected AssemblyFinding(Severity severity, int lineNumber, LineSection section, int startCharIndex, int length) | ||
{ | ||
LineSection = section; | ||
StartCharIndex = startCharIndex; | ||
Length = length; | ||
Severity = severity; | ||
LineNumber = lineNumber; | ||
} | ||
|
||
public abstract string Message { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
namespace MixAssembler.Finding | ||
{ | ||
public class AssemblyInfo : AssemblyFinding | ||
public class AssemblyInfo(string message, int lineNumber, LineSection lineSection, int startCharIndex, int length) | ||
: AssemblyFinding(MixLib.Misc.Severity.Info, lineNumber, lineSection, startCharIndex, length) | ||
{ | ||
private readonly string message; | ||
|
||
public AssemblyInfo(string message, int lineNumber, LineSection lineSection, int startCharIndex, int length) | ||
: base(MixLib.Misc.Severity.Info, lineNumber, lineSection, startCharIndex, length) | ||
=> this.message = message; | ||
|
||
public override string Message | ||
=> this.message; | ||
=> message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
using MixLib.Misc; | ||
using MixLib.Misc; | ||
|
||
namespace MixAssembler.Finding | ||
{ | ||
public class AssemblyWarning : ValidationFinding | ||
public class AssemblyWarning(int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: ValidationFinding(Severity.Warning, lineNumber, lineSection, causeStartIndex, causeLength, error) | ||
{ | ||
public AssemblyWarning(int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: base(Severity.Warning, lineNumber, lineSection, causeStartIndex, causeLength, error) { } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
using MixLib.Misc; | ||
using MixLib.Misc; | ||
|
||
namespace MixAssembler.Finding | ||
{ | ||
public class ValidationFinding : AssemblyFinding | ||
public class ValidationFinding(Severity severity, int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: AssemblyFinding(severity, lineNumber, lineSection, causeStartIndex, causeLength) | ||
{ | ||
public ValidationError Error { get; private set; } | ||
|
||
public ValidationFinding(Severity severity, int lineNumber, LineSection lineSection, int causeStartIndex, int causeLength, ValidationError error) | ||
: base(severity, lineNumber, lineSection, causeStartIndex, causeLength) | ||
=> Error = error; | ||
public ValidationError Error => error; | ||
|
||
public override string Message | ||
=> Error.CompiledMessage; | ||
=> Error.CompiledMessage; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.