Joel <[EMAIL PROTECTED]> writes:

> David Abrahams wrote:
>> "John Maddock" <[EMAIL PROTECTED]> writes:
>> 
>>>>Quickbook's syntax is modal and switches to and from plain
>>>>quickbook syntax to c++/python/etc. Unlike Quickbook, ReST
>>>>does not have highlighting and the code above will be
>>>>ambiguous in Quickbook in c++ source code mode.
>>>>
>>>>Perhaps what we need is a way to escape to qbk from within
>>>>code snippets. In qbk mode, we use the tick `some code` to
>>>>switch temprarily from qbk to source code mode. I think it
>>>>should be easy to do the same the other way around. To avoid
>>>>clashing with the syntax of the language, the escape mark
>>>>should be part of the highlighting configuration. For c++,
>>>>we can reuse the tick. Example:
>>>>
>>>>    struct is_void : public `*true-or-false-type*` {};
>>>>
>>>>Thoughts?
>>>
>>> That's actually one of the things I tried in case it worked
>>> already, so yes I think it is a good idea ;-)
>> But it doesn't capture quite the same semantics as <replaceable>.
>
> Alright. Perhaps what we then are code placeholders like:
>
> [placeholder true-or-false-type]
>
>     struct is_void : public true-or-false-type {};
>
> [set true-or-false-type to mpl::true_]

Have you looked through the litre examples from CPPTMP yet?  I like
the high-level idea here of identifying the replaceable text by name,
but it still seems as though you're trying to do too many things that
should be left to a general-purpose scripting language.  For example,
suppose the code snippet needs several instances of true-or-false-type
and some of them need to be replaced with different text?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to