diff --git a/impl/ex/lib/statifier.ex b/impl/ex/lib/statifier.ex new file mode 100644 index 0000000..d442999 --- /dev/null +++ b/impl/ex/lib/statifier.ex @@ -0,0 +1,22 @@ +defmodule Statifier do + def parse() do + :statifier + |> :code.priv_dir() + |> Path.join("scxml/microwave.scxml") + |> Statifier.Codec.SCXML.parse() + end + + def parse(file) do + codec = + if String.ends_with?(file, ".yaml") do + Statifier.Codec.YAML + else + Statifier.Codec.SCXML + end + + :statifier + |> :code.priv_dir() + |> Path.join(file) + |> codec.parse() + end +end