implemented the comment state in the template parser