mirah/mirah — Issue #152: def_edb can't be called in a quote block of a macro
Author: baroquebobcat
Created: 2011-10-18 14:05:12+00:00
State: open

```mirah
macro def foo bar
quote do
def_edb `bar`, "something"
end
end
```

causes

```
NoMethodError: undefined method `name' for Unquote
FunctionalCall(n):Mirah::AST::Unquote
```

to be raised because `def_edb` is being expanded before `foo` is.

https://github.com/mirah/mirah/blob/master/lib/mirah/plugin/edb.rb#L19

I'm not sure how to fix this behavior. I figure we either need `def_edb` to be unquote tolerate, or to expand it after the macro it is in.

I don't like the idea of making it unquote proof as much because it means that that's one more thing a plugin writer would have to worry about, but if it's simpler maybe we could start there.