diff options
author | Marion <marion.zepf@gmail.com> | 2013-09-08 14:12:50 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-09-08 14:12:50 (GMT) |
commit | dfebf0be36908618c3b23839557dea93810b1198 (patch) | |
tree | 1e9e57273127cbc23e3847e6d3df2427201fdfc1 /util | |
parent | 7fe3c377a730a75e15b5d7c23c7ba2f746e0396c (diff) |
Primitives for all constant blocks (add screen dimensions, update colors)
- Use the get() method of the CONSTANTS dict to retrieve the values of
constants, but export it as CONSTANTS['key'].
- Introduce the new class TypedSubscript for Subscript ASTs with a type.
Diffstat (limited to 'util')
-rw-r--r-- | util/codegen.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/codegen.py b/util/codegen.py index 5f768f8..6e4d383 100644 --- a/util/codegen.py +++ b/util/codegen.py @@ -477,6 +477,10 @@ class SourceGenerator(NodeVisitor): self.write('[') self.visit(node.slice) self.write(']') + visit_TypedSubscript = visit_Subscript + + def visit_Index(self, node): + self.visit(node.value) def visit_Slice(self, node): if node.lower is not None: |