microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
415 stars 130 forks source link

Condition ternary operator colors #1019

Open barsdeveloper opened 9 months ago

barsdeveloper commented 9 months ago

When getting the condition from a function call it does break he grammar interpretation. It is being fixed either by using a variable instead of b() or by removing the "a" at the beginning

function b() { }
class A {
    static f = () =>
        "a"
        + (!b() ? `_${1}` : "")
        + `'${2}'`
}

image