Rewrite i18n extraction to use PHP-Parser rather than Xhpast
Summary:
Also:
- Teach it that `count` returns a number. Maybe things should use `phutil_count` instead, but in practice they sometimes don't.
- Let it trace through certain variable assignments.
- Tell it that certain methods of certain classes take arguments that are pre-typed, and use this for edge types.
Part of T16378, T16289, and T15862 (but doesn't close any of them)
Test Plan:
- Run `./bin/i18n extract --clean` on the old version before the patch.
- Save the `src/.cache/i18n_strings.json` file somewhere.
- Run `./bin/i18n extract --clean` on the new version with this patch.
- Save the `src/.cache/i18n_strings.json` file somewhere.
- Compare the two files. The expected differences are a few more params show up as numbers, but nothing else.
Reviewers: O1 Blessed Committers, mainframe98, avivey
Reviewed By: O1 Blessed Committers, avivey
Subscribers: avivey, aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Differential Revision: https://we.phorge.it/D26554