github.com/evanw/esbuild/internal/js_ast.EArrow.PreferExpr (field)
9 uses
github.com/evanw/esbuild/internal/js_ast (current package)
js_ast.go#L501: PreferExpr bool // Use shorthand if true and "Body" is a single return statement
github.com/evanw/esbuild/internal/bundler
linker.go#L1659: getter = js_ast.Expr{Data: &js_ast.EArrow{PreferExpr: true, Body: body}}
github.com/evanw/esbuild/internal/js_parser
js_parser.go#L2180: PreferExpr: true,
js_parser.go#L8926: PreferExpr: true,
js_parser.go#L11154: then = js_ast.Expr{Loc: arg.Loc, Data: &js_ast.EArrow{Body: body, PreferExpr: true}}
js_parser.go#L11428: p.lowerFunction(&e.IsAsync, &e.Args, e.Body.Loc, &e.Body.Stmts, &e.PreferExpr, &e.HasRestArg, true /* isArrow */)
js_parser.go#L11438: e.PreferExpr = true
js_parser_lower.go#L439: PreferExpr: true,
github.com/evanw/esbuild/internal/js_printer
js_printer.go#L1656: if len(e.Body.Stmts) == 1 && e.PreferExpr {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |