Open almond-neely opened 10 years ago
@frostie5 Do you need method calls that take parameters?
Is there a way to call Go functions?
Not at this time, no. I have plans to extend the gohaml library; however, I have had little time to dedicate to it. I plan on having it by the end of the year. I welcome contribs, if you feel like extending the language. To do so, add the correct constructs to the lang.y file and add a case in the resolveValue method on line 93 of tree.go. That should get methods in the works nicely.
(All of this advice comes from just reviewing the code. YMMV as you implement it.)
What is lang.y
exactly?
lang.y
is the source code file in the repo: https://github.com/realistschuckle/gohaml/blob/master/lang.y
@realistschuckle right, but, more specifically, what is the y
format?
Sorry! Yacc. http://dinosaur.compilertools.net/yacc/
Thanks. I'll look into it :)
First of all, your gohaml project has made writing my go web app much easier(I hate HTML). Currently i've been using gohaml "statically"-- that is, only to replace html, and then html/template to plug in data/ iterate over ranges. My app has some pages with a lot of data from a DB, and i access this data on a per-page basis with a method call using html/template. For sanity/clarity's sake, i'm currently trying migrate all of my html/template code over to gohaml, but as far as i can tell, there's no support for method/function calls. Is this a feature we can expect in the future?