-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing issues with ControlFlowAnalyzer on loops (#105)
* Preparing change for loops in CFG * fix build after merging master * rewrite cfg builder to use BoundTreeWalker
- Loading branch information
Showing
6 changed files
with
149 additions
and
117 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
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,12 +1,17 @@ | ||
using System.Diagnostics; | ||
using Todl.Compiler.CodeAnalysis.Text; | ||
|
||
namespace Todl.Compiler.Diagnostics | ||
{ | ||
public sealed class Diagnostic | ||
[DebuggerDisplay("{GetDebuggerDisplay()}")] | ||
public readonly struct Diagnostic | ||
{ | ||
public string Message { get; init; } | ||
public DiagnosticLevel Level { get; init; } | ||
public TextLocation TextLocation { get; init; } | ||
public ErrorCode ErrorCode { get; init; } | ||
|
||
public string GetDebuggerDisplay() | ||
=> $"ErrorCode = {ErrorCode}, Text = \"{TextLocation.TextSpan}\""; | ||
} | ||
} |
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