snippets: add functions to header.
snippets: add snippet parser.

this is not very resillient yet. there is much to do.