Otherwise the following would generate a ; following a method, which is a syntax error.
// Transform one method to two
$emitter->transform('method', function($codegen, $node) {
yield null => new Method(...);
yield null => new Method(...);
});
This can be considered a workaround, it would be better to have Statement nodes, but this would be a significant refactoring!
Otherwise the following would generate a
;
following a method, which is a syntax error.This can be considered a workaround, it would be better to have
Statement
nodes, but this would be a significant refactoring!