MCPcopy
hub / github.com/MadAppGang/dingo / LambdaCodeGen

Struct LambdaCodeGen

pkg/codegen/lambda.go:22–25  ·  view source on GitHub ↗

LambdaCodeGen generates Go function literals from Dingo lambda expressions. Transforms: - Rust-style: |x| x + 1 → func(x any) any { return x + 1 } - TypeScript-style: (x) => x + 1 → func(x any) any { return x + 1 } - Block lambda: |x| { ... } → func(x any) any { ... } Handles: - Type annotations o

Source from the content-addressed store, hash-verified

20// - Block bodies (pass through)
21// - Type inference placeholders (any - replaced in type inference pass)
22type LambdaCodeGen struct {
23 *BaseGenerator
24 expr *ast.LambdaExpr
25}
26
27// Generate produces Go code for the lambda expression.
28//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected