Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,9 @@
"Nextflow": {
"line_comment": ["//"],
"multi_line_comments": [["/*", "*/"]],
"quotes": [["\\\"", "\\\""]],
"extensions": ["nextflow", "nf"]
"quotes": [["\\\"\\\"\\\"", "\\\"\\\"\\\""], ["'''", "'''"], ["\\\"", "\\\""], ["'", "'"]],
"extensions": ["nf"],
"filenames": ["nextflow.config"]
},
"Nim": {
"line_comment": ["#"],
Expand Down
44 changes: 34 additions & 10 deletions tests/data/nextflow.nf
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
/* 18 lines 10 code 5 comments 3 blanks */
// 42 lines 28 code 5 comments 9 blanks

/*
Nextflow - hello
*/
* Multi-line block comment
*/

// comment
cheers = Channel.from 'Bonjour', 'Ciao', 'Hello', 'Hola'
// Single line comment
nextflow.enable.dsl = 2

params.greeting = 'Hello'
params.name = "World"

process sayHello {
echo true
input:
val x from cheers
script:
input:
val greeting
val name

output:
stdout

script:
"""
echo '$x world!'
echo '${greeting}, ${name}!'
echo "// this is not a comment"
echo '/* also not a comment */'
"""
}

process farewell {
output:
stdout

script:
'''
echo 'Goodbye!'
'''
}

workflow {
sayHello(params.greeting, params.name) | view
farewell() | view
}
Loading