mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Use `emit()` for writing `questionDotToken`, leading to properly calling the emit hooks (which `emitTokenWithComment` doesn't) and printing the comments. This fixes #35372 by calling its hooks to set the `.__pos` and `.__end` fields. Also, remove `getDotOrQuestionDotToken` which was used only here -- mainly because it seems likely to encourage misusing the `questionDotToken` again. Also, fix a bunch of `visitor` -> `tokenVisiton` calls in `visitorPublic.ts`.