mirah/mirah — Issue #168: Generate Methods via Macros
Author: RobertFischer
Created: 2012-01-31 19:03:29+00:00
State: open

It'd be nice to generate methods using macros. Something like this:

```
macro def makeMethod(name)
["Bar"].each do |string|
quote {
def `"${name.string_value}${string}"`()
puts string
end
}
end
end

makeMethod "foo"
```

Currently, my efforts to do this run into either syntax errors or an error in inference:

```
Cause: (InternalCompilerError) undefined method `infer' for BlockPass
FunctionalCall(ping):Mirah::AST::BlockPass
```