| 02-09-2008, 12:29 AM | #1 |
I want //! define, but not that define. I would want something that was scope compatible, and also library compatible , as in you need to be on code that requires the library owning it in order to use it. But specially, I would like private and public ones. But then, in order to do this I would have to come up for new syntax and I have no idea about how to do that... |
| 02-09-2008, 01:19 AM | #2 |
The way everybody else does it is with CPP run on individual files, so that scope is over a file. Then you have one include mechanism that is part of CPP (#include, files) and one part that is language (library/scope, modules). Files are the way to go for editing JASS but it's unpopular. But you probably already considered all this... I think you need yet another notation for indicating something akin to file scope. Your preprocessor injects those files where they get #included. //! File xasfd //! EndFile. Also I would throw out the //! notation and just use #. Karukef invented that pre-syntax disable, and it's pointless when we already have other syntax that breaks stuff. I think we talked about adding a virtual file notation awhile ago but library was good enough then. |
| 02-09-2008, 10:32 PM | #3 |
anyway =) create first the simple define command and after you can do what do you want ^^ (xD) |
| 02-10-2008, 05:08 PM | #4 | |
Quote:
|
| 02-10-2008, 07:22 PM | #5 |
//! globaldefine applies to the entire map //! define applies to the scope or library it is declared within, and allows it to be used in any code that requires that library //! privatedefine applies to the scope or library it is declared within only |
| 02-11-2008, 09:36 PM | #6 |
What I have now: //! define //! sdefine Both are evaluate immediately after library/scope stuff, and before structs, in adition, sdefine simply prepends SCOPE_PRIVATE before the define's name. The name sdefine is subject to change. |
