Skip to content

Commit 71236c9

Browse files
Suggestions for syntax page
Signed-off-by: Christopher Hakkaart <[email protected]>
1 parent 3d29edb commit 71236c9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/reference/syntax.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,24 @@ nextflow.preview.topic = true
7373

7474
An include declaration consists of an *include source* and one or more *include clauses*:
7575

76+
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`):
77+
7678
```groovy
77-
include { foo ; bar as baz } from './some/module'
79+
include { foo } from './some/module'
7880
```
7981

80-
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`).
82+
Each include clause should specify a name, and may also specify an *alias*:
8183

82-
Each include clause should specify a name, and may also specify an *alias*. In the example above, `bar` is included under the alias `baz`.
84+
```groovy
85+
include { bar as baz } from './some/module'
86+
```
87+
88+
Include clauses may include multiple names:
89+
90+
```groovy
91+
// together
92+
include { foo ; bar as baz } from './some/module'
93+
```
8394

8495
Include clauses can be separated by newlines or semi-colons, or they can be specified as separate includes:
8596

0 commit comments

Comments
 (0)