Skip to content

Search

Documentation

script

What a tool asks about a script file. The editor and balaur check have it; a game's runtime does not.

On this page

What a tool asks about a script file. The editor and balaur check have it; a game's runtime does not.

13 functions, 0 constants. Scripts reach it as script::.

Functions

Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.

function acts on what it does
api() -> [script::ApiModule] — Every module a script can reach: its functions, their signatures and what each does, and its constants.
check(string, string) -> [script::Diagnostic] — Every compiler error in the source, read as the file at the path: one for each function that does not compile.
complete(string, string, int, int) -> [script::Completion] — Every completion valid at that caret; an editor passes the buffer it is showing.
definition(string, string, int, int) -> script::Place? — Where the name at that caret is declared in the file; nil when it is not.
exports(string) -> any — The pub fields of the script's struct, which a scene tunes, with their types and defaults.
find(string, string, string) -> [script::Place] — Every place that text appears in the file, matched as text rather than as a name.
format(string, string) -> string — The source laid out as balaur fmt lays it out; unchanged when it will not parse.
hover(string, string, int, int) -> script::Hover? — What the name at that caret is: its type, or its signature; nil when it is nothing.
references(string, string, string) -> [script::Place] — Every use of that name in the file.
rename(string, string, string, string) -> [script::Edit] — The file with a name renamed; nothing is written, so a caller can show it first.
replace(string, string, string, string) -> [script::Edit] — The file with that text replaced; nothing is written, so a caller can show it first.
signature(string, string, int, int) -> script::Signature? — The call the caret is inside, and which argument it is on.
symbols(string, string) -> [script::Symbol] — What the file declares: its structs, their fields and methods, its functions, and each event with its description for a detail.

Are you sure?