stmt

package
v0.0.0-...-d472ff9 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: BSD-2-Clause Imports: 4 Imported by: 12

Documentation

Overview

Package stmt defines data structures representing Neugram statements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assign

type Assign struct {
	Position src.Pos
	Decl     bool
	Left     []expr.Expr
	Right    []expr.Expr // TODO: give up on multiple rhs values for now.
}

func (*Assign) Pos

func (s *Assign) Pos() src.Pos

type Bad

type Bad struct {
	Position src.Pos
	Error    error
}

func (*Bad) Pos

func (s *Bad) Pos() src.Pos

type Block

type Block struct {
	Position src.Pos
	Stmts    []Stmt
}

func (*Block) Pos

func (s *Block) Pos() src.Pos

type Branch

type Branch struct {
	Position src.Pos
	Type     token.Token // Continue, Break, Goto, or Fallthrough
	Label    string
}

func (*Branch) Pos

func (s *Branch) Pos() src.Pos

type Const

type Const struct {
	Position src.Pos
	NameList []string
	Type     tipe.Type
	Values   []expr.Expr
}

func (*Const) Pos

func (s *Const) Pos() src.Pos

type ConstSet

type ConstSet struct {
	Position src.Pos
	Consts   []*Const
}

func (*ConstSet) Pos

func (s *ConstSet) Pos() src.Pos

type Defer

type Defer struct {
	Position src.Pos
	Expr     expr.Expr
}

func (*Defer) Pos

func (s *Defer) Pos() src.Pos

type For

type For struct {
	Position src.Pos
	Init     Stmt
	Cond     expr.Expr
	Post     Stmt
	Body     Stmt // always *BlockStmt
}

func (*For) Pos

func (s *For) Pos() src.Pos

type Go

type Go struct {
	Position src.Pos
	Call     *expr.Call
}

func (*Go) Pos

func (s *Go) Pos() src.Pos

type If

type If struct {
	Position src.Pos
	Init     Stmt
	Cond     expr.Expr
	Body     Stmt // always *BlockStmt
	Else     Stmt
}

func (*If) Pos

func (s *If) Pos() src.Pos

type Import

type Import struct {
	Position src.Pos
	Name     string
	Path     string
}

func (*Import) Pos

func (s *Import) Pos() src.Pos

type ImportSet

type ImportSet struct {
	Position src.Pos
	Imports  []*Import
}

func (*ImportSet) Pos

func (s *ImportSet) Pos() src.Pos

type Labeled

type Labeled struct {
	Position src.Pos
	Label    string
	Stmt     Stmt
}

func (*Labeled) Pos

func (s *Labeled) Pos() src.Pos

type MethodikDecl

type MethodikDecl struct {
	Position src.Pos
	Name     string
	Type     *tipe.Named
	Methods  []*expr.FuncLiteral
}

func (*MethodikDecl) Pos

func (s *MethodikDecl) Pos() src.Pos

type Range

type Range struct {
	Position src.Pos
	Decl     bool
	Key      expr.Expr
	Val      expr.Expr
	Expr     expr.Expr
	Body     Stmt // always *BlockStmt
}

func (*Range) Pos

func (s *Range) Pos() src.Pos

type Return

type Return struct {
	Position src.Pos
	Exprs    []expr.Expr
}

func (*Return) Pos

func (s *Return) Pos() src.Pos

type Select

type Select struct {
	Position src.Pos
	Cases    []SelectCase
}

func (*Select) Pos

func (s *Select) Pos() src.Pos

type SelectCase

type SelectCase struct {
	Position src.Pos
	Default  bool
	Stmt     Stmt // a recv- or send-stmt
	Body     *Block
}

func (SelectCase) Pos

func (s SelectCase) Pos() src.Pos

type Send

type Send struct {
	Position src.Pos
	Chan     expr.Expr
	Value    expr.Expr
}

Send is channel send statement, "a <- b".

func (*Send) Pos

func (s *Send) Pos() src.Pos

type Simple

type Simple struct {
	Position src.Pos
	Expr     expr.Expr
}

func (*Simple) Pos

func (s *Simple) Pos() src.Pos

type Stmt

type Stmt interface {
	Pos() src.Pos // implements syntax.Node
	// contains filtered or unexported methods
}

type Switch

type Switch struct {
	Position src.Pos
	Init     Stmt
	Cond     expr.Expr
	Cases    []SwitchCase
}

func (*Switch) Pos

func (s *Switch) Pos() src.Pos

type SwitchCase

type SwitchCase struct {
	Position src.Pos
	Conds    []expr.Expr
	Default  bool
	Body     *Block
}

func (SwitchCase) Pos

func (s SwitchCase) Pos() src.Pos

type TypeDecl

type TypeDecl struct {
	Position src.Pos
	Name     string
	Type     *tipe.Named
}

func (*TypeDecl) Pos

func (s *TypeDecl) Pos() src.Pos

type TypeDeclSet

type TypeDeclSet struct {
	Position  src.Pos
	TypeDecls []*TypeDecl
}

func (*TypeDeclSet) Pos

func (s *TypeDeclSet) Pos() src.Pos

type TypeSwitch

type TypeSwitch struct {
	Position src.Pos
	Init     Stmt // initialization statement; or nil
	Assign   Stmt // x := y.(type) or y.(type)
	Cases    []TypeSwitchCase
}

func (*TypeSwitch) Pos

func (s *TypeSwitch) Pos() src.Pos

type TypeSwitchCase

type TypeSwitchCase struct {
	Position src.Pos
	Default  bool
	Types    []tipe.Type
	Body     *Block
}

func (TypeSwitchCase) Pos

func (s TypeSwitchCase) Pos() src.Pos

type Var

type Var struct {
	Position src.Pos
	NameList []string
	Type     tipe.Type
	Values   []expr.Expr
}

func (*Var) Pos

func (s *Var) Pos() src.Pos

type VarSet

type VarSet struct {
	Position src.Pos
	Vars     []*Var
}

func (*VarSet) Pos

func (s *VarSet) Pos() src.Pos

Jump to

Keyboard shortcuts

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