frontend: factorize out some of the prototype parsing code
frontend: factorize out some of the prototype parsing code

So we can re-use it for defining function types.

Signed-off-by: Mark Ryan <88ffc4093c40652fbbf052f026a8b6147509f0aa@gmail.com>

markdryan/subtilis,markdryan/subtilis