Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bufbuild/protocompile
/ functions
Functions
1,436 in github.com/bufbuild/protocompile
⨍
Functions
1,436
◇
Types & classes
233
↓ 3 callers
Function
protoStatname
(s int)
parser/proto.y.go:984
↓ 3 callers
Method
putMessageNode
(m *descriptorpb.DescriptorProto, n ast.MessageDeclNode)
parser/result.go:959
↓ 3 callers
Function
readerForTestdata
(t testing.TB, filename string)
parser/parser_test.go:973
↓ 3 callers
Function
removePrefixIndent
(s string)
linker/linker_test.go:3963
↓ 3 callers
Method
resolveExtensionType
(name string)
options/options.go:245
↓ 3 callers
Method
setFloat
(lval *protoSymType, val float64)
parser/lexer.go:431
↓ 3 callers
Function
setMapEntry
( fld protoreflect.FieldDescriptor, msg protoreflect.Message, mapVal protoreflect.Map, entry protoreflect.
options/options.go:1472
↓ 3 callers
Function
testByProtoc
(t *testing.T, files map[string]string, fileNames []string)
linker/linker_test.go:4501
↓ 3 callers
Method
validateEnumValueFeatureSupport
( edition descriptorpb.Edition, enum protoreflect.EnumDescriptor, number protoreflect.EnumNumber, path []i
options/options.go:944
↓ 3 callers
Function
writeToNull
(b *testing.B, fds *descriptorpb.FileDescriptorSet)
internal/benchmarks/benchmark_test.go:494
↓ 2 callers
Method
AddComment
AddComment adds info about a comment to this file. Comments must first be added as items via f.AddToken(). The given comment argument is the Token fro
ast/file_info.go:128
↓ 2 callers
Method
AddToken
AddToken adds info about a token at the given location to this file. It returns a value that allows access to all of the token's details.
ast/file_info.go:98
↓ 2 callers
Function
BinaryPath
BinaryPath returns the path to an appropriate protoc executable. This path is created by the Makefile, so run `make test` instead of `go test ./...` t
internal/protoc/protoc.go:36
↓ 2 callers
Method
ByDescriptor
(d protoreflect.Descriptor)
linker/descriptors.go:390
↓ 2 callers
Function
CanPack
CanPack returns true if a repeated field of the given kind can use packed encoding.
internal/util.go:224
↓ 2 callers
Function
Compile
Compile compiles the given files with protoc. The fileNames parameter indicates the order of files that should be used in the command line for protoc
internal/protoc/protoc.go:63
↓ 2 callers
Method
DefaultEnumValue
()
linker/descriptors.go:1480
↓ 2 callers
Function
DescriptorProtosEnterAndExit
DescriptorProtosEnterAndExit walks all descriptor protos in the given file using a depth-first traversal, calling the given functions on entry and on
walk/walk.go:238
↓ 2 callers
Function
DescriptorsEnterAndExit
DescriptorsEnterAndExit walks all descriptors in the given file using a depth-first traversal, calling the given functions on entry and on exit for ea
walk/walk.go:67
↓ 2 callers
Method
Edition
()
linker/descriptors.go:216
↓ 2 callers
Method
EnumNode
EnumNode returns the AST node corresponding to the given enum. This can return nil, such as if the given enum is not part of the FileDescriptorProto h
parser/parser.go:180
↓ 2 callers
Method
ExtensionRangeNode
ExtensionRangeNode returns the AST node corresponding to the given extension range. This can return nil, such as if the given range is not part of the
parser/parser.go:163
↓ 2 callers
Method
FieldDescriptorProto
()
protoutil/protos.go:156
↓ 2 callers
Method
FindExtensionByNumber
FindExtensionByNumber returns the extension descriptor for the given tag that extends the given message name. If no such extension is defined in this
linker/files.go:44
↓ 2 callers
Method
First
First returns the first element in the sequence. The bool return is false if this sequence contains no elements. For example, an empty file has no ite
ast/file_info.go:226
↓ 2 callers
Method
FullName
()
linker/descriptors.go:1091
↓ 2 callers
Method
GetGroupKeyword
()
ast/field.go:36
↓ 2 callers
Method
GetSyntax
()
ast/no_source.go:69
↓ 2 callers
Method
HasJSONName
()
linker/descriptors.go:1141
↓ 2 callers
Method
HasOptionalKeyword
()
linker/descriptors.go:1188
↓ 2 callers
Method
Import
Import populates the symbol table with all symbols/elements and extension tags present in the given file descriptor. If s is nil or if fd has already
linker/symbols.go:80
↓ 2 callers
Function
InterpretUnlinkedOptions
InterpretUnlinkedOptions does a best-effort attempt to interpret options in the given parsed result, returning an index that can be used to generate s
options/options.go:131
↓ 2 callers
Method
IsAnyTypeReference
IsAnyTypeReference reports if this is an Any type reference.
ast/options.go:309
↓ 2 callers
Method
IsPacked
()
linker/descriptors.go:1207
↓ 2 callers
Method
Items
()
ast/file.go:131
↓ 2 callers
Method
Last
Last returns the last element in the sequence. The bool return is false if this sequence contains no elements. For example, an empty file has no items
ast/file_info.go:235
↓ 2 callers
Function
Link
Link handles linking a parsed descriptor proto into a fully-linked descriptor. If the given parser.Result has imports, they must all be present in the
linker/linker.go:42
↓ 2 callers
Method
Methods
()
linker/descriptors.go:1725
↓ 2 callers
Method
Name
()
linker/descriptors.go:1087
↓ 2 callers
Function
NewCompactOptionNode
NewCompactOptionNode creates a new *OptionNode for a full compact declaration (as used in fields, enum values, and extension ranges). All arguments mu
ast/options.go:99
↓ 2 callers
Function
NewCompactOptionsNode
NewCompactOptionsNode creates a *CompactOptionsNode. All args must be non-nil. The commas arg must have a length that is one less than the length of o
ast/options.go:342
↓ 2 callers
Function
NewEnumValueNode
NewEnumValueNode creates a new *EnumValueNode. All arguments must be non-nil except opts which is only non-nil if the declaration included options. -
ast/enum.go:134
↓ 2 callers
Function
NewExtensionFieldReferenceNode
NewExtensionFieldReferenceNode creates a new *FieldReferenceNode for an extension field. All args must be non-nil. The openSym and closeSym runes shou
ast/options.go:249
↓ 2 callers
Function
NewExtensionRangeNode
NewExtensionRangeNode creates a new *ExtensionRangeNode. All args must be non-nil except opts, which may be nil. - keyword: The token corresponding to
ast/ranges.go:46
↓ 2 callers
Function
NewFieldReferenceNode
NewFieldReferenceNode creates a new *FieldReferenceNode for a regular field. The name arg must not be nil.
ast/options.go:233
↓ 2 callers
Function
NewFileInfo
NewFileInfo creates a new instance for the given file.
ast/file_info.go:64
↓ 2 callers
Function
NewFileNodeWithEdition
NewFileNodeWithEdition creates a new *FileNode. The edition parameter is required. If a file has no edition declaration, use NewFileNode instead. Thi
ast/file.go:62
↓ 2 callers
Function
NewMessageFieldNode
NewMessageFieldNode creates a new *MessageFieldNode. All args except sep must be non-nil.
ast/values.go:493
↓ 2 callers
Function
NewNegativeIntLiteralNode
NewNegativeIntLiteralNode creates a new *NegativeIntLiteralNode. Both arguments must be non-nil.
ast/values.go:202
↓ 2 callers
Function
NewOptionNode
NewOptionNode creates a new *OptionNode for a full option declaration (as used in files, messages, oneofs, enums, services, and methods). All argument
ast/options.go:61
↓ 2 callers
Function
NewRPCTypeNode
NewRPCTypeNode creates a new *RPCTypeNode. All arguments must be non-nil except stream, which may be nil. - openParen: The token corresponding to the
ast/service.go:282
↓ 2 callers
Function
NewReservedRangesNode
NewReservedRangesNode creates a new *ReservedNode that represents reserved numeric ranges. All args must be non-nil. - keyword: The token correspondin
ast/ranges.go:251
↓ 2 callers
Function
NewRuneNode
NewRuneNode creates a new *RuneNode with the given properties.
ast/node.go:104
↓ 2 callers
Function
NewSyntheticMapField
NewSyntheticMapField creates a new *SyntheticMapField for the given identifier (either a key or value type in a map declaration) and tag number (1 for
ast/field.go:739
↓ 2 callers
Method
OptionNamePartNode
OptionNamePartNode returns the AST node corresponding to the given name part for an uninterpreted option. This can return nil, such as if the given na
parser/parser.go:143
↓ 2 callers
Method
ParentFile
()
linker/resolve.go:803
↓ 2 callers
Function
ProtoFromDescriptor
ProtoFromDescriptor extracts a descriptor proto from the given "rich" descriptor. For descriptors generated by the compiler, this is an inexpensive an
protoutil/protos.go:82
↓ 2 callers
Function
ProtoFromMessageDescriptor
ProtoFromMessageDescriptor extracts a descriptor proto from the given "rich" descriptor. For message descriptors generated by the compiler, this is an
protoutil/protos.go:135
↓ 2 callers
Function
RemoveOption
(uo []*descriptorpb.UninterpretedOption, indexToRemove int)
internal/options.go:62
↓ 2 callers
Method
ReporterError
ReporterError returns the error returned by the handler's reporter. If the reporter has either not been invoked (no errors handled) or has not returne
reporter/reporter.go:214
↓ 2 callers
Function
ResolveFeature
ResolveFeature resolves a feature for the given descriptor. This simple helper examines the given element and its ancestors, searching for an override
internal/editions/editions.go:83
↓ 2 callers
Function
Scan
Scan scans the given reader, which should contain Protobuf source, and returns the set of imports declared in the file. The result also contains the v
parser/fastscan/fastscan.go:96
↓ 2 callers
Method
Services
()
linker/descriptors.go:269
↓ 2 callers
Method
StartValueAsInt32
(minVal, maxVal int32)
ast/ranges.go:192
↓ 2 callers
Function
StripSourceRetentionOptionsFromFile
StripSourceRetentionOptionsFromFile returns a file descriptor proto that omits any options in file that are defined to be retained only in source. If
options/source_retention_options.go:35
↓ 2 callers
Method
Syntax
()
linker/descriptors.go:1083
↓ 2 callers
Function
WithStandardImports
WithStandardImports returns a new resolver that can provide the source code for the standard imports that are included with protoc. This differs from
wellknownimports/wellknownimports.go:44
↓ 2 callers
Method
accessFile
(path string)
resolver.go:157
↓ 2 callers
Method
addExtensions
(ext *ast.ExtendNode, flds *[]*descriptorpb.FieldDescriptorProto, msgs *[]*descriptorpb.DescriptorProto, synta
parser/result.go:266
↓ 2 callers
Method
addMessageBody
(msgd *descriptorpb.DescriptorProto, body *ast.MessageBody, syntax protoreflect.Syntax, handler *reporter.Hand
parser/result.go:580
↓ 2 callers
Method
addPath
(p sourcePath)
options/source_retention_options.go:115
↓ 2 callers
Method
addReservedNames
(names *[]string, node *ast.ReservedNode, syntax protoreflect.Syntax, handler *reporter.Handler, alreadyReserv
parser/result.go:532
↓ 2 callers
Method
asEnumDescriptor
(en *ast.EnumNode, syntax protoreflect.Syntax, handler *reporter.Handler)
parser/result.go:489
↓ 2 callers
Function
asExtensionType
(ext protoreflect.ExtensionDescriptor)
internal/editions/editions.go:352
↓ 2 callers
Function
asLabel
(lbl *ast.FieldLabel)
parser/result.go:292
↓ 2 callers
Method
asMessageDescriptor
(node *ast.MessageNode, syntax protoreflect.Syntax, handler *reporter.Handler, depth int)
parser/result.go:522
↓ 2 callers
Method
attributeComments
(prevInfo, info ast.NodeInfo)
sourceinfo/source_code_info.go:786
↓ 2 callers
Function
benchmarkGoogleapisProtoc
(b *testing.B, extraArgs ...string)
internal/benchmarks/benchmark_test.go:436
↓ 2 callers
Function
benchmarkGoogleapisProtocompile
(b *testing.B, factory func() *protocompile.Compiler)
internal/benchmarks/benchmark_test.go:260
↓ 2 callers
Function
benchmarkGoogleapisProtoparse
(b *testing.B, factory func() *protoparse.Parser)
internal/benchmarks/benchmark_test.go:296
↓ 2 callers
Function
benchmarkProtocompile
(b *testing.B, c *protocompile.Compiler, sources []string)
internal/benchmarks/benchmark_test.go:266
↓ 2 callers
Function
buildDescriptor
(name string, data []byte)
internal/featuresext/featuresext.go:67
↓ 2 callers
Function
buildUninterpretedMapForEnum
(qual string, ed *descriptorpb.EnumDescriptorProto, opts map[string]interface{})
options/options_test.go:319
↓ 2 callers
Function
canonicalEnumValueName
(enumValueName, enumName string)
linker/validate.go:744
↓ 2 callers
Function
checkAttributesInFields
(t *testing.T, exp, actual protoreflect.ExtensionDescriptors, where string)
linker/descriptors_ext_test.go:142
↓ 2 callers
Method
commitFileLocked
(f protoreflect.FileDescriptor)
linker/symbols.go:403
↓ 2 callers
Method
compile
(ctx context.Context, file string)
compiler.go:261
↓ 2 callers
Method
compileLocked
(ctx context.Context, file string, explicitFile bool)
compiler.go:268
↓ 2 callers
Method
countElementsInEnums
(enums []*descriptorpb.EnumDescriptorProto)
linker/pool.go:126
↓ 2 callers
Method
createEnums
(prefix string, parent protoreflect.Descriptor, enumProtos []*descriptorpb.EnumDescriptorProto, pool *allocPoo
linker/descriptors.go:654
↓ 2 callers
Method
createExtensions
(prefix string, parent protoreflect.Descriptor, extProtos []*descriptorpb.FieldDescriptorProto, pool *allocPoo
linker/descriptors.go:919
↓ 2 callers
Function
createFieldRanges
(rangeProtos []T)
linker/descriptors.go:621
↓ 2 callers
Method
createMessages
(prefix string, parent protoreflect.Descriptor, msgProtos []*descriptorpb.DescriptorProto, pool *allocPool)
linker/descriptors.go:406
↓ 2 callers
Method
enumFieldValue
enumFieldValue resolves the given AST node val as an enum value descriptor. If the given value is not a valid identifier (or number if allowed), an er
options/options.go:1672
↓ 2 callers
Method
enumFieldValueFromProto
enumFieldValueFromProto resolves the given uninterpreted option value as an enum value descriptor. If the given value is not a valid identifier, an er
options/options.go:1720
↓ 2 callers
Method
fieldValue
fieldValue computes a compile-time value (constant or list or message literal) for the given AST node val. The value in val must be assignable to the
options/options.go:1622
↓ 2 callers
Function
findImportSpan
(res parser.Result, dep string)
compiler.go:570
↓ 2 callers
Function
findOption
(res hasOptionNode, handler errorHandler, scope string, opts []*descriptorpb.UninterpretedOption, name string,
internal/options.go:38
↓ 2 callers
Function
findOptionSpan
( file ast.FileDeclNode, root ast.NodeWithOptions, md protoreflect.MessageDescriptor, path ...int32, )
linker/validate.go:931
↓ 2 callers
Function
findReservedNameNode
(parent ast.Node, decls []T, name string)
parser/validate.go:298
← previous
next →
301–400 of 1,436, ranked by callers