History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-508
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Doug H
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

allow standalone interpolated strings for templates

Created: 14/Oct/05 11:22 AM   Updated: 14/Oct/05 12:30 PM
Component/s: Parser
Affects Version/s: 0.7
Fix Version/s: 0.7.5

Time Tracking:
Not Specified


 Description  « Hide
Standalone interpolated strings fail at the parser stage instead of later in the pipeline like other standalone strings. This is because the interpolated string has two ESEPARATOR tokens at the end instead of the beginning like other interpolated strings. Changing the expression_interpolation rule fixes that (see below).

This is useful for "html in boo" style templates like how quixote does it in python: http://colorstudy.com/docs/shootout.html#quixote
Ayende's Brail template wouldn't require adding an "output " at the beginning of every line, for example.

protected
expression_interpolation returns [ExpressionInterpolationExpression e]
{ e = null; Expression param = null; LexicalInfo info = null; }:
(firstseparator:ESEPARATOR)?
( options { greedy = true; } :

startsep:ESEPARATOR{ if (info == null)

{ info = ToLexicalInfo(startsep); e = new ExpressionInterpolationExpression(info); }

}
param=expression { if (null != param) { e.Expressions.Add(param); } }
endsep:ESEPARATOR
)+
(lastseparator:ESEPARATOR)?
;



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.