Skip navigation

So I am building [what I think will be] a kick ass Templating engine / programing language for anything (well sort off), called Templ.

So far I have added the ability for templates to include functions (Via use of Funt<T, TReturn>), loops and variables, for example heres a template from my test folder:

Hi [[yourname]]

heres the numbers between 1 and 100

Im a map

[[yourname]] represents a variable called yourname
[[numbers:1,100]] represents a function called numbers with the parameter 1,100 (in Templ, everything is a string)

<<20>> represents the start of a loop that will iterate 20 times
<<endl>> represents the end of the  loop, anything between this and the start of the loop will be repeated 20 times

As you can tell, It isn’t exactly a templating engine, it’s more of a template parser/ programming language.

In the code that processes Templ, you declare variables with the following
Templ.Variables.add(varname, varvalue)

To delare a function you use the following

I am hoping you managed to get that, it is not as confusing as it seems when I explain it.

Now, here is the part where I need some feedback. As I am going to Open Source Templ, Is there anything that you would like to see in this (other than me hitting the delete key on the project :P)?

Blogged with Flock

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: