decompiler

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const LabelPrefix = "jumpTo"

Variables

This section is empty.

Functions

func MLOGToGolang

func MLOGToGolang(input string) (string, error)

func MLOGToGolangBytes

func MLOGToGolangBytes(input []byte) (string, error)

func MLOGToGolangFile

func MLOGToGolangFile(fileName string) (string, error)

func RegisterFuncTranslation

func RegisterFuncTranslation(name string, translator Translator)

Types

type Global

type Global struct {
	Lines       []mlog.MLOGLine
	Labels      map[string]*mlog.MLOGLine
	MappedLines map[int]*mlog.MLOGLine
	Variables   map[string]string
}

func (Global) Assert

func (g Global) Assert(variable string, variableType string) error

func (Global) AssignOrDefine

func (g Global) AssignOrDefine(variable string, variableType string) (token.Token, error)

func (Global) Exists

func (g Global) Exists(variable string, variableType string) (bool, error)

func (Global) GetType

func (g Global) GetType(variable string) (string, error)

func (Global) Resolve

func (g Global) Resolve(str string, variableType string) (ast.Expr, error)

type PreprocessFunc

type PreprocessFunc func(args []string) ([]int, error)

type Resolvable

type Resolvable interface {
	PostProcess(context.Context, *Global) error
	GetValue() string
}

type TranslateFunc

type TranslateFunc func(args []string, global *Global) ([]ast.Stmt, []string, error)

type Translator

type Translator struct {
	Preprocess PreprocessFunc
	Translate  TranslateFunc
}

Jump to

Keyboard shortcuts

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