mt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTags

func FindTags(mtv *MtType, tag ...int) (rv []int)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

func ReplaceBlocksWithNew

func ReplaceBlocksWithNew(search_in_tree **MtType, new_block *MtType)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Find the nodes in tree (blocks) with stated name and replace them with new

Types

type MtType

type MtType struct {
	NodeType    int         // gen.Tok_XXX  ( may be token or parsed Sub-tree-reduced )
	EscapeIt    bool        //
	ID          string      //
	DataType    int         // eval.CtxType_* - data type
	XValue      interface{} //	// All values
	SVal        []string    // Parameters to this node {% cycle v1  v2  v3 as bob silent %} 0=>v1, 1=>v2, 2=>v3
	TVal        []int       // TokNo - The Token Number
	TokVal      []tok.Token // TokNo - The Token Number
	Error       bool        // True if error
	ErrorMsg    string      // The message
	DataVal     interface{} // Data that is used in eval of this node.
	FxId        int         // If Fx - this is the ID of the function to call
	HTML_Output string      //	// Output at end.
	List        []*MtType   // N-Ary tree of children
	LineNo      int         // Where did I come from
	ColNo       int         //
	FileName    string      //
	LValue      bool        // Is this an L-Value (assignable, chanable)
}

func DuplicateTree

func DuplicateTree(tree *MtType) (rv *MtType)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Duplicate a tree

func NewMtType

func NewMtType(t int, v string) (mt *MtType)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

func (*MtType) DumpMtType

func (mt *MtType) DumpMtType(fo io.Writer, pos, depth int)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

func (*MtType) EvalExpr

func (mt *MtType) EvalExpr(Context *eval.ContextType, n, m int) bool

n from beginning to m from end.

func (*MtType) EvalVars

func (mt *MtType) EvalVars(in []string) (rv []string)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Evaluate a set of contents or variables in 'in' - retuning an array of values in rv

func (*MtType) MoreThan

func (mt *MtType) MoreThan(n int) bool

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

func (*MtType) NOptions

func (mt *MtType) NOptions(n int) bool

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

func (*MtType) OptInList

func (mt *MtType) OptInList(pos int, s ...string) bool

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Jump to

Keyboard shortcuts

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