JSDoc support by RyanCavanaugh · Pull Request #6024 · microsoft/TypeScript
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we ever manifest this name to the user?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing where you skip this check.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so an identifier can start with anything but the characters checked for above, but then after that must contain proper identifier characters. That seems a bit odd.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be parseJSDocIdentifier. The scanning is handled by the scanner.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it should call nextJSDocToken(), similar to what parseIdentifier in the main parser does.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should never happen though right? As you've eaten the preceding white space, and there's nothing in here where you would consume white space inside a token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters