(params, kind?: string)
| 1906 | } |
| 1907 | |
| 1908 | parseArrayPattern(params, kind?: string): Node.ArrayPattern { |
| 1909 | const node = this.createNode(); |
| 1910 | |
| 1911 | this.expect('['); |
| 1912 | const elements: Node.ArrayPatternElement[] = []; |
| 1913 | while (!this.match(']')) { |
| 1914 | if (this.match(',')) { |
| 1915 | this.nextToken(); |
| 1916 | elements.push(null); |
| 1917 | } else { |
| 1918 | if (this.match('...')) { |
| 1919 | elements.push(this.parseBindingRestElement(params, kind)); |
| 1920 | break; |
| 1921 | } else { |
| 1922 | elements.push(this.parsePatternWithDefault(params, kind)); |
| 1923 | } |
| 1924 | if (!this.match(']')) { |
| 1925 | this.expect(','); |
| 1926 | } |
| 1927 | } |
| 1928 | |
| 1929 | } |
| 1930 | this.expect(']'); |
| 1931 | |
| 1932 | return this.finalize(node, new Node.ArrayPattern(elements)); |
| 1933 | } |
| 1934 | |
| 1935 | parsePropertyPattern(params, kind?: string): Node.Property { |
| 1936 | const node = this.createNode(); |
no test coverage detected