Module ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Str decorator_list decorator_list
N/A js_helper TestCase TestFunctionTraversal N/A TestCase N/A N/A 
    Consider the following tree:

    - body
      |-function a()
      | |- foo
      | |- bar
      |-zip
      |-function b()
      | |-abc
      | |-def
      |-zap

    In the old traversal technique, it would be evaluated in the order:

        body a() foo bar zip b() abc def zap

    If the tree is considered as a graph, this would be prefix notation
    traversal.

    This is not optimal, however, as JS commonly uses callbacks which are set
    up before delegation code. The new traversal technique should access nodes
    in the following order:

        body zip zap a() foo bar b() abc def

    If the tree is considered a graph, this would be a custom prefix notation
    traversal where all non-function nodes are traversed before all function
    nodes.
     test_function_declaration_order N/A N/A self N/A N/A N/A Test that function declarations happen in the right time. N/A N/A N/A self run_script 
        foo = "first";
        function test() {
            foo = "second";
        }
        bar = foo;
         N/A N/A N/A self assert_var_eq bar first N/A N/A N/A self assert_var_eq foo second N/A test_function_expression_order N/A N/A self N/A N/A N/A Test that function expressions happen in the right time. N/A N/A N/A self run_script 
        foo = "first"
        var x = function() {
            foo = "second";
        }
        bar = foo;
         N/A N/A N/A self assert_var_eq bar first N/A N/A N/A self assert_var_eq foo second N/A test_nested_functions N/A N/A self N/A N/A N/A Test that nested functions are considered in the right order. N/A N/A N/A self run_script 
        foo = "first"
        function test() {
            function a() {foo = "second"}
            foo = "third";
        }
         N/A N/A N/A self assert_var_eq foo second N/A N/A