bridge

package
v0.0.0-...-19eb0a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProtobufOptionSyntax syntax = "proto2" 选项
	ProtobufOptionSyntax = "proto.syntax"
	ProtobufOptionPacked = "proto.packed"
	ProtobufOptionFixed  = "proto.fixed"
	ProtobufOptionSigned = "proto.signed"
)

protobuf 消息解析设置选项

Variables

This section is empty.

Functions

func AppendOption

func AppendOption(c, a0, a1 interface{}) (val *ast.YTOptions, err error)

Options OptionExpr << bridge.AppendOption($Context, $0, $1) >>

func ArrayType

func ArrayType(c, a0 interface{}) (_ *ast.YTField, err error)

FieldType: "repeated" tok_identifier << bridge.ArrayType($Context, $1) >>

func BasicOrCustomType

func BasicOrCustomType(c, a0 interface{}) (*ast.YTField, error)

FieldType: tok_identifier << bridge.BasicOrCustomType($Context, $0) >>

func FieldArray

func FieldArray(c, m, v interface{}) (msg *ast.YTMessage, err error)

Fields "repeated" FieldExpr << bridge.FieldArray($Context, $0, $1) >>

func FieldField

func FieldField(c, m, v interface{}) (msg *ast.YTMessage, err error)

Fields FieldExpr << bridge.FieldField($Context, $0, $1) >>

func FieldMessage

func FieldMessage(c, m, v interface{}) (msg *ast.YTMessage, err error)

Fields Message << bridge.FieldMessage($Context, $0, $1) >>

func MapType

func MapType(c, a2, a4 interface{}) (_ *ast.YTField, err error)

FieldType: "map" "<" tok_identifier "," tok_identifier ">" << bridge.MapType($Context, $2, $4) >>

func NewEnum

func NewEnum(c, en, evs interface{}) (def *ast.YTEnumDef, err error)

Enum: "enum" tok_identifier "{" Options "}" OptEnd << bridge.NewEnum($Context, $1, $3) >>

func NewField

func NewField(c, a0, a1, a3, a4 interface{}) (field *ast.YTField, err error)

FieldExpr: FieldType tok_identifier "=" tok_num FieldOption OptEnd << bridge.NewField($Context,$0, $1, $3, $4) >>

func NewImport

func NewImport(c, pkg, alias interface{}) (imp *ast.YTImport, err error)

Import: "import" tok_identifier tok_literal OptEnd << bridge.NewImport($Context, $2, $1) >>

func NewMessage

func NewMessage(c, mn, fvs interface{}) (def *ast.YTMessage, err error)

Message: "message" tok_identifier "{" Fields "}" OptEnd << bridge.NewMessage($Context, $1, $3) >>

func NewMethod

func NewMethod(c, a0, a2, a4, a5, a6 interface{}) (m *ast.YTMethod, err error)

ServiceMethod: tok_identifier "(" tok_identifier ")" tok_identifier MethodNo FieldOption OptEnd << bridge.NewMethod($Context, $0, $2, $4, $5, $6) >>

func NewPackage

func NewPackage(c, v1 interface{}) (pkg *ast.YTPackage, err error)

Package: "package" tok_identifier OptEnd

func NewProject

func NewProject(c, a1, a3 interface{}) (proj *ast.YTProject, err error)

项目定义 Project:"project" tok_identifier "{" ProjElements "}" OptEnd << bridge.NewProject($Context, $1, $3) >>

func NewProtocol

func NewProtocol(c, pkg, imports, defines interface{}) (_ *ast.YTProgram, err error)

func NewService

func NewService(c, a1, a3 interface{}) (_ *ast.YTService, err error)

Service: "service" tok_identifier "{" ServiceElements "}" OptEnd << bridge.NewService($Context, $1, $3) >>

func OptionExpr

func OptionExpr(c, n, v interface{}) (opt *ast.YTOption, err error)

OptionExpr: tok_identifier OptionValue OptEnd << bridge.OptionExpr($Context, $0, $1) >>

func ProjectArea

func ProjectArea(c, a0, a1 interface{}) (proj *ast.YTProject, err error)

ProjElements ProjArea << bridge.ProjectArea($Context, $0, $1) >>

func ProjectOption

func ProjectOption(c, a0, a1 interface{}) (proj *ast.YTProject, err error)

ProjElements OptionExpr << bridge.ProjectOption($Context, $0, $1) >>

func ProtoNewOption

func ProtoNewOption(c, a1, a3 interface{}) (opt *ast.YTOption, err error)

Option: "option" tok_identifier "=" tok_literal ";" << ast.ProtoNewOption($Context, $1, $3) >>

func ProtoSyntax

func ProtoSyntax(c, a0 interface{}) (opt *ast.YTOption, err error)

Syntax: "syntax" "=" tok_literal ";" << bridge.ProtoSyntax($Context, $2) >>

func ServiceFlag

func ServiceFlag(c, a0, a1 interface{}) (_ *ast.YTService, err error)

ServiceElements: ServiceElements MethodFlag << bridge.ServiceFlag($Context, $0, $1) >>

func ServiceMethod

func ServiceMethod(c, a0, a1 interface{}) (_ *ast.YTService, err error)

ServiceElements: ServiceElements ServiceMethod << bridge.ServiceMethod($Context, $0, $1) >>

func ServiceOption

func ServiceOption(c, a0, a1 interface{}) (_ *ast.YTService, err error)

ServiceElements: ServiceElements OptionExpr << bridge.ServiceOption($Context, $0, $1) >>

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL