25 lines
757 B
C#
25 lines
757 B
C#
using System.CommandLine;
|
|
using MycroForge.CLI.Commands.Interfaces;
|
|
|
|
namespace MycroForge.CLI.Commands;
|
|
|
|
public partial class MycroForge
|
|
{
|
|
public class Rewrite : Command, ISubCommandOf<MycroForge>
|
|
{
|
|
public Rewrite() : base("rewrite", "Test a python source rewriter.")
|
|
{
|
|
this.SetHandler(ExecuteAsync);
|
|
}
|
|
|
|
private async Task ExecuteAsync()
|
|
{
|
|
// var path = Path.Combine(Directory.GetCurrentDirectory(), "main.py");
|
|
// var source = await File.ReadAllTextAsync(path);
|
|
// var rewriter = new TestRewriter(source);
|
|
// var rewrite = rewriter.Rewrite();
|
|
// await File.WriteAllTextAsync(path, rewrite);
|
|
}
|
|
}
|
|
}
|