parser

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

Parser represents a parser for a Go source file that contains convergen blocks.

func NewParser

func NewParser(srcPath, dstPath string) (*Parser, error)

NewParser returns a new parser for convergen annotations.

func (*Parser) CreateBuilder

func (p *Parser) CreateBuilder() *builder.FunctionBuilder

CreateBuilder creates a new function builder.

func (*Parser) GenerateBaseCode

func (p *Parser) GenerateBaseCode() (code string, err error)

GenerateBaseCode generates the base code without convergen annotations. The code is stripped of convergen annotations and the doc comments of interfaces. The resulting code can be used as a starting point for the code generation process. GenerateBaseCode returns the resulting code as a string, or an error if the generation process fails.

func (*Parser) Parse

func (p *Parser) Parse() ([]*model.MethodsInfo, error)

Parse parses convergen annotations in the source code.

Jump to

Keyboard shortcuts

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