Alan Manuel Gloria:
> We could also use one of the later techniques I eventually settled on:
> have readers return a one-item list to mean "got a datum, here it is!"
> or an empty list to mean "didn't get a datum". It complicates all
> actions, admittedly - now you have to unwrap the return value - but
> avoids special marker cons cells.
True. But I think I have an even better approach - instead of calling it_expr
in this special case, have it recurse to t_expr. Then special indents "work
like usual". It's much simpler - just one more line to handle this special
case, and we don't have to deal with any additional wrapping/unwrapping. Below
is the change.
So below is another tweak, which seems to be a more general approach.
--- David A. Wheeler
(group_i=it_expr {$v = $group_i.v;} /* Ignore initial GROUP/scomment */
| comment_eol
(indent g_body=body {$v = $g_body.v;} /* Normal GROUP use */
- | same (comment_eol same)* g_i=it_expr {$v = $g_i.v;} /* Plausible se
+ | same ( g_i=it_expr {$v = $g_i.v;} /* Plausible separator */
+ /* Handle #!sweet EOL EOL t_expr */
+ | comment_eol restart=t_expr {$v = $restart.v;} )
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss