hasExportDeclaration: a statement that exports by name or by assignment (`export {…}`, `export =`, `export default x`), not by declaring.
(block: Node)
| 1246 | /// hasExportDeclaration: a statement that exports by name or by assignment |
| 1247 | /// (`export {…}`, `export =`, `export default x`), not by declaring. |
| 1248 | fn has_export_declaration(block: Node) -> bool { |
| 1249 | for i in 0..block.named_child_count() { |
| 1250 | if let Some(statement) = block.named_child(i) { |
| 1251 | if statement.kind() == "export_statement" && statement.child_by_field_name("declaration").is_none() { |
| 1252 | return true; |
| 1253 | } |
| 1254 | } |
| 1255 | } |
| 1256 | false |
| 1257 | } |
| 1258 | |
| 1259 | fn opt_str(arena: &mut Arena, s: Option<&str>) -> StrRef { |
| 1260 | match s { |