Changeset 391 for python/trunk/Lib/lib2to3/fixer_base.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/lib2to3/fixer_base.py
r2 r391 25 25 PATTERN = None # Most subclasses should override with a string literal 26 26 pattern = None # Compiled pattern, set by compile_pattern() 27 pattern_tree = None # Tree representation of the pattern 27 28 options = None # Options object passed to initializer 28 29 filename = None # The filename (set by set_filename) … … 36 37 _accept_type = None # [Advanced and not public] This tells RefactoringTool 37 38 # 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 38 45 39 46 # Shortcut for access to Python grammar symbols … … 59 66 """ 60 67 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) 62 71 63 72 def set_filename(self, filename):
Note:
See TracChangeset
for help on using the changeset viewer.