(expr ast.Expression)
| 1777 | } |
| 1778 | |
| 1779 | func (c *compiler) processKey(expr ast.Expression) (val unistring.String, computed bool) { |
| 1780 | keyExpr := c.compileExpression(expr) |
| 1781 | if keyExpr.constant() { |
| 1782 | v, ex := c.evalConst(keyExpr) |
| 1783 | if ex == nil { |
| 1784 | return v.string(), false |
| 1785 | } |
| 1786 | } |
| 1787 | keyExpr.emitGetter(true) |
| 1788 | computed = true |
| 1789 | return |
| 1790 | } |
| 1791 | |
| 1792 | func (e *compiledClassLiteral) processClassKey(expr ast.Expression) (privateName *privateName, key unistring.String, computed bool) { |
| 1793 | if p, ok := expr.(*ast.PrivateIdentifier); ok { |
no test coverage detected