* }}} */ * load and function call operations {{{ */
(reader io.Reader, name string)
| 2011 | /* load and function call operations {{{ */ |
| 2012 | |
| 2013 | func (ls *LState) Load(reader io.Reader, name string) (*LFunction, error) { |
| 2014 | chunk, err := parse.Parse(reader, name) |
| 2015 | if err != nil { |
| 2016 | return nil, newApiErrorE(ApiErrorSyntax, err) |
| 2017 | } |
| 2018 | proto, err := Compile(chunk, name) |
| 2019 | if err != nil { |
| 2020 | return nil, newApiErrorE(ApiErrorSyntax, err) |
| 2021 | } |
| 2022 | return newLFunctionL(proto, ls.currentEnv(), 0), nil |
| 2023 | } |
| 2024 | |
| 2025 | func (ls *LState) Call(nargs, nret int) { |
| 2026 | ls.callR(nargs, nret, -1) |
no test coverage detected