Skip to content

parser

luau
local parser = require("@lute/syntax/parser")

WARNING

These APIs are still open to future evolution. In new major versions, they may change in backwards incompatible ways.

Summary

EntryDescription
parseParses source as a Luau script and returns the resulting CST.
parseExprParses source as a single Luau expression and returns the resulting CST node.

Functions and Properties

parser.parse

Parses source as a Luau script and returns the resulting CST.

luau
(source: string) -> cst.CstParseResult

parser.parseExpr

Parses source as a single Luau expression and returns the resulting CST node.

luau
(source: string) -> cst.CstExpr