Documentation ¶
Index ¶
- type Alias
- type AnnAssign
- type Arg
- type Arguments
- type Assert
- type Assign
- type AsyncFor
- type AsyncFunctionDef
- type AsyncWith
- type Attribute
- type AugAssign
- type Await
- type BinOp
- type BoolOp
- type BoolOpExpr
- type Break
- type Bytes
- type Call
- type ClassDef
- type CmpOp
- type Comment
- type Compare
- type Comprehension
- type ConstantExpr
- type Continue
- type Delete
- type Dict
- type DictComp
- type DocString
- type Ellipsis
- type ExceptHandler
- type Expr
- type ExprContext
- type ExprStmt
- type ExtSlice
- type For
- type FormattedValue
- type FunctionDef
- type GeneratorExp
- type Global
- type Identifier
- type If
- type IfExp
- type Import
- type ImportFrom
- type Index
- type JoinedStr
- type Keyword
- type Lambda
- type List
- type ListComp
- type Module
- type Name
- type NameConstant
- type Nonlocal
- type Num
- type Operator
- type Pass
- type Raise
- type RangeSlice
- type Return
- type Set
- type SetComp
- type Singleton
- type Slice
- type Starred
- type Stmt
- type Str
- type Subscript
- type Try
- type Tuple
- type UnaryOp
- type UnaryOpExpr
- type While
- type With
- type WithItem
- type Writer
- type Yield
- type YieldFrom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alias ¶
type Alias struct { Name Identifier Asname *Identifier }
import name with optional 'as' alias.
type Arg ¶
type Arg struct { Arg Identifier Annotation Expr }
type AsyncFunctionDef ¶
type AsyncFunctionDef struct { Name Identifier Args Arguments Body []Stmt DecoratorList []Expr Returns Expr }
type Attribute ¶
type Attribute struct { Value Expr Attr Identifier Ctx ExprContext }
the following expression can appear in assignment context
func (Attribute) Precedence ¶
type Await ¶
type Await struct{ Value Expr }
the grammar constrains where yield expressions can occur
func (Await) Precedence ¶
type BinOp ¶
func (BinOp) Precedence ¶
type BoolOpExpr ¶
func (BoolOpExpr) Precedence ¶
func (e BoolOpExpr) Precedence() int
type Call ¶
func (Call) Precedence ¶
type ClassDef ¶
type ClassDef struct { Name Identifier Bases []Expr Keywords []Keyword Body []Stmt DecoratorList []Expr }
type Compare ¶
need sequences for compare to distinguish between x < 4 < 3 and struct {< x 4} < 3
func (Compare) Precedence ¶
type ConstantExpr ¶
type ConstantExpr struct{ Value interface{} }
func (ConstantExpr) Precedence ¶
func (ConstantExpr) Precedence() int
type Dict ¶
func (Dict) Precedence ¶
type DictComp ¶
type DictComp struct { Key Expr Value Expr Generators []Comprehension }
func (DictComp) Precedence ¶
type ExceptHandler ¶
type ExceptHandler struct { Typ Expr Name Identifier Body []Stmt }
type ExprContext ¶
type ExprContext int
const ( LoadStore ExprContext = iota Del AugLoad AugStore Param )
type FormattedValue ¶
func (FormattedValue) Precedence ¶
func (FormattedValue) Precedence() int
type FunctionDef ¶
type FunctionDef struct { Name Identifier Args Arguments Body []Stmt DecoratorList []Expr Returns Expr }
type GeneratorExp ¶
type GeneratorExp struct { Elt Expr Generators []Comprehension }
func (GeneratorExp) Precedence ¶
func (GeneratorExp) Precedence() int
type Global ¶
type Global struct{ Names []Identifier }
type Identifier ¶
type Identifier string
type IfExp ¶
func (IfExp) Precedence ¶
type ImportFrom ¶
type ImportFrom struct { Module *Identifier Names []Alias Level *int }
type Keyword ¶
type Keyword struct { Arg *Identifier Value Expr }
keyword arguments supplied to call (NULL identifier for **kwargs)
type Lambda ¶
func (Lambda) Precedence ¶
type ListComp ¶
type ListComp struct { Elt Expr Generators []Comprehension }
func (ListComp) Precedence ¶
type NameConstant ¶
type NameConstant struct{ Value Singleton }
func (NameConstant) Precedence ¶
func (NameConstant) Precedence() int
type Nonlocal ¶
type Nonlocal struct{ Names []Identifier }
type RangeSlice ¶
type SetComp ¶
type SetComp struct { Elt Expr Generators []Comprehension }
func (SetComp) Precedence ¶
type Str ¶
type Str struct{ S string } // need to specify raw; unicode; *etc
func (Str) Precedence ¶
type Subscript ¶
type Subscript struct { Value Expr Slice Slice Ctx ExprContext }
func (Subscript) Precedence ¶
type UnaryOpExpr ¶
func (UnaryOpExpr) Precedence ¶
func (e UnaryOpExpr) Precedence() int
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) WriteModule ¶
Click to show internal directories.
Click to hide internal directories.