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

Wrap constructors in .In.

This commit is contained in:
Rob Rix 2015-10-06 20:43:02 -04:00
parent 40ecf24c9e
commit 87d547a670

View File

@ -39,19 +39,19 @@ extension Fix where A: StringConvertible {
.Some("source.lang.swift.decl.extension"),
.Some("source.lang.swift.decl.enum"),
.Some("source.lang.swift.decl.struct"):
self = .Branch([ .Leaf(A(string: name)), .Branch(try substructure.map { try Fix(JSON: $0) ?? bail() }) ])
self = .In(.Branch([ .In(.Leaf(A(string: name))), .In(.Branch(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
case .Some("source.lang.swift.decl.enumelement"):
fallthrough
case
.Some("source.lang.swift.decl.function.method.instance"),
.Some("source.lang.swift.decl.function.free"):
self = .Branch([ .Leaf(A(string: name)), .Branch(try substructure.map { try Fix(JSON: $0) ?? bail() }) ])
self = .In(.Branch([ .In(.Leaf(A(string: name))), .In(.Branch(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
case
.Some("source.lang.swift.decl.var.instance"),
.Some("source.lang.swift.decl.var.static"):
self = .Leaf(A(string: name))
self = .In(.Leaf(A(string: name)))
default:
return nil