* }}} */ * load and function call operations {{{ */
(reader io.Reader, name string)
| 1798 | /* load and function call operations {{{ */ |
| 1799 | |
| 1800 | func (ls *LState) Load(reader io.Reader, name string) (*LFunction, error) { |
| 1801 | chunk, err := parse.Parse(reader, name) |
| 1802 | if err != nil { |
| 1803 | return nil, newApiErrorE(ApiErrorSyntax, err) |
| 1804 | } |
| 1805 | proto, err := Compile(chunk, name) |
| 1806 | if err != nil { |
| 1807 | return nil, newApiErrorE(ApiErrorSyntax, err) |
| 1808 | } |
| 1809 | return newLFunctionL(proto, ls.currentEnv(), 0), nil |
| 1810 | } |
| 1811 | |
| 1812 | func (ls *LState) Call(nargs, nret int) { |
| 1813 | ls.callR(nargs, nret, -1) |
nothing calls this directly
no test coverage detected