summaryrefslogtreecommitdiff
path: root/old-docs/syntax-include.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'old-docs/syntax-include.mdwn')
-rw-r--r--old-docs/syntax-include.mdwn27
1 files changed, 27 insertions, 0 deletions
diff --git a/old-docs/syntax-include.mdwn b/old-docs/syntax-include.mdwn
new file mode 100644
index 0000000..a95f489
--- /dev/null
+++ b/old-docs/syntax-include.mdwn
@@ -0,0 +1,27 @@
+Lace - Syntax of include statements
+===================================
+
+Include statements take a source token to include and an optional list
+of definitions which must all be true before the include will take
+place.
+
+ include <sourcename> <0-or-more-definitions>
+
+If the include ends with a question mark (`include?`) then should the
+sourcename not be available at the time, it will be silently ignored.
+
+Nominally an included ruleset is linearly inserted into the execution stream
+there and then. In practice, while include statements result in compilation of
+the rulesets at the same time, the contents of the ruleset will not be run
+unless the supplied definitions all pass. This means that any rules (including
+`define`s) in the included ruleset will not be executed unless the definitions
+all pass. As such, use conditional includes carefully.
+
+If an "optional" include source isn't available, it is as though the
+definitions did not pass. If a mandatory include source isn't
+available then compilation of the ruleset will fail immediately.
+
+Circular includes are not acceptable. Not even if there's a set of conditions
+which mean that it might never happen. Any attempt at circular includes will
+result in a critical error at compile time because that is when all included
+rulesets are loaded in their entirety.