Garden 🌻

Manual

Keywords

let, fun, enum, struct, external, internal, import, if, else, while, return, test, match, break, continue, for, in, assert and as.

Built-in Types

Bool, Fun, Int, List, Namespace, NoValue, Option, Path, Result, String, Tuple and Unit.

Prelude

These functions are available everywhere.

dbg, error, print, println, range, shell, shell_arguments, source_directory, string_repr and todo.

Filesystem Namespace __fs.gdn

list_directory, set_working_directory, working_directory and write_file.

Example usage:

import "__fs.gdn" as fs
fs::list_directory(Path{ p: "/" })

Garden Reflection Namespace __garden.gdn

check_snippet, doc_comment, doc_comment_for_type, keywords, lex, namespace_functions, prelude_types and source_for_type.

Example usage:

import "__garden.gdn" as garden
garden::check_snippet("let x = 1")