Commit 1db024c5 authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'sort-headers' into 'master'

Sort headers/global definitions to enable reproducible code generation

See merge request pycodegen/pystencils!52
parents 97307848 673151f4
......@@ -87,7 +87,7 @@ def get_global_declarations(ast):
return set(global_declarations)
return sorted(set(global_declarations), key=lambda x: str(x))
def get_headers(ast_node: Node) -> Set[str]:
......@@ -103,7 +103,7 @@ def get_headers(ast_node: Node) -> Set[str]:
if isinstance(a, Node):
return headers
return sorted(headers)
# --------------------------------------- Backend Specific Nodes -------------------------------------------------------
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