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
↓ 186 callers
Method
String
()
ast/file_info.go:593
↓ 149 callers
Method
GetName
()
ast/service.go:105
↓ 126 callers
Method
NodeInfo
(n Node)
ast/file.go:24
↓ 117 callers
Method
HandleErrorf
HandleErrorf handles an error with the given source position, creating the error using the given message format and arguments. If the handler has alr
reporter/reporter.go:165
↓ 116 callers
Method
Enum
()
linker/descriptors.go:1505
↓ 108 callers
Method
FullName
()
linker/descriptors.go:233
↓ 100 callers
Method
Name
()
ast/file.go:23
↓ 88 callers
Method
nodeInfo
(n ast.Node)
options/options.go:277
↓ 85 callers
Method
Len
()
sourceinfo/source_code_info.go:743
↓ 66 callers
Method
Get
(i int)
linker/descriptors.go:576
↓ 61 callers
Method
Message
()
linker/descriptors.go:1509
↓ 59 callers
Function
Errorf
Errorf creates a new ErrorWithPos whose underlying error is created using the given message format and arguments (via fmt.Errorf).
reporter/errors.go:52
↓ 58 callers
Method
ToKeyword
ToKeyword is used to convert identifiers to keywords. Since keywords are not reserved in the protobuf language, they are initially lexed as identifier
ast/identifiers.go:64
↓ 48 callers
Method
Number
()
linker/descriptors.go:1103
↓ 46 callers
Method
newLoc
(n ast.Node, path []int32)
sourceinfo/source_code_info.go:667
↓ 45 callers
Method
Compile
Compile compiles the given file names into fully-linked descriptors. The compiler's resolver is used to locate source code (or intermediate artifacts
compiler.go:134
↓ 44 callers
Method
FileDescriptorProto
FileDescriptorProto returns the file descriptor proto.
parser/parser.go:124
↓ 44 callers
Method
Start
()
ast/node.go:23
↓ 44 callers
Function
newNodeWithRunes
(node T, trailingRunes ...*ast.RuneNode)
parser/ast.go:130
↓ 39 callers
Method
visitInterface
(node Node)
ast/walk.go:600
↓ 38 callers
Method
Error
(s string)
parser/proto.y.go:951
↓ 38 callers
Method
Kind
()
linker/descriptors.go:1128
↓ 37 callers
Method
handleErrorf
(span ast.SourceSpan, msg string, args ...interface{})
options/options.go:160
↓ 36 callers
Method
GetNumber
()
ast/enum.go:107
↓ 36 callers
Function
NewHandler
NewHandler creates a new Handler that reports errors and warnings using the given reporter.
reporter/reporter.go:95
↓ 34 callers
Method
Path
()
linker/descriptors.go:245
↓ 34 callers
Function
WithStandardImports
WithStandardImports returns a new resolver that knows about the same standard imports that are included with protoc. Note that this uses the descript
resolver.go:204
↓ 33 callers
Method
ByName
(s protoreflect.Name)
linker/descriptors.go:422
↓ 33 callers
Method
Fields
()
linker/descriptors.go:521
↓ 32 callers
Method
WriteString
(s string)
ast/ast_roundtrip_test.go:117
↓ 29 callers
Method
FindDescriptorByName
FindDescriptorByName returns the given named element that is defined in this file. If no such element exists, nil is returned.
linker/files.go:37
↓ 28 callers
Method
Index
(int)
sourceinfo/source_code_info.go:744
↓ 28 callers
Function
Visit
Visit implements the double-dispatch idiom and visits the given node by calling the appropriate method of the given visitor.
ast/walk.go:100
↓ 27 callers
Method
FileNode
()
parser/result.go:849
↓ 26 callers
Method
AsIdentifier
()
ast/identifiers.go:30
↓ 26 callers
Method
End
()
ast/node.go:24
↓ 26 callers
Method
GetOptions
()
options/target_types.go:31
↓ 25 callers
Method
FullName
()
linker/resolve.go:823
↓ 23 callers
Method
Value
Value returns a Go representation of the value. For scalars, this will be a string, int64, uint64, float64, or bool. This could also be an Identifier
ast/values.go:43
↓ 23 callers
Method
push
(element int32)
options/source_retention_options.go:103
↓ 23 callers
Method
requireSemicolon
(semicolons []*ast.RuneNode)
parser/lexer.go:765
↓ 23 callers
Function
toElements
(convert func(*ast.RuneNode) T, node T, runes []*ast.RuneNode)
parser/ast.go:137
↓ 22 callers
Method
FindFileByPath
FindFileByPath searches for information for the given file path. If no result is available, it should return a non-nil error, such as protoregistry.No
resolver.go:43
↓ 22 callers
Method
IsMap
()
linker/descriptors.go:1227
↓ 22 callers
Method
ParentFile
()
linker/descriptors.go:191
↓ 21 callers
Method
ContainingMessage
()
linker/descriptors.go:1498
↓ 21 callers
Method
IsExtension
()
linker/descriptors.go:1184
↓ 21 callers
Function
Parse
Parse parses the given source code info and returns an AST. The given filename is used to construct error messages and position information. The given
parser/parser.go:94
↓ 20 callers
Function
UnknownSpan
UnknownSpan is a placeholder span when only the source file name is known.
ast/no_source.go:25
↓ 20 callers
Method
insert
(start uintptr, length uint64)
internal/benchmarks/measure.go:36
↓ 19 callers
Method
FieldNode
(f *descriptorpb.FieldDescriptorProto)
parser/result.go:877
↓ 19 callers
Method
GetUninterpretedOption
()
parser/clone.go:168
↓ 18 callers
Method
Options
()
linker/descriptors.go:241
↓ 17 callers
Method
RawText
()
ast/file_info.go:404
↓ 17 callers
Method
findOptionSpan
( d protoutil.DescriptorProtoWrapper, path ...int32, )
linker/validate.go:918
↓ 16 callers
Function
NewFieldNode
NewFieldNode creates a new *FieldNode. The label and options arguments may be nil but the others must be non-nil. - label: The token corresponding to
ast/field.go:80
↓ 16 callers
Function
ResultFromAST
ResultFromAST constructs a descriptor proto from the given AST. The returned result includes the descriptor proto and also contains an index that can
parser/result.go:63
↓ 16 callers
Method
readRune
()
parser/lexer.go:42
↓ 16 callers
Method
readRune
()
parser/fastscan/lexer.go:85
↓ 16 callers
Function
stripOptionsFromAll
stripOptionsFromAll applies the given function to each element in the given slice in order to remove source-retention options from it. It returns the
options/source_retention_options.go:515
↓ 16 callers
Method
toIdentValueNode
(leadingDot *ast.RuneNode)
parser/ast.go:63
↓ 15 callers
Method
GetUninterpretedOption
()
options/target_types.go:26
↓ 15 callers
Method
Imports
()
linker/descriptors.go:253
↓ 15 callers
Method
IsValid
IsValid returns true if this comment is valid. If this comment is a zero-value struct, it is not valid.
ast/file_info.go:668
↓ 15 callers
Function
findExtensionRangeOptionSpan
( file protoreflect.FileDescriptor, extended protoreflect.MessageDescriptor, extRangeIndex int, extRange *
linker/validate.go:835
↓ 14 callers
Method
Cardinality
()
linker/descriptors.go:1107
↓ 14 callers
Method
FileDescriptorProto
()
parser/result.go:82
↓ 14 callers
Method
IsList
()
linker/descriptors.go:1220
↓ 14 callers
Function
ResolveFeature
ResolveFeature resolves a feature for the given descriptor. If the given element is in a proto2 or proto3 syntax file, this skips resolution and just
protoutil/editions.go:92
↓ 13 callers
Method
Extensions
()
walk/walk.go:101
↓ 13 callers
Method
GetOptions
()
ast/field.go:37
↓ 13 callers
Method
GetValue
()
ast/options.go:25
↓ 13 callers
Function
SourceAccessorFromMap
SourceAccessorFromMap returns a function that can be used as the Accessor field of a SourceResolver that uses the given map to load source. The map ke
resolver.go:171
↓ 13 callers
Method
newLocWithComments
(n ast.Node, path []int32)
sourceinfo/source_code_info.go:701
↓ 13 callers
Method
unreadRune
(sz int)
parser/lexer.go:63
↓ 13 callers
Function
valueKind
(val interface{})
options/options.go:1570
↓ 12 callers
Method
AsString
()
ast/values.go:64
↓ 12 callers
Method
FieldType
()
ast/field.go:33
↓ 12 callers
Method
FileNode
FileNode returns the root of the AST. If this result has no AST then a placeholder node is returned.
parser/parser.go:128
↓ 12 callers
Method
GetOptions
()
parser/clone.go:173
↓ 12 callers
Method
IsExtension
IsExtension reports if this is an extension name or not (e.g. enclosed in punctuation, such as parentheses or brackets).
ast/options.go:304
↓ 12 callers
Method
LeadingComments
LeadingComments returns all comments in the source that exist between the element and the previous element, except for any trailing comment on the pre
ast/file_info.go:483
↓ 12 callers
Function
NewReporter
NewReporter creates a new reporter that invokes the given functions on error or warning.
reporter/reporter.go:59
↓ 12 callers
Method
Next
Next returns the next element in the sequence that comes after the given element. The bool returns is false if there is no next item (i.e. the given e
ast/file_info.go:231
↓ 12 callers
Method
Path
Path returns a slice of nodes that represents the path from the root of the walk operaiton to the currently visited node. The first element in the pat
ast/walk.go:213
↓ 12 callers
Function
ProtoFromFileDescriptor
ProtoFromFileDescriptor extracts a descriptor proto from the given "rich" descriptor. For file descriptors generated by the compiler, this is an inexp
protoutil/protos.go:113
↓ 12 callers
Method
Range
(f func(ast.ValueNode, ast.ValueNode) bool)
options/options.go:1063
↓ 12 callers
Function
ResolveCustomFeature
ResolveCustomFeature resolves a custom feature for the given extension and field descriptor. The given extension must be an extension of google.proto
protoutil/editions.go:112
↓ 12 callers
Function
stripSourceRetentionOptions
( options M, path sourcePath, removedPaths *sourcePathTrie, )
options/source_retention_options.go:151
↓ 12 callers
Function
verifyMap
(t *testing.T, tree *treemap.TreeMap[uintptr, uint64], ranges ...uintptr)
internal/benchmarks/measure_test.go:116
↓ 11 callers
Method
AST
AST returns the parsed abstract syntax tree. This returns nil if the Result was created without an AST.
parser/parser.go:122
↓ 11 callers
Method
Clone
()
parser/clone_test.go:195
↓ 11 callers
Method
GetEnd
()
linker/descriptors.go:618
↓ 11 callers
Method
GetStart
()
linker/descriptors.go:617
↓ 11 callers
Method
OptionNode
OptionNode returns the AST node corresponding to the given uninterpreted option. This can return nil, such as if the given option is not part of the F
parser/parser.go:138
↓ 11 callers
Method
Syntax
()
linker/descriptors.go:203
↓ 11 callers
Method
adjustPos
(c rune)
parser/fastscan/lexer.go:129
↓ 11 callers
Function
buildUninterpretedMap
(prefix string, uos []*descriptorpb.UninterpretedOption, opts map[string]interface{})
options/options_test.go:327
↓ 11 callers
Function
optionValueKind
(opt *descriptorpb.UninterpretedOption)
options/options.go:1596
↓ 11 callers
Function
parseFileForTest
(filename string)
parser/parser_test.go:860
next →
1–100 of 1,436, ranked by callers