diff options
author | Anton Samokhvalov <[email protected]> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) |
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd')
-rw-r--r-- | contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd b/contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd index ae222b5f7b1..2c17901fa4f 100644 --- a/contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd +++ b/contrib/tools/cython/Cython/Compiler/ParseTreeTransforms.pxd @@ -1,82 +1,82 @@ - -from __future__ import absolute_import - -cimport cython - -from .Visitor cimport ( - CythonTransform, VisitorTransform, TreeVisitor, - ScopeTrackingTransform, EnvTransform) - -cdef class SkipDeclarations: # (object): - pass - -cdef class NormalizeTree(CythonTransform): - cdef bint is_in_statlist - cdef bint is_in_expr - cpdef visit_StatNode(self, node, is_listcontainer=*) - -cdef class PostParse(ScopeTrackingTransform): - cdef dict specialattribute_handlers - cdef size_t lambda_counter - cdef size_t genexpr_counter - cdef _visit_assignment_node(self, node, list expr_list) - - -#def eliminate_rhs_duplicates(list expr_list_list, list ref_node_sequence) -#def sort_common_subsequences(list items) [email protected](starred_targets=Py_ssize_t, lhs_size=Py_ssize_t, rhs_size=Py_ssize_t) -cdef flatten_parallel_assignments(list input, list output) -cdef map_starred_assignment(list lhs_targets, list starred_assignments, list lhs_args, list rhs_args) - -#class PxdPostParse(CythonTransform, SkipDeclarations): -#class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): -#class WithTransform(CythonTransform, SkipDeclarations): -#class DecoratorTransform(CythonTransform, SkipDeclarations): - -#class AnalyseDeclarationsTransform(EnvTransform): - -cdef class AnalyseExpressionsTransform(CythonTransform): - pass - -cdef class ExpandInplaceOperators(EnvTransform): - pass - -cdef class AlignFunctionDefinitions(CythonTransform): - cdef dict directives + +from __future__ import absolute_import + +cimport cython + +from .Visitor cimport ( + CythonTransform, VisitorTransform, TreeVisitor, + ScopeTrackingTransform, EnvTransform) + +cdef class SkipDeclarations: # (object): + pass + +cdef class NormalizeTree(CythonTransform): + cdef bint is_in_statlist + cdef bint is_in_expr + cpdef visit_StatNode(self, node, is_listcontainer=*) + +cdef class PostParse(ScopeTrackingTransform): + cdef dict specialattribute_handlers + cdef size_t lambda_counter + cdef size_t genexpr_counter + cdef _visit_assignment_node(self, node, list expr_list) + + +#def eliminate_rhs_duplicates(list expr_list_list, list ref_node_sequence) +#def sort_common_subsequences(list items) [email protected](starred_targets=Py_ssize_t, lhs_size=Py_ssize_t, rhs_size=Py_ssize_t) +cdef flatten_parallel_assignments(list input, list output) +cdef map_starred_assignment(list lhs_targets, list starred_assignments, list lhs_args, list rhs_args) + +#class PxdPostParse(CythonTransform, SkipDeclarations): +#class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): +#class WithTransform(CythonTransform, SkipDeclarations): +#class DecoratorTransform(CythonTransform, SkipDeclarations): + +#class AnalyseDeclarationsTransform(EnvTransform): + +cdef class AnalyseExpressionsTransform(CythonTransform): + pass + +cdef class ExpandInplaceOperators(EnvTransform): + pass + +cdef class AlignFunctionDefinitions(CythonTransform): + cdef dict directives cdef set imported_names cdef object scope - + @cython.final -cdef class YieldNodeCollector(TreeVisitor): - cdef public list yields - cdef public list returns +cdef class YieldNodeCollector(TreeVisitor): + cdef public list yields + cdef public list returns cdef public list finallys cdef public list excepts - cdef public bint has_return_value + cdef public bint has_return_value cdef public bint has_yield cdef public bint has_await - + @cython.final -cdef class MarkClosureVisitor(CythonTransform): - cdef bint needs_closure - +cdef class MarkClosureVisitor(CythonTransform): + cdef bint needs_closure + @cython.final -cdef class CreateClosureClasses(CythonTransform): - cdef list path - cdef bint in_lambda - cdef module_scope - cdef generator_class - +cdef class CreateClosureClasses(CythonTransform): + cdef list path + cdef bint in_lambda + cdef module_scope + cdef generator_class + cdef create_class_from_scope(self, node, target_module_scope, inner_node=*) cdef find_entries_used_in_closures(self, node) #cdef class InjectGilHandling(VisitorTransform, SkipDeclarations): # cdef bint nogil -cdef class GilCheck(VisitorTransform): - cdef list env_stack - cdef bint nogil - cdef bint nogil_declarator_only - -cdef class TransformBuiltinMethods(EnvTransform): - cdef visit_cython_attribute(self, node) +cdef class GilCheck(VisitorTransform): + cdef list env_stack + cdef bint nogil + cdef bint nogil_declarator_only + +cdef class TransformBuiltinMethods(EnvTransform): + cdef visit_cython_attribute(self, node) |