Documentation ¶
Index ¶
- Variables
- func CreateWriter() codeWriter
- type AttributeDeclaration
- type ClassDeclaration
- func (self *ClassDeclaration) Abstract() *ClassDeclaration
- func (self *ClassDeclaration) AddAttributes(attributes ...Writable) *ClassDeclaration
- func (self *ClassDeclaration) Attribute(code string) *ClassDeclaration
- func (self *ClassDeclaration) Case() *ClassDeclaration
- func (self *ClassDeclaration) Contructor() *MethodDeclaration
- func (self *ClassDeclaration) Define(block bool) *StatementsDeclaration
- func (self *ClassDeclaration) Extends(types ...string) *ClassDeclaration
- func (self *ClassDeclaration) Private() *ClassDeclaration
- func (self *ClassDeclaration) Public() *ClassDeclaration
- func (self *ClassDeclaration) Sealed() *ClassDeclaration
- func (self *ClassDeclaration) WriteCode(writer CodeWriter)
- type CodeWriter
- type EolDefinition
- type FieldDeclaration
- func (self *FieldDeclaration) AddAttributes(attributes ...Writable) *FieldDeclaration
- func (self *FieldDeclaration) Attribute(code string) *FieldDeclaration
- func (self *FieldDeclaration) Init(init Writable) *FieldDeclaration
- func (self *FieldDeclaration) Override() *FieldDeclaration
- func (self *FieldDeclaration) Val() *FieldDeclaration
- func (self *FieldDeclaration) Var() *FieldDeclaration
- func (self *FieldDeclaration) WriteCode(writer CodeWriter)
- type FieldKind
- type ImportDeclaration
- type MethodDeclaration
- func (self *MethodDeclaration) AddAttributes(attributes ...Writable) *MethodDeclaration
- func (self *MethodDeclaration) AddImplicitParams(params ...Writable) *MethodDeclaration
- func (self *MethodDeclaration) AddParams(params ...Writable) *MethodDeclaration
- func (self *MethodDeclaration) Async() *MethodDeclaration
- func (self *MethodDeclaration) Attribute(code string) *MethodDeclaration
- func (self *MethodDeclaration) Define() *StatementsDeclaration
- func (self *MethodDeclaration) ImplicitParam(name string, type_ string) *FieldDeclaration
- func (self *MethodDeclaration) IsConstructor() bool
- func (self *MethodDeclaration) NoParams() *MethodDeclaration
- func (self *MethodDeclaration) Override() *MethodDeclaration
- func (self *MethodDeclaration) Param(name string, type_ string) *FieldDeclaration
- func (self *MethodDeclaration) ParamPerLine() *MethodDeclaration
- func (self *MethodDeclaration) Private() *MethodDeclaration
- func (self *MethodDeclaration) Public() *MethodDeclaration
- func (self *MethodDeclaration) Returns(returnType string) *MethodDeclaration
- func (self *MethodDeclaration) WriteCode(writer CodeWriter)
- type StatementsDeclaration
- func (self *StatementsDeclaration) Add(code string) *StatementsDeclaration
- func (self *StatementsDeclaration) AddCode(code Writable) *StatementsDeclaration
- func (self *StatementsDeclaration) AddLn(code string) *StatementsDeclaration
- func (self *StatementsDeclaration) Block(scope bool) *StatementsDeclaration
- func (self *StatementsDeclaration) Def(name string) *MethodDeclaration
- func (self *StatementsDeclaration) Scope(block bool) *StatementsDeclaration
- func (self *StatementsDeclaration) Val(name string, type_ string) *FieldDeclaration
- func (self *StatementsDeclaration) Var(name string, type_ string) *FieldDeclaration
- func (self *StatementsDeclaration) WriteCode(writer CodeWriter)
- type TraitDeclaration
- func (self *TraitDeclaration) AddAttributes(attributes ...Writable) *TraitDeclaration
- func (self *TraitDeclaration) Attribute(code string) *TraitDeclaration
- func (self *TraitDeclaration) Define(block bool) *StatementsDeclaration
- func (self *TraitDeclaration) Extends(types ...string) *TraitDeclaration
- func (self *TraitDeclaration) Private() *TraitDeclaration
- func (self *TraitDeclaration) Public() *TraitDeclaration
- func (self *TraitDeclaration) Sealed() *TraitDeclaration
- func (self *TraitDeclaration) WriteCode(writer CodeWriter)
- type UnitDeclaration
- func (self *UnitDeclaration) AddDeclarations(declarations ...Writable) *UnitDeclaration
- func (self *UnitDeclaration) AddImports(imports ...string) *UnitDeclaration
- func (self *UnitDeclaration) Code() string
- func (self *UnitDeclaration) Import(package_ string) *UnitDeclaration
- func (self *UnitDeclaration) WriteCode(writer CodeWriter)
- type Writable
- type WritableCode
Constants ¶
This section is empty.
Variables ¶
View Source
var False = Code("false")
View Source
var Null = Code("null")
View Source
var True = Code("true")
Functions ¶
func CreateWriter ¶
func CreateWriter() codeWriter
Types ¶
type AttributeDeclaration ¶
type AttributeDeclaration struct {
// contains filtered or unexported fields
}
func Attribute ¶
func Attribute(code string) *AttributeDeclaration
func (*AttributeDeclaration) WriteCode ¶
func (self *AttributeDeclaration) WriteCode(writer CodeWriter)
type ClassDeclaration ¶
type ClassDeclaration struct {
// contains filtered or unexported fields
}
func Class ¶
func Class(name string) *ClassDeclaration
func Object ¶
func Object(name string) *ClassDeclaration
func (*ClassDeclaration) Abstract ¶
func (self *ClassDeclaration) Abstract() *ClassDeclaration
func (*ClassDeclaration) AddAttributes ¶
func (self *ClassDeclaration) AddAttributes(attributes ...Writable) *ClassDeclaration
func (*ClassDeclaration) Attribute ¶
func (self *ClassDeclaration) Attribute(code string) *ClassDeclaration
func (*ClassDeclaration) Case ¶
func (self *ClassDeclaration) Case() *ClassDeclaration
func (*ClassDeclaration) Contructor ¶
func (self *ClassDeclaration) Contructor() *MethodDeclaration
func (*ClassDeclaration) Define ¶
func (self *ClassDeclaration) Define(block bool) *StatementsDeclaration
func (*ClassDeclaration) Extends ¶
func (self *ClassDeclaration) Extends(types ...string) *ClassDeclaration
func (*ClassDeclaration) Private ¶
func (self *ClassDeclaration) Private() *ClassDeclaration
func (*ClassDeclaration) Public ¶
func (self *ClassDeclaration) Public() *ClassDeclaration
func (*ClassDeclaration) Sealed ¶
func (self *ClassDeclaration) Sealed() *ClassDeclaration
func (*ClassDeclaration) WriteCode ¶
func (self *ClassDeclaration) WriteCode(writer CodeWriter)
type CodeWriter ¶
type CodeWriter interface { Eol() Indent() UnIndent() Write(code string) }
type EolDefinition ¶
type EolDefinition struct{}
func Eol ¶
func Eol() *EolDefinition
func (*EolDefinition) WriteCode ¶
func (self *EolDefinition) WriteCode(writer CodeWriter)
type FieldDeclaration ¶
type FieldDeclaration struct {
// contains filtered or unexported fields
}
func NewFieldDeclaration ¶
func NewFieldDeclaration(name string, type_ string) *FieldDeclaration
func Val ¶
func Val(name string, type_ string) *FieldDeclaration
func Var ¶
func Var(name string, type_ string) *FieldDeclaration
func (*FieldDeclaration) AddAttributes ¶
func (self *FieldDeclaration) AddAttributes(attributes ...Writable) *FieldDeclaration
func (*FieldDeclaration) Attribute ¶
func (self *FieldDeclaration) Attribute(code string) *FieldDeclaration
func (*FieldDeclaration) Init ¶
func (self *FieldDeclaration) Init(init Writable) *FieldDeclaration
func (*FieldDeclaration) Override ¶
func (self *FieldDeclaration) Override() *FieldDeclaration
func (*FieldDeclaration) Val ¶
func (self *FieldDeclaration) Val() *FieldDeclaration
func (*FieldDeclaration) Var ¶
func (self *FieldDeclaration) Var() *FieldDeclaration
func (*FieldDeclaration) WriteCode ¶
func (self *FieldDeclaration) WriteCode(writer CodeWriter)
type ImportDeclaration ¶
type ImportDeclaration struct {
// contains filtered or unexported fields
}
func Import ¶
func Import(package_ string) *ImportDeclaration
func (*ImportDeclaration) WriteCode ¶
func (self *ImportDeclaration) WriteCode(writer CodeWriter)
type MethodDeclaration ¶
type MethodDeclaration struct {
// contains filtered or unexported fields
}
func Method ¶
func Method(name string) *MethodDeclaration
func (*MethodDeclaration) AddAttributes ¶
func (self *MethodDeclaration) AddAttributes(attributes ...Writable) *MethodDeclaration
func (*MethodDeclaration) AddImplicitParams ¶
func (self *MethodDeclaration) AddImplicitParams(params ...Writable) *MethodDeclaration
func (*MethodDeclaration) AddParams ¶
func (self *MethodDeclaration) AddParams(params ...Writable) *MethodDeclaration
func (*MethodDeclaration) Async ¶
func (self *MethodDeclaration) Async() *MethodDeclaration
func (*MethodDeclaration) Attribute ¶
func (self *MethodDeclaration) Attribute(code string) *MethodDeclaration
func (*MethodDeclaration) Define ¶
func (self *MethodDeclaration) Define() *StatementsDeclaration
func (*MethodDeclaration) ImplicitParam ¶
func (self *MethodDeclaration) ImplicitParam(name string, type_ string) *FieldDeclaration
func (*MethodDeclaration) IsConstructor ¶
func (self *MethodDeclaration) IsConstructor() bool
func (*MethodDeclaration) NoParams ¶
func (self *MethodDeclaration) NoParams() *MethodDeclaration
func (*MethodDeclaration) Override ¶
func (self *MethodDeclaration) Override() *MethodDeclaration
func (*MethodDeclaration) Param ¶
func (self *MethodDeclaration) Param(name string, type_ string) *FieldDeclaration
func (*MethodDeclaration) ParamPerLine ¶
func (self *MethodDeclaration) ParamPerLine() *MethodDeclaration
func (*MethodDeclaration) Private ¶
func (self *MethodDeclaration) Private() *MethodDeclaration
func (*MethodDeclaration) Public ¶
func (self *MethodDeclaration) Public() *MethodDeclaration
func (*MethodDeclaration) Returns ¶
func (self *MethodDeclaration) Returns(returnType string) *MethodDeclaration
func (*MethodDeclaration) WriteCode ¶
func (self *MethodDeclaration) WriteCode(writer CodeWriter)
type StatementsDeclaration ¶
type StatementsDeclaration struct {
// contains filtered or unexported fields
}
func Block ¶
func Block(scope bool) *StatementsDeclaration
func Scope ¶
func Scope(block bool) *StatementsDeclaration
func Statements ¶
func Statements(block bool, scope bool) *StatementsDeclaration
func (*StatementsDeclaration) Add ¶
func (self *StatementsDeclaration) Add(code string) *StatementsDeclaration
func (*StatementsDeclaration) AddCode ¶
func (self *StatementsDeclaration) AddCode(code Writable) *StatementsDeclaration
func (*StatementsDeclaration) AddLn ¶
func (self *StatementsDeclaration) AddLn(code string) *StatementsDeclaration
func (*StatementsDeclaration) Block ¶
func (self *StatementsDeclaration) Block(scope bool) *StatementsDeclaration
func (*StatementsDeclaration) Def ¶
func (self *StatementsDeclaration) Def(name string) *MethodDeclaration
func (*StatementsDeclaration) Scope ¶
func (self *StatementsDeclaration) Scope(block bool) *StatementsDeclaration
func (*StatementsDeclaration) Val ¶
func (self *StatementsDeclaration) Val(name string, type_ string) *FieldDeclaration
func (*StatementsDeclaration) Var ¶
func (self *StatementsDeclaration) Var(name string, type_ string) *FieldDeclaration
func (*StatementsDeclaration) WriteCode ¶
func (self *StatementsDeclaration) WriteCode(writer CodeWriter)
type TraitDeclaration ¶
type TraitDeclaration struct {
// contains filtered or unexported fields
}
func Trait ¶
func Trait(name string) *TraitDeclaration
func (*TraitDeclaration) AddAttributes ¶
func (self *TraitDeclaration) AddAttributes(attributes ...Writable) *TraitDeclaration
func (*TraitDeclaration) Attribute ¶
func (self *TraitDeclaration) Attribute(code string) *TraitDeclaration
func (*TraitDeclaration) Define ¶
func (self *TraitDeclaration) Define(block bool) *StatementsDeclaration
func (*TraitDeclaration) Extends ¶
func (self *TraitDeclaration) Extends(types ...string) *TraitDeclaration
func (*TraitDeclaration) Private ¶
func (self *TraitDeclaration) Private() *TraitDeclaration
func (*TraitDeclaration) Public ¶
func (self *TraitDeclaration) Public() *TraitDeclaration
func (*TraitDeclaration) Sealed ¶
func (self *TraitDeclaration) Sealed() *TraitDeclaration
func (*TraitDeclaration) WriteCode ¶
func (self *TraitDeclaration) WriteCode(writer CodeWriter)
type UnitDeclaration ¶
type UnitDeclaration struct {
// contains filtered or unexported fields
}
func Unit ¶
func Unit(package_ string) *UnitDeclaration
func (*UnitDeclaration) AddDeclarations ¶
func (self *UnitDeclaration) AddDeclarations(declarations ...Writable) *UnitDeclaration
func (*UnitDeclaration) AddImports ¶
func (self *UnitDeclaration) AddImports(imports ...string) *UnitDeclaration
func (*UnitDeclaration) Code ¶
func (self *UnitDeclaration) Code() string
func (*UnitDeclaration) Import ¶
func (self *UnitDeclaration) Import(package_ string) *UnitDeclaration
func (*UnitDeclaration) WriteCode ¶
func (self *UnitDeclaration) WriteCode(writer CodeWriter)
type Writable ¶
type Writable interface {
WriteCode(writer CodeWriter)
}
type WritableCode ¶
type WritableCode struct {
// contains filtered or unexported fields
}
func C ¶
func C(code string) *WritableCode
func Code ¶
func Code(code string) *WritableCode
func Int ¶
func Int(value int) *WritableCode
func Str ¶
func Str(value string) *WritableCode
func (*WritableCode) WriteCode ¶
func (self *WritableCode) WriteCode(writer CodeWriter)
Click to show internal directories.
Click to hide internal directories.