Documentation
¶
Index ¶
- func Int(value int64) *big.Int
- func WriteString(output io.Writer, data string)
- type Base
- type Cache
- type Compiler
- func (c *Compiler) Add()
- func (c *Compiler) AddInput(input io.Reader)
- func (c *Compiler) Back()
- func (c *Compiler) BigData(name string, data ...*big.Int)
- func (c *Compiler) BigInt(value *big.Int)
- func (c *Compiler) Call(f *Function)
- func (c *Compiler) CallRaw(data string)
- func (c *Compiler) Cast(a, b Type) bool
- func (c *Compiler) Channel() string
- func (c *Compiler) Code(data string)
- func (c *Compiler) CollectAll()
- func (c *Compiler) Compile()
- func (c *Compiler) CompileCache(cache Cache, name string, line int)
- func (c *Compiler) Copy()
- func (c *Compiler) CopyList()
- func (c *Compiler) CopyPipe()
- func (c *Compiler) Data(name string, data []byte)
- func (c *Compiler) DeleteFlag(flag Flag)
- func (c *Compiler) Div()
- func (c *Compiler) Done()
- func (c *Compiler) Drop()
- func (c *Compiler) DropList()
- func (c *Compiler) DropPipe()
- func (c *Compiler) DropType(t Type)
- func (c *Compiler) Error() string
- func (c *Compiler) Exit()
- func (c *Compiler) Expected(tokens ...string)
- func (c *Compiler) Expecting(token string)
- func (c *Compiler) ExpectingType(t Type)
- func (c *Compiler) Expression() Type
- func (c *Compiler) Flip()
- func (c *Compiler) Fork()
- func (c *Compiler) Free()
- func (c *Compiler) FreeList()
- func (c *Compiler) FreePipe()
- func (c *Compiler) FreeType(t Type)
- func (c *Compiler) GainScope()
- func (c *Compiler) Get()
- func (c *Compiler) GetFlag(flag Flag) (Flag, int)
- func (c *Compiler) GetFunction(name string) *Function
- func (c *Compiler) GetOperator(symbol string) Operator
- func (c *Compiler) GetScope() Scope
- func (c *Compiler) GetType(name string) *Type
- func (c *Compiler) GetVariable(name string) Variable
- func (c *Compiler) Global() string
- func (c *Compiler) GlobalFlagExists(f Flag) bool
- func (c *Compiler) Heap()
- func (c *Compiler) HeapList()
- func (c *Compiler) HeapPipe()
- func (c *Compiler) If()
- func (c *Compiler) Info()
- func (c *Compiler) Int(value int64)
- func (c *Compiler) Less()
- func (c *Compiler) Link(data string)
- func (c *Compiler) List()
- func (c *Compiler) Load()
- func (c *Compiler) LoadCache(cache Cache, name string, line int)
- func (c *Compiler) Loop()
- func (c *Compiler) LoseScope()
- func (c *Compiler) Main()
- func (c *Compiler) Make()
- func (c *Compiler) Mod()
- func (c *Compiler) More()
- func (c *Compiler) Move()
- func (c *Compiler) Mul()
- func (c *Compiler) Name(data string)
- func (c *Compiler) NameList(data string)
- func (c *Compiler) NamePipe(data string)
- func (c *Compiler) Native(target, data string)
- func (c *Compiler) NewCache(open, close string) Cache
- func (c *Compiler) No()
- func (c *Compiler) Open()
- func (c *Compiler) Or()
- func (c *Compiler) Peek() string
- func (c *Compiler) Pipe()
- func (c *Compiler) Pop()
- func (c *Compiler) Pow()
- func (c *Compiler) Pull(data string)
- func (c *Compiler) PullList(data string)
- func (c *Compiler) PullPipe(data string)
- func (c *Compiler) PullType(t Type, data string)
- func (c *Compiler) Push(data string)
- func (c *Compiler) PushList(data string)
- func (c *Compiler) PushPipe(data string)
- func (c *Compiler) PushType(t Type, data string)
- func (c *Compiler) Put()
- func (c *Compiler) RaiseError(message Translatable)
- func (c *Compiler) Read()
- func (c *Compiler) Redo()
- func (c *Compiler) Same()
- func (c *Compiler) Scan() string
- func (c *Compiler) ScanEmbeddedStatement(t Type)
- func (c *Compiler) ScanExpression() Type
- func (c *Compiler) ScanIf(test string) bool
- func (c *Compiler) ScanStatement()
- func (c *Compiler) Seek()
- func (c *Compiler) Send()
- func (c *Compiler) Set()
- func (c *Compiler) SetFlag(f Flag)
- func (c *Compiler) SetGlobal(name string, t Type)
- func (c *Compiler) SetGlobalFlag(f Flag)
- func (c *Compiler) SetSyntax(s Syntax)
- func (c *Compiler) SetVariable(name string, t Type)
- func (c *Compiler) Shunt(t Type, precedence int) Type
- func (c *Compiler) Size()
- func (c *Compiler) Stop()
- func (c *Compiler) Sub()
- func (c *Compiler) Swap()
- func (c *Compiler) SwapList()
- func (c *Compiler) SwapOutput()
- func (c *Compiler) SwapPipe()
- func (c *Compiler) Token() string
- func (c *Compiler) UndefinedError(token string)
- func (c *Compiler) Unexpected(token string)
- func (c *Compiler) Unimplemented()
- func (c *Compiler) UpdateFlag(flag Flag)
- func (c *Compiler) UpdateVariable(name string, t Type)
- func (c *Compiler) Used()
- func (c *Compiler) Wrap(data string)
- type Data
- type DefaultBase
- type Expression
- type Flag
- type Function
- type Language
- type Operator
- type Scope
- type Shunt
- type Statement
- type Syntax
- func (s *Syntax) RegisterAlias(from string, to string)
- func (s *Syntax) RegisterExpression(expression Expression)
- func (s *Syntax) RegisterFunction(f *Function)
- func (s *Syntax) RegisterOperator(symbol string, p int)
- func (s *Syntax) RegisterStatement(statement Statement)
- func (s *Syntax) RegisterType(t Type)
- type Translatable
- type Type
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteString ¶
Types ¶
type Compiler ¶
type Compiler struct {
Syntax
CurrentFunction *Function
Language Language
GlobalScope Scope
Scope []Scope
Header io.Writer
Output io.Writer
StdErr []io.Writer
DisableOutput bool
Scanners []*scanner.Scanner
CurrentLines []string
LastLine string
LineOffset int
NextToken string
DoneToken bool
Errors bool
// contains filtered or unexported fields
}
func (*Compiler) CollectAll ¶
func (c *Compiler) CollectAll()
func (*Compiler) DeleteFlag ¶
func (*Compiler) ExpectingType ¶
func (*Compiler) Expression ¶
func (*Compiler) GetFunction ¶
func (*Compiler) GetOperator ¶
func (*Compiler) GetVariable ¶
func (*Compiler) GlobalFlagExists ¶
func (*Compiler) RaiseError ¶
func (c *Compiler) RaiseError(message Translatable)
func (*Compiler) ScanEmbeddedStatement ¶
func (*Compiler) ScanExpression ¶
func (*Compiler) ScanStatement ¶
func (c *Compiler) ScanStatement()
func (*Compiler) SetGlobalFlag ¶
func (*Compiler) SetVariable ¶
func (*Compiler) SwapOutput ¶
func (c *Compiler) SwapOutput()
func (*Compiler) UndefinedError ¶
func (*Compiler) Unexpected ¶
func (*Compiler) Unimplemented ¶
func (c *Compiler) Unimplemented()
func (*Compiler) UpdateFlag ¶
func (*Compiler) UpdateVariable ¶
type DefaultBase ¶
type DefaultBase byte
const ( NULL DefaultBase = iota INT LIST PIPE )
func (DefaultBase) Attach ¶
func (d DefaultBase) Attach(c *Compiler)
func (DefaultBase) Detach ¶
func (d DefaultBase) Detach(c *Compiler)
func (DefaultBase) Drop ¶
func (d DefaultBase) Drop(c *Compiler)
func (DefaultBase) Free ¶
func (d DefaultBase) Free(c *Compiler)
func (DefaultBase) Pull ¶
func (d DefaultBase) Pull(c *Compiler, name string)
func (DefaultBase) Push ¶
func (d DefaultBase) Push(c *Compiler, name string)
type Expression ¶
type Expression struct {
Name Translatable
OnScan func(*Compiler) Type
Detect func(*Compiler) *Type
}
type Language ¶
type Language int
const ( English Language = iota Afrikaans Albanian Amharic Arabic Armenian Azerbaijani Basque Belarusian Bengali Bosnian Bulgarian Burmese Catalan Cebuano Chichewa Chinese Corsican Croatian Czech Danish Dutch Esperanto Estonian Filipino Finnish French Frisian Galician Georgian German Greek Gujarati HaitianCreole Hausa Hawaiian Hebrew Hindi Hmong Hungarian Icelandic Igbo Indonesian Irish Italian Japanese Javanese Kannada Kazakh Khmer Korean Kurdish Kyrgyz Lao Latin Latvian Lithuanian Luxembourgish Macedonian Malagasy Malay Malayalam Maltese Maori Marathi Mongolian Nepali Norwegian Pashto Persian Polish Portuguese Punjabi Romanian Russian Samoan ScotsGaelic Serbian Sesotho Shona Sindhi Sinhala Slovak Slovenian Somali Spanish Sundanese Swahili Swedish Tajik Tamil Telugu Thai Turkish Ukrainian Urdu Uzbek Vietnamese Welsh Xhosa Yiddish Yoruba Zulu Klingon All )
type Statement ¶
type Statement struct {
Name Translatable
OnScan func(*Compiler)
Detect func(*Compiler) bool
}
type Syntax ¶
type Syntax struct {
Name string
Statements []Statement
Expressions []Expression
Types []Type
Functions []*Function
Operators []Operator
Aliases map[string]string
}
func (*Syntax) RegisterAlias ¶
func (*Syntax) RegisterExpression ¶
func (s *Syntax) RegisterExpression(expression Expression)
func (*Syntax) RegisterFunction ¶
func (*Syntax) RegisterOperator ¶
func (*Syntax) RegisterStatement ¶
func (*Syntax) RegisterType ¶
type Translatable ¶
func NoTranslation ¶
func NoTranslation(name string) Translatable
type Type ¶
type Type struct {
Data
Name Translatable
Base Base
Immutable bool
Fake bool
Constant bool
Cast func(c *Compiler, a Type, b Type) bool
Shunt func(c *Compiler, symbol string, a Type, b Type) *Type
Casts []func(c *Compiler, t Type) bool
Shunts map[string]func(*Compiler, Type) Type
Collect func(*Compiler)
EmbeddedStatement func(*Compiler, Type)
}
Click to show internal directories.
Click to hide internal directories.