tserrgen

package module
v0.0.0-...-a391b59 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

README

tserrgen

Go package to generate tserr error messages

Documentation

Overview

Copyright (c) 2023 thorstenrie. All Rights Reserved. Use is governed with GNU Affero General Public License v3.0 that can be found in the LICENSE file.

Copyright (c) 2023 thorstenrie. All Rights Reserved. Use is governed with GNU Affero General Public License v3.0 that can be found in the LICENSE file.

Copyright (c) 2023 thorstenrie. All Rights Reserved. Use is governed with GNU Affero General Public License v3.0 that can be found in the LICENSE file.

Copyright (c) 2023 thorstenrie. All Rights Reserved. Use is governed with GNU Affero General Public License v3.0 that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(fn tsfio.Filename) error

Types

type AssignmentArgs

type AssignmentArgs struct {
	ExprLeft, ExprRight string
}

type Code

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

func NewCode

func NewCode() *Code

func (*Code) Addr

func (code *Code) Addr() *Code

Address operator

func (*Code) Assignment

func (code *Code) Assignment(a *AssignmentArgs) *Code

Assignment

func (*Code) BlockEnd

func (code *Code) BlockEnd() *Code

Block End

func (*Code) Call

func (code *Code) Call(n string) *Code

Function Call

func (*Code) CompositeLit

func (code *Code) CompositeLit(LiteralType string) *Code

Composite Literal

func (*Code) Func1

func (code *Code) Func1(a *Func1Args) *Code

func (*Code) FuncEnd

func (code *Code) FuncEnd() *Code

Block End with new line

func (*Code) Ident

func (code *Code) Ident(n string) *Code

Identifier

func (*Code) If

func (code *Code) If(a *IfArgs) *Code

If statement

func (*Code) IfErr

func (code *Code) IfErr(a *IfErrArgs) *Code

If statement for error handling using a simple statement

func (*Code) KeyedElement

func (code *Code) KeyedElement(a *KeyedElementArgs) *Code

Keyed element of a Composite literal

func (*Code) LineComment

func (code *Code) LineComment(c string) *Code

Line comment

func (*Code) List

func (code *Code) List() *Code

IdentifierLIst

func (*Code) Listln

func (code *Code) Listln() *Code

IdentifierList with new line

func (*Code) ParamEnd

func (code *Code) ParamEnd() *Code

Parameters End

func (*Code) ParamEndln

func (code *Code) ParamEndln() *Code

Parameters End + new line

func (*Code) Return

func (code *Code) Return() *Code

Return

func (*Code) SelField

func (code *Code) SelField(a *SelArgs) *Code

Field Selector

func (*Code) SelMethod

func (code *Code) SelMethod(a *SelArgs) *Code

Method Selector

func (*Code) ShortVarDecl

func (code *Code) ShortVarDecl(a *ShortVarDeclArgs) *Code

Short variable declaration

func (*Code) String

func (code *Code) String() string

func (*Code) Type

func (code *Code) Type(a *TypeArgs) *Code

Type

func (*Code) TypeStruct

func (code *Code) TypeStruct(n string) *Code

Type declaration for struct type

type Codefile

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

func NewCodefile

func NewCodefile(dn tsfio.Directory, fn tsfio.Filename) (*Codefile, error)

func (*Codefile) Filepath

func (cf *Codefile) Filepath() tsfio.Filename

func (*Codefile) FinishFile

func (cf *Codefile) FinishFile() error

func (*Codefile) Format

func (cf *Codefile) Format() error

func (*Codefile) StartFile

func (cf *Codefile) StartFile() error

func (*Codefile) WriteCode

func (cf *Codefile) WriteCode(c string) error

type Func1Args

type Func1Args struct {
	Name, Var, Type, Return string
}

type IfArgs

type IfArgs struct {
	ExprLeft, ExprRight, Operator string
}

Expression

type IfErrArgs

type IfErrArgs struct {
	Method, Operator string
}

type KeyedElementArgs

type KeyedElementArgs struct {
	Key, Element string
}

type SelArgs

type SelArgs struct {
	Val, Sel string
}

type ShortVarDeclArgs

type ShortVarDeclArgs struct {
	Ident, Expr string
}

type TypeArgs

type TypeArgs struct {
	Name, Type string
}

Jump to

Keyboard shortcuts

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