This commit is contained in:
Nitload
2025-08-25 09:50:30 +08:00
parent bd0e31e922
commit 1359ff4ecc
1630 changed files with 738486 additions and 2399 deletions
+7 -9
View File
@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="StepReader.HeadReader.cs"
// file="StepHeadReader.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
@@ -37,12 +37,13 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace StgSharp.Model.Step
namespace StgSharp.Modeling.Step
{
public partial class StepReader
{
private static Regex expressionSplitter = GetStepHeadExpressionParser();
private static Regex expressionSplitter = new Regex(
@"^(?<CALLER>[A-Z_]+)\s?\((?<PARAM>.+)\)\;", RegexOptions.Compiled );
/**/
private StepInfo _info;
@@ -52,7 +53,7 @@ namespace StgSharp.Model.Step
return _info;
}
StepInfo info = new StepInfo();
List<StepHeaderLineConstructor> constructorList = new List<StepHeaderLineConstructor>();
List<StepObjectConstructor> constructorList = new List<StepObjectConstructor>();
using( MemoryMappedViewStream ms = _memoryFile.CreateViewStream(
0, _size, MemoryMappedFileAccess.Read ) )
{
@@ -75,10 +76,10 @@ namespace StgSharp.Model.Step
GroupCollection match = expressionSplitter.Match( token ).Groups;
constructorList.Add(
new StepHeaderLineConstructor(
new StepObjectConstructor(
0, match[ "CALLER" ].ToString(), match[ "PARAM" ].ToString() ) );
}
foreach( StepHeaderLineConstructor constructor in constructorList )
foreach( StepObjectConstructor constructor in constructorList )
{
switch( constructor.Caller )
{
@@ -104,9 +105,6 @@ namespace StgSharp.Model.Step
}
return info;
}
[GeneratedRegex( @"^(?<CALLER>[A-Z_]+)\s?\((?<PARAM>.+)\)\;", RegexOptions.Compiled )]
private static partial Regex GetStepHeadExpressionParser();
/**/
}