From 557a7e3ccd8dc5e32317167c42e527a43f55e7a8 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Wed, 5 Jan 2022 15:19:47 -0600 Subject: [PATCH] Add a function that can parse recursive tuples Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- nfdocs-parser.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nfdocs-parser.py b/nfdocs-parser.py index 08352f3..ad3cf8f 100755 --- a/nfdocs-parser.py +++ b/nfdocs-parser.py @@ -25,6 +25,18 @@ def definition_type(signature): # Return the results return def_name, def_type +def params_to_list(params): + if "tuple" in params.keys(): + tuple_item = nodes.list_item(text="tuple") + tuple_list = nodes.bullet_list() + for io in params["tuple"]: + tuple_list += params_to_list(io) + tuple_item += tuple_list + return tuple_item + else: + return nodes.list_item(text="not tuple") + print("not yet implemented") + # Take path as single argument for now nextflow_path = sys.argv[1] with open(nextflow_path) as nextflow_file: