MCPcopy Create free account

hub / github.com/bufbuild/protocompile / types & classes

Types & classes233 in github.com/bufbuild/protocompile

↓ 19 callersFuncTypeResolverFunc
ResolverFunc is a simple function type that implements Resolver.
resolver.go:79
↓ 16 callersTypeAliastokenType
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 callersTypeAliasToken
Token represents a single lexed token.
ast/file_info.go:380
↓ 7 callersTypeAliasItem
Item represents an item lexed from source. It represents either a Token or a Comment.
ast/file_info.go:397
↓ 6 callersTypeAliasident
options/options_test.go:45
↓ 4 callersInterfaceNode
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 callersTypeAliasSourceInfoMode
SourceInfoMode indicates how source code info is generated by a Compiler.
compiler.go:105
↓ 3 callersTypeAliasaggregate
options/options_test.go:46
↓ 2 callersTypeAliasIdentifier
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 callersInterfaceResolver
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 callersTypeAliasCompositeResolver
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 callersInterfaceEnumValueDeclNode
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 callersInterfaceFieldDeclNode
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 callersInterfaceFileDeclNode
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 callersInterfaceMessageDeclNode
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 callersInterfaceOneofDeclNode
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 callersInterfaceRPCDeclNode
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 callersTypeAliasSyntaxError
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 callersInterfacecomments
sourceinfo/source_code_info.go:742
↓ 1 callersTypeAliaserrUnusedImport
linker/linker.go:145
↓ 1 callersTypeAliasfieldRanger
options/options.go:1071
↓ 1 callersTypeAliasfilesResolver
linker/files.go:272
↓ 1 callersTypeAliasterminalNode
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 callersTypeAliasvalueRanger
options/options.go:1061
StructAncestorTracker
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
StructArrayLiteralNode
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
StructArrayLiteralSourceInfo
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
StructComment
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
StructComments
Comments represents a range of sequential comments in a source file (e.g. no interleaving items or AST nodes).
ast/file_info.go:628
StructCompactOptionsNode
CompactOptionsNode represents a compact options declaration, as used with fields, enum values, and extension ranges. Example: [deprecated = true, js
ast/options.go:327
StructCompiler
Compiler handles compilation tasks, to turn protobuf source files, or other intermediate representations, into fully linked descriptors. The compilat
compiler.go:53
InterfaceCompositeNode
CompositeNode represents any non-terminal node in the tree. These are interior or root nodes and have child nodes.
ast/node.go:46
StructCompoundIdentNode
CompoundIdentNode represents a qualified identifier. A qualified identifier has at least one dot and possibly multiple identifier names (all separated
ast/identifiers.go:74
StructCompoundStringLiteralNode
CompoundStringLiteralNode represents a compound string literal, which is the concatenaton of adjacent string literals. Example: "this " "is" " al
ast/values.go:99
InterfaceDescriptorProtoWrapper
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
StructEditionNode
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
StructEmptyDeclNode
EmptyDeclNode represents an empty declaration in protobuf source. These amount to extra semicolons, with no actual content preceding the semicolon.
ast/node.go:114
InterfaceEnumElement
EnumElement is an interface implemented by all AST nodes that can appear in the body of an enum declaration.
ast/enum.go:91
StructEnumNode
EnumNode represents an enum declaration. Example: enum Foo { BAR = 0; BAZ = 1 }
ast/enum.go:22
StructEnumValueNode
EnumValueNode represents an enum declaration. Example: UNSET = 0 [deprecated = true];
ast/enum.go:116
FuncTypeErrorReporter
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
InterfaceErrorUnusedImport
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
InterfaceErrorWithPos
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
InterfaceExtendElement
ExtendElement is an interface implemented by all AST nodes that can appear in the body of an extends declaration.
ast/message.go:216
StructExtendNode
ExtendNode represents a declaration of extension fields. Example: extend google.protobuf.FieldOptions { bool redacted = 33333; }
ast/message.go:152
StructExtensionRangeNode
ExtensionRangeNode represents an extension range declaration in an extendable message. Example: extensions 100 to max;
ast/ranges.go:23
StructFieldLabel
FieldLabel represents the label of a field, which indicates its cardinality (i.e. whether it is optional, required, or repeated).
ast/field.go:185
StructFieldNode
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
StructFieldReferenceNode
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
InterfaceFile
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
InterfaceFileElement
FileElement is an interface implemented by all AST nodes that are allowed as top-level declarations in the file.
ast/file.go:151
StructFileInfo
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
StructFileNode
FileNode is the root of the AST hierarchy. It represents an entire protobuf source file.
ast/file.go:32
TypeAliasFiles
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
StructFloatLiteralNode
FloatLiteralNode represents a floating point numeric literal.
ast/values.go:248
InterfaceFloatValueNode
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
InterfaceGenerateOption
GenerateOption represents an option for how source code info is generated.
sourceinfo/source_code_info.go:107
StructGroupNode
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
StructHandler
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
InterfaceHasEdition
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
InterfaceHasFeatures
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
StructIdentNode
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
InterfaceIdentValueNode
IdentValueNode is an AST node that represents an identifier.
ast/identifiers.go:28
StructImport
Import represents an import in a Protobuf source file.
parser/fastscan/fastscan.go:41
StructImportNode
ImportNode represents an import statement. Example: import "google/protobuf/empty.proto";
ast/file.go:259
InterfaceIntValueNode
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
FuncTypeInterpreterOption
InterpreterOption is an option that can be passed to InterpretOptions and its variants.
options/options.go:83
InterfaceItemInfo
ItemInfo provides details about an item's location in the source file and its contents.
ast/file_info.go:401
TypeAliasKeywordNode
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
StructMapFieldNode
MapFieldNode represents a map field declaration. Example: map<string,string> replacements = 3 [deprecated = true];
ast/field.go:590
StructMapTypeNode
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
StructMessageBody
MessageBody represents the body of a message. It is used by both MessageNodes and GroupNodes.
ast/message.go:107
StructMessageContext
MessageContext provides information about the location in a descriptor hierarchy, for adding context to warnings and error messages.
internal/message_context.go:39
InterfaceMessageElement
MessageElement is an interface implemented by all AST nodes that can appear in a message body.
ast/message.go:130
StructMessageFieldNode
MessageFieldNode represents a single field (name and value) inside of a message literal. Example: foo:"bar"
ast/values.go:480
StructMessageLiteralNode
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
StructMessageLiteralSourceInfo
MessageLiteralSourceInfo represents source info paths for the child elements of an [*ast.MessageLiteralNode].
sourceinfo/source_code_info.go:84
StructMessageNode
MessageNode represents a message declaration. Example: message Foo { string name = 1; repeated string labels = 2; bytes extra = 3; }
ast/message.go:44
StructNegativeIntLiteralNode
NegativeIntLiteralNode represents an integer literal with a negative (-) sign.
ast/values.go:193
StructNoOpVisitor
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
TypeAliasNoSourceNode
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
StructNodeInfo
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
InterfaceNodeWithOptions
NodeWithOptions represents a node in the AST that contains option statements.
ast/options.go:399
InterfaceOneofElement
OneofElement is an interface implemented by all AST nodes that can appear in the body of a oneof declaration.
ast/field.go:482
StructOneofNode
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
InterfaceOptionChildrenSourceInfo
OptionChildrenSourceInfo represents source info paths for child elements of an option value.
sourceinfo/source_code_info.go:69
InterfaceOptionDeclNode
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
TypeAliasOptionIndex
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
StructOptionNameNode
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
StructOptionNode
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
StructOptionSourceInfo
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
StructPackageNode
PackageNode represents a package declaration. Example: package foobar.com;
ast/file.go:324
StructPanicError
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
InterfaceParsedFile
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
InterfaceRPCElement
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
StructRPCNode
RPCNode represents an RPC declaration. Example: rpc Foo (Bar) returns (Baz);
ast/service.go:116
StructRPCTypeNode
RPCTypeNode represents the declaration of a request or response type for an RPC. Example: (stream foo.Bar)
ast/service.go:268
InterfaceRangeDeclNode
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
StructRangeNode
RangeNode represents a range expression, used in both extension ranges and reserved ranges. Example: 1000 to max
ast/ranges.go:117
InterfaceReporter
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