Lua.AST.Statement.FuncDecl (Lua v1.0.0-rc.2)
View SourceRepresents a function declaration: function name(params) body end
The name can be a path for nested names:
function foo() end-> name:["foo"], is_method: falsefunction a.b.c() end-> name:["a", "b", "c"], is_method: falsefunction obj:method() end-> name:["obj", "method"], is_method: true
When is_method is true, an implicit self parameter is added.
Summary
Types
@type t() :: %Lua.AST.Statement.FuncDecl{ body: Lua.AST.Block.t(), is_method: boolean(), meta: Lua.AST.Meta.t() | nil, name: [String.t()], params: [Lua.AST.Expr.Function.param()] }