Unbreak support for Buck2 tuple type syntax (#1509)

In Buck2:

* `()` is the type of the empty tuple (what Bazel calls `tuple[()]`)
* `(T,)` is the type of a 1-element tuple of T
* `(T, U)` or equivalently `(T, U,)` is the type of a 2-element tuple
type

etc.

This means we need to allow tuples of type expressions as type atoms.
(And we may as well allow arbitrary parenthesized type expressions as
type atoms, since Buck2 suppports those too.)

Fixes #1508.

## Buildtools PR checklist

- [X] The code in this PR is covered by unit/integration tests.
- [X] I have tested these changes and provide testing instructions
below.
- [ ] I have either responded to, or resolved all Gemini comments on the
PR.
- [X] I have read Google Eng Practices on [Small
Changes](https://google.github.io/eng-practices/review/developer/small-cls.html),
this PR either follows these guidelines or the description provides
reasoning for why they can not be followed.

@fmeum @dtolnay
6 files changed
tree: 22703192609246521c37825212fb1d22c0e347eb
  1. .bazelci/
  2. .github/
  3. api_proto/
  4. build/
  5. build_proto/
  6. buildifier/
  7. buildozer/
  8. bzlenv/
  9. config/
  10. convertast/
  11. deps_proto/
  12. differ/
  13. edit/
  14. extra_actions_base_proto/
  15. file/
  16. generatetables/
  17. labels/
  18. lang/
  19. release/
  20. tables/
  21. testutils/
  22. unused_deps/
  23. warn/
  24. wspace/
  25. .bazelrc
  26. .bazelversion
  27. .gitignore
  28. .mailmap
  29. .pre-commit-config.yaml
  30. BUILD.bazel
  31. CODEOWNERS
  32. CONTRIBUTING.md
  33. CONTRIBUTORS
  34. go.mod
  35. go.sum
  36. launcher.js
  37. LICENSE
  38. MODULE.bazel
  39. README.md
  40. status.py
  41. update_generated.sh
  42. WARNINGS.md
  43. WORKSPACE
  44. WORKSPACE.bzlmod
README.md

Buildtools for bazel

This repository contains developer tools for working with Google's bazel buildtool.

Build status

Setup

See instructions in each tool's directory.