Support nested ternary
robotnewyork opened this issue · 2 comments
robotnewyork commented
Nested ternary in HTL / Sightly causes error.
karollewandowski commented
Nested ternary operators are allowed in grammar and work without any issues for me, eg.:
${'something' ? 'a' : ('1' ? 'x' : 'x')} // prints a
${'' ? 'a' : ('1' ? 'x' : 'x')} // prints x
Nested expressions have to be enclosed in parentheses. If it's not the case, then I think you should post snippet that does not work.
robotnewyork commented
Thanks, I did not realize nested expressions had to be enclosed in parenthesis. Closing issue.