You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following piece of code is valid but it is parsed incorrectly:
varthis_=``;varisCorrect=`foo`;typeButThis= ``;//<- first backtick is misparsedtypeIsWrong= `foo`;// Um... So I'm in a template string or what?varvalue=`type A = string`;//<- second backtick is misparsed
I was just browsing someone's code on GitHub when I noticed the highlighting was wrong. I tried to reproduce the problem in the snippet above. The first backtick on line 3 seems to have been ignored or what.
The original code I saw looked more like this, actually:
The output of tree-sitter parse is the following: I didn't know anything about tree-sitter before, and I have been unable to run tree-sitter right now, sorry. I'll come back to this later.
The text was updated successfully, but these errors were encountered:
The following piece of code is valid but it is parsed incorrectly:
The snippet above is valid TypeScript:
https://www.typescriptlang.org/play?#code/G4QwTgBALgFglgZwPoQLwQAYYNwChSSIDCA9mGAKYDGUamAZiSTrlAJ4AOFEAQgK5QAKvAR0s2CAHpJAHgC0EenDAJaAIxBUA1lDjaIiCAHd4UCq07cAkggDqYEgDsA5mMbM8uaRACqAWwA6IIgAZRIIKwByPwNHCBBoCj8OABsQMwhVMDgXCDJjGHSAflx8cAhQFL5udAx2LggAQTosnOccKVkFBGonABMIDW1dfUMTODMgA
I was just browsing someone's code on GitHub when I noticed the highlighting was wrong. I tried to reproduce the problem in the snippet above. The first backtick on line 3 seems to have been ignored or what.
The original code I saw looked more like this, actually:
The output ofI didn't know anything about tree-sitter before, and I have been unable to run tree-sitter right now, sorry. I'll come back to this later.tree-sitter parse
is the following:The text was updated successfully, but these errors were encountered: