Open
Description
It should be able to match with constants.
Example:
using Rematch
module Mod
const VALUE = 0
end
import .Mod
const FOO = 1
const BAR = 2
const FOOBAR = 3
const BAR_FOO = 4
x = FOO
y = @match x begin
Mod.VALUE => :mod_value
FOO => :foo
BAR => :bar
FOOBAR => :foobar
BAR_FOO => :barfoo
_ => nothing
end
@assert y == :foo
Metadata
Metadata
Assignees
Labels
No labels