From 94dd4c97bde092a9143a531adf7f5b3302efb4c9 Mon Sep 17 00:00:00 2001 From: Ryan O'Neill Date: Tue, 18 Aug 2015 09:56:17 -0700 Subject: [PATCH] doc ToC ordering --- HOCON.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/HOCON.md b/HOCON.md index 30f8e457..dde47648 100644 --- a/HOCON.md +++ b/HOCON.md @@ -22,11 +22,11 @@ - [Note: Arrays without commas or newlines](#note-arrays-without-commas-or-newlines) - [Path expressions](#path-expressions) - [Paths as keys](#paths-as-keys) - - [Conditional expressions](#conditional-expressions) - [Substitutions](#substitutions) - [Self-Referential Substitutions](#self-referential-substitutions) - [The `+=` field separator](#the--field-separator) - [Examples of Self-Referential Substitutions](#examples-of-self-referential-substitutions) + - [Conditional expressions](#conditional-expressions) - [Includes](#includes) - [Include syntax](#include-syntax) - [Include semantics: merging](#include-semantics-merging) @@ -720,23 +720,6 @@ resolving an optional substitution (i.e. the `${?foo}` syntax). If `${?foo}` refers to itself then it's as if it referred to a nonexistent value. -### Conditional expressions - -Conditional expressions allow for a block of configuration to be -included or omitted based on the value of a substitution. - -Example conditional expression: - - - `if [${a} == "a"] { b: true }` - -In this case, if the substitution ${a} was equal to the string "a" -then the object { b: true } would be merged into the object that -the conditional expression was declared inside. If it was not -equal to "a" nothing would be merged. - -The left hand side substitution cannot be optional. Currently, only equality comparisons are supported. The right hand side -of the expression can be any string, quoted or unquoted, or a boolean. - #### The `+=` field separator Fields may have `+=` as a separator rather than `:` or `=`. A @@ -913,6 +896,23 @@ rather than by the path inside the `${}` expression, because substitutions may be resolved differently depending on their position in the file. +### Conditional expressions + +Conditional expressions allow for a block of configuration to be +included or omitted based on the value of a substitution. + +Example conditional expression: + + - `if [${a} == "a"] { b: true }` + +In this case, if the substitution ${a} was equal to the string "a" +then the object { b: true } would be merged into the object that +the conditional expression was declared inside. If it was not +equal to "a" nothing would be merged. + +The left hand side substitution cannot be optional. Currently, only equality comparisons are supported. The right hand side +of the expression can be any string, quoted or unquoted, or a boolean. + ### Includes #### Include syntax