Codegen
=======

The ``Codegen`` module is responsible for the low-level compilation
of the page template.

Suite
-----

The ``Suite`` class compiles a source code suite and makes a code
object available.

  >>> from z3c.pt.codegen import Suite
  >>> suite = Suite("""\
  ... print 'Hello World!'
  ... """)
  >>> exec suite.code
  Hello World!

AST transformations
-------------------
  
We allow attribute access to dictionary entries to minimize verbosity
in templates. It works by wrapping the get attribute nodes in a method
that tries a dictionary lookup if attribute lookup failed.

  >>> suite = Suite("""\
  ... a = {'b': 1}
  ... assert a['b'] == a.b
  ... """)
  >>> exec suite.code
