Documentation
¶
Overview ¶
Package expr defines data structures representing Neugram expressions.
Index ¶
- type ArrayLiteral
- type Bad
- type BasicLiteral
- type Binary
- type Call
- type CompLiteral
- type Expr
- type FuncLiteral
- type Ident
- type Index
- type MapLiteral
- type Range
- type Selector
- type Shell
- type ShellAndOr
- type ShellAssign
- type ShellCmd
- type ShellList
- type ShellPipeline
- type ShellRedirect
- type ShellSimpleCmd
- type Slice
- type SliceLiteral
- type TableLiteral
- type Type
- type TypeAssert
- type Unary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteral ¶
type ArrayLiteral struct { Position src.Pos Type *tipe.Array Keys []Expr // TODO: could make this []int Values []Expr }
func (*ArrayLiteral) Pos ¶
func (e *ArrayLiteral) Pos() src.Pos
type Bad ¶
type BasicLiteral ¶
func (*BasicLiteral) Pos ¶
func (e *BasicLiteral) Pos() src.Pos
type Binary ¶
type Call ¶
type CompLiteral ¶
type CompLiteral struct { Position src.Pos Type tipe.Type Keys []Expr // TODO: could make this []string Values []Expr }
func (*CompLiteral) Pos ¶
func (e *CompLiteral) Pos() src.Pos
type Expr ¶
type FuncLiteral ¶
type FuncLiteral struct { Position src.Pos Name string // may be empty ReceiverName string // if non-empty, this is a method PointerReceiver bool Type *tipe.Func ParamNames []string ResultNames []string Body interface{} // *stmt.Block, breaking the package import cycle }
func (*FuncLiteral) Pos ¶
func (e *FuncLiteral) Pos() src.Pos
type Ident ¶
type Index ¶
type MapLiteral ¶
func (*MapLiteral) Pos ¶
func (e *MapLiteral) Pos() src.Pos
type Range ¶
type Selector ¶
type Shell ¶
type Shell struct { Position src.Pos Cmds []*ShellList TrapOut bool // override os.Stdout, outer language collect it DropOut bool // send stdout to /dev/null (just an optimization) ElideError bool // FreeVars is a list of $-parameters referred to in this // shell expression that are declared statically in the // scope of the expression. Not all parameters have to be // declared statically in the scope, as they may be // referring to run time environment variables. FreeVars []string }
type ShellAndOr ¶
type ShellAndOr struct { Position src.Pos Pipeline []*ShellPipeline Sep []token.Token // '&&' or '||'. len(Sep) == len(Pipeline)-1 Background bool }
func (*ShellAndOr) Pos ¶
func (e *ShellAndOr) Pos() src.Pos
type ShellAssign ¶
func (ShellAssign) Pos ¶
func (e ShellAssign) Pos() src.Pos
type ShellCmd ¶
type ShellCmd struct { Position src.Pos SimpleCmd *ShellSimpleCmd // or: Subshell *ShellList }
type ShellList ¶
type ShellList struct { Position src.Pos AndOr []*ShellAndOr }
type ShellPipeline ¶
func (*ShellPipeline) Pos ¶
func (e *ShellPipeline) Pos() src.Pos
type ShellRedirect ¶
type ShellRedirect struct { Position src.Pos Number *int Token token.Token // '<', '<&', '>', '>&', '>>' Filename string }
func (*ShellRedirect) Pos ¶
func (e *ShellRedirect) Pos() src.Pos
type ShellSimpleCmd ¶
type ShellSimpleCmd struct { Position src.Pos Redirect []*ShellRedirect Assign []ShellAssign Args []string }
func (*ShellSimpleCmd) Pos ¶
func (e *ShellSimpleCmd) Pos() src.Pos
type Slice ¶
type SliceLiteral ¶
type SliceLiteral struct { Position src.Pos Type *tipe.Slice Keys []Expr // TODO: could make this []int Values []Expr }
func (*SliceLiteral) Pos ¶
func (e *SliceLiteral) Pos() src.Pos
type TableLiteral ¶
func (*TableLiteral) Pos ¶
func (e *TableLiteral) Pos() src.Pos
type Type ¶
Type is not a typical Neugram expression. It is used only for when types are passed as arguments to the builtin functions new and make.
Source Files
¶
- expr.go
Click to show internal directories.
Click to hide internal directories.