BubbleMatch.Sigil (bubble_match v0.6.3) View Source

Link to this section Summary

Functions

Define the ~m sigil for compile-time parsing of BML expressions.

Link to this section Functions

Link to this macro

sigil_m(arg, list)

View Source (macro)

Define the ~m sigil for compile-time parsing of BML expressions.

For use within Elixir it is possible to use a ~m sigil which parses the given BML query on compile-time:

defmodule MyModule do
  use BubbleMatch.Sigil

  def greeting?(input) do
    BubbleMatch.match(~m"hello | hi | howdy", input) != :nomatch
  end
end