ThrowTheSwitch/CMock — pull request #19 by lgreve (2014-02-24 00:53:04+00:00)
Title: Fix removal of multi-line typedefs

This patch fixes a bug where multi-line typedefs are not being removed from parsed headers. This leads to ruby parsing errors or stray typedefs in the generated headers depending on the format of the typedef.

For example:
```
typedef void (*myfunc)
(
int a,
int b
);
```

causes the error:
```
CMock/lib/cmock_header_parser.rb:247:in `parse_declaration': Failed Parsing Declaration Prototype! (RuntimeError)
declaration: '(int a, int b)'
modifier: ''
return: {:type => '', :name => 'cmock_to_return', :ptr? => false, :const? => false, :str => ' cmock_to_return', :void? => false}
function: ''
args: [
{:type => 'int', :name => 'a', :ptr? => false, :const? => false}
{:type => 'int', :name => 'b', :ptr? => false, :const? => false}
]

from /Users/lucas/dev/git/lgreve/CMock/lib/cmock_header_parser.rb:33:in `block in parse'
from /Users/lucas/dev/git/lgreve/CMock/lib/cmock_header_parser.rb:32:in `map'
from /Users/lucas/dev/git/lgreve/CMock/lib/cmock_header_parser.rb:32:in `parse'
from lib/cmock.rb:40:in `generate_mock'
from lib/cmock.rb:31:in `block in setup_mocks'
from lib/cmock.rb:30:in `each'
from lib/cmock.rb:30:in `setup_mocks'
from lib/cmock.rb:85:in `

'
```