lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jan 20, 2010 at 3:48 PM, Tobias Kieslich <tobias@justdreams.de> wrote:
> On Wed, 20 Jan 2010, Romulo wrote:
>
>> I think the worst part is matching lines: where the user declared the
>> tag, and where the code generator puts the associated
>> expression/statement. With the template-is-a-Lua-script approach, it's
>> somewhat hard to identify in what line  an expression is, because
>> whilst you can check with the debug library what line the tag function
>> was called, you can't tell which line the attribute is being declared
>> ( span{ \n\n href="${ obj:link_to( 'blog' ) }" } ). Perhaps with a
>> proper XML parser this can be made easier.
> Hm, with a proper parser, yes. The parser I use is strictly regexp based
> and henca has no notion of the line it is on. I would have to make that
> a tad more sophisticated and store at least the line where the tag
> starts in order to have better debugging. However, that applies to the
> parsing and template compilation only. The compiled template is entirely
> oblivious to the input. But the at that point I shall be past the issues
> anyway where the template input has much impact on possible errors.
> [...]

You guys are hijacking this thread. Please take the discussion to a new one.

-- 
-Patrick Donnelly

"Let all men know thee, but no man know thee thoroughly: Men freely
ford that see the shallows."

- Benjamin Franklin