News for hackers. Stuff that matters.
Re:Show HN: Render abstract syntax trees using React by oh_teh_meows on Thursday August 29, 2019 @06:00PM (#20834144)
The Code component seems like a catch all. If it were to support actual AST, surely

<Code>const a = 3</Code>

Would have looked something like:

<Assign> <Lhs constant><Id>a</Id></Lhs> <Rhs><Literal>3</Literal></Rhs> </Assign>

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".