MCPcopy
hub / github.com/purpleidea/mgmt / StmtProg

Struct StmtProg

lang/ast/structs.go:4693–4706  ·  view source on GitHub ↗

StmtProg represents a list of stmt's. This usually occurs at the top-level of any program, and often within an if stmt. It also contains the logic so that the bind statement's are correctly applied in this scope, and irrespective of their order of definition.

Source from the content-addressed store, hash-verified

4691// the bind statement's are correctly applied in this scope, and irrespective of
4692// their order of definition.
4693type StmtProg struct {
4694 interfaces.Textarea
4695
4696 data *interfaces.Data
4697 scope *interfaces.Scope // store for use by imports
4698
4699 // TODO: should this be a map? if so, how would we sort it to loop it?
4700 importProgs []*StmtProg // list of child programs after running SetScope
4701 importFiles []string // list of files seen during the SetScope import
4702
4703 nodeOrder []interfaces.Stmt // used for .Graph
4704
4705 Body []interfaces.Stmt
4706}
4707
4708// String returns a short representation of this statement.
4709func (obj *StmtProg) String() string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected