:: krowemoh

Thursday | 26 DEC 2024
Posts Links Other About Now

previous
next

The Template Language - Github

2023-06-22
template-language

I've put my code on github now so it can be pulled from there. There are still some major issues, the first being my parser having issues. It can't handle expressions fully and requires some knowledge of the internals to get it right. This si something I plan to fix up.

The other major issue is that the speed of the rendering isn't fast enough in my eyes. It takes too long and I really hope there is a way to speed things up. I am mostly doing just character processing and I don't see any loops that might be quadratic so there isn't an easy out.

Regardless, I think the code is fine as is and it works. {Basic} [Pun intended.] templates will work relatively well and I am using my templating language to build out my blog. The goal would be to remove the statically generated part with dynamic calls to BASIC with the rendered template as the response but that is still a ways away.

BASIC Templating Language

I learned 2 major things in building out this language. The first is that postfix notation is a cheat code and I should abuse it some more. The other is that parsing is harder than I thought and it's something I should have planned out earlier. It's not too late because my abstractions aren't too bad but it will be some work to wire in new parsing logic.