FluxML / FluxML/MacroTools.jl

@capture union problem

Open
#180 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Julia
Stars
320
Forks
84
PR merge metrics
No merged PRs in 30d

Description

Similar to what was noted in https://github.com/FluxML/MacroTools.jl/issues/40#issuecomment-357466077,

```julia
julia> @capture :(myvariable = 2) (lhs_Symbol = rhs_)
true

julia> @capture :(myvariable = 2) (lhs_Symbol = rhs_) | someotherpat
false

julia> @capture :(myvariable = 2) (lhs_ = rhs_) | someotherpat
true
```

The second match should be true as well.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the @capture entry point and reproduce the three Julia examples from the issue, comparing the union pattern with and without the typed lhs_Symbol binding. Done means the second example, `(lhs_Symbol = rhs_) | someotherpat`, matches the expression and returns true.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.