Last active
August 29, 2015 14:22
-
-
Save asaaki/32c310f2f23d3eb4696a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule SigilZ do | |
defmacro sigil_z(input, flags) do | |
quote do | |
[input: unquote(input), flags: unquote(flags)] | |
end | |
end | |
end | |
# then: | |
import SigilZ | |
~z(my input data)abc | |
#=> [input: "my input data", flags: 'abc'] | |
# NB! The flags are a char_list, not a string/binary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment