Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15409892
D10554.id25380.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
587 B
Referenced Files
None
Subscribers
None
D10554.id25380.diff
View Options
diff --git a/src/parser/aast/api/AASTNode.php b/src/parser/aast/api/AASTNode.php
--- a/src/parser/aast/api/AASTNode.php
+++ b/src/parser/aast/api/AASTNode.php
@@ -58,6 +58,18 @@
return $this->children;
}
+ public function getChildrenOfType($type) {
+ $nodes = array();
+
+ foreach ($this->children as $child) {
+ if ($child->getTypeName() == $type) {
+ $nodes[] = $child;
+ }
+ }
+
+ return $nodes;
+ }
+
public function getChildOfType($index, $type) {
$child = $this->getChildByIndex($index);
if ($child->getTypeName() != $type) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 5:50 AM (1 d, 16 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706098
Default Alt Text
D10554.id25380.diff (587 B)
Attached To
Mode
D10554: Add a `getChildrenOfType` method to `AASTNode`
Attached
Detach File
Event Timeline
Log In to Comment