Joel de Guzman wrote:
We need a program options flag for this which defaultsIt's converting tabs to four spaces now, which seems to be the "preferred" indent scheme for Boost. The recommended approach to tabs in Boost code is to simply avoid them, which IMHO is the right thing to do for Boost. I'm a little wary of adding flags or options which make it easier to support tabs which probably shouldn't be there in the first place in any code included in Boost docs, but we can also deal with that by just issuing nasty warnings whenever the highlighting process encounters tabs... Anyhow, the "flaky" part is that the current tab expansion is simply "tab" -> "space space space space", which works pretty well for leading indentation, but thrashes stuff like int foo( ) { // here are some alignedbecause it's not smart enough to replace a tab with "enough spaces to reach the next tab stop". We can handle this through doing tab expansion just before we process the highlighting, but this isn't really a high priority for me. If anyone is interested, I can point them to where it would need to go, or graft it in given a tab expansion algorithm which works on standard iterators or std::string. What's macroref? I seem to have missed this?Just like [classref ...] and [funcref ...], but for macros. Don't you think we ought to just standardize on a quickbookProbably, with a few comments:
I think we ought to have the extensions in the syntax definition.Agreed. But that was more than I had time for, so I hard-coded the basics for now. Besides, it gave me another excuse to play with the Boost preprocessor library: #define HIGHLIGHT_EXTENSION( r, mode, ext ) \This little snippet doesn't even scratch the surface demonstrating how cool it can get... If you haven't explored the Boost preprocessor library yet (soapbox mode, I suspect Joel's already knows this ;) ), I suggest doing so when you can. Like QuickBook, it has proven very helpful in applying my favorite three principles of software elegance. No. Maybe we could - I am jumping through some untested hoops to deal with the infamous directory separator character issue. I did take a peek, but haven't used it yet. One problem I ran into is that I couldn't find any portable way in Boost to get the path used for the current executable. Anyone know if boost::filesystem (or anything else in boost or the C++ Standard Library) can portably find this, given the contents of argv[0]?o -I / --include_path command line option to add additionalAre we using boost::file_system now? Cheers and Nice work!Thanks! - james -- __________________________________________________________ James Fowler, Open Sea Consulting http://www.OpenSeaConsulting.com, Marietta, Georgia, USA Do C++ Right. http://www.OpenCpp.org, opening soon! |
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Daniel James
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... David Abrahams
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... David Abrahams
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Joel de Guzman
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Thomas Guest
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Thomas Guest
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Joel de Guzman
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters Joao Abecasis
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters Joel de Guzman
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... David Abrahams
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... James Fowler
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Joel de Guzman
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Joel de Guzman
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Thomas Guest
- Re: [Boost-docs] Re: Dynamically Loadable Syntax Highighter... James Fowler
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... David Abrahams
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Eric Niebler
- Re: [Boost-docs] Re: Dynamically Loadable Syntax Highighter... James Fowler
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Thomas Guest
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... David Abrahams
- [Boost-docs] Re: Dynamically Loadable Syntax Highighters [ ... Joel de Guzman
