text

package
v0.0.0-...-c1d2b53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionInvoke = 1
	ActionGet    = 2
)
View Source
const (
	AssertReturn     = 1
	AssertTrap       = 2
	AssertExhaustion = 3
	AssertMalformed  = 4
	AssertInvalid    = 5
	AssertUnlinkable = 6
)

Variables

This section is empty.

Functions

func CompileModule

func CompileModule(input antlr.CharStream) (m *binary.Module, err error)

func CompileModuleFile

func CompileModuleFile(filename string) (*binary.Module, error)

WAT Module

func CompileModuleStr

func CompileModuleStr(s string) (*binary.Module, error)

Types

type Action

type Action struct {
	Kind       byte
	ModuleName string
	ItemName   string
	Expr       []binary.Instruction
}

type Assertion

type Assertion struct {
	Line    int
	Kind    byte
	Action  *Action
	Result  []binary.Instruction
	Module  interface{}
	Failure string
}

type BinaryModule

type BinaryModule struct {
	Line int
	Name string
	Data []byte
}

type ErrorListener

type ErrorListener struct {
	antlr.DefaultErrorListener
	// contains filtered or unexported fields
}

func (*ErrorListener) GetErrors

func (listener *ErrorListener) GetErrors(input antlr.CharStream) error

func (*ErrorListener) SyntaxError

func (listener *ErrorListener) SyntaxError(recognizer antlr.Recognizer,
	offendingSymbol interface{}, line, column int, msg string,
	e antlr.RecognitionException)

type Meta

type Meta struct {
}

type QuotedModule

type QuotedModule struct {
	Line int
	Name string
	Text string
}

type Register

type Register struct {
	ModuleName string
	Name       string
}

type Script

type Script struct {
	Cmds []interface{}
}

https://github.com/WebAssembly/spec/tree/master/interpreter#scripts

func CompileScript

func CompileScript(input antlr.CharStream) (s *Script, err error)

func CompileScriptFile

func CompileScriptFile(filename string) (*Script, error)

WAST Script

func CompileScriptStr

func CompileScriptStr(s string) (*Script, error)

type SemanticError

type SemanticError struct {
	// contains filtered or unexported fields
}

func (*SemanticError) Error

func (e *SemanticError) Error() string

func (*SemanticError) FillDetail

func (e *SemanticError) FillDetail(input antlr.CharStream)

type SyntaxError

type SyntaxError struct {
	// contains filtered or unexported fields
}

func (SyntaxError) Error

func (err SyntaxError) Error() string

type SyntaxErrors

type SyntaxErrors []SyntaxError

func (SyntaxErrors) Error

func (errs SyntaxErrors) Error() string

func (SyntaxErrors) FillDetail

func (errs SyntaxErrors) FillDetail(input antlr.CharStream)

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

func (*ValidationError) Error

func (e *ValidationError) Error() string

func (*ValidationError) FillDetail

func (e *ValidationError) FillDetail(input antlr.CharStream)

type WatModule

type WatModule struct {
	Line   int
	Name   string
	Module *binary.Module
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL