goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

erb-like template engine #134

Closed st0012 closed 7 years ago

st0012 commented 7 years ago

Since go's template engines all need to be compiled, it's not possible to create a template engine that to them. So the only way to have a template engine is to create one with Goby. And I found a simplified implementation of erubis, I think we can try to implement something like this. But we'll need satisfy to some prerequisites before doing this:

cc @adlerhsieh

hachi8833 commented 7 years ago

FYI: regarding regexp class, I think regexp2 package, which came from .NET Framework code in C#, would be very good for Goby. Very powerful, and the features are almost all equivalent to Ruby's Onigmo and PCRE, except the very-new "absent operator" in Ruby 2.4 as far as I have used.

*Go's standard regexp package is pretty poor :-).

gernest commented 7 years ago

I think at the moment gooby need somehow to provide facility to work with raw bytes. Implementing something like this need more control of the input stream.

st0012 commented 7 years ago

@gernest I agree with your opinion, but currently we don't have enough contributors to implement this. Are you interested in implementing this feature?

st0012 commented 7 years ago

We're focusing on building API server now, this feature seem to be redundant.