Skip to content
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

Fix syntax highlighting for function calls with Flow type arguments #527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gabelevi
Copy link

@gabelevi gabelevi commented Apr 2, 2019

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 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.

@kumarharsh
Copy link

Ah, this would be super nice! @gandm ping?

mroch added a commit to mroch/vscode-language-babel that referenced this pull request Aug 27, 2019
michaelgmcd pushed a commit to michaelgmcd/vscode-language-babel that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants