facebook / jsx

The JSX specification is a XML-like syntax extension to ECMAScript.
http://facebook.github.io/jsx/
1.96k stars 132 forks source link

Ambiguous syntax #140

Closed Jack-Works closed 2 years ago

Jack-Works commented 2 years ago

What can we do to avoid this syntax ambiguity?

1
<video>2</video>/g

it can be parsed as...

((1<video) > 2 ) < (/video>/g)
Jack-Works commented 2 years ago

Oh this is not an ambiguous syntax. According to ASI, it will be interpreted as a JSX tag. wrong conclusion

wooorm commented 2 years ago

in that case, https://github.com/facebook/jsx/pull/139#discussion_r814664264 stands again?