Documentation ¶
Overview ¶
Package tokens contains the definitions for all gecko symbols/tokens
Index ¶
- type Addition
- type Argument
- type Assignment
- type CImport
- type Class
- type ClassBlockField
- type ClassField
- type ClassMethod
- type Comparison
- type Declaration
- type Else
- type ElseIf
- type Entry
- type Enum
- type Equality
- type Expression
- type Field
- type File
- type ForInLoop
- type ForOfLoop
- type FuncCall
- type If
- type Implementation
- type ImplementationField
- type Import
- type Literal
- type Loop
- type Method
- type Multiplication
- type Object
- type ObjectKeyValue
- type Primary
- type SizeDef
- type Trait
- type TypeRef
- type Unary
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addition ¶
type Addition struct { Multiplication *Multiplication `parser:"@@"` Op string `parser:"[ @( '-' | '+' | '|' | '&' | '>' '>' '>' | '<' '<' '<')"` Next *Addition `parser:" @@ ]"` // contains filtered or unexported fields }
type Argument ¶
type Argument struct { Name string `parser:"[ @Ident ':' ]"` Value *Expression `parser:"( @@"` SubCall *FuncCall `parser:"| @@)"` // contains filtered or unexported fields }
type Assignment ¶
type Assignment struct { Name string `parser:"@Ident"` Value *Expression `parser:"'=' @@"` // contains filtered or unexported fields }
type CImport ¶
type Class ¶
type Class struct { Visibility string `parser:"[ @'private' | @'public' | @'protected' ]"` ExternalName string `parser:"[ 'external' @String ]"` Name string `parser:"'class' @Ident"` Fields []*ClassBlockField `parser:"'{' { @@ } '}'"` Implementations []*Implementation // contains filtered or unexported fields }
type ClassBlockField ¶
type ClassField ¶
type ClassField struct { Field // contains filtered or unexported fields }
type ClassMethod ¶
type ClassMethod struct { Method // contains filtered or unexported fields }
type Comparison ¶
type Comparison struct { Addition *Addition `parser:"@@"` Op string `parser:"[ @( '>' | '>' '=' | '<' | '<' '=' )"` Next *Comparison `parser:" @@ ]"` // contains filtered or unexported fields }
type Declaration ¶
type Else ¶
type Else struct { Value []*Entry `parser:"'else' '{' { @@ } '}'"` // contains filtered or unexported fields }
type ElseIf ¶
type ElseIf struct { Expression *Expression `parser:"'else' 'if' '(' @@ ')'"` Value []*Entry `parser:"'{' { @@ } '}'"` ElseIf *ElseIf `parser:"[ @@ "` Else *Else `parser:"| @@ ]"` // contains filtered or unexported fields }
type Entry ¶
type Entry struct { Return *Expression `parser:"'return' @@"` VoidReturn *bool `parser:"| @'return'"` Assignment *Assignment `parser:"| @@"` ElseIf *ElseIf `parser:"| @@"` Else *Else `parser:"| @@"` If *If `parser:"| @@"` FuncCall *FuncCall `parser:"| @@"` Method *Method `parser:"| @@"` Class *Class `parser:"| @@"` Implementation *Implementation `parser:"| @@"` Trait *Trait `parser:"| @@"` Enum *Enum `parser:"| @@"` Field *Field `parser:"| @@"` Loop *Loop `parser:"| @@"` CImport *CImport `parser:"| @@"` Declaration *Declaration `parser:"| @@"` Import *Import `parser:"| @@"` // contains filtered or unexported fields }
type Enum ¶
type Equality ¶
type Equality struct { Comparison *Comparison `parser:"@@"` Op string `parser:"[ @( '!' '=' | '=' '=' )"` Next *Equality `parser:" @@ ]"` // contains filtered or unexported fields }
type Expression ¶
type Expression struct { Equality *Equality `parser:"@@"` // contains filtered or unexported fields }
type Field ¶
type Field struct { Visibility string `parser:"[ @'private' | @'public' | @'protected' | @'external' ]"` Mutability string `parser:"@'let'"` Name string `parser:"@Ident"` Type *TypeRef `parser:"[ ':' @@ ]"` Value *Expression `parser:"[ '=' @@ ]"` // contains filtered or unexported fields }
type ForInLoop ¶
type ForInLoop struct { Variable *Field `parser:"@@ 'in'"` SourceArray *Expression `parser:"@@"` // contains filtered or unexported fields }
type ForOfLoop ¶
type ForOfLoop struct { Variable *Field `parser:"@@ 'of'"` SourceArray *Expression `parser:"@@"` // contains filtered or unexported fields }
type FuncCall ¶
type If ¶
type If struct { Expression *Expression `parser:"'if' '(' @@ ')'"` Value []*Entry `parser:"'{' { @@ } '}'"` ElseIf *ElseIf `parser:"[ @@ "` Else *Else `parser:"| @@ ]"` // contains filtered or unexported fields }
type Implementation ¶
type Implementation struct { Visibility string `parser:"[ @'private' | @'public' | @'protected' ]"` Default bool `parser:"[ @'default' ]"` Name string `parser:"'impl' @Ident"` For string `parser:"['for' @Ident]"` Fields []*ImplementationField `parser:"[ '{' { @@ } '}' ]"` // contains filtered or unexported fields }
type ImplementationField ¶
type ImplementationField struct { Name string `parser:"'func' @Ident"` Arguments []*Value `parser:"[ '(' [ @@ { ',' @@ } ] ')' ]"` Type *TypeRef `parser:"':' @@"` Value []*Entry `parser:"[ '{' @@* '}' ]"` // contains filtered or unexported fields }
func (*ImplementationField) ToMethodToken ¶
func (i *ImplementationField) ToMethodToken() *Method
type Import ¶
type Literal ¶
type Literal struct { IsPointer bool `parser:"[ @'&' ]"` FuncCall *FuncCall `parser:"( @@"` Bool string `parser:" | @( 'true' | 'false' )"` String string `parser:" | @String"` Symbol string `parser:" | @Ident"` Number string `parser:" | @Number"` Object []*ObjectKeyValue `parser:" | '{' [ @@ { ',' @@ } ] '}'"` Array []*Literal `parser:" | '[' [ @@ { ',' @@ } ] ']' )"` ArrayIndex *Literal `parser:"[ '[' @@ ']' ]"` // contains filtered or unexported fields }
type Loop ¶
type Loop struct { For string `parser:"'for'"` ForOf *ForOfLoop `parser:"( @@"` ForIn *ForInLoop `parser:" | @@"` ForExpression *Expression `parser:" | @@ )"` Value []*Entry `parser:" '{' @@* '}' "` // contains filtered or unexported fields }
type Method ¶
type Method struct { Visibility string `parser:"[ @'private' | @'public' | @'protected' | @'external' ]"` Variardic bool `parser:"[ @'variardic' ]"` Name string `parser:"'func' @Ident"` Arguments []*Value `parser:"'(' [ @@ { ',' @@ } ] ')'"` Type *TypeRef `parser:"[ ':' @@ ]"` Value []*Entry `parser:"[ '{' @@* '}' ]"` // contains filtered or unexported fields }
type Multiplication ¶
type Multiplication struct { Unary *Unary `parser:"@@"` Op string `parser:"[ @( '/' | '*' )"` Next *Multiplication `parser:" @@ ]"` // contains filtered or unexported fields }
type ObjectKeyValue ¶
type ObjectKeyValue struct { Key string `parser:"@Ident ':'"` Value *Expression `parser:"@@"` // contains filtered or unexported fields }
type Primary ¶
type Primary struct { Literal *Literal `parser:"@@"` // IsPointer *bool `parser:"[ '&' ]"` // FuncCall *FuncCall `parser:"( @@"` // Bool string `parser:" | ( @'true' | @'false' )"` // Nil *bool `parser:" | @'nil'"` // String string `parser:" | @String"` // Symbol string `parser:" | @Ident"` // Number string `parser:" | @Number"` SubExpression *Expression `parser:" | '(' @@ ')'"` // contains filtered or unexported fields }
type SizeDef ¶
type Trait ¶
type Trait struct { Name string `parser:"'trait' @Ident"` Type *TypeRef `parser:"'<' @@ '>'"` Fields []*ImplementationField `parser:"'{' { @@ } '}'"` // contains filtered or unexported fields }
type TypeRef ¶
Click to show internal directories.
Click to hide internal directories.