03:26 | <Jack Works> | having a question about ASI |
03:30 | <Jack Works> | I'm working on the JSX spec, with JSXElement added to the syntax, for this code:
will it be interpreted as: NumericLiteral; JSXElement divided by g
Some comparison and a RegExp literal? |
03:34 | <jmdyck> | The latter. |
03:34 | <Jack Works> | oh thanks |
03:36 | <jmdyck> | ASI only kicks in when there would otherwise be a syntax error. So since "1 < video" doesn't have a syntax error, ASI doesn't insert a semicolon after the '1'. |
03:37 | <Jack Works> | so
it should be |
03:38 | <Jack Works> | oh yes, "Uncaught SyntaxError: Invalid regular expression: missing /" |
03:41 | <Jack Works> | 🤔 tried this code on babel, ts and swc. same result Unterminated regexp literal . I think the status quo is good |
19:47 | <devsnek> | sort of relatedly but not really relatedly does anyone know why jsx transpilers always call a function instead of just making an object? |