Skip to content

Commit

Permalink
mv dsl macros to reflect different api levels
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Aug 15, 2014
1 parent 95e4174 commit e65f388
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lib/dsl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,7 @@ defmodule WebAssembly.DSL do
end


# basic api

defmacro builder(do: body) do
quote do
alias WebAssembly.Core.St
var!(st) = St.new
unquote(body)
St.release(var!(st))
end
end
# internal api

defmacro add_val!(v) do
quote do
Expand All @@ -67,6 +58,18 @@ defmodule WebAssembly.DSL do
end
end


# basic api

defmacro builder(do: body) do
quote do
alias WebAssembly.Core.St
var!(st) = St.new
unquote(body)
St.release(var!(st))
end
end

defmacro tag(tagname, attrs\\[], rest)

defmacro tag(tagname, attrs, do: body) do
Expand Down

0 comments on commit e65f388

Please sign in to comment.