Fix inline comments breaking search
This commit is contained in:
parent
007f3aa191
commit
d3340d51e2
1 changed files with 2 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ proc searchAstForNode(ast: ref Ast, node: TSNode): bool =
|
||||||
|
|
||||||
if ast.isNil:
|
if ast.isNil:
|
||||||
return
|
return
|
||||||
|
|
||||||
if ast.children.len != 0:
|
if ast.children.len != 0:
|
||||||
let
|
let
|
||||||
rstr = ast.getRegexForAstChildren()
|
rstr = ast.getRegexForAstChildren()
|
||||||
|
|
@ -50,7 +51,7 @@ proc searchAstForNode(ast: ref Ast, node: TSNode): bool =
|
||||||
if node.getTSNodeNamedChildCountSansComments() != 0:
|
if node.getTSNodeNamedChildCountSansComments() != 0:
|
||||||
var flag = true
|
var flag = true
|
||||||
for i in 0 .. node.tsNodeNamedChildCount()-1:
|
for i in 0 .. node.tsNodeNamedChildCount()-1:
|
||||||
if node.tsNodeType() != "comment":
|
if $node.tsNodeNamedChild(i).tsNodeType() != "comment":
|
||||||
let
|
let
|
||||||
nodeChild = node.tsNodeNamedChild(i)
|
nodeChild = node.tsNodeNamedChild(i)
|
||||||
astChild = ast.getAstChildByName($nodeChild.tsNodeType())
|
astChild = ast.getAstChildByName($nodeChild.tsNodeType())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue