Le 23/10/2014 08:23, [email protected] a écrit :
On Thu, Oct 23, 2014 at 8:17 AM, Thierry Goubier
<[email protected] <mailto:[email protected]>> wrote:

    Le 23/10/2014 08:09, [email protected] <mailto:[email protected]>
    a écrit :

        How hard would it be to parse such a file with this kind of content?

        
https://github.com/mitsuhiko/__flask/blob/master/examples/__minitwit/minitwit.py
        
<https://github.com/mitsuhiko/flask/blob/master/examples/minitwit/minitwit.py>


    Not hard. A bit of work on PythonParser2.


Well, I meant "a file like this in Smalltalk" :-) Still, a cool idea of
yours!

That in Smalltalk may be better, especially to induce people to extend it with Pharo afterwards :)

But Pharo has issues with long methods (such as a single, long file). I wrote some code to split methods for SmaCC at the AST level (parse, split, create sub-methods, replace code with call to method, compile), but it works in SmaCC generated code; I didn't really try to make it general.


        This would generate a WAComponent subclass with methods in it,
        register
        the thing and go for it.


    The level of Python in it look not too difficult to convert. But it
    relies on a framework for which I can't answer. What is jinja ?

Jinja is the template engine: http://jinja.pocoo.org/

Ok,

Thierry

Reply via email to