execute

package
v0.0.0-...-c8b78b8 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallBondResource

func CallBondResource(context context.Context, channel chan *treactorpb.Bond, molecule string)

func CallElementResource

func CallElementResource(context context.Context, channel chan *treactorpb.Bond, symbol string)

Types

type Block

type Block struct {
	Block string
	KV    map[string]string
	// contains filtered or unexported fields
}

func ParseBlock

func ParseBlock(block string) (*Block, error)

func (*Block) Calls

func (o *Block) Calls() int

func (*Block) Execute

func (o *Block) Execute(ctx context.Context, channel chan *treactorpb.Bond)

func (*Block) String

func (o *Block) String() string

type Operator

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

func (*Operator) Calls

func (o *Operator) Calls() int

func (*Operator) Execute

func (o *Operator) Execute(ctx context.Context, channel chan *treactorpb.Bond)

func (*Operator) String

func (o *Operator) String() string

type Parser

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

Parser represents a parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new instance of Parser.

type Plan

type Plan interface {
	String() string
	Execute(ctx context.Context, channel chan *treactorpb.Bond)
	Calls() int
}

func Parse

func Parse(molecule string) (plan Plan, err error)

type Scanner

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

func NewScanner

func NewScanner(r io.Reader) *Scanner

NewScanner returns a new instance of Scanner.

func (*Scanner) Scan

func (s *Scanner) Scan() (tok Token, lit string)

Scan returns the next token and literal value.

type Token

type Token int
const (
	// Special tokens
	ILLEGAL Token = iota
	EOF
	WS

	// Literals
	WORD
	NUMBER

	// Misc characters
	MULTIPLY // *
	PLUS     // ^
	COMMA    // ,
	COLON    // :

	BLOCK_START // [
	BLOCK_END   // ]
)

Jump to

Keyboard shortcuts

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