2008-02-05 | Paul Boddie | file changeset files shortlog | Introduced loop construct tracking so that assignments occurring within loops are always marked as potentially occurring many times. Changed the NamespaceDict.set method to use a single_assignment parameter instead of a global_assignment parameter since the latter is more specific than necessary: non-global, loop-resident assignments produce the same effect on the number of assignments registered. Added a test of class attributes and loops within the top level of class definitions. |
paul@0 | 1 | #!/usr/bin/env python |
paul@0 | 2 | |
paul@0 | 3 | import micropython |
paul@0 | 4 | import sys |
paul@4 | 5 | |
paul@22 | 6 | def show(importer): |
paul@22 | 7 | for i, x in enumerate(importer.get_image()): |
paul@22 | 8 | print i, x |
paul@22 | 9 | |
paul@0 | 10 | i = micropython.Importer(sys.path) |
paul@4 | 11 | if len(sys.argv) < 2: |
paul@4 | 12 | m = i.load("micropython") |
paul@4 | 13 | #m = i.load_from_file("micropython/__init__.py") |
paul@4 | 14 | else: |
paul@4 | 15 | m = i.load_from_file(sys.argv[1]) |
paul@7 | 16 | i.vacuum() |
paul@7 | 17 | ot = i.get_object_table() |
paul@7 | 18 | pt = i.get_parameter_table() |
paul@0 | 19 | |
paul@0 | 20 | # vim: tabstop=4 expandtab shiftwidth=4 |