toit

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(p string) string

func ToCamelCase

func ToCamelCase(str string) string

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Argument

func (w *Writer) Argument(name string) error

func (*Writer) ConditionExpression

func (w *Writer) ConditionExpression(cond string, trueCase string, falseCase string) error

func (*Writer) Const

func (w *Writer) Const(name string, typ string, value string) error

func (*Writer) EndAssignment

func (w *Writer) EndAssignment() error

func (*Writer) EndBlock

func (w *Writer) EndBlock(newLined bool) error

func (*Writer) EndCall

func (w *Writer) EndCall() error

func (*Writer) EndClass

func (w *Writer) EndClass() error

func (*Writer) EndConstructor

func (w *Writer) EndConstructor() error

func (*Writer) EndConstructorDecl

func (w *Writer) EndConstructorDecl() error

func (*Writer) EndFunction

func (w *Writer) EndFunction() error

func (*Writer) EndFunctionDecl

func (w *Writer) EndFunctionDecl(returnType string) error

func (*Writer) EndLine

func (w *Writer) EndLine() error

func (*Writer) Import

func (w *Writer) Import(path string) error

func (*Writer) ImportAs

func (w *Writer) ImportAs(path string, alias string) error

func (*Writer) Literal

func (w *Writer) Literal(s string) error

func (*Writer) MultiLineComment

func (w *Writer) MultiLineComment(s string) error

func (*Writer) NamedArgument

func (w *Writer) NamedArgument(name string, value string) error

func (*Writer) NewLine

func (w *Writer) NewLine() error

func (*Writer) Parameter

func (w *Writer) Parameter(name string, typ string) error

func (*Writer) ParameterWithDefault

func (w *Writer) ParameterWithDefault(name string, typ string, def string) error

func (*Writer) ReturnEnd

func (w *Writer) ReturnEnd() error

func (*Writer) ReturnStart

func (w *Writer) ReturnStart() error

func (*Writer) SingleLineComment

func (w *Writer) SingleLineComment(s string) error

func (*Writer) Space

func (w *Writer) Space() error

func (*Writer) StartAssignment

func (w *Writer) StartAssignment(field string) error

func (*Writer) StartBlock

func (w *Writer) StartBlock(newLined bool, parameters ...string) error

func (*Writer) StartCall

func (w *Writer) StartCall(fn string) error

func (*Writer) StartClass

func (w *Writer) StartClass(name string, extends string, implements ...string) error

func (*Writer) StartConstructorDecl

func (w *Writer) StartConstructorDecl(name string) error

func (*Writer) StartFunctionDecl

func (w *Writer) StartFunctionDecl(name string) error

func (*Writer) StartStaticFunctionDecl

func (w *Writer) StartStaticFunctionDecl(name string) error

func (*Writer) StaticConst

func (w *Writer) StaticConst(name string, typ string, value string) error

func (*Writer) Type

func (w *Writer) Type(typ string) error

func (*Writer) Variable

func (w *Writer) Variable(name string, typ string, value string) error

Jump to

Keyboard shortcuts

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