Insist on enclosing parens, since "(" introductory-token is not otherwise legal
> let a = (switch (foo) { > case 10: 100; > default: 200; > }); > > 2. If-expression: > > let a = (if (foo) { > print('a is foo'); > foo; > } else { > // do some longer stuff > }); > > > 3. Try-expressions: > > let a = (try { > // do dangerous stuff > "ok value"; > } catch (e) { > "default value"; > }); > > > let a = ({ > print('doing stuff'); > 100; > }); > Even the last is now easily unambiguous. -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss