-
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.
Merge pull request #22 from mika-f/fix/shuffle-declarations
- Loading branch information
Showing
8 changed files
with
103 additions
and
8 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
18 changes: 18 additions & 0 deletions
18
src/Plana.Composition.ShuffleDeclarations/RemovePragmaRewriter.cs
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// ------------------------------------------------------------------------------------------ | ||
// Copyright (c) Natsuneko. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
// ------------------------------------------------------------------------------------------ | ||
|
||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.CSharp; | ||
using Microsoft.CodeAnalysis.CSharp.Syntax; | ||
|
||
namespace Plana.Composition.ShuffleDeclarations; | ||
|
||
internal class RemovePragmaRewriter() : CSharpSyntaxRewriter(true) | ||
{ | ||
public override SyntaxNode? VisitPragmaWarningDirectiveTrivia(PragmaWarningDirectiveTriviaSyntax node) | ||
{ | ||
return SyntaxFactory.SkippedTokensTrivia(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Plana.Composition.ShuffleDeclarations/RemoveRegionAndEndRegionRewriter.cs
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// ------------------------------------------------------------------------------------------ | ||
// Copyright (c) Natsuneko. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
// ------------------------------------------------------------------------------------------ | ||
|
||
using Microsoft.CodeAnalysis; | ||
using Microsoft.CodeAnalysis.CSharp; | ||
using Microsoft.CodeAnalysis.CSharp.Syntax; | ||
|
||
namespace Plana.Composition.ShuffleDeclarations; | ||
|
||
internal class RemoveRegionAndEndRegionRewriter() : CSharpSyntaxRewriter(true) | ||
{ | ||
public override SyntaxNode? VisitRegionDirectiveTrivia(RegionDirectiveTriviaSyntax node) | ||
{ | ||
return SyntaxFactory.SkippedTokensTrivia(); | ||
} | ||
|
||
public override SyntaxNode? VisitEndRegionDirectiveTrivia(EndRegionDirectiveTriviaSyntax node) | ||
{ | ||
return SyntaxFactory.SkippedTokensTrivia(); | ||
} | ||
} |
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