Documentation ¶
Overview ¶
Package compiler compiles a B++ AST tree into LLVM IR, which can then be compiled into extremely high-performance Assembly.
Index ¶
- func AddFunction(fn *parser.FunctionBlock) error
- func Compile(prog *parser.Program) (string, error)
- func CompileArgs(stm *parser.ArgsStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileArray(stm *parser.ArrayStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileBlock(stms []parser.Statement, block *ir.Block) (*ir.Block, error)
- func CompileCeil(stm *parser.CeilStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileChoose(stm *parser.ChooseStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileCompare(stm *parser.ComparisonStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileConcat(stm *parser.ConcatStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileData(stm *parser.Data, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileDefine(stm *parser.DefineStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileFloor(stm *parser.FloorStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileFunctionCall(stm *parser.FunctionCallStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileIf(stm *parser.IfStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileIfBlock(stm *parser.IfBlock, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileIndex(stm *parser.IndexStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileMath(stm *parser.MathStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileRandint(stm *parser.RandintStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileRandom(stm *parser.RandomStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileRound(stm *parser.RoundStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileStmt(stm parser.Statement, b *ir.Block) (value.Value, *ir.Block, error)
- func CompileTypeCast(stm *parser.TypeCastStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileVar(stm *parser.VarStmt, block *ir.Block) (value.Value, *ir.Block, error)
- func CompileWhileBlock(stm *parser.WhileBlock, block *ir.Block) (value.Value, *ir.Block, error)
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFunction ¶
func AddFunction(fn *parser.FunctionBlock) error
func CompileArgs ¶
func CompileArray ¶
func CompileCeil ¶
func CompileChoose ¶
func CompileCompare ¶
func CompileConcat ¶
func CompileData ¶
func CompileDefine ¶
func CompileFloor ¶
func CompileFunctionCall ¶
func CompileIfBlock ¶
func CompileIndex ¶
func CompileMath ¶
func CompileRandint ¶
func CompileRandom ¶
Using this method: https://stackoverflow.com/a/64286825/11388343
func CompileRound ¶
func CompileStmt ¶
func CompileTypeCast ¶
func CompileVar ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.