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
↓ 5 callers
Method
resolve
(name string, onlyTypes bool, scopes []scope, checkedCache []string)
linker/resolve.go:629
↓ 5 callers
Method
setPrevAndAddComments
(n ast.TerminalNode)
parser/lexer.go:369
↓ 5 callers
Method
setRune
(lval *protoSymType, val rune)
parser/lexer.go:436
↓ 4 callers
Method
AddExtension
AddExtension records the given extension, which is used to ensure that no two files attempt to extend the same message using the same tag. The given p
linker/symbols.go:545
↓ 4 callers
Method
AsItem
AsItem returns the Item that corresponds to c.
ast/file_info.go:673
↓ 4 callers
Method
Children
Children contains all AST nodes that are immediate children of this one.
ast/node.go:49
↓ 4 callers
Function
ComputePath
ComputePath computes the source location path for the given descriptor. The boolean value indicates whether the result is valid. If the path cannot be
internal/util.go:140
↓ 4 callers
Method
Enums
()
walk/walk.go:100
↓ 4 callers
Method
FieldNode
FieldNode returns the AST node corresponding to the given field. This can return nil, such as if the given field is not part of the FileDescriptorProt
parser/parser.go:153
↓ 4 callers
Method
FindImportByPath
FindImportByPath returns the File corresponding to the given import path. If this file does not import the given path, nil is returned.
linker/files.go:40
↓ 4 callers
Method
HasPresence
()
linker/descriptors.go:1171
↓ 4 callers
Method
Messages
()
walk/walk.go:99
↓ 4 callers
Function
NewMapFieldNode
NewMapFieldNode creates a new *MapFieldNode. All arguments must be non-nil except opts, which may be nil. - mapType: The token corresponding to the ma
ast/field.go:610
↓ 4 callers
Function
NewOptionNameNode
NewOptionNameNode creates a new *OptionNameNode. The dots arg must have a length that is one less than the length of parts. The parts arg must not be
ast/options.go:158
↓ 4 callers
Method
OptionNode
(o *descriptorpb.UninterpretedOption)
parser/result.go:856
↓ 4 callers
Method
Previous
Previous returns the previous element in the sequence that comes before the given element. The bool returns is false if there is no previous item (i.e
ast/file_info.go:240
↓ 4 callers
Function
ResultWithoutAST
ResultWithoutAST returns a parse result that has no AST. All methods for looking up AST nodes return a placeholder node that contains only the filenam
parser/result.go:46
↓ 4 callers
Method
String
()
internal/message_context.go:56
↓ 4 callers
Method
TextName
()
linker/descriptors.go:1152
↓ 4 callers
Method
Token
()
ast/node.go:33
↓ 4 callers
Function
UnknownPos
UnknownPos is a placeholder position when only the source file name is known.
ast/no_source.go:19
↓ 4 callers
Function
asExtsNode
NB: If we ever add other put*Node methods, to index other kinds of elements in the descriptor proto hierarchy, we need to update the index recreation
parser/result.go:1003
↓ 4 callers
Function
clearKnownExtensionsFromFile
(t *testing.T, file *descriptorpb.FileDescriptorProto)
protoutil/editions_test.go:609
↓ 4 callers
Function
cloneInto
(dest proto.Message, src proto.Message, res linker.Resolver)
options/options.go:774
↓ 4 callers
Method
describe
()
parser/fastscan/lexer.go:64
↓ 4 callers
Method
enableLenience
(enable bool)
options/options.go:1461
↓ 4 callers
Method
fail
(err error)
compiler.go:225
↓ 4 callers
Function
findExtension
(d hasExtensionsAndMessages, message protoreflect.FullName, field protoreflect.FieldNumber)
linker/files.go:342
↓ 4 callers
Function
hasEnum
(fd *descriptorpb.FileDescriptorProto, name string)
parser/parser_test.go:894
↓ 4 callers
Function
infoEqual
(t *testing.T, exp, act ast.ItemInfo)
ast/items_test.go:113
↓ 4 callers
Function
isEditions
(r *result)
linker/validate.go:1151
↓ 4 callers
Function
newFieldDescriptor
(name string, fieldType string, tag *int32, lbl *descriptorpb.FieldDescriptorProto_Label)
parser/result.go:343
↓ 4 callers
Function
newTestLexer
(t *testing.T, in io.Reader, h *reporter.Handler)
parser/lexer_test.go:507
↓ 4 callers
Function
numError
(err error, kind, s string)
parser/lexer.go:472
↓ 4 callers
Function
resolveDescriptor
(res linker.Resolver, name string)
options/options.go:229
↓ 3 callers
Function
AsInt32
AsInt32 range checks the given int value and returns its value is in the range or 0, false if it is outside the range.
ast/values.go:144
↓ 3 callers
Method
AsInt64
()
ast/values.go:138
↓ 3 callers
Method
AsResolver
AsResolver returns a Resolver that uses f as the source of descriptors. If a given query cannot be answered with the files in f, the query will fail w
linker/files.go:173
↓ 3 callers
Function
DescriptorProtos
DescriptorProtos walks all descriptor protos in the given file using a depth-first traversal, calling the given function for each descriptor proto in
walk/walk.go:223
↓ 3 callers
Method
EnumValueNode
EnumValueNode returns the AST node corresponding to the given enum. This can return nil, such as if the given enum value is not part of the FileDescri
parser/parser.go:185
↓ 3 callers
Method
EnumValueNode
(e *descriptorpb.EnumValueDescriptorProto)
parser/result.go:919
↓ 3 callers
Method
ExtensionRanges
()
linker/descriptors.go:547
↓ 3 callers
Function
GetEdition
GetEdition returns the edition for a given element. It returns EDITION_PROTO2 or EDITION_PROTO3 if the element is in a file that uses proto2 or proto3
internal/editions/editions.go:146
↓ 3 callers
Function
GetFeatureDefault
GetFeatureDefault computes the default value for a feature. The given container is the message type that contains the field. This should usually be th
internal/editions/editions.go:213
↓ 3 callers
Method
GetFeatures
()
options/target_types.go:25
↓ 3 callers
Method
HandleErrorWithPos
HandleErrorWithPos handles an error with the given source position. If the handler has already aborted (by returning a non-nil error from a prior cal
reporter/reporter.go:155
↓ 3 callers
Method
HandleWarning
HandleWarning handles the given warning. This will delegate to the handler's configured reporter.
reporter/reporter.go:171
↓ 3 callers
Method
HandleWarningWithPos
HandleWarningWithPos handles a warning with the given source position. This will delegate to the handler's configured reporter.
reporter/reporter.go:187
↓ 3 callers
Method
HasDefault
()
linker/descriptors.go:1263
↓ 3 callers
Function
InitCap
InitCap returns the given field name, but with the first letter capitalized.
internal/util.go:48
↓ 3 callers
Method
IsMapEntry
()
linker/descriptors.go:517
↓ 3 callers
Method
JSONName
()
linker/descriptors.go:1145
↓ 3 callers
Method
Less
(i, j int)
parser/validate.go:534
↓ 3 callers
Method
MapKey
()
linker/descriptors.go:1249
↓ 3 callers
Method
MessageName
()
ast/message.go:29
↓ 3 callers
Function
NewFileRecursive
NewFileRecursive recursively converts a protoreflect.FileDescriptor to a File. If f has any dependencies/imports, they are converted, too, including a
linker/files.go:89
↓ 3 callers
Function
NewImportNode
NewImportNode creates a new *ImportNode. The public and weak arguments are optional and only one or the other (or neither) may be specified, not both.
ast/file.go:281
↓ 3 callers
Function
NewSpecialFloatLiteralNode
NewSpecialFloatLiteralNode returns a new *SpecialFloatLiteralNode for the given keyword. The given keyword should be "inf", "infinity", or "nan" in an
ast/values.go:280
↓ 3 callers
Method
Parent
()
linker/resolve.go:807
↓ 3 callers
Method
Parent
()
linker/descriptors.go:195
↓ 3 callers
Function
ProtoFromFieldDescriptor
ProtoFromFieldDescriptor extracts a descriptor proto from the given "rich" descriptor. For field descriptors generated by the compiler, this is an ine
protoutil/protos.go:154
↓ 3 callers
Method
RangeOptions
(func(*OptionNode) bool)
ast/options.go:401
↓ 3 callers
Method
Tokens
()
ast/file.go:135
↓ 3 callers
Method
Unwrap
Unwrap returns the underlying error.
reporter/errors.go:37
↓ 3 callers
Function
Walk
Walk conducts a walk of the AST rooted at the given root using the given visitor. It performs a "pre-order traversal", visiting a given AST node befor
ast/walk.go:25
↓ 3 callers
Method
addSourceError
(err error)
parser/lexer.go:742
↓ 3 callers
Method
asFieldDescriptor
(node *ast.FieldNode, maxTag int32, syntax protoreflect.Syntax, handler *reporter.Handler)
parser/result.go:306
↓ 3 callers
Method
asGroupDescriptors
(group *ast.GroupNode, syntax protoreflect.Syntax, maxTag int32, handler *reporter.Handler, depth int)
parser/result.go:362
↓ 3 callers
Function
asSpan
(file string, srcLoc protoreflect.SourceLocation)
linker/validate.go:1118
↓ 3 callers
Function
checkClone
(t *testing.T, orig, clone Result, isProtoClone bool)
parser/clone_test.go:72
↓ 3 callers
Method
checkDepth
(depth int, node ast.MessageDeclNode, handler *reporter.Handler)
parser/result.go:567
↓ 3 callers
Method
checkFieldUsage
checkFieldUsage verifies that the given option field can be used for the given target type. It reports an error if not and returns a non-nil error if
options/options.go:730
↓ 3 callers
Method
checkTag
(n ast.Node, v uint64, maxTag int32)
parser/result.go:765
↓ 3 callers
Function
combineAll
(slices ...[]T)
options/source_retention_options_test.go:682
↓ 3 callers
Method
combineComments
(comments comments)
sourceinfo/source_code_info.go:910
↓ 3 callers
Function
combinePathsForOption
(prefix, optionPath []int32)
sourceinfo/source_code_info.go:240
↓ 3 callers
Method
commentUsed
(c comments)
sourceinfo/source_code_info.go:873
↓ 3 callers
Function
computeSupportedEditions
(minEdition, maxEdition descriptorpb.Edition)
internal/editions/editions.go:359
↓ 3 callers
Function
descriptorType
(m proto.Message)
options/options.go:2009
↓ 3 callers
Function
editionString
(t descriptorpb.Edition)
options/options.go:770
↓ 3 callers
Function
fillInMissingLabel
(fld *descriptorpb.FieldDescriptorProto)
parser/validate.go:564
↓ 3 callers
Function
findOptionNode
( path []int32, nodes interface { Range(func(N, ast.ValueNode) bool) }, srcInfoAccessor func(N) *sourcei
options/options.go:1017
↓ 3 callers
Function
generateSourceCodeInfoForMessage
(opts OptionIndex, sci *sourceCodeInfo, n ast.MessageDeclNode, fieldPath []int32, path []int32)
sourceinfo/source_code_info.go:309
↓ 3 callers
Method
getLeadingComments
(n ast.Node)
sourceinfo/source_code_info.go:763
↓ 3 callers
Method
getMark
()
parser/lexer.go:75
↓ 3 callers
Method
getRangeBounds
(rng *ast.RangeNode, minVal, maxVal int32, handler *reporter.Handler)
parser/result.go:722
↓ 3 callers
Method
getTrailingComments
(n ast.Node)
sourceinfo/source_code_info.go:774
↓ 3 callers
Function
hasExtension
(fd *descriptorpb.FileDescriptorProto, name string)
parser/parser_test.go:876
↓ 3 callers
Method
interpretFieldOptions
(fqn string, fld *descriptorpb.FieldDescriptorProto, customOpts bool)
options/options.go:364
↓ 3 callers
Function
interpretOptions
(lenient bool, file file, res linker.Resolver, handler *reporter.Handler, interpOpts []InterpreterOption)
options/options.go:135
↓ 3 callers
Method
isComment
isComment is comment returns true if i refers to a comment. (If it returns false, i refers to a token.)
ast/file_info.go:336
↓ 3 callers
Method
itemBackward
(i Item, allowComment bool)
ast/file_info.go:324
↓ 3 callers
Method
itemForward
(i Item, allowComment bool)
ast/file_info.go:313
↓ 3 callers
Function
makeSpan
(start, end ast.SourcePos)
sourceinfo/source_code_info.go:866
↓ 3 callers
Method
newLocWithGivenComments
(nodeInfo ast.NodeInfo, detachedComments []comments, leadingComments comments, trailingComments comments, path
sourceinfo/source_code_info.go:708
↓ 3 callers
Function
newMeasuringTape
()
internal/benchmarks/measure.go:30
↓ 3 callers
Method
offset
()
parser/lexer.go:59
↓ 3 callers
Function
packageFor
(dsc protoreflect.Descriptor)
linker/resolve.go:454
↓ 3 callers
Function
parseFloat
(token string)
parser/lexer.go:342
↓ 3 callers
Function
pathKey
(p protoreflect.SourcePath)
linker/pathkey_unsafe.go:32
← previous
next →
201–300 of 1,436, ranked by callers