A postfix ? operator would need some lookahead production rules so it can be distinguished from the beginning of a ternary operator.
e.g:
let r = a?
label: {
prop
}
is already valid syntax that parses to:
let r = a ? (label) : ({ prop });
A postfix ? operator would need some lookahead production rules so it can be distinguished from the beginning of a ternary operator.
e.g:
let r = a?
label: {
prop
}
is already valid syntax that parses to:
let r = a ? (label) : ({ prop });