Explorar el Código

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

tags/v1.0^2
Benjamin Attal hace 10 años
padre
commit
5db273a773
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. +3
    -3
      bitshift/parser/python.py

+ 3
- 3
bitshift/parser/python.py Ver fichero

@@ -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



Cargando…
Cancelar
Guardar