Commit 16de3005 authored by Jan Hoenig's avatar Jan Hoenig
Browse files

Fixed minor bugs. Done testing on (un)official LLVMJitPrinter. It looks promissing after all.

parent a27a31c5
......@@ -291,7 +291,7 @@ class LoopOverCoordinate(Node):
textwrap.indent(str(self.body), '\t'))
def __repr__(self):
return 'loop {!s} from {!s} to {!s} step{!s}'.format(self.loopCounterName, self.start, self.stop, self.step)
return 'loop:{!s} in {!s}:{!s}:{!s}'.format(self.loopCounterName, self.start, self.stop, self.step)
class SympyAssignment(Node):
from sympy.printing.printer import Printer
from graphviz import Digraph
from graphviz import Digraph, lang
class DotPrinter(Printer):
......@@ -9,6 +9,7 @@ class DotPrinter(Printer):
def __init__(self, **kwargs):
super().__init__() = Digraph(**kwargs) = lang.quote
def _print_KernelFunction(self, function):
......@@ -39,7 +40,7 @@ def dotprint(ast, view=False, **kwargs):
Returns a string which can be used to generate a DOT-graph
:param ast: The ast which should be generated
:param view: Boolen, if rendering of the image directly should occur.
:param kwargs: is directly passed to the DotPrinter class
:param kwargs: is directly passed to the DotPrinter class:
:return: string in DOT format
printer = DotPrinter(**kwargs)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment