Handling lines — take 2

6 views
Skip to first unread message

Magnus Holm

unread,
Jan 15, 2010, 1:56:24 PM1/15/10
to guardians-o...@googlegroups.com
After writing a Liquid-parser which handles the "new" lines-exp
presented in http://groups.google.com/group/guardians-of-the-temple/browse_thread/thread/1ae34029db0c3efd,
I realized there might a better, easier way:

Simply introduce [:newline] which inserts a newline in the generated code.

[:multi,
[:dynamic, "hello"],
[:dynamic, "@world"],
[:newline],
[:dynamic, "yeah"]

# =>

buffer << hello ; buffer << @world
buffer << yeah

I'm going to implement this one too, and see which one is easiest to
work with :-)

// Magnus Holm

Reply all
Reply to author
Forward
0 new messages