mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Move ChildrenCollection outside of TSNode.
This is necessary to be able to link in release config.
This commit is contained in:
parent
a0b3738ee2
commit
17d101f17c
@ -26,20 +26,20 @@ extension TSNode {
|
||||
var namedChildren: ChildrenCollection {
|
||||
return ChildrenCollection(node: self, count: ts_node_named_child_count(self), child: ts_node_named_child)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct ChildrenCollection: CollectionType {
|
||||
let node: TSNode
|
||||
let count: Int
|
||||
let child: (TSNode, Int) -> TSNode
|
||||
struct ChildrenCollection: CollectionType {
|
||||
let node: TSNode
|
||||
let count: Int
|
||||
let child: (TSNode, Int) -> TSNode
|
||||
|
||||
subscript (index: Int) -> TSNode {
|
||||
return child(node, index)
|
||||
}
|
||||
subscript (index: Int) -> TSNode {
|
||||
return child(node, index)
|
||||
}
|
||||
|
||||
let startIndex = 0
|
||||
var endIndex: Int {
|
||||
return count
|
||||
}
|
||||
let startIndex = 0
|
||||
var endIndex: Int {
|
||||
return count
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user