I'm writing a codegen utility and I'd like to make sure I don't generate invalid identifiers. I've spent quite a while searching around and digging through the compiler API but I haven't found an easy way yet to check if an identifier name will be valid.
Is there perhaps a publicly exposed method like isValidIdentifier, or some way to create a Node to then try and turn into an Identifier? Or even just a list of reservedKeywords or something