Re:Show HN: Render abstract syntax trees using React
by codejamninja on Friday August 30, 2019 @06:03AM
(#20837193)
The Code component would do a poor job at nesting code in a body. The point of this project is to make it easy to generate code through an AST, hence the <Code /> "catch call".
<Code>const a = 3</Code>
Would have looked something like:
<Assign> <Lhs constant><Id>a</Id></Lhs> <Rhs><Literal>3</Literal></Rhs> </Assign>