Documentation ¶
Overview ¶
Package asm implements the Good Ethereum Assembler (geas).
For a description of the geas language, see the README.md file in the project root.
Index ¶
- type Compiler
- func (c *Compiler) CompileFile(filename string) []byte
- func (c *Compiler) CompileString(input string) []byte
- func (c *Compiler) Errors() []error
- func (c *Compiler) SetDebugLexer(on bool)
- func (c *Compiler) SetIncludeDepthLimit(limit int)
- func (c *Compiler) SetMaxErrors(limit int)
- func (c *Compiler) SetUsePush0(on bool)
- type Position
- type PositionError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler performs the assembling.
func NewCompiler ¶
NewCompiler creates a compiler. The passed file system is used to resolve import file names.
func (*Compiler) CompileFile ¶
CompileString compiles the given program text and returns the corresponding bytecode. If compilation fails, the returned slice is nil. Use the Errors method to get parsing/compilation errors.
func (*Compiler) CompileString ¶
CompileString compiles the given program text and returns the corresponding bytecode. If compilation fails, the returned slice is nil. Use the Errors method to get parsing/compilation errors.
func (*Compiler) SetDebugLexer ¶
SetDebugLexer enables/disables printing of the token stream to stdout.
func (*Compiler) SetIncludeDepthLimit ¶
SetDebugLexer enables/disables printing of the token stream to stdout.
func (*Compiler) SetMaxErrors ¶
SetMaxErrors sets the limit on the number of errors that can happen before the compiler gives up.
func (*Compiler) SetUsePush0 ¶
SetUsePush0 enables/disables use of the PUSH0 instruction. It's on by default.
type PositionError ¶
PositionError is an error containing a file position.