Page MenuHomePhabricator

Fix improper XHPAST parsing of namespace grammar like "use x as private;"
ClosedPublic

Authored by epriestley on Apr 7 2020, 9:24 PM.
Tags
None
Referenced Files
F19034862: D21068.id.diff
Tue, Nov 25, 3:16 PM
F19025528: D21068.diff
Mon, Nov 24, 7:37 AM
F19017121: D21068.id.diff
Sun, Nov 23, 6:38 AM
F18922710: D21068.id50193.diff
Sun, Nov 9, 3:49 PM
F18869388: D21068.diff
Nov 4 2025, 11:33 AM
F18772126: D21068.id50187.diff
Oct 9 2025, 12:27 AM
F18652752: D21068.id.diff
Sep 21 2025, 9:22 AM
F18628764: D21068.diff
Sep 16 2025, 7:15 AM
Subscribers
None

Details

Summary

Depends on D21067. Ref T13492. Converting unit tests to be readable exposed this error in the grammar.

Normally, "grammar_rule" rules emit a standalone Node. In this case, the bottom-level grammar rule is a collection of trivial rules and the callers configure the Node. Wrap the bottom-level rule in a configuration rule so the node is configured correctly and consistently, in exactly one place.

Test Plan

Ran unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
xhpast6
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24006
Build 33042: Run Core Tests
Build 33041: arc lint + arc unit

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Apr 7 2020, 9:35 PM
This revision was automatically updated to reflect the committed changes.