parse function definitions + test