Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15453064
D12287.id29511.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
588 B
Referenced Files
None
Subscribers
None
D12287.id29511.diff
View Options
diff --git a/src/parser/aast/api/AASTNodeList.php b/src/parser/aast/api/AASTNodeList.php
--- a/src/parser/aast/api/AASTNodeList.php
+++ b/src/parser/aast/api/AASTNodeList.php
@@ -28,11 +28,7 @@
}
public function selectDescendantsOfType($type_name) {
- $results = array();
- foreach ($this->list as $id => $node) {
- $results += $node->selectDescendantsOfType($type_name)->getRawNodes();
- }
- return $this->newList($results);
+ return $this->selectDescendantsOfTypes(array($type_name));
}
public function selectDescendantsOfTypes(array $type_names) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 30, 9:06 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709796
Default Alt Text
D12287.id29511.diff (588 B)
Attached To
Mode
D12287: Simplify `AASTNodeList::selectDescendantsOfType`
Attached
Detach File
Event Timeline
Log In to Comment