Skip to content

Recognize = as equivalent to ? in JSDoc signatures#6869

Merged
RyanCavanaugh merged 2 commits into
microsoft:masterfrom
RyanCavanaugh:fix6811
Feb 4, 2016
Merged

Recognize = as equivalent to ? in JSDoc signatures#6869
RyanCavanaugh merged 2 commits into
microsoft:masterfrom
RyanCavanaugh:fix6811

Conversation

@RyanCavanaugh
Copy link
Copy Markdown
Member

Fixes #6811

Comment thread src/compiler/parser.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be what we consider a "synthetic" node? That usually uses an start of -1 or something.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not synthetic -- it's backed by a real span

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the SyntaxKind match the actual contents of token? Here we are marking a '=' token as a QuestionToken.

I get it works, but seems a little dirty. Is there precedence in the code for marking tokens with a SyntaxKind which doesn't match the token contents? If not, doesn't seem like we should start.

@RyanCavanaugh
Copy link
Copy Markdown
Member Author

Any other comments? @billti ?

@billti
Copy link
Copy Markdown
Member

billti commented Feb 4, 2016

👍

RyanCavanaugh added a commit that referenced this pull request Feb 4, 2016
Recognize `=` as equivalent to `?` in JSDoc signatures
@RyanCavanaugh RyanCavanaugh merged commit a324176 into microsoft:master Feb 4, 2016
@RyanCavanaugh RyanCavanaugh deleted the fix6811 branch February 4, 2016 23:48
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants