(program)
| 1717 | // to its body instead of creating a new node. |
| 1718 | |
| 1719 | function parseTopLevel(program) { |
| 1720 | lastStart = lastEnd = tokPos; |
| 1721 | if (options.locations) lastEndLoc = new Position; |
| 1722 | inFunction = strict = null; |
| 1723 | bracketNesting = 0; |
| 1724 | readToken(); |
| 1725 | var node = program || startNode(); |
| 1726 | if (!program) node.body = []; |
| 1727 | while (tokType !== _eof) { |
| 1728 | var stmt = parseStatement(); |
| 1729 | if (stmt) node.body.push(stmt); |
| 1730 | } |
| 1731 | return finishNode(node, "Program"); |
| 1732 | } |
| 1733 | |
| 1734 | // Parse a single statement. |
| 1735 | // |
no test coverage detected