Open SlowFox71 opened 2 months ago
More thought needs to put into this. For one thing, the patch above is wrong: The lexer needs to be touched, too as otherwise whitespace would be permitted ? ->
which is wrong; this is corrected by using the files attached here.
The other thing is that I did not consider registered objects, which I should have done. However, this needs changes in ObjectMethodCallCompiler.php which is beyond my confidence. lexer.txt parser.txt
Also see #633 and the related PR
PHP supports the nullsafe operator
?->
since version 8, so it would be fine, if this were reflected in Smarty as well. A rather simple patch should suffice, see attachment (but I am not a parser expert, as in the suggestions a couple of days ago).patch.txt