Skip to content

Commit 67e05ea

Browse files
committed
Fix spelling errors in src/matchers.jl
Fixed the following typos flagged by CI spell checker: - 'explenation' → 'explanation' (line 123) - 'wether' → 'whether' (lines 141, 143, 162) - 'lenght' → 'length' (line 149) These were all in comments and documentation within the matchers.jl file. No functional changes, only spelling corrections.
1 parent 837effd commit 67e05ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/matchers.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function term_matcher_constructor(term)
120120
car(matchers′)(term, bindings′) do b, n
121121
loop(drop_n(term, n), b, cdr(matchers′))
122122
end
123-
# explenation of above 3 lines:
123+
# explanation of above 3 lines:
124124
# car(matchers′)(b,n -> loop(drop_n(term, n), b, cdr(matchers′)), term, bindings′)
125125
# <------ next(b,n) ---------------------------->
126126
# car = first element of list, cdr = rest of the list, drop_n = drop first n elements of list
@@ -138,15 +138,15 @@ end
138138
# normal part (can bee a tree) operation defslot part
139139

140140
# defslot_term_matcher works like this:
141-
# checks wether data starts with the default operation.
141+
# checks whether data starts with the default operation.
142142
# if yes (1): continues like term_matcher
143-
# if no checks wether data matches the normal part
143+
# if no checks whether data matches the normal part
144144
# if no returns nothing, rule is not applied
145145
# if yes (2): adds the pair (default value name, default value) to the found bindings and
146146
# calls the success function like term_matcher would do
147147

148148
function defslot_term_matcher_constructor(term)
149-
a = arguments(term) # lenght two bc defslot term matcher is allowed only with +,* and ^, that accept two arguments
149+
a = arguments(term) # length two bc defslot term matcher is allowed only with +,* and ^, that accept two arguments
150150
matchers = (matcher(operation(term)), map(matcher, a)...) # create matchers for the operation and the two arguments of the term
151151

152152
defslot_index = findfirst(x -> isa(x, DefSlot), a) # find the defslot in the term
@@ -159,7 +159,7 @@ function defslot_term_matcher_constructor(term)
159159
if !iscall(car(data)) || (iscall(car(data)) && nameof(operation(car(data))) != defslot.operation)
160160
other_part_matcher = matchers[defslot_index==2 ? 2 : 3] # find the matcher of the normal part
161161

162-
# checks wether it matches the normal part
162+
# checks whether it matches the normal part
163163
# <-----------------(2)------------------------------->
164164
bindings = other_part_matcher((b,n) -> assoc(b, defslot.name, defslot.defaultValue), data, bindings)
165165

0 commit comments

Comments
 (0)