daily update on 20240206 by nitload youmu, token parser change to use regex generator
This commit is contained in:
@@ -41,17 +41,15 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace StgSharp.Script.Express
|
||||
{
|
||||
public class ExpSchemaSource
|
||||
public partial class ExpSchemaSource
|
||||
{
|
||||
[GeneratedRegex(@"\s*END_CONSTANT;")]
|
||||
private static partial Regex GetConstDefineEnd();
|
||||
|
||||
private static Regex
|
||||
_constDefineBegin = new Regex(
|
||||
@"\s*CONSTANT", RegexOptions.Compiled ),
|
||||
_constDefineEnd = new Regex(
|
||||
@"\s*END_CONSTANT;", RegexOptions.Compiled ),
|
||||
_schemaBegin = new Regex(
|
||||
@"\s*SCHEMA\s*(?<namespace>[A-Za-z0-9_]+)\s?;",
|
||||
RegexOptions.Compiled ),
|
||||
_constDefineBegin = GetConstDefineBegin(),
|
||||
_constDefineEnd = GetConstDefineEnd(),
|
||||
_schemaBegin = GetSchemaBegin(),
|
||||
_schemaEnd = new Regex(
|
||||
@"END_SCHEMA;\s*--\s*(?<namespace>[A-Za-z0-9_]+)",
|
||||
RegexOptions.Compiled ),
|
||||
@@ -315,6 +313,11 @@ namespace StgSharp.Script.Express
|
||||
return false;
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"\s*CONSTANT")]
|
||||
private static partial Regex GetConstDefineBegin();
|
||||
|
||||
[GeneratedRegex(@"\s*SCHEMA\s*(?<namespace>[A-Za-z0-9_]+)\s?;")]
|
||||
private static partial Regex GetSchemaBegin();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user