michaelgmcd / vscode-language-babel

VSCode syntax highlighting for today's JavaScript
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
MIT License
131 stars 17 forks source link

Fix highlighting of function calls with Flow type args #56

Closed mroch closed 4 years ago

mroch commented 5 years ago

In Flow, you can call a function an explicitly specify the types for the generics. For example

function foo<A, B>(a: A, b: B): void {}

foo<string, number>("hello", 123);

This PR attempts to update vscode-language-babel to support this syntax. It's a little complicated, since the grammar is somewhat ambiguous. For example, foo < bar > (123) is a valid expression in JavaScript, but Flow interprets it as a call expression with type parameters.

Fixes https://github.com/michaelgmcd/vscode-language-babel/issues/43 Similar to https://github.com/gandm/language-babel/pull/527, but adds meta.method-call.*

michaelgmcd commented 5 years ago

Wow, this looks great. I'll take a closer look sometime before Sunday and test a few things. Excited to merge this.

rattrayalex-stripe commented 4 years ago

Awesome to see investment in community tooling like this, thank you @mroch !

valscion commented 4 years ago

This is amazing! Thank you all for making this happen 💞

Any chance on getting a new release out soonish? 😅

michaelgmcd commented 4 years ago

Released in v0.0.24. Let me know if you run into any issues.