MCPcopy
hub / github.com/google/mangle / Bytes

Function Bytes

ast/ast.go:308–310  ·  view source on GitHub ↗

Bytes constructs a byte string constant.

(bytes []byte)

Source from the content-addressed store, hash-verified

306
307// Bytes constructs a byte string constant.
308func Bytes(bytes []byte) Constant {
309 return Constant{BytesType, string(bytes), int64(hashBytes(bytes)), nil, nil}
310}
311
312// Number constructs a constant symbol that contains a number.
313func Number(num int64) Constant {

Callers 3

TestDisplayStringFunction · 0.92
TestParseStringConstantFunction · 0.92
VisitBStrMethod · 0.92

Calls 1

hashBytesFunction · 0.85

Tested by 2

TestDisplayStringFunction · 0.74
TestParseStringConstantFunction · 0.74