Skip to content

Commit f0c7dd1

Browse files
committed
typos
1 parent 9576a62 commit f0c7dd1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/cursors.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ A [`TreeCursor`](@ref) for tree nodes with the [`IndexedChildren`](@ref) trait b
191191
are not directly accessible.
192192
193193
This type is very similar to [`ImplicitCursor`](@ref) except that it is free to assume that the child iteration
194-
state is an integer starting at `1` which drastially simplifies type inference and slightly simplifies the
194+
state is an integer starting at `1` which drastically simplifies type inference and slightly simplifies the
195195
iteration methods.
196196
"""
197197
struct IndexedCursor{N,P} <: TreeCursor{N,P}

src/iteration.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ Any[1,Any[2,3]]
365365
we will get `[[1, [2,3]], 1, [2, 3], 2, 3]`.
366366
367367
WARNING: This is \$O(n^2)\$, only use this if you know you need it, as opposed to
368-
a more standard statefull approach.
368+
a more standard stateful approach.
369369
"""
370370
struct StatelessBFS{T} <: TreeIterator{T}
371371
root::T
@@ -469,7 +469,7 @@ Note that in most common cases tree nodes are of a type which depends on their c
469469
`Int` or `Vector`. Alternatively, to only operate on leaves do `map(𝒻, Leaves(itr))`.
470470
471471
It's very easy to write an `f` that makes `treemap` stack-overflow. To avoid this, ensure that `f` eventually
472-
termiantes, i.e. that sometimes it returns empty `children`. For example, if `f(n) = (nothing, [0; children(n)])` will
472+
terminates, i.e. that sometimes it returns empty `children`. For example, if `f(n) = (nothing, [0; children(n)])` will
473473
stack-overflow because every node will have at least 1 child.
474474
475475
To create a tree with [`HasNodeType`](@ref) which enables efficient iteration, see [`StableNode`](@ref) instead.

src/printing.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ printnode(io::IO, node; kw...) = show(IOContext(io, :compact => true, :limit =>
9595
repr_node(node; context=nothing)
9696
9797
Get the string representation of a node using [`printnode`](@ref). This works
98-
analagously to `Base.repr`.
98+
analogously to `Base.repr`.
9999
100100
`context` is an `IO` or `IOContext` object whose attributes are used for the
101101
I/O stream passed to `printnode`.
@@ -119,7 +119,7 @@ Set of characters (or strings) used to pretty-print tree branches in [`print_tre
119119
- `mid`: "Forked" branch segment connecting to middle children.
120120
- `terminator`: Final branch segment connecting to last child.
121121
- `skip`: Vertical branch segment.
122-
- `dash`: Horizontal branch segmentt printed to the right of `mid` and `terminator`.
122+
- `dash`: Horizontal branch segment printed to the right of `mid` and `terminator`.
123123
- `trunc`: Used to indicate the subtree has been truncated at the maximum depth.
124124
- `pair`: Printed between a child node and its key.
125125
"""
@@ -163,7 +163,7 @@ function TreeCharSet(name::Symbol=:unicode)
163163
elseif name == :ascii
164164
TreeCharSet("+", "\\", "|", "--", "...", " => ")
165165
else
166-
throw(ArgumentError("unrecognized dfeault TreeCharSet name: $name"))
166+
throw(ArgumentError("unrecognized default TreeCharSet name: $name"))
167167
end
168168
end
169169

src/traits.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ childstatetype(node) = childstatetype(typeof(node))
180180
NodeType(::Type)
181181
NodeType(node)
182182
183-
A trait which specifiees whether a tree has a predictable node type (`HasNodeType()`) or not (`NodeTypeUnknown()`).
183+
A trait which specifies whether a tree has a predictable node type (`HasNodeType()`) or not (`NodeTypeUnknown()`).
184184
185185
This is analogous to `Base.IteratorEltype`. In particular the `IteratorEltype` of [`TreeIterator`](@ref) is dictated
186186
by this trait.

0 commit comments

Comments
 (0)