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

Method compileConditionalExpression

compiler_expr.go:2560–2568  ·  view source on GitHub ↗
(v *ast.ConditionalExpression)

Source from the content-addressed store, hash-verified

2558}
2559
2560func (c *compiler) compileConditionalExpression(v *ast.ConditionalExpression) compiledExpr {
2561 r := &compiledConditionalExpr{
2562 test: c.compileExpression(v.Test),
2563 consequent: c.compileExpression(v.Consequent),
2564 alternate: c.compileExpression(v.Alternate),
2565 }
2566 r.init(c, v.Idx0())
2567 return r
2568}
2569
2570func (e *compiledLogicalOr) constant() bool {
2571 if e.left.constant() {

Callers 1

compileExpressionMethod · 0.95

Calls 3

compileExpressionMethod · 0.95
initMethod · 0.65
Idx0Method · 0.65

Tested by

no test coverage detected