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 handling of colons on Flow function types #1089

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Apr 26, 2022

  1. Configuration menu
    Copy the full SHA
    d2e3181 View commit details
    Browse the repository at this point in the history
  2. Split up test/flow.ts cases in the Mocha metadata.

    This file is very nicely structured as data-driven tests!  Make
    that structure visible to Mocha too.  That way when something
    breaks a particular handful of tests, it's easy to see which ones.
    gnprice committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    4cee7b2 View commit details
    Browse the repository at this point in the history
  3. In Flow round-trip tests, compare text before re-parsing.

    When something's wrong, this produces a nice clear diff,
    which the comparison of ASTs doesn't.
    gnprice committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    c1cf486 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2e9d9f3 View commit details
    Browse the repository at this point in the history
  5. Straighten out handling of Flow function types.

    This way is simpler to reason about: it's fewer conditionals, and
    less peeking up and down the tree to try to anticipate what other
    nodes will do.  And it works the same on all existing tests.
    
    It also works correctly on a number of other test cases where the
    existing logic breaks.  Add a bunch of those, and a few others.
    gnprice committed Apr 26, 2022
    Configuration menu
    Copy the full SHA
    3cf2432 View commit details
    Browse the repository at this point in the history