Fixed scripts using syntax like $self

This commit is contained in:
smallmodel 2024-04-09 23:22:45 +02:00
parent 2bf1144a14
commit dc60cb45b2
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
4 changed files with 23 additions and 13 deletions

View file

@ -342,3 +342,12 @@ sval_u node6(int type, sval_u val1, sval_u val2, sval_u val3, sval_u val4, sval_
return val;
}
sval_u node_listener(sval_u val1, sval_u val2)
{
if (!str::icmp(val1.stringValue, "self")) {
return node2(ENUM_listener, node1_(method_self), val2);
} else {
return node2(ENUM_string, val1, val2);
}
}