Documentation
¶
Index ¶
- type Array
- type ArrayType
- type Ast
- type Attr
- type Binary
- type Block
- type Break
- type Call
- type Char
- type CheckNull
- type Continue
- type Covert
- type Dot
- type EnumField
- type EnumType
- type Expr
- type Extern
- type Extract
- type Field
- type Float
- type For
- type FuncDecl
- type FuncDef
- type FuncType
- type GenericArgList
- type GenericParam
- type GenericParamList
- type Global
- type Ident
- type IdentExpr
- type IdentType
- type IfElse
- type Import
- type Index
- type Inline
- type Integer
- type Judgment
- type Lambda
- type LambdaType
- type Match
- type MatchCase
- type MatchCaseElem
- type MultipleVariableDef
- type NoInline
- type Param
- type RefType
- type Return
- type SingleVariableDef
- type Stmt
- type String
- type Struct
- type StructType
- type Trait
- type Tuple
- type TupleType
- type Type
- type TypeAlias
- type TypeDef
- type Unary
- type VarArg
- type VarDef
- type VariableDef
- type While
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Begin reader.Position Stmts linkedlist.LinkedList[Stmt] End reader.Position }
Block 代码块
type For ¶
type For struct { Begin reader.Position CursorMut bool Cursor token.Token Iterator Expr Body *Block }
For 遍历
type FuncDecl ¶
type FuncDecl struct { Begin reader.Position Name token.Token Params []Param Ret optional.Optional[Type] End reader.Position }
FuncDecl 函数声明
type FuncDef ¶
type FuncDef struct { Attrs []Attr Begin reader.Position Public bool SelfType optional.Optional[token.Token] FuncDecl GenericParams optional.Optional[*GenericParamList] Body optional.Optional[*Block] }
FuncDef 函数定义
type FuncType ¶
type FuncType struct { Begin reader.Position Params []Type Ret optional.Optional[Type] End reader.Position }
FuncType 函数类型
type GenericArgList ¶
func (*GenericArgList) Output ¶
func (self *GenericArgList) Output(w io.Writer, depth uint) (err error)
func (*GenericArgList) Position ¶
func (self *GenericArgList) Position() reader.Position
type GenericParam ¶
func (*GenericParam) Position ¶
func (self *GenericParam) Position() reader.Position
type GenericParamList ¶
type GenericParamList struct { Begin reader.Position Params []*GenericParam End reader.Position }
func (*GenericParamList) Output ¶
func (self *GenericParamList) Output(w io.Writer, depth uint) (err error)
func (*GenericParamList) Position ¶
func (self *GenericParamList) Position() reader.Position
type Ident ¶
type Ident struct { Pkg optional.Optional[token.Token] Name token.Token GenericArgs optional.Optional[*GenericArgList] }
Ident 标识符
type IfElse ¶
type IfElse struct { Begin reader.Position Cond optional.Optional[Expr] Body *Block Next optional.Optional[*IfElse] }
IfElse if else
type Import ¶
type Import struct { Begin reader.Position Paths []token.Token Alias optional.Optional[token.Token] }
Import 包导入
type LambdaType ¶
LambdaType 匿名函数类型
func (*LambdaType) Position ¶
func (self *LambdaType) Position() reader.Position
type Match ¶
type Match struct { Begin reader.Position Value Expr Cases []MatchCase Other optional.Optional[*Block] End reader.Position }
Match 匹配
type MatchCase ¶
type MatchCaseElem ¶
type MultipleVariableDef ¶
type MultipleVariableDef struct { Attrs []Attr Begin reader.Position Public bool Vars []VarDef Value optional.Optional[Expr] End reader.Position }
MultipleVariableDef 多变量定义
func (*MultipleVariableDef) Output ¶
func (self *MultipleVariableDef) Output(w io.Writer, depth uint) (err error)
func (*MultipleVariableDef) Position ¶
func (self *MultipleVariableDef) Position() reader.Position
func (*MultipleVariableDef) ToSingleList ¶
func (self *MultipleVariableDef) ToSingleList() []*SingleVariableDef
type Param ¶
type SingleVariableDef ¶
type SingleVariableDef struct { Attrs []Attr Begin reader.Position Public bool Var VarDef Value optional.Optional[Expr] }
SingleVariableDef 单变量定义
func (*SingleVariableDef) Output ¶
func (self *SingleVariableDef) Output(w io.Writer, depth uint) (err error)
func (*SingleVariableDef) Position ¶
func (self *SingleVariableDef) Position() reader.Position
type StructType ¶
func (*StructType) Position ¶
func (self *StructType) Position() reader.Position
type Trait ¶
type Trait struct { Begin reader.Position Public bool Name token.Token Methods []*FuncDecl End reader.Position }
Trait 特征
type TypeDef ¶
type TypeDef struct { Begin reader.Position Public bool Name token.Token GenericParams optional.Optional[*GenericParamList] Target Type }
TypeDef 类型定义
type VariableDef ¶
Click to show internal directories.
Click to hide internal directories.