Skip to content

Conversation

@tanyanliang110
Copy link
Contributor

@tanyanliang110 tanyanliang110 commented Jan 7, 2025

问题1:WrapFnCall 函数中的参数解析问题

问题详情platypus issue#56

1.在函数调用时,WrapFnCall函数无法正确处理缺省参数,导致数组下标越界。
2.WrapFnCall处理函数调用时,对关键字参数只是简单取右值,未能将关键字与参数正确对应。
$\qquad$ 一些特殊情况:(函数:pt_kvs_keys(tags:_ bool = true, fields: bool = true)

` pt_kvs_keys(fields=false,tags=true)`(其中tags是第一个位置参数),解析出的输入为[false,true],而不是预期的[true,false],

 `pt_kvs_keys(fields=false)`缺省第一个位置参数,关键字为第二个参数。

解决方案:

$\qquad$将参数列表设置为函数输入和函数原型长度的最大值,避免下标越界。
$\qquad$引入paramMap来确保关键字与参数值一一对应。

问题2:kv_split 函数的切分问题

相关ligai

1.value中存在切割符会导致value被切开

解决方案:

$\qquad$增加参数value_delimiters,根据指定的 如 "" 或者 {}来确定value 的范围,支持字符嵌套

@guance-review-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tanyanliang110

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@guance-review-bot guance-review-bot bot added size/L and removed size/M labels Jan 16, 2025
@tanyanliang110 tanyanliang110 changed the title 修复 WrapFnCall 函数中的参数解析问题 修复 WrapFnCall 函数中的参数解析问题和kv_split 函数的切分问题 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants