Konafets / antlers-idea

Adds support for Antlers, the templating language of Statamic
MIT License
16 stars 1 forks source link

Improve Lexer readibility and performance #135

Closed Konafets closed 1 year ago

Konafets commented 1 year ago

Remove a loop which loops backbackwards through the matched content and checks every char if it is a { to put it back into the input stream. As we have everytime two { in the matched string we can just use yypushback(2) to get the same result. This is easier to read and does not need to cast the stream to a string.