[C++] bask in my awesomeness.

Started by
41 comments, last by Alpha_ProgDes 11 years, 2 months ago
Quote:Original post by loufoque
Quote:You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.


Well what I mean is it'll check stuff like:

<html>_ <body>_<!html>_ <!body>_; // compiler error


But there's no way to tell it things like "a <body> block must appear inside an <html> block".
Advertisement
Big Smile... Big Smile!! Sir well done!! And a massive thank you!
I'd love to see this for LOLCAT too.
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Quote:Original post by the_edd
Quote:Original post by loufoque
Quote:You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.


Well what I mean is it'll check stuff like:

<html>_ <body>_<!html>_ <!body>_; // compiler error


But there's no way to tell it things like "a <body> block must appear inside an <html> block".


It should be possible to add such functionality with a healthy dose of BOOST_PP.
Sick! [cool]
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Quote:Original post by MaulingMonkey
Quote:Original post by the_edd
Quote:Original post by loufoque
Quote:You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.


Well what I mean is it'll check stuff like:

<html>_ <body>_<!html>_ <!body>_; // compiler error


But there's no way to tell it things like "a <body> block must appear inside an <html> block".


It should be possible to add such functionality with a healthy dose of BOOST_PP.


Perhaps you're right. But I fear the repercussions of making it just a little bit too useful for its own good!

For example, I thought it would be quite cool if you could use boost::bind style placeholders such as _1, _2, ... in order to create an XML template that you could "call" with different arguments in order to generate XML documents with small changes in content. But enough is enough. I wasn't *that* bored :)
Finally we can make MMORPGs in HTML!

</epic>
This should definitely be pushed to boost for an april 1st rollout of a new engine. :)
Quote:But there's no way to tell it things like "a <body> block must appear inside an <html> block".

Of course there is.
Looks like you're way less awesome than you think.

Expression templates allow you to build any abstract syntax tree as a type, that you may then evaluate as you see fit at compile-time using metaprogramming.
Quote:Original post by loufoque
Quote:But there's no way to tell it things like "a <body> block must appear inside an <html> block".

Of course there is.
Looks like you're way less awesome than you think.

Expression templates allow you to build any abstract syntax tree as a type, that you may then evaluate as you see fit at compile-time using metaprogramming.

*sigh*

No, he's awesome. He's definitely awesome. When he said "But there's no way to tell it things like 'a <body> block must appear inside an <html> block'" he meant in the current version of XSMELL (at least that's how I understood it). Of course he could change it so such checking would be done. But he didn't add that functionality to XSMELL, so it can't be done (yes, you could make it so it's done yourself, but XSMELL doesn't provide a way for you to do this). Really, you're over complicating everything and nitpicking way more than you need to be.
[size=2][ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

This topic is closed to new replies.

Advertisement