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

Phrase this as a guard.

This commit is contained in:
Rob Rix 2015-10-27 18:07:23 -04:00
parent ac2a12a03f
commit 1374cf8052

View File

@ -42,7 +42,7 @@ if let a = arguments[1] {
print(Cofree<String, TSNode>.ana { node in
let count = ts_node_child_count(node)
if count == 0 {
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)!