MCPcopy Create free account
hub / github.com/dop251/goja / processClassKey

Method processClassKey

compiler_expr.go:1792–1800  ·  view source on GitHub ↗
(expr ast.Expression)

Source from the content-addressed store, hash-verified

1790}
1791
1792func (e *compiledClassLiteral) processClassKey(expr ast.Expression) (privateName *privateName, key unistring.String, computed bool) {
1793 if p, ok := expr.(*ast.PrivateIdentifier); ok {
1794 privateName = e.c.classScope.getDeclaredPrivateId(p.Name)
1795 key = privateIdString(p.Name)
1796 return
1797 }
1798 key, computed = e.c.processKey(expr)
1799 return
1800}
1801
1802type clsElement struct {
1803 key unistring.String

Callers 1

emitGetterMethod · 0.95

Calls 3

privateIdStringFunction · 0.85
getDeclaredPrivateIdMethod · 0.80
processKeyMethod · 0.80

Tested by

no test coverage detected