package
2.0.0+incompatible
Repository: https://github.com/phpstudyer/protoreflect.git
Documentation: pkg.go.dev
# Functions
AsInt32 range checks the given int value and returns its value is in the range or 0, false if it is outside the range.
NewArrayLiteralNode creates a new *ArrayLiteralNode.
NewBoolLiteralNode returns a new *BoolLiteralNode for the given keyword, which must be "true" or "false".
NewCompactOptionNode creates a new *OptionNode for a full compact declaration (as used in fields, enum values, and extension ranges).
NewCompactOptionsNode creates a *CompactOptionsNode.
NewCompoundIdentNode creates a *CompoundIdentNode.
NewCompoundLiteralStringNode creates a new *CompoundStringLiteralNode that consists of the given string components.
NewEmptyDeclNode creates a new *EmptyDeclNode.
No description provided by the author
NewEnumNode creates a new *EnumNode.
NewEnumValueNode creates a new *EnumValueNode.
NewExtendNode creates a new *ExtendNode.
NewExtensionFieldReferenceNode creates a new *FieldReferenceNode for an extension field.
NewExtensionRangeNode creates a new *ExtensionRangeNode.
NewFieldNode creates a new *FieldNode.
NewFieldReferenceNode creates a new *FieldReferenceNode for a regular field.
NewFileElement creates a new *FileNode.
NewFloatLiteralNode creates a new *FloatLiteralNode with the given val.
NewGroupNode creates a new *GroupNode.
NewIdentNode creates a new *IdentNode.
NewImportNode creates a new *ImportNode.
NewKeywordNode creates a new *KeywordNode.
NewMapFieldNode creates a new *MapFieldNode.
NewMapTypeNode creates a new *MapTypeNode.
NewMessageFieldNode creates a new *MessageFieldNode.
NewMessageLiteralNode creates a new *MessageLiteralNode.
NewMessageNode creates a new *MessageNode.
NewNegativeIntLiteralNode creates a new *NegativeIntLiteralNode.
NewNoSourceNode creates a new NoSourceNode for the given filename.
NewOneOfNode creates a new *OneOfNode.
NewOptionNameNode creates a new *OptionNameNode.
NewOptionNode creates a new *OptionNode for a full option declaration (as used in files, messages, oneofs, enums, services, and methods).
NewPackageNode creates a new *PackageNode.
NewPositiveUintLiteralNode creates a new *PositiveUintLiteralNode.
NewRangeNode creates a new *RangeNode.
NewReservedNamesNode creates a new *ReservedNode that represents reserved names.
NewReservedRangesNode creates a new *ReservedNode that represents reserved numeric ranges.
NewRPCNode creates a new *RPCNode with no body.
NewRPCNodeWithBody creates a new *RPCNode that includes a body (and possibly options).
NewRPCTypeNode creates a new *RPCTypeNode.
NewRuneNode creates a new *RuneNode with the given properties.
NewServiceNode creates a new *ServiceNode.
NewSignedFloatLiteralNode creates a new *SignedFloatLiteralNode.
NewSpecialFloatLiteralNode returns a new *SpecialFloatLiteralNode for the given keyword, which must be "inf" or "nan".
NewStringLiteralNode creates a new *StringLiteralNode with the given val.
NewSyntaxNode creates a new *SyntaxNode.
NewSyntheticMapField creates a new *SyntheticMapField for the given identifier (either a key or value type in a map declaration) and tag number (1 for key, 2 for value).
NewUintLiteralNode creates a new *UintLiteralNode with the given val.
Print prints the given AST node to the given output.
UnknownPos is a placeholder position when only the source file name is known.
Walk conducts a walk of the AST rooted at the given root using the given function.
# Structs
ArrayLiteralNode represents an array literal, which is only allowed inside of a MessageLiteralNode, to indicate values for a repeated field.
BoolLiteralNode represents a boolean literal.
Comment represents a single comment in a source file.
CompactOptionsNode represents a compact options declaration, as used with fields, enum values, and extension ranges.
CompoundIdentNode represents a qualified identifier.
CompoundStringLiteralNode represents a compound string literal, which is the concatenaton of adjacent string literals.
EmptyDeclNode represents an empty declaration in protobuf source.
EnumNode represents an enum declaration.
EnumNode represents an enum declaration.
ExtendNode represents a declaration of extension fields.
ExtensionRangeNode represents an extension range declaration in an extendable message.
FieldLabel represents the label of a field, which indicates its cardinality (i.e.
FieldNode represents a normal field declaration (not groups or maps).
FieldReferenceNode is a reference to a field name.
FileNode is the root of the AST hierarchy.
FloatLiteralNode represents a floating point numeric literal.
GroupNode represents a group declaration, which doubles as a field and inline message declaration.
IdentNode represents a simple, unqualified identifier.
ImportNode represents an import statement.
MapFieldNode represents a map field declaration.
MapTypeNode represents the type declaration for a map field.
MessageBody represents the body of a message.
MessageFieldNode represents a single field (name and value) inside of a message literal.
MessageLiteralNode represents a message literal, which is compatible with the protobuf text format and can be used for custom options with message types.
MessageNode represents a message declaration.
NegativeIntLiteralNode represents an integer literal with a negative (-) sign.
NoSourceNode is a placeholder AST node that implements numerous interfaces in this package.
OneOfNode represents a one-of declaration.
OptionNameNode represents an option name or even a traversal through message types to name a nested option field.
OptionNode represents the declaration of a single option for an element.
PackageNode represents a package declaration.
PositiveUintLiteralNode represents an integer literal with a positive (+) sign.
PosRange is a range of positions in a source file that indicates the span of some region of source, such as a single token or a sub-tree of the AST.
RangeNode represents a range expression, used in both extension ranges and reserved ranges.
ReservedNode represents reserved declaration, whic can be used to reserve either names or numbers.
RPCNode represents an RPC declaration.
RPCTypeNode represents the declaration of a request or response type for an RPC.
RuneNode represents a single rune in protobuf source.
ServiceNode represents a service declaration.
SignedFloatLiteralNode represents a signed floating point number.
SourcePos identifies a location in a proto source file.
SpecialFloatLiteralNode represents a special floating point numeric literal for "inf" and "nan" values.
StringLiteralNode represents a simple string literal.
SyntaxNode represents a syntax declaration, which if present must be the first non-comment content.
SyntheticMapField is not an actual node in the AST but a synthetic node that implements FieldDeclNode.
TokenInfo represents state accumulated by the lexer to associated with a token (aka terminal node).
UintLiteralNode represents a simple integer literal with no sign character.
Visitor provides a technique for walking the AST that allows for dynamic dispatch, where a particular function is invoked based on the runtime type of the argument.
# Interfaces
CompositeNode represents any non-terminal node in the tree.
EnumElement is an interface implemented by all AST nodes that can appear in the body of an enum declaration.
EnumValueDeclNode is a placeholder interface for AST nodes that represent enum values.
ExtendElement is an interface implemented by all AST nodes that can appear in the body of an extends declaration.
FieldDeclNode is a node in the AST that defines a field.
FileDeclNode is a placeholder interface for AST nodes that represent files.
FileElement is an interface implemented by all AST nodes that are allowed as top-level declarations in the file.
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 uint64.
IdentValueNode is an AST node that represents an identifier.
IntValueNode is an AST node that represents an integer literal.
MessageDeclNode is a node in the AST that defines a message type.
MessageElement is an interface implemented by all AST nodes that can appear in a message body.
Node is the interface implemented by all nodes in the AST.
OneOfElement is an interface implemented by all AST nodes that can appear in the body of a oneof declaration.
OptionDeclNode is a placeholder interface for AST nodes that represent options.
RangeDeclNode is a placeholder interface for AST nodes that represent numeric values.
RPCDeclNode is a placeholder interface for AST nodes that represent RPC declarations.
RPCElement is an interface implemented by all AST nodes that can appear in the body of an rpc declaration (aka method).
ServiceElement is an interface implemented by all AST nodes that can appear in the body of a service declaration.
StringValueNode is an AST node that represents a string literal.
TerminalNode represents a leaf in the AST.
ValueNode is an AST node that represents a literal value.
# Type aliases
Identifier is a possibly-qualified name.
KeywordNode is an AST node that represents a keyword.
VisitFunc is used to examine a node in the AST when walking the tree.