Documentation ¶
Overview ¶
Package gobpp converts Go source code into B++ source code.
Index ¶
- func Convert(fset *token.FileSet, f *ast.File) (string, error)
- type Function
- type Program
- func (p *Program) AddBlock(args []ast.Stmt) error
- func (p *Program) AddDecl(decl ast.Decl) error
- func (p *Program) AddExpr(expr ast.Expr) error
- func (p *Program) AddFile(f *ast.File) error
- func (p *Program) AddStmt(stmt ast.Stmt) error
- func (p *Program) End()
- func (p *Program) Init()
- func (p *Program) NodePos(node ast.Node) string
- func (p *Program) Pos(pos token.Pos) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Program ¶
type Program struct { *strings.Builder Fset *token.FileSet Funcs map[string]Function FuncName string }
Program defines the program source code and some program data
func (*Program) AddBlock ¶
AddBlock adds a block of statements to a B++ program, add a boolean parameter to the end of the call to remove the "\n" from the end of the code generated
Click to show internal directories.
Click to hide internal directories.