mirror of
https://github.com/github/semantic.git
synced 2024-12-01 17:59:10 +03:00
Indexed, not Branch.
This commit is contained in:
parent
706654552f
commit
7e4ca06cbc
@ -39,14 +39,14 @@ extension Fix where A: StringConvertible {
|
|||||||
.Some("source.lang.swift.decl.extension"),
|
.Some("source.lang.swift.decl.extension"),
|
||||||
.Some("source.lang.swift.decl.enum"),
|
.Some("source.lang.swift.decl.enum"),
|
||||||
.Some("source.lang.swift.decl.struct"):
|
.Some("source.lang.swift.decl.struct"):
|
||||||
self = .In(.Branch([ .In(.Leaf(A(string: name))), .In(.Branch(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
|
self = .In(.Indexed([ .In(.Leaf(A(string: name))), .In(.Indexed(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
|
||||||
|
|
||||||
case .Some("source.lang.swift.decl.enumelement"):
|
case .Some("source.lang.swift.decl.enumelement"):
|
||||||
fallthrough
|
fallthrough
|
||||||
case
|
case
|
||||||
.Some("source.lang.swift.decl.function.method.instance"),
|
.Some("source.lang.swift.decl.function.method.instance"),
|
||||||
.Some("source.lang.swift.decl.function.free"):
|
.Some("source.lang.swift.decl.function.free"):
|
||||||
self = .In(.Branch([ .In(.Leaf(A(string: name))), .In(.Branch(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
|
self = .In(.Indexed([ .In(.Leaf(A(string: name))), .In(.Indexed(try substructure.map { try Fix(JSON: $0) ?? bail() })) ]))
|
||||||
|
|
||||||
case
|
case
|
||||||
.Some("source.lang.swift.decl.var.instance"),
|
.Some("source.lang.swift.decl.var.instance"),
|
||||||
@ -83,7 +83,7 @@ extension Fix where A: StringConvertible {
|
|||||||
do {
|
do {
|
||||||
switch JSON.dictionary?["key.substructure"] {
|
switch JSON.dictionary?["key.substructure"] {
|
||||||
case let .Some(.Array(a)):
|
case let .Some(.Array(a)):
|
||||||
self = .In(.Branch(try a.map { try Fix(JSON: $0) ?? bail() }))
|
self = .In(.Indexed(try a.map { try Fix(JSON: $0) ?? bail() }))
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user