parser

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseArrayType

func ParseArrayType(p *Parser) (*ast.Array, error)

func ParseConst

func ParseConst(p *Parser) (*ast.Const, error)

func ParseCustomError

func ParseCustomError(p *Parser) (customError *ast.CustomError, err error)

func ParseEnum

func ParseEnum(p *Parser) (enum *ast.Enum, err error)

func ParseExtend

func ParseExtend(p *Parser) (*ast.Identifier, error)

func ParseMapKeyType

func ParseMapKeyType(p *Parser) (ast.Type, error)

func ParseMapType

func ParseMapType(p *Parser) (*ast.Map, error)

func ParseMethodTypes

func ParseMethodTypes(p *Parser) (methodTypes []ast.MethodType, err error)

func ParseModel

func ParseModel(p *Parser) (*ast.Model, error)

func ParseModelField

func ParseModelField(p *Parser) (field *ast.Field, err error)

func ParseOption

func ParseOption(p *Parser) (option *ast.Option, err error)

func ParseOptions

func ParseOptions(p *Parser) (ast.Options, error)

func ParseProgram

func ParseProgram(p *Parser) (prog *ast.Program, err error)

func ParseService

func ParseService(p *Parser) (service *ast.Service, err error)

func ParseServiceMethod

func ParseServiceMethod(p *Parser) (methods []*ast.Method, err error)

func ParseServiceMethodArgument

func ParseServiceMethodArgument(p *Parser) (arg *ast.Arg, err error)

func ParseServiceMethodReturnArg

func ParseServiceMethodReturnArg(p *Parser) (ret *ast.Return, err error)

func ParseType

func ParseType(p *Parser) (ast.Type, error)

func ParseValue

func ParseValue(p *Parser) (value ast.Value, err error)

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(input string) *Parser

func NewFilenames

func NewFilenames(filenames ...string) *Parser

func (*Parser) Current

func (p *Parser) Current() *token.Token

func (*Parser) Next

func (p *Parser) Next() *token.Token

func (*Parser) Peek

func (p *Parser) Peek() *token.Token

func (*Parser) WithError

func (p *Parser) WithError(token *token.Token, args ...any) error

Jump to

Keyboard shortcuts

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