Skip to main content

parse

Function parse 

Source
pub fn parse(src: &[u8], version: LuaVersion) -> Result<Chunk, SyntaxError>
Expand description

Parse a Lua source chunk for the given dialect into an arena AST (Chunk).

LuaVersion::MacroLua sources are not routed through the macro expander here — this entry point is dialect-agnostic and only sees the raw token stream. The Vm’s eval path runs the expander transparently for MacroLua; direct callers feed expanded tokens via parse_tokens.