Attaching node content as metadata

Is there a standard way to attach a per node NodeProp that holds the content of the given node? Think of a string literal, an identifier etc. I understand this will be expensive, but so is slicing the document text using doc.sliceString.

Context: I would like to reuse an existing Lezer parser for my simple language instead of shipping and running two separate parsers.

No, there isn’t—that’s not really something Lezer’s tree structure can do.

1 Like

I see. Thank you for the quick response!