<div dir="ltr"><div>Is there a way to modify the token stream as it is being lexed?</div><div><br></div><div>I need to look for a token followed by a comment with a particular content and replace them with a string literal.</div><div><br></div><div>I am writing a custom tool that uses a MatchCallback to match certain nodes, but the identifiers that I need to replace are not valid (they will be code-genned before compilation), so I need to replace them with something that is actually valid (and useful).<br></div><div><br></div></div>