瀏覽代碼

Fix bug in parser for Python classes.

tags/v1.0^2
Ben Kurtovic 10 年之前
父節點
當前提交
05811c7c1b
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. +3
    -1
      bitshift/parser/python.py

+ 3
- 1
bitshift/parser/python.py 查看文件

@@ -134,7 +134,9 @@ class _CachedWalker(ast.NodeVisitor):
start_line, start_col, end_line, end_col = self.block_position(node)

pos = (start_line, start_col, end_line, end_col)
self.accum['classes'][node.name] = pos
if node.name not in self.accum['classes']:
self.accum['classes'][node.name] = {'assignments': [], 'uses': []}
self.accum['classes'][node.name]['assignments'].append(pos)

self.generic_visit(node)



Loading…
取消
儲存