Lua.AST.Chunk (Lua v1.0.0-rc.2)
View SourceRepresents the top-level chunk (file or string) in Lua.
A chunk is essentially a block that represents a complete unit of Lua code.
Summary
Functions
Creates a new Chunk.
Types
@type t() :: %Lua.AST.Chunk{block: Lua.AST.Block.t(), meta: Lua.AST.Meta.t() | nil}
Functions
@spec new(Lua.AST.Block.t(), Lua.AST.Meta.t() | nil) :: t()
Creates a new Chunk.
Examples
iex> Lua.AST.Chunk.new(%Lua.AST.Block{stmts: []})
%Lua.AST.Chunk{block: %Lua.AST.Block{stmts: [], meta: nil}, meta: nil}