Tomek Sowiński, el 10 de octubre a las 20:13 me escribiste: > Simen kjaeraas napisał: > > > Tomek Sowiński <[email protected]> wrote: > > > >> pragma(msg, "blabla") > >> > >> bug or feature? > > > > Feature. http://www.digitalmars.com/d/2.0/pragma.html: > > > > "Pragmas can be used by themselves terminated with a ';', they can > > influence a statement, a block of statements, a declaration, or a block > > of declarations." > > > > E.g. pragma( blah, blablableh ) struct foo {}; might mean something, > > and in this case the pragma would modify foo. > > Heh, should've DAFS, thanks. > It's still baffling a bit - what can pragma(msg) possibly influence? Perhaps > there should be a > division - influencing vs. statement flavor. The compiler could disallow > usage not lying in a > particular pragma's nature.
The parser doesn't know about what "msg" means. To do this you'll have to define each pragma as part of the syntax (you can't, since most of the usefulness of pragma is language extension) or have a stmpragma and exppragma to parse differently "statement flavor" and "influencing" pragmas, or something like that. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- He cometido pecados, he hecho el mal, he sido víctima de la envidia, el egoísmo, la ambición, la mentira y la frivolidad, pero siempre he sido un padre argentino que quiere que su hijo triunfe en la vida. -- Ricardo Vaporeso
