Traverse top level GN targets and call the builder functions
(self, tree)
| 103 | self.builder.BuildEpilogue() |
| 104 | |
| 105 | def TraverseTargets(self, tree): |
| 106 | 'Traverse top level GN targets and call the builder functions' |
| 107 | for stmt in tree.children: |
| 108 | if stmt.data != 'call': |
| 109 | continue |
| 110 | target_type = stmt.children[0] |
| 111 | if target_type not in V8_TARGET_TYPES: |
| 112 | continue |
| 113 | target = stmt.children[1].children[0].strip('\"') |
| 114 | if target not in self.filtered_targets: |
| 115 | continue |
| 116 | self.current_target = target |
| 117 | self._Target(target_type, target, stmt.children[2].children) |
| 118 | |
| 119 | def _Target(self, target_type, target, stmts): |
| 120 | stmts = self._StatementList(stmts) |