Open mhsdesign opened 2 years ago
I think you mean {foo != null ? foo : bar}
in your example
btw concerning fusion woulndt this be cool?
path ??= 'hello'
->
path.@process.nullCoalescing = ${value ?? 'hello'}
edit: this was more of a Schnapsidee as it makes things less transparent and harder to learn
Description
Currently one often needs to write the following code in fusion eel:
in php this could be better written like
$foo ?? $bar;
im proposing to implement this Null Coalescing Operator in eel:
The eel parser https://github.com/neos/flow-development-collection/blob/68321067e83dc82702d266f6b27b4f4afad54186/Neos.Eel/Resources/Private/Grammar/Eel.peg.inc#L43 and the CompilingEelParser https://github.com/neos/flow-development-collection/blob/68321067e83dc82702d266f6b27b4f4afad54186/Neos.Eel/Classes/CompilingEelParser.php#L293 should be extended. (Those snippets show the ternary eel)
I would not implement this in the InterpretedEelParser.php as this one is not used and should probably be removed.