Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bufbuild/protocompile
/ types & classes
Types & classes
233 in github.com/bufbuild/protocompile
⨍
Functions
1,436
◇
Types & classes
233
↓ 19 callers
FuncType
ResolverFunc
ResolverFunc is a simple function type that implements Resolver.
resolver.go:79
↓ 16 callers
TypeAlias
tokenType
This file contains a streaming lexer. The lexer in the parser package loads the entire file into memory. But this lexer is much more memory efficient
parser/fastscan/lexer.go:41
↓ 10 callers
TypeAlias
Token
Token represents a single lexed token.
ast/file_info.go:380
↓ 7 callers
TypeAlias
Item
Item represents an item lexed from source. It represents either a Token or a Comment.
ast/file_info.go:397
↓ 6 callers
TypeAlias
ident
options/options_test.go:45
↓ 4 callers
Interface
Node
Node is the interface implemented by all nodes in the AST. It provides information about the span of this AST node in terms of location in the source
ast/node.go:22
↓ 4 callers
TypeAlias
SourceInfoMode
SourceInfoMode indicates how source code info is generated by a Compiler.
compiler.go:105
↓ 3 callers
TypeAlias
aggregate
options/options_test.go:46
↓ 2 callers
TypeAlias
Identifier
Identifier is a possibly-qualified name. This is used to distinguish ValueNode values that are references/identifiers vs. those that are string litera
ast/identifiers.go:25
↓ 2 callers
Interface
Resolver
Resolver is used by the compiler to resolve a proto source file name into some unit that is usable by the compiler. The result could be source for a p
resolver.go:39
↓ 1 callers
TypeAlias
CompositeResolver
CompositeResolver is a slice of resolvers, which are consulted in order until one can supply a result. If none of the constituent resolvers can supply
resolver.go:92
↓ 1 callers
Interface
EnumValueDeclNode
EnumValueDeclNode is a placeholder interface for AST nodes that represent enum values. This allows NoSourceNode to be used in place of *EnumValueNode
ast/enum.go:104
↓ 1 callers
Interface
FieldDeclNode
FieldDeclNode is a node in the AST that defines a field. This includes normal message fields as well as extensions. There are multiple types of AST no
ast/field.go:29
↓ 1 callers
Interface
FileDeclNode
FileDeclNode is a placeholder interface for AST nodes that represent files. This allows NoSourceNode to be used in place of *FileNode for some usages.
ast/file.go:21
↓ 1 callers
Interface
MessageDeclNode
MessageDeclNode is a node in the AST that defines a message type. This includes normal message fields as well as implicit messages: - *MessageNode - *
ast/message.go:27
↓ 1 callers
Interface
OneofDeclNode
OneofDeclNode is a node in the AST that defines a oneof. There are multiple types of AST nodes that declare oneofs: - *OneofNode - *SyntheticOneof Th
ast/field.go:390
↓ 1 callers
Interface
RPCDeclNode
RPCDeclNode is a placeholder interface for AST nodes that represent RPC declarations. This allows NoSourceNode to be used in place of *RPCNode for som
ast/service.go:103
↓ 1 callers
TypeAlias
SyntaxError
SyntaxError is returned from Scan when one or more syntax errors are observed. Scan does not fully parse the source, so there are many kinds of syntax
parser/fastscan/fastscan.go:54
↓ 1 callers
Interface
comments
sourceinfo/source_code_info.go:742
↓ 1 callers
TypeAlias
errUnusedImport
linker/linker.go:145
↓ 1 callers
TypeAlias
fieldRanger
options/options.go:1071
↓ 1 callers
TypeAlias
filesResolver
linker/files.go:272
↓ 1 callers
TypeAlias
terminalNode
terminalNode contains bookkeeping shared by all TerminalNode implementations. It is embedded in all such node types in this package. It provides the i
ast/node.go:56
↓ 1 callers
TypeAlias
valueRanger
options/options.go:1061
Struct
AncestorTracker
AncestorTracker is used to track the path of nodes during a walk operation. By passing AsWalkOptions to a call to Walk, a visitor can inspect the path
ast/walk.go:188
Struct
ArrayLiteralNode
ArrayLiteralNode represents an array literal, which is only allowed inside of a MessageLiteralNode, to indicate values for a repeated field. Example:
ast/values.go:346
Struct
ArrayLiteralSourceInfo
ArrayLiteralSourceInfo represents source info paths for the child elements of an [*ast.ArrayLiteralNode]. This value is only useful for non-empty arra
sourceinfo/source_code_info.go:76
Struct
Comment
Comment represents a single comment in a source file. It indicates the position of the comment and its contents. A single comment means one line-style
ast/file_info.go:659
Struct
Comments
Comments represents a range of sequential comments in a source file (e.g. no interleaving items or AST nodes).
ast/file_info.go:628
Struct
CompactOptionsNode
CompactOptionsNode represents a compact options declaration, as used with fields, enum values, and extension ranges. Example: [deprecated = true, js
ast/options.go:327
Struct
Compiler
Compiler handles compilation tasks, to turn protobuf source files, or other intermediate representations, into fully linked descriptors. The compilat
compiler.go:53
Interface
CompositeNode
CompositeNode represents any non-terminal node in the tree. These are interior or root nodes and have child nodes.
ast/node.go:46
Struct
CompoundIdentNode
CompoundIdentNode represents a qualified identifier. A qualified identifier has at least one dot and possibly multiple identifier names (all separated
ast/identifiers.go:74
Struct
CompoundStringLiteralNode
CompoundStringLiteralNode represents a compound string literal, which is the concatenaton of adjacent string literals. Example: "this " "is" " al
ast/values.go:99
Interface
DescriptorProtoWrapper
DescriptorProtoWrapper is a protoreflect.Descriptor that wraps an underlying descriptor proto. It provides the same interface as Descriptor but with o
protoutil/protos.go:60
Struct
EditionNode
EditionNode represents an edition declaration, which if present must be the first non-comment content. Example: edition = "2023"; Files may include
ast/file.go:218
Struct
EmptyDeclNode
EmptyDeclNode represents an empty declaration in protobuf source. These amount to extra semicolons, with no actual content preceding the semicolon.
ast/node.go:114
Interface
EnumElement
EnumElement is an interface implemented by all AST nodes that can appear in the body of an enum declaration.
ast/enum.go:91
Struct
EnumNode
EnumNode represents an enum declaration. Example: enum Foo { BAR = 0; BAZ = 1 }
ast/enum.go:22
Struct
EnumValueNode
EnumValueNode represents an enum declaration. Example: UNSET = 0 [deprecated = true];
ast/enum.go:116
FuncType
ErrorReporter
ErrorReporter is responsible for reporting the given error. If the reporter returns a non-nil error, parsing/linking will abort with that error. If th
reporter/reporter.go:30
Interface
ErrorUnusedImport
ErrorUnusedImport may be passed to a warning reporter when an unused import is detected. The error the reporter receives will be wrapped with source p
linker/linker.go:140
Interface
ErrorWithPos
ErrorWithPos is an error about a proto source file that adds information about the location in the file that caused the error.
reporter/errors.go:31
Interface
ExtendElement
ExtendElement is an interface implemented by all AST nodes that can appear in the body of an extends declaration.
ast/message.go:216
Struct
ExtendNode
ExtendNode represents a declaration of extension fields. Example: extend google.protobuf.FieldOptions { bool redacted = 33333; }
ast/message.go:152
Struct
ExtensionRangeNode
ExtensionRangeNode represents an extension range declaration in an extendable message. Example: extensions 100 to max;
ast/ranges.go:23
Struct
FieldLabel
FieldLabel represents the label of a field, which indicates its cardinality (i.e. whether it is optional, required, or repeated).
ast/field.go:185
Struct
FieldNode
FieldNode represents a normal field declaration (not groups or maps). It can represent extension fields as well as non-extension fields (both inside o
ast/field.go:51
Struct
FieldReferenceNode
FieldReferenceNode is a reference to a field name. It can indicate a regular field (simple unqualified name), an extension field (possibly-qualified n
ast/options.go:218
Interface
File
File is like a super-powered protoreflect.FileDescriptor. It includes helpful methods for looking up elements in the descriptor and can be used to cre
linker/files.go:33
Interface
FileElement
FileElement is an interface implemented by all AST nodes that are allowed as top-level declarations in the file.
ast/file.go:151
Struct
FileInfo
FileInfo contains information about the contents of a source file, including details about comments and items. A lexer accumulates these details as it
ast/file_info.go:27
Struct
FileNode
FileNode is the root of the AST hierarchy. It represents an entire protobuf source file.
ast/file.go:32
TypeAlias
Files
Files represents a set of protobuf files. It is a slice of File values, but also provides a method for easily looking up files by path and name.
linker/files.go:154
Struct
FloatLiteralNode
FloatLiteralNode represents a floating point numeric literal.
ast/values.go:248
Interface
FloatValueNode
FloatValueNode is an AST node that represents a numeric literal with a floating point, in scientific notation, or too large to fit in an int64 or uint
ast/values.go:238
Interface
GenerateOption
GenerateOption represents an option for how source code info is generated.
sourceinfo/source_code_info.go:107
Struct
GroupNode
GroupNode represents a group declaration, which doubles as a field and inline message declaration. It can represent extension fields as well as non-ex
ast/field.go:219
Struct
Handler
Handler is used by protocompile operations for handling errors and warnings. This type is thread-safe. It uses a mutex to serialize calls to its repor
reporter/reporter.go:85
Interface
HasEdition
HasEdition should be implemented by values that implement [protoreflect.FileDescriptor], to provide access to the file's edition when its syntax is [p
internal/editions/editions.go:133
Interface
HasFeatures
HasFeatures is implemented by all options messages and provides a nil-receiver-safe way of accessing the features explicitly configured in those optio
internal/editions/editions.go:66
Struct
IdentNode
IdentNode represents a simple, unqualified identifier. These are used to name elements declared in a protobuf file or to refer to elements. Example:
ast/identifiers.go:40
Interface
IdentValueNode
IdentValueNode is an AST node that represents an identifier.
ast/identifiers.go:28
Struct
Import
Import represents an import in a Protobuf source file.
parser/fastscan/fastscan.go:41
Struct
ImportNode
ImportNode represents an import statement. Example: import "google/protobuf/empty.proto";
ast/file.go:259
Interface
IntValueNode
IntValueNode is an AST node that represents an integer literal. If an integer literal is too large for an int64 (or uint64 for positive literals), it
ast/values.go:136
FuncType
InterpreterOption
InterpreterOption is an option that can be passed to InterpretOptions and its variants.
options/options.go:83
Interface
ItemInfo
ItemInfo provides details about an item's location in the source file and its contents.
ast/file_info.go:401
TypeAlias
KeywordNode
KeywordNode is an AST node that represents a keyword. Keywords are like identifiers, but they have special meaning in particular contexts. Example:
ast/identifiers.go:145
Struct
MapFieldNode
MapFieldNode represents a map field declaration. Example: map<string,string> replacements = 3 [deprecated = true];
ast/field.go:590
Struct
MapTypeNode
MapTypeNode represents the type declaration for a map field. It defines both the key and value types for the map. Example: map<string, Values>
ast/field.go:537
Struct
MessageBody
MessageBody represents the body of a message. It is used by both MessageNodes and GroupNodes.
ast/message.go:107
Struct
MessageContext
MessageContext provides information about the location in a descriptor hierarchy, for adding context to warnings and error messages.
internal/message_context.go:39
Interface
MessageElement
MessageElement is an interface implemented by all AST nodes that can appear in a message body.
ast/message.go:130
Struct
MessageFieldNode
MessageFieldNode represents a single field (name and value) inside of a message literal. Example: foo:"bar"
ast/values.go:480
Struct
MessageLiteralNode
MessageLiteralNode represents a message literal, which is compatible with the protobuf text format and can be used for custom options with message typ
ast/values.go:412
Struct
MessageLiteralSourceInfo
MessageLiteralSourceInfo represents source info paths for the child elements of an [*ast.MessageLiteralNode].
sourceinfo/source_code_info.go:84
Struct
MessageNode
MessageNode represents a message declaration. Example: message Foo { string name = 1; repeated string labels = 2; bytes extra = 3; }
ast/message.go:44
Struct
NegativeIntLiteralNode
NegativeIntLiteralNode represents an integer literal with a negative (-) sign.
ast/values.go:193
Struct
NoOpVisitor
NoOpVisitor is a visitor implementation that does nothing. All methods unconditionally return nil. This can be embedded into a struct to make that str
ast/walk.go:353
TypeAlias
NoSourceNode
NoSourceNode is a placeholder AST node that implements numerous interfaces in this package. It can be used to represent an AST element for a file whos
ast/no_source.go:44
Struct
NodeInfo
NodeInfo represents the details for a node or token in the source file's AST. It provides access to information about the node's location in the sourc
ast/file_info.go:412
Interface
NodeWithOptions
NodeWithOptions represents a node in the AST that contains option statements.
ast/options.go:399
Interface
OneofElement
OneofElement is an interface implemented by all AST nodes that can appear in the body of a oneof declaration.
ast/field.go:482
Struct
OneofNode
OneofNode represents a one-of declaration. Example: oneof query { string by_name = 2; Type by_type = 3; Address by_address = 4; Labels b
ast/field.go:407
Interface
OptionChildrenSourceInfo
OptionChildrenSourceInfo represents source info paths for child elements of an option value.
sourceinfo/source_code_info.go:69
Interface
OptionDeclNode
OptionDeclNode is a placeholder interface for AST nodes that represent options. This allows NoSourceNode to be used in place of *OptionNode for some u
ast/options.go:22
TypeAlias
OptionIndex
OptionIndex is a mapping of AST nodes that define options to corresponding paths into the containing file descriptor. The path is a sequence of field
sourceinfo/source_code_info.go:40
Struct
OptionNameNode
OptionNameNode represents an option name or even a traversal through message types to name a nested option field. Example: (foo.bar).baz.(bob)
ast/options.go:137
Struct
OptionNode
OptionNode represents the declaration of a single option for an element. It is used both for normal option declarations (start with "option" keyword a
ast/options.go:37
Struct
OptionSourceInfo
OptionSourceInfo describes the source info path for an option value and contains information about the value's descendants in the AST.
sourceinfo/source_code_info.go:44
Struct
PackageNode
PackageNode represents a package declaration. Example: package foobar.com;
ast/file.go:324
Struct
PanicError
PanicError is an error value that represents a recovered panic. It includes the value returned by recover() as well as the stack trace. This should g
compiler.go:310
Interface
ParsedFile
ParsedFile wraps an optional AST and required FileDescriptorProto. This is used so types like parser.Result can be passed to this internal package avo
internal/message_context.go:29
Interface
RPCElement
RPCElement is an interface implemented by all AST nodes that can appear in the body of an rpc declaration (aka method).
ast/service.go:256
Struct
RPCNode
RPCNode represents an RPC declaration. Example: rpc Foo (Bar) returns (Baz);
ast/service.go:116
Struct
RPCTypeNode
RPCTypeNode represents the declaration of a request or response type for an RPC. Example: (stream foo.Bar)
ast/service.go:268
Interface
RangeDeclNode
RangeDeclNode is a placeholder interface for AST nodes that represent numeric values. This allows NoSourceNode to be used in place of *RangeNode for s
ast/ranges.go:104
Struct
RangeNode
RangeNode represents a range expression, used in both extension ranges and reserved ranges. Example: 1000 to max
ast/ranges.go:117
Interface
Reporter
Reporter is a type that handles reporting both errors and warnings. A reporter does not need to be thread-safe. Safe concurrent access is managed by a
reporter/reporter.go:41
next →
1–100 of 233, ranked by callers