diff --git a/ILSpy/Languages/ILAstLanguage.cs b/ILSpy/Languages/ILAstLanguage.cs index 15e392094..c41d18049 100644 --- a/ILSpy/Languages/ILAstLanguage.cs +++ b/ILSpy/Languages/ILAstLanguage.cs @@ -57,6 +57,11 @@ namespace ILSpy.Languages this.name = name; } + // ILAst output uses the same `{}/()/[]` bracket conventions as C#, plus C#-style + // `//` comments and `"..."` strings. Reusing CSharpBracketSearcher gives the + // language correct bracket highlighting without a per-grammar implementation. + public override ILSpy.TextView.IBracketSearcher BracketSearcher { get; } = new CSharpBracketSearcher(); + /// /// Fires after a run installs a fresh . /// The Debug Steps pane subscribes here so it can rebind its TreeView to the new diff --git a/ILSpy/Languages/ILLanguage.cs b/ILSpy/Languages/ILLanguage.cs index 713176a04..994c12718 100644 --- a/ILSpy/Languages/ILLanguage.cs +++ b/ILSpy/Languages/ILLanguage.cs @@ -41,6 +41,10 @@ namespace ILSpy.Languages public override string FileExtension => ".il"; + // Disassembled IL uses the same `{}/()/[]` bracket conventions plus C#-style + // `//` comments and `"..."` strings — reuse CSharpBracketSearcher's logic. + public override ILSpy.TextView.IBracketSearcher BracketSearcher { get; } = new CSharpBracketSearcher(); + // DisplaySettings (ShowMetadataTokens / ShowRawRVAOffsetAndBytes / // DecodeCustomAttributeBlobs / ShowMetadataTokensInBase10) aren't wired yet — once // they are, plumb them in here. All four default to false.