Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/lib2to3/fixer_base.py

    r2 r391  
    2525    PATTERN = None  # Most subclasses should override with a string literal
    2626    pattern = None  # Compiled pattern, set by compile_pattern()
     27    pattern_tree = None # Tree representation of the pattern
    2728    options = None  # Options object passed to initializer
    2829    filename = None # The filename (set by set_filename)
     
    3637    _accept_type = None # [Advanced and not public] This tells RefactoringTool
    3738                        # which node type to accept when there's not a pattern.
     39
     40    keep_line_order = False # For the bottom matcher: match with the
     41                            # original line order
     42    BM_compatible = False # Compatibility with the bottom matching
     43                          # module; every fixer should set this
     44                          # manually
    3845
    3946    # Shortcut for access to Python grammar symbols
     
    5966        """
    6067        if self.PATTERN is not None:
    61             self.pattern = PatternCompiler().compile_pattern(self.PATTERN)
     68            PC = PatternCompiler()
     69            self.pattern, self.pattern_tree = PC.compile_pattern(self.PATTERN,
     70                                                                 with_tree=True)
    6271
    6372    def set_filename(self, filename):
Note: See TracChangeset for help on using the changeset viewer.