Skip to content

Commit

Permalink
Fix NESTML printer (#930)
Browse files Browse the repository at this point in the history
* fix NESTML printer

* fix NESTML printer

---------

Co-authored-by: C.A.P. Linssen <[email protected]>
  • Loading branch information
clinssen and C.A.P. Linssen authored Aug 9, 2023
1 parent 0ef6243 commit 6e1c66e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pynestml/codegeneration/printers/nestml_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,14 @@ def print_input_port(self, node: ASTInputPort) -> str:
ret += " " + self.print(node.get_datatype()) + " "
if node.has_size_parameter():
ret += "[" + node.get_size_parameter() + "]"
ret += "<-"
ret += "<- "
if node.has_input_qualifiers():
for qual in node.get_input_qualifiers():
ret += self.print(qual) + " "
if node.is_spike():
ret += "spike"
else:
ret += "current"
ret += "continuous"
ret += print_sl_comment(node.in_comment) + "\n"
return ret

Expand Down Expand Up @@ -442,7 +442,9 @@ def print_kernel(self, node: ASTKernel) -> str:

def print_output_block(self, node: ASTOutputBlock) -> str:
ret = print_ml_comments(node.pre_comments, self.indent, False)
ret += print_n_spaces(self.indent) + "output: " + ("spike" if node.is_spike() else "current")
ret += print_n_spaces(self.indent) + "output:\n"
ret += print_n_spaces(self.indent + 4)
ret += "spike" if node.is_spike() else "continuous"
ret += print_sl_comment(node.in_comment)
ret += "\n"
return ret
Expand Down

0 comments on commit 6e1c66e

Please sign in to comment.