RelationalAI-oss / Rematch.jl

Pattern matching
Other
52 stars 6 forks source link

Add support for interpolating values into the pattern #11

Closed NHDaly closed 5 years ago

NHDaly commented 5 years ago

Added case to handle_destruct to match $a or $(f(a)) expressions.

Currently doesn't handle interpolations that themselves contain splats:

    arr=[1,2,3]; @match [0, $(arr...), 0] = [0,1,2,3,0]
NHDaly commented 5 years ago

(I've opened this against RelationalAI-oss:Rematch-field-names, because https://github.com/RelationalAI-oss/Rematch.jl/pull/9 fixes a bunch of broken tests. Once that's merged, i'll change the diff-base back to master.)

EDIT: Changed back to merge into master.

ghost commented 5 years ago

Note that this PR adds another TODO item to check for https://github.com/RelationalAI-oss/Rematch.jl/issues/13.