daily update on 20250220 by nitload youmu, building AST generator, correct type naming
This commit is contained in:
@@ -52,55 +52,50 @@ namespace StgSharp
|
||||
internal static class Program
|
||||
{
|
||||
|
||||
static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp";
|
||||
private static string testExpPath = @"D:\Programmer\stepcode\data\ap203\ap203.exp";
|
||||
|
||||
internal static unsafe void Main( string[] args )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
try {
|
||||
StgSharp.Init();
|
||||
|
||||
|
||||
ExpCompile.InitCompile();
|
||||
ExpFileSource reader = new ExpFileSource(testExpPath);
|
||||
ExpFileSource reader = new ExpFileSource( testExpPath );
|
||||
ExpSchemaSource schemaSource = new ExpSchemaSource();
|
||||
schemaSource.ReadSchema(reader);
|
||||
schemaSource.ReadSchema( reader );
|
||||
|
||||
ScriptSourceTransmitter st = new ScriptSourceTransmitter("end", 0);
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
ScriptSourceTransmitter st = new ScriptSourceTransmitter(
|
||||
"end", 0 );
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
string str = $"rawCode () (\"\") {i}";
|
||||
Console.WriteLine(str);
|
||||
st.WriteLine(str);
|
||||
Console.WriteLine( str );
|
||||
st.WriteLine( str );
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
string str = $"Code{i} {new string(' ', i + 1)}-- Comment{i}";
|
||||
Console.WriteLine(str);
|
||||
st.WriteLine(str);
|
||||
Console.WriteLine( str );
|
||||
st.WriteLine( str );
|
||||
}
|
||||
st.WriteLine("CodeBef (* comment");
|
||||
st.WriteLine($"comment *) codeAft");
|
||||
Console.WriteLine("CodeBef (* comment_");
|
||||
Console.WriteLine($"_comment *) codeAft");
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
var str = $" Code{i} (* (* Comment{i} *) *) Code{i}";
|
||||
Console.WriteLine(str);
|
||||
st.WriteLine(str);
|
||||
st.WriteLine( "CodeBef (* comment" );
|
||||
st.WriteLine( $"comment *) codeAft" );
|
||||
Console.WriteLine( "CodeBef (* comment_" );
|
||||
Console.WriteLine( $"_comment *) codeAft" );
|
||||
for( int i = 0; i < 10; i++ ) {
|
||||
string str = $" Code{i} (* (* Comment{i} *) *) Code{i}";
|
||||
Console.WriteLine( str );
|
||||
st.WriteLine( str );
|
||||
}
|
||||
st.WriteLine("end");
|
||||
ExpSourceReader sr = new ExpSourceReader(st);
|
||||
st.WriteLine( "end" );
|
||||
ExpSourceReader sr = new ExpSourceReader( st );
|
||||
int count = 0;
|
||||
while (!sr.IsEmpty)
|
||||
{
|
||||
while( !sr.IsEmpty ) {
|
||||
count++;
|
||||
var str = sr.ReadToken();
|
||||
Console.WriteLine($"{count}\t{str.Mask}\t\t{str.Value.ToString()}");
|
||||
|
||||
Token str = sr.ReadToken();
|
||||
Console.WriteLine(
|
||||
$"{count}\t{str.Flag}\t\t{str.Value.ToString()}" );
|
||||
}
|
||||
var slice = st.Slice(5, 2);
|
||||
IScriptSourceProvider slice = st.Slice( 5, 2 );
|
||||
|
||||
/*
|
||||
|
||||
@@ -130,20 +125,18 @@ namespace StgSharp
|
||||
|
||||
return;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
catch( Exception ) {
|
||||
throw;
|
||||
/*
|
||||
StgSharp.WriteLog($"{ex}", LogType.Error);
|
||||
if( true ) { }
|
||||
Dialogue.PostError( ex );
|
||||
/**/
|
||||
Environment.Exit(-1);
|
||||
Environment.Exit( -1 );
|
||||
/**/
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
finally { }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -0,0 +1,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ccef0de6f686f94da655b0e7d854d0acaf907d04")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.IO;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Net.Http;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c23b640cae59b9ee7dcfd8f026b8970a084ddbd7")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ccef0de6f686f94da655b0e7d854d0acaf907d04")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
Reference in New Issue
Block a user