micropython

docs/annotations.txt

506:d5f5db3d3636
2012-05-18 Paul Boddie Added support for the inspection and generation of list comprehensions. Moved various common code generation routines into separate methods and adjusted the list and sequence population methods for wider re-use.
     1 AST Node Annotations
     2 ====================
     3 
     4 These annotations should be defined in the revised compiler.ast classes.
     5 
     6 Attribute Users
     7 ---------------
     8 
     9 _attrnames          defines a dictionary mapping local names to sets of
    10                     attribute names found to be used with those names in a
    11                     branch
    12 _attrcontributors   defines nodes contributing to combined attribute usage known
    13                     to a node
    14 _attrcombined       defines a dictionary mapping local names to sets of
    15                     attribute names found to be used with those names for the
    16                     entire lifetime of a particular attribute user
    17 _attrmerged         defines a dictionary mapping local names to sets of
    18                     attribute names merging combined observations with locally
    19                     applicable observations, indicating usage specific to a
    20                     region of the code
    21 _attrtypes          defines types deduced either from combined attribute usage
    22                     details (for users)
    23 _attrspecifictypes  defines specific types from merged attribute usage details
    24                     (for non-user nodes)
    25 _attrdefs           defines definition-related users which consume usage details
    26                     from the node
    27 
    28 Attribute Accessors
    29 -------------------
    30 
    31 _attrusers          defines a dictionary mapping local names to sets of nodes
    32                     defining those names
    33 
    34 Name Accessors
    35 --------------
    36 
    37 _scope              set as "constant", "local", "global" or "builtins"
    38 
    39 Program Units
    40 -------------
    41 
    42 unit                refers to a micropython Class, Function or Module instance