meyercm / shorter_maps

Elixir ~M sigil for map shorthand. `~M{id, name} ~> %{id: id, name: name}`
MIT License
233 stars 11 forks source link

Atom containing `?` giving compilation error #10

Closed rhnonose closed 7 years ago

rhnonose commented 7 years ago

When I use an atom with a trailing ? it gives a compilation warning. Here's the output in IEx:

iex(2)> ~M{a?} = %{a?: true}
** (CompileError) iex:2: expected key-value pairs in a map, got: a?
    (stdlib) lists.erl:1263: :lists.foldl/3
    (shorter_maps) expanding macro: ShorterMaps.sigil_M/2
    iex:2: (file)

Is there a subset of characters that are not supported? My current version is the latest on hex, 2.2.3

meyercm commented 7 years ago

I've just published 2.2.4, which should correct this issue. Thanks for the good bug report!