Inaccurate line number in error message

Hi,

when running the following policy snippet below, one gets the error
message "line 1 (i): error, not a BRO type".

1 function foo(i: int)
2 {
3 # ...
4 local j: i;
5 }

However, there is no error in line 1. It's in line 4, which should be "j
= i" instead. I just had a more complicated scenario with basically this
error and it took me ages to locate the problem. I kept looking in the
wrong spot because my line "4" was much further down in a biggish
function.

After looking at parse.y for a while I conclude that I don't really know
the right way to fix this -- could anyone provide pointers, or better
yet, a patch? Thanks!

Cheers,
Christian.