Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve representation of simple xhp class attributes
Summary: An xhp attribute class declaration can be either complex -- a type, name, initializer and requires clause -- or just an XHP type name. Many of these attribute declarations can be in a list. For example: attribute Foo bar = whatever, :button; We were previously parsing the "simple" form by simply sticking the token in the list. But that is weird in two ways. First, it seems "unparallel" that list items can be either a complex structure or a token. Second, it is weird that a type name appears in the parse tree without being inside a simple type node. We fix both problems at once, by wrapping up the token first in a simple type, and then in a new "simple attribute" parse node. Thanks to Kendall for pointing out the issue. Reviewed By: KendallHopkins Differential Revision: D4433214 fbshipit-source-id: 91f59c7be2180ed6b7717a520774b225837884d2
- Loading branch information
1 parent
10b9c95
commit 815d085
Showing
9 changed files
with
157 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters