-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lexical classification for template strings #1744
Conversation
var offset = 0; | ||
var token = SyntaxKind.Unknown; | ||
var lastNonTriviaToken = SyntaxKind.Unknown; | ||
var templateStack: SyntaxKind[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just initialie this to []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think one stack is sufficient. just make sure to clear it every call.
@mhegazy @CyrusNajmabadi what are we thinking about this? |
It may be too late in our schedule to accept this change for 1.4.2. |
This PR adds lexical classification support for template strings in the absence of a syntactic classifier.
It will break in the presence of
But otherwise it is a fairly good approximation.