MCPcopy Create free account
hub / github.com/cloudwan/gohan / parser

Method parser

extension/gohanscript/stmt.go:156–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156func (stmt *Stmt) parser() (parser StmtParser, err error) {
157 for key, value := range stmt.RawData {
158 parser = GetStmtParser(key)
159 if parser != nil {
160 stmt.funcName = key
161 stmt.Args, err = MapToValue(parseCode(key, value))
162 return
163 }
164 }
165 return nil, nil
166}
167
168//HasArgs checks if statement has functions
169func (stmt *Stmt) HasArgs(keys ...string) error {

Callers 1

FuncMethod · 0.95

Calls 3

GetStmtParserFunction · 0.85
MapToValueFunction · 0.85
parseCodeFunction · 0.85

Tested by

no test coverage detected