functions

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFunctions

func GetFunctions() map[string]string

Types

type CodeLine

type CodeLine struct {
	Ok   bool
	Line int
	Code string
}

type FuncContext

type FuncContext struct {
}

func NewFuncContext

func NewFuncContext() *FuncContext

type FuncParser

type FuncParser struct {
	FunCtx *FuncContext
	Codes  []*CodeLine
}

func NewFuncParser

func NewFuncParser(funCtx *FuncContext, codes []*CodeLine) *FuncParser

func (*FuncParser) Parse

func (fp *FuncParser) Parse() ([]*Function, error)

type Function

type Function struct {
	Name       string
	Args       []string
	ArgsValue  []string
	Skip       bool
	Return     string
	ReturnName string
	Code       *CodeLine
}

func ParseFunctions

func ParseFunctions(codes []*CodeLine) ([]*Function, error)

type TestFunctions

type TestFunctions struct {
}

func (*TestFunctions) Assert

func (f *TestFunctions) Assert(v1 string, op string, v2 string) bool

TODO:各种类型比较

func (*TestFunctions) Foreach

func (f *TestFunctions) Foreach(v1 string, op string, v2 string) bool

func (*TestFunctions) Len

func (f *TestFunctions) Len(t string) int

func (*TestFunctions) Match

func (f *TestFunctions) Match(str string, reg string) string

func (*TestFunctions) Print

func (f *TestFunctions) Print(o interface{}) bool

func (*TestFunctions) Replace

func (f *TestFunctions) Replace(str string, old string, new string) string

func (*TestFunctions) Set

func (f *TestFunctions) Set(key string, value string) bool

func (*TestFunctions) Sleep

func (f *TestFunctions) Sleep(t string) bool

func (*TestFunctions) ToLower

func (f *TestFunctions) ToLower(str string) string

func (*TestFunctions) ToUpper

func (f *TestFunctions) ToUpper(str string) string

func (*TestFunctions) While

func (f *TestFunctions) While(v1 string, op string, v2 string) bool

Jump to

Keyboard shortcuts

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