instruction

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	ToInstruction(parsed parsers.LanguageInstruction) (Instruction, error)
	ToCommonInstruction(parsed parsers.LanguageInstructionCommon) (CommonInstruction, error)
}

Adapter represents instructions adapter

func NewAdapter

func NewAdapter() Adapter

NewAdapter creates a new adapter instance

type Builder

type Builder interface {
	Create() Builder
	WithInstruction(ins CommonInstruction) Builder
	WithCommand(command commands.Command) Builder
	Now() (Instruction, error)
}

Builder represents an instruction builder

func NewBuilder

func NewBuilder() Builder

NewBuilder creates a new builder instance

type CommonInstruction

type CommonInstruction interface {
	IsInstruction() bool
	Instruction() standard_instruction.Instruction
	IsMatch() bool
	Match() match.Match
}

CommonInstruction represents a common instruction

type CommonInstructionBuilder

type CommonInstructionBuilder interface {
	Create() CommonInstructionBuilder
	WithInstruction(ins standard_instruction.Instruction) CommonInstructionBuilder
	WithMatch(match match.Match) CommonInstructionBuilder
	Now() (CommonInstruction, error)
}

CommonInstructionBuilder represents a common instruction builder

func NewCommonInstructionBuilder

func NewCommonInstructionBuilder() CommonInstructionBuilder

NewCommonInstructionBuilder creates a new common instruction builder

type Instruction

type Instruction interface {
	IsInstruction() bool
	Instruction() CommonInstruction
	IsCommand() bool
	Command() commands.Command
}

Instruction represents a language application instruction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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