1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +03:00

Reformat.

This commit is contained in:
Rob Rix 2015-10-27 18:10:17 -04:00
parent 3f61255915
commit 76a67a7d8e

View File

@ -40,13 +40,16 @@ if let a = arguments[1] {
ts_document_parse(document)
let root = ts_document_root_node(document)
print(Cofree<String, TSNode>.ana { node in
let count = ts_node_child_count(node)
guard count > 0 else {
return String.fromCString(ts_node_name(node, document)).map(Syntax.Leaf)!
}
return .Indexed((0..<count).map { ts_node_child(node, $0) })
} (root))
let term = Cofree<String, TSNode>
.ana { node in
let count = ts_node_child_count(node)
guard count > 0 else {
return String.fromCString(ts_node_name(node, document)).map(Syntax.Leaf)!
}
return .Indexed((0..<count).map { ts_node_child(node, $0) })
} (root)
print(term)
ts_document_free(document)
}