Adds a `let` declaration to the current LexicalEnvironment.
(name *ast.IdentifierNode)
| 235 | |
| 236 | // Adds a `let` declaration to the current LexicalEnvironment. |
| 237 | func (c *EmitContext) AddLexicalDeclaration(name *ast.IdentifierNode) { |
| 238 | varDecl := c.Factory.NewVariableDeclaration(name, nil /*exclamationToken*/, nil /*typeNode*/, nil /*initializer*/) |
| 239 | c.SetEmitFlags(varDecl, EFNoNestedSourceMaps) |
| 240 | scope := c.letScopeStack.Peek() |
| 241 | scope.variables = append(scope.variables, varDecl) |
| 242 | } |
| 243 | |
| 244 | // Merges declarations produced by c.EndVariableEnvironment() or c.EndLexicalEnvironment() into a statement list |
| 245 | func (c *EmitContext) MergeEnvironmentList(statements *ast.StatementList, declarations []*ast.Statement) *ast.StatementList { |
no test coverage detected