1. 重新设计了 JSON门户类的实现

2. Script脚本添加了原始字符串的实现
3. 修复了Script中无法对  \" 双引号转义的问题
4. 新增了对于集合嵌套取值的支持(目前仅是集合取值)
5. 重新设计了FlowWorkManagement任务启动的逻辑,修复了触发器无法正常运行的问题
6. 在ScriptBaseFunc中新增了 json() 本地函数,支持将字符串转为IJsonToken进行取值。
7. EmitHelper对于集合取值时,反射获取“get_item”委托时存在看你多个MethodInfo,现在可以传入子项类型,帮助匹配目标重载方法
This commit is contained in:
fengjiayi
2025-07-31 23:59:31 +08:00
parent 5f6a58168a
commit 1bccccc835
36 changed files with 948 additions and 335 deletions

View File

@@ -214,6 +214,14 @@
// 识别字符串字面量
if (currentChar == '"')
{
if (_input[_index + 1] == '"'
&& _input[_index + 2] == '"')
{
var value = _input.Slice(_index, 4).ToString();
// 原始字符串
return ReadRawString();
}
return ReadString();
}
@@ -440,6 +448,28 @@
return token;
}
private Token ReadRawString()
{
// skip opening triple quotes
_index += 3;
var start = _index;
while (_index + 2 < _input.Length)
{
if (_input[_index] == '"' && _input[_index + 1] == '"' && _input[_index + 2] == '"')
{
var value = _input.Slice(start, _index - start).ToString();
_index += 3; // skip closing """
return CreateToken(TokenType.String, value);
}
_index++;
}
throw new Exception("Unterminated raw string literal");
}
/// <summary>
/// 读取硬编码的文本