21:38
<rickbutton>
anyone doing any work with JS CSTs lately? I’ve been doing a lot of codegen/codemod work lately and the idea of rolling my own sounds like a lot of work
22:10
<bakkot>
define "doing any work with"
22:11
<bakkot>
I have been in the process of updating our AST (shift), which supports location information and comment although I wouldn't exactly call it a CST
22:11
<bakkot>
what sort of thing are you looking for?
22:24
<rickbutton>
yeah I guess I should clarify I'm not actually looking for a "true" CST from like grammar rules but an AST with additional metadata for comments/semicolons/etc that doesn't fit into a standard estree AST. for context, I've skimmed the various convos on estree/parser repos on this, but the convo seems to have stopped, im wondering if anyone has found a good way to do it
22:25
<rickbutton>
i should look at shift
22:31
<bakkot>
shift just has side tables for comments and location data
22:32
<bakkot>
not really any fancier than you'd get from babel's parser or any other, really
22:33
<bakkot>
the usual approach, or at least my approach, is to slice out input source text using the location data, and inspect that for whatever you're interested in
22:38
<rickbutton>
i see