Documentation ¶
Overview ¶
Package apast defines a simplified AST format that is easy to interpret. We make a number of simplifying assumptions:
- We assume that the code already compiles, so we don't check things like type errors.
- There are no operators; they are replaced by function calls.
Index ¶
- type ArrayLiteralExpr
- type AssignStmt
- type BlockStmt
- type BreakStmt
- type EmptyStmt
- type Expr
- type ExprStmt
- type FieldAccessExpr
- type ForStmt
- type FuncCallExpr
- type FuncDecl
- type IdentExpr
- type IfStmt
- type IndexExpr
- type LiteralExpr
- type MethodDecl
- type Package
- type ReturnStmt
- type SliceLiteralExpr
- type Stmt
- type StructLiteralExpr
- type TypeDecl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayLiteralExpr ¶
type AssignStmt ¶
type FieldAccessExpr ¶
type FuncCallExpr ¶
func (*FuncCallExpr) String ¶
func (e *FuncCallExpr) String() string
type LiteralExpr ¶
type LiteralExpr struct {
Val interface{}
}
func (*LiteralExpr) String ¶
func (e *LiteralExpr) String() string
type MethodDecl ¶
type ReturnStmt ¶
type ReturnStmt struct {
Results []Expr
}
type SliceLiteralExpr ¶
type StructLiteralExpr ¶
type TypeDecl ¶
type TypeDecl struct {
Methods map[string]*MethodDecl
}
Click to show internal directories.
Click to hide internal directories.