Skip to content

matching problem with v0.7 #59

@Qiyamah

Description

@Qiyamah

Here is what happens with V06

julia> using  ExpressionPatterns.Matching

julia> using  ExpressionPatterns.Helper

julia> using  Base.Meta

julia> match = matcher(:(@m :x y))
(::match!) (generic function with 2 methods)

julia> match(:(@transport :car   (john, peter)))
true

and here is what happens with v0.7

julia> using  ExpressionPatterns.Matching

julia> using  ExpressionPatterns.Helper

julia> using  Base.Test
WARNING: Base.Test is deprecated, run `using Test` instead
 in module Base

julia> using  Base.Meta

julia> match = matcher(:(@m :x y))
┌ Warning: `current_module()` is deprecated, use `@__MODULE__` instead.
│   caller = matcher(::Expr) at Function.jl:12
└ @ ExpressionPatterns.Matching.Function Function.jl:12
┌ Warning: `find(f::Function, A::AbstractVector)` is deprecated, use `findall(f, A)` instead.
│   caller = optimize_slurps!(::ExpressionPatterns.PatternStructure.Trees.PatternNode, ::ExpressionPatterns.Analyzer.Function.AnalysisState) at SlurpOptimizations.jl:13
└ @ ExpressionPatterns.Analyzer.SlurpOptimizations SlurpOptimizations.jl:13
(::getfield(ExpressionPatterns.Matching.Function, Symbol("#match!#1")){ExpressionPatterns.PatternStructure.Trees.PatternNode}) (generic function with 2 methods)

julia> match(:(@transport :car   (john, peter)))
┌ Warning: `endof(a)` is deprecated, use `lastindex(a)` instead.
│   caller = match_children(::ExpressionPatterns.PatternStructure.Trees.PatternNode, ::Array{Any,1}, ::Int64, ::Int64, ::Any) at Function.jl:76
└ @ ExpressionPatterns.Matching.Function Function.jl:76
false

Thanks

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions