Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steviegt6/cle-elum
roslyn
https://github.com/steviegt6/cle-elum
compiler csharp mod modding monomod roslyn roslyn-analyzer roslyn-analyzers
Last synced: 3 days ago
JSON representation
roslyn
- Host: GitHub
- URL: https://github.com/steviegt6/cle-elum
- Owner: steviegt6
- Created: 2023-01-26T06:04:12.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T17:53:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-20T02:36:39.581Z (11 days ago)
- Topics: compiler, csharp, mod, modding, monomod, roslyn, roslyn-analyzer, roslyn-analyzers
- Language: C#
- Homepage:
- Size: 4.09 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> **Warning** | This is not a practical project. If you find yourself ever needing this, consider rethinking everything.
# cle-elum
> compiler hacking!!!!!1!! but for c#
---
Experimental, questionable Roslyn activities.
## Things
### Roslyn Modding
Modify Roslyn in-memory with [MonoMod](https://github.com/MonoMod/MonoMod) (RuntimeDetour) and a somewhat convenient little bit of API boilerplate:
```cs
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed class MyAnalyzer : DiagnosticAnalyzer {
public override ImmutableArray SupportedDiagnostics =>
ImmutableArray.Empty;public MyAnalyzer() {
// Your entrypoint lies within this class' constructor.
BootstrapAnalyzer.EnsureInitialized();
Patch();
}public override void Initialize(AnalysisContext context) { }
private static void Patch() {
// use monomod here
}
}
```General changes that make normally-invalid stuff valid will be reflected properly in Visual Studio, but not anything that doesn't use Roslyn (such as Rider).