do some source gen work
This commit is contained in:
@@ -21,8 +21,8 @@ namespace StgSharp
|
||||
{
|
||||
|
||||
private static string[] regexSource = [
|
||||
@"(a|b)(c|d)",
|
||||
/**/
|
||||
@"(?<name>123)(?<name>123)",
|
||||
/*
|
||||
@"http|https|ftp|ftps",
|
||||
@"abc[0-9]x|abc[0-9]y|abd[0-9]x|abd[0-9]y|xyz",
|
||||
@"get_name|get_value|get_type|set_name|set_value|set_type",
|
||||
@@ -52,11 +52,16 @@ namespace StgSharp
|
||||
Console.WriteLine(ir[i].AsCommand(i));
|
||||
}
|
||||
/**/
|
||||
/**/
|
||||
Console.WriteLine("-----Optimized once-----");
|
||||
List<RegexIR> opt_ir = interpreterSource.IRs;
|
||||
for (int i = 0; i < opt_ir.Count; i++) {
|
||||
Console.WriteLine(opt_ir[i].AsCommand(i));
|
||||
if (opt_ir is not null)
|
||||
{
|
||||
for (int i = 0; i < opt_ir.Count; i++) {
|
||||
Console.WriteLine(opt_ir[i].AsCommand(i));
|
||||
}
|
||||
}
|
||||
/**/
|
||||
Console.WriteLine(interpreterSource.AnalyseException?.ToString() ?? "No error");
|
||||
RegexInfo info = interpreterSource.Info;
|
||||
Console.WriteLine("-----Regex Info-----");
|
||||
|
||||
Reference in New Issue
Block a user