micropython

docs/annotations.txt

599:8dc737ce59ed
2012-07-14 Paul Boddie Initialised the annotation attributes on the underlying AST nodes, requiring a modified compiler library, removing the associated attribute presence tests in this software.
     1 AST Node Annotations
     2 ====================
     3 
     4 These annotations should be defined in the revised compiler.ast classes.
     5 
     6 Evaluation Results
     7 ------------------
     8 
     9 _attr               notes the result associated with an attribute access
    10                     operation during inspection
    11 
    12 Attribute Users
    13 ---------------
    14 
    15 _attrtypes          defines types deduced either from combined attribute usage
    16                     details (for users)
    17 
    18 Attribute Contributors
    19 ----------------------
    20 
    21 _attrnames          defines a dictionary mapping local names to sets of
    22                     attribute names found to be used with those names in a
    23                     branch
    24 _attrbranches       indicates the immediate contributors to attribute usage
    25                     known to a node
    26 _attrcontributors   defines nodes contributing to combined attribute usage known
    27                     to a node
    28 _attrcombined       defines a dictionary mapping local names to sets of
    29                     attribute names found to be used with those names for the
    30                     entire lifetime of a particular attribute user
    31 _attrmerged         defines a dictionary mapping local names to sets of
    32                     attribute names merging combined observations with locally
    33                     applicable observations, indicating usage specific to a
    34                     region of the code
    35 _attrspecifictypes  defines specific types from merged attribute usage details
    36                     (for non-user nodes)
    37 _attrdefs           defines definition-related users which consume usage details
    38                     from the node
    39 
    40 Attribute Accessors
    41 -------------------
    42 
    43 _attrusers          defines a dictionary mapping local names to sets of nodes
    44                     defining those names
    45 
    46 Name Accessors
    47 --------------
    48 
    49 _scope              set as "constant", "local", "global" or "builtins"
    50 
    51 Program Units
    52 -------------
    53 
    54 unit                refers to a micropython Class, Function or Module instance