Skip to content

Commit

Permalink
Update SyntaxTree.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
phlegmaticprogrammer committed Jul 26, 2021
1 parent d02e783 commit 6df3914
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/ParsingKit/SyntaxTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public final class SyntaxTree : Hashable {
})
}

subscript (_ index : Int) -> SyntaxTree {
return children[index]
}

public func explode() -> Set<SyntaxTree> {
var trees : Set<SyntaxTree> = []
for i in 0 ..< countCases {
Expand Down

0 comments on commit 6df3914

Please sign in to comment.