parser
luau
local parser = require("@std/syntax/parser")WARNING
These APIs are still open to future evolution. In new major versions, they may change in backwards incompatible ways.
Summary
| Entry | Description |
|---|---|
| parse | Parses source as a complete Luau file and returns the full ParseResult, including the root block and EOF token. |
| parseBlock | Parses Luau source code into a CstStatBlock |
| parseExpr | Parses source as a single Luau expression and returns the resulting CstExpr. |
Functions and Properties
parser.parse
Parses source as a complete Luau file and returns the full ParseResult, including the root block and EOF token.
luau
(source: string) -> types.ParseResultparser.parseBlock
Parses Luau source code into a CstStatBlock
luau
(source: string) -> types.CstStatBlockparser.parseExpr
Parses source as a single Luau expression and returns the resulting CstExpr.
luau
(source: string) -> types.CstExpr