(tok token.Token)
| 794 | } |
| 795 | |
| 796 | func (self *_parser) parseLexicalDeclaration(tok token.Token) *ast.LexicalDeclaration { |
| 797 | idx := self.expect(tok) |
| 798 | if !self.scope.allowLet { |
| 799 | self.error(idx, "Lexical declaration cannot appear in a single-statement context") |
| 800 | } |
| 801 | |
| 802 | list := self.parseVariableDeclarationList() |
| 803 | self.ensurePatternInit(list) |
| 804 | self.semicolon() |
| 805 | |
| 806 | return &ast.LexicalDeclaration{ |
| 807 | Idx: idx, |
| 808 | Token: tok, |
| 809 | List: list, |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | func (self *_parser) parseDoWhileStatement() ast.Statement { |
| 814 | inIteration := self.scope.inIteration |
no test coverage detected