Documentation ¶
Overview ¶
Package compile declares the functions required to translate an Antha AST into a go source file
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Antha ¶
type Antha struct { SourceSHA256 []byte // contains filtered or unexported fields }
Antha is a preprocessing pass from antha file to go file
type AnthaFile ¶
An AnthaFile is a file generated by the Antha translation process
func (*AnthaFile) NewReader ¶
func (f *AnthaFile) NewReader() io.ReadCloser
NewReader returns a new reader for this file
type AnthaFiles ¶
type AnthaFiles struct {
// contains filtered or unexported fields
}
AnthaFiles is a collection of AnthaFiles
func NewAnthaFiles ¶
func NewAnthaFiles() *AnthaFiles
NewAnthaFiles returns a new collection of AnthaFiles
func (*AnthaFiles) Files ¶
func (f *AnthaFiles) Files() []*AnthaFile
Files returns the files in the collection
type AnthaRoot ¶
type AnthaRoot struct {
// contains filtered or unexported fields
}
An AnthaRoot collects data from multiple Antha passes
func NewAnthaRoot ¶
NewAnthaRoot creates a new AnthaRoot
func (*AnthaRoot) Generate ¶
func (r *AnthaRoot) Generate() (*AnthaFiles, error)
Generate generates additional files not stric
type CommentedNode ¶
type CommentedNode struct { Node interface{} // *ast.File, or ast.Expr, ast.Decl, ast.Spec, or ast.Stmt Comments []*ast.CommentGroup }
A CommentedNode bundles an AST node and corresponding comments. It may be provided as argument to any of the Fprint functions.
type Config ¶
type Config struct { Mode Mode // default: 0 Tabwidth int // default: 8 Indent int // default: 0 (all code is indented at least by this much) }
A Config node controls the output of Fprint.
func (*Config) Fprint ¶
func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node interface{}) (map[int]int, error)
Fprint "pretty-prints" an AST node to output for a given configuration cfg. Position information is interpreted relative to the file set fset. The node type must be *ast.File, *CommentedNode, []ast.Decl, []ast.Stmt, or assignment-compatible to ast.Expr, ast.Decl, ast.Spec, or ast.Stmt.
type Field ¶
type Field struct { Name string Type ast.Expr // Fully qualified go type name Doc string Tag string }
A Field is a field of a message
type Message ¶
type Message struct { Name string Doc string Fields []*Field Kind token.Token // One of token.{DATA, PARAMETERS, OUTPUTS, INPUTS, MESSAGE} }
A Message is an input or an output or user defined type