Documentation ¶
Overview ¶
Package ast declares the types used to represent syntax trees for Gor packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadExpr ¶
A BadExpr node is a placeholder for an expression containing syntax errors for which a correct expression node cannot be created.
type BasicLit ¶
type BasicLit struct { ValuePos gotoken.Pos // literal position Kind token.Token // token.INT, token.FLOAT, token.IMAG, token.CHAR, or token.STRING Value string // literal string; e.g. 42, 0x7f, 3.14, 1e-9, 2.4i, 'a', '\x7f', "foo" or `\m\n\o` }
A BasicLit node describes a basic literal.
type BinaryExpr ¶
type BinaryExpr struct { X Expr // left operand OpPos gotoken.Pos // position of Op Op token.Token // operator Y Expr // right operand }
BinaryExpr represents an expression operating on two operands.
type Decl ¶
type Decl interface {
// contains filtered or unexported methods
}
Decl declaration node int the AST.
type Expr ¶
type Expr interface {
// contains filtered or unexported methods
}
Expr represents an expression.
type GenDecl ¶
type GenDecl struct { TokPos gotoken.Pos // position of Tok Tok token.Token // IMPORT, CONST, TYPE, or VAR Lparen gotoken.Pos // position of '(', if any Specs []Spec Rparen gotoken.Pos // position of ')', if any }
A GenDecl node (generic declaration node) represents an import, constant, type or variable declaration.
type ImportSpec ¶
type ImportSpec struct { Name *Ident // local package name (including "."); or nil Path *BasicLit // import path }
ImportSpec represents a node for an import declaration.
type Spec ¶
type Spec interface {
// contains filtered or unexported methods
}
The Spec type stands for any of *ImportSpec, *ValueSpec, and *TypeSpec.
Click to show internal directories.
Click to hide internal directories.