liujingxing/XmlClassGuard

kt语法上替换类名只替换一半

MarkWang100 opened this issue · 3 comments

形如:

for (id in NotificationItem.Notification_Id_Recommend_Func_dlg..NotificationItem.Notification_Id_Recommend_Func_dlg2){
}

只替换成

for (id in CD.Notification_Id_Recommend_Func_dlg..NotificationItem.Notification_Id_Recommend_Func_dlg2){

第二个NotificationItem 没有替换。

ps:
Notification_Id_Recommend_Func_dlg和Notification_Id_Recommend_Func_dlg2都是NotificationItem定义的常量

看不懂你的语法

就是正常的for in语法:
for (i in 0..5) {
println(i) // 0,1,2,3,4,5 --> upto 5
}

只是代码中0 和5 是个类NotificationItem的两个常量。然后目前guard替换类NotificationItem的时候,只替换CD.Notification_Id_Recommend_Func_dlg

但是第二NotificationItem.Notification_Id_Recommend_Func_dlg2 中的NotificationItem 没有替换,感觉是脚本正则规则替换有bug吧。

规则没问题,故意这么写的,因为第二个前面有..,常量提取出来,用中间变量替换就好