1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Produce indexed nodes.

This commit is contained in:
Rob Rix 2015-10-27 18:09:23 -04:00
parent 1374cf8052
commit 52a63856a8

View File

@ -45,7 +45,7 @@ if let a = arguments[1] {
guard count > 0 else {
return String.fromCString(ts_node_string(node, document)).map(Syntax.Leaf)!
}
return String.fromCString(ts_node_string(node, document)).map(Syntax.Leaf)!
return .Indexed((0..<count).map { ts_node_child(node, $0) })
} (root))
ts_document_free(document)