From be4feb12ba9a3b5e100e62f3f82c988f2f754c84 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 6 Nov 2018 18:14:01 -0600 Subject: [PATCH] MAINT: Documentation updtes for the output statement. --- src/lib.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ec9ec10..7b85b23 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -425,10 +425,22 @@ //! //! * Out statement //! -//! The out statement defined the output for a UCG file. It identifies an expression that will be output as a -//! compiled artifact by the UCG compiler was well as the artifact type. The artifact type is expected to be one -//! of the registered converters (e.g. json, exec) and the artifact file will take the same name as the ucg file -//! with the extension replaced by the defined extension for that converter. +//! The out statement defines the output for a UCG file. It identifies the output converter type and an +//! expression that will be output. The output converter type is expected to be one of the registered converters +//! (e.g. json, exec) and the artifact file will take the same name as the ucg file with the extension replaced by +//! the defined extension for that converter. +//! +//! For a file named api_config.ucg with the following contents: +//! +//! ```ucg +//! let myconf = { +//! api_url = "https://example.org/api/v1/", +//! api_token = env.API_TOKEN, +//! }; +//! out json myconf; +//! ``` +//! +//! ucg will output the myconf tuple as json to a file called api_config.json //! //! ### Converters //!