printer
luau
local printer = require("@std/syntax/printer")printer.printFile
Returns an entire parsed file as source text, including the EOF token, optionally applying replacements.
luau
(result: types.ParseResult, replacements: types.Replacements?) -> stringprinter.printNode
Returns node as source text, optionally applying replacements to substitute specific nodes with new text.
luau
(node: types.AstNode, replacements: types.Replacements?) -> string