Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-09-08 14:12:50 (GMT)
committer Marion <marion.zepf@gmail.com>2013-09-08 14:12:50 (GMT)
commitdfebf0be36908618c3b23839557dea93810b1198 (patch)
tree1e9e57273127cbc23e3847e6d3df2427201fdfc1 /util
parent7fe3c377a730a75e15b5d7c23c7ba2f746e0396c (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.py4
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: