浏览代码

Bugfixes for _serialize function in bitshift/parser/python.py

tags/v1.0^2
Benjamin Attal 10 年前
父节点
当前提交
5db273a773
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      bitshift/parser/python.py

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

@@ -70,12 +70,12 @@ def _serialize(tree):
start_line, end_line = _start_n_end(cur_node)
accum['classes'][cur_node.name] = {'start_ln': start_line , 'end_ln': end_line}

elif isinstance(cur_node, ast.AST):
if isinstance(cur_node, ast.AST):
for k in cur_node.__dict__.keys():
node = node.__dict__[k]
node = cur_node.__dict__[k]
_helper(node, accum)

accum = {}
accum = {'vars': {}, 'functions': {}, 'classes': {}}
_helper(tree, accum)
return accum



正在加载...
取消
保存