Speed up literal string patterns and fix a bug of unexpected capturing
- Improve string pattern performance
@match str begin
"This" => ...
end
Now we use ===
instead of ==
to make string comparisons at julia v1.1+.
- Avoid to regard symbol
nothing
as as-pattern:
A bug occurred at the previous version, wherenothing
s are not treated as literals, so following assertion used to fail.
@assert @match 1 begin
nothing => false
_ => true
end # =>
Solved via defining a special pattern before capturing to handle with this.