implement applyEndPatternLast feature

I used this feature some times in SublimeText Language specs and missed it at atom :)