Fix #55 - crash and no typedef name
This commit is contained in:
parent
6584a304d5
commit
a8028a62ec
3 changed files with 10 additions and 5 deletions
|
|
@ -11,14 +11,14 @@ proc printLisp(root: TSNode) =
|
|||
depth = 0
|
||||
|
||||
while true:
|
||||
if not node.tsNodeIsNull():
|
||||
if not node.tsNodeIsNull() and depth > -1:
|
||||
if gStateRT.pretty:
|
||||
stdout.write spaces(depth)
|
||||
let
|
||||
(line, col) = node.getLineCol()
|
||||
stdout.write &"({$node.tsNodeType()} {line} {col} {node.tsNodeEndByte() - node.tsNodeStartByte()}"
|
||||
else:
|
||||
return
|
||||
break
|
||||
|
||||
if node.tsNodeNamedChildCount() != 0:
|
||||
if gStateRT.pretty:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue