(thing)
| 1993 | } |
| 1994 | |
| 1995 | function as_statement_array(thing) { |
| 1996 | if (thing === null) return []; |
| 1997 | if (thing instanceof AST_BlockStatement) return all(thing.body, safe_to_trim) ? thing.body : [ thing ]; |
| 1998 | if (thing instanceof AST_EmptyStatement) return []; |
| 1999 | if (is_statement(thing)) return [ thing ]; |
| 2000 | throw new Error("Can't convert thing to statement array"); |
| 2001 | } |
| 2002 | |
| 2003 | function is_empty(thing) { |
| 2004 | if (thing === null) return true; |
no test coverage detected
searching dependent graphs…