From c71eb702bbc79faf7680d04ecb49191e9fd18a73 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 21 Jun 2014 12:13:28 +0200 Subject: [PATCH] tools/make_stmt_transformer: pass args/kwargs --- artiq/compiler/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/tools.py b/artiq/compiler/tools.py index 8cecd5580..867affcbb 100644 --- a/artiq/compiler/tools.py +++ b/artiq/compiler/tools.py @@ -25,8 +25,8 @@ def value_to_ast(value): return None def make_stmt_transformer(transformer_class): - def stmt_transformer(stmts): - transformer = transformer_class() + def stmt_transformer(stmts, *args, **kwargs): + transformer = transformer_class(*args, **kwargs) new_stmts = [transformer.visit(stmt) for stmt in stmts] stmts[:] = new_stmts return stmt_transformer