Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

常量 string 赋值中包含双引号转义错误 #23

Open
matianjun1 opened this issue Sep 9, 2021 · 2 comments
Open

常量 string 赋值中包含双引号转义错误 #23

matianjun1 opened this issue Sep 9, 2021 · 2 comments

Comments

@matianjun1
Copy link

matianjun1 commented Sep 9, 2021

rule "name test" "i can"  salience 0
begin
    name = "abc\"def"
end

外部获取 name 的值时 print 出来 为 abc\"def 而不是 abc"def

@zhangzhen0370
Copy link

zhangzhen0370 commented Sep 15, 2022

rule "name test" "i can"  salience 0
begin
name="a\\" // 这样写,是给name赋值为a\\了,理解为最外层的双引号中的字符串是没转义,写的是什么就是什么
//如果想要给name赋值为a\,规则写成name="a\",在规则编译是报错:build rule from string err: [line 6:8 mismatched input '60' expecting END。
// 现有的引擎无法满足此种需求。望作者改进,谢谢。
end

@OctoberCity
Copy link

OctoberCity commented Apr 18, 2023

支持字符串转义吗?比如支持 ` 替代外层的“

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants