* Add a top-level class/function declaration.
(declaration: syntax.DeclarationStatement)
| 54 | * Add a top-level class/function declaration. |
| 55 | */ |
| 56 | addDeclaration(declaration: syntax.DeclarationStatement) { |
| 57 | // When seeing class/function declaration in main script, the variable |
| 58 | // statements before should be treated as static variables. |
| 59 | if (this.type != 'lib') |
| 60 | this.pushVariableStatementsToDeclarations(); |
| 61 | this.pushDeclaration(declaration); |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Add a top-level variable declaration. |
no test coverage detected