SystemParadox / triplet

triple-quoted string transformer
1 stars 0 forks source link

Cannot parse JSX #1

Closed SystemParadox closed 8 years ago

SystemParadox commented 8 years ago

Cannot currently parse JSX with {} components:

<Foo key={ foo }>hello</Foo>

The issue is that / following } is assumed to be a regex. In reality this requires looking back (through functions) to determine if we are in an expression or a statement.

How can we differentiate between these?

function foo() { }>5
<Foo key={ }>5</Foo>
<Foo key={ } />
SystemParadox commented 8 years ago

Fixed in 1.2.0.