Parses Luau source code and returns a structured AST.
The returned root is a Block node whose body contains an array
of statement nodes. Every node carries a type string discriminator
and a location with 1-based line/column positions.
Pass { captureComments = true } to include a comments array in
the result. Pass { collectSurroundingText = true } to include a
sparse surroundingText side table keyed by AST node.
local result = parse.parse(source, { captureComments = true })
print("Lines:", result.lines)
print("Errors:", #result.errors)
print("Top-level statements:", #result.root.body)