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
@@ -28,6 +28,8 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using CommunityToolkit.HighPerformance.Helpers;
using StgSharp.Collections;
using System;
@@ -84,22 +86,20 @@ namespace StgSharp.Script.Express
return _schemaInclude.ContainsKey( schema.Name );
}
public bool TryGetConst(string name, out ExpElementInstanceBase constInstance)
public bool TryGetConstant(string name, out ExpElementInstanceBase constInstance)
{
if (ExpCompile.BuiltinConst.TryGetValue(name, out constInstance))
{
}
}
public ExpToken SearchConstDeclare( string typeName )
{
ExpToken constant;
foreach (var item in ExpCompile.BuiltinConst.Values)
{
return true;
}
throw new KeyNotFoundException();
foreach (var item in _constDict.Values)
{
if (item.TryGetConstant(name, out constInstance))
{
return true;
}
}
return false;
}
}
}