From 597e06e410a79c20881936ecf7e994b382464de5 Mon Sep 17 00:00:00 2001 From: Christopher Hakkaart Date: Wed, 9 Oct 2024 13:24:25 +0200 Subject: [PATCH] Suggestions for syntax page --- docs/reference/syntax.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/reference/syntax.md b/docs/reference/syntax.md index 0bf29acadb..7a25659699 100644 --- a/docs/reference/syntax.md +++ b/docs/reference/syntax.md @@ -73,13 +73,24 @@ nextflow.preview.topic = true An include declaration consists of an *include source* and one or more *include clauses*: +The include source should be a string literal and should refer to either a local path (e.g. `./module.nf`) or a plugin (e.g. `plugin/nf-hello`): + ```groovy -include { foo ; bar as baz } from './some/module' +include { foo } from './some/module' ``` -The include source should be a string literal and should refer to either a local path (e.g. `./module.nf`) or a plugin (e.g. `plugin/nf-hello`). +Each include clause should specify a name, and may also specify an *alias*: -Each include clause should specify a name, and may also specify an *alias*. In the example above, `bar` is included under the alias `baz`. +```groovy +include { bar as baz } from './some/module' +``` + +Include clauses may include multiple names: + +```groovy +// together +include { foo ; bar as baz } from './some/module' +``` Include clauses can be separated by newlines or semi-colons, or they can be specified as separate includes: