Draft implementation of if parser