daily update on 20240203 by nitload youmu, ExpComment Comment Splitter ok, case code(* comment[comment*)code--comment and comment*)code--comment not added, may use span optimize all programme

This commit is contained in:
Nitload
2025-02-03 23:27:54 +08:00
parent 4ee675669f
commit 4e5a1b0dfb
48 changed files with 1247 additions and 662 deletions
+52 -5
View File
@@ -60,12 +60,59 @@ namespace STgSharpTest
}
[TestMethod]
public void TestMethod()
public void TestSource()
{
ExpFileReader reader = new ExpFileReader(testExpPath);
ExpSchemaSource schemaSource = new ExpSchemaSource();
schemaSource.ReadSchema(reader);
ScriptSourceTransmitter st = new ScriptSourceTransmitter("end", 0);
for (int i = 0; i < 10; i++)
{
st.WriteLine($"Code{i} {new string(' ', i + 1)}-- Comment{i}");
}
st.WriteLine("Code (* comment");
for (int i = 0; i < 10; i++)
{
st.WriteLine($"comment-code");
}
st.WriteLine($"comment *) code");
for (int i = 0; i < 10; i++)
{
st.WriteLine($" Code{i} (* (* Comment *) *) Code{i}");
}
st.WriteLine("end");
ExpSourceReader reader = new ExpSourceReader(st);
while (!st.IsEmpty)
{
Console.WriteLine(reader.ReadLine());
}
}
}
[TestMethod]
public void TestMethod()
{
ScriptSourceTransmitter st = new ScriptSourceTransmitter("end", 0);
for (int i = 0; i < 10; i++)
{
st.WriteLine($"Code{i} {new string(' ',i+1)}-- Comment{i}");
}
st.WriteLine("Code (* comment");
for (int i = 0; i < 10; i++)
{
st.WriteLine($"comment-code");
}
st.WriteLine($"comment *) code");
for (int i = 0; i < 10; i++)
{
st.WriteLine($" Code{i} (* (* Comment *) *) Code{i}");
}
st.WriteLine("end");
ExpSourceReader reader = new ExpSourceReader(st);
while (!st.IsEmpty)
{
Console.WriteLine(reader.ReadNoCommentLine());
}
}
}
}
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpTest")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e687473132786f419a48170313782d6779890c3d")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4ee675669ffd20ba891984a7dcdc6e382d12143f")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpTest")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpTest")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/e687473132786f419a48170313782d6779890c3d/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/4ee675669ffd20ba891984a7dcdc6e382d12143f/*"}}