Merge pull request #71 from SiegeLord/master

Add the -property command line argument
This commit is contained in:
David Nadlinger
2012-02-06 07:13:37 -08:00
3 changed files with 14 additions and 0 deletions

View File

@@ -25,6 +25,12 @@ static cl::opt<bool, true> useDeprecated("d",
cl::ZeroOrMore,
cl::location(global.params.useDeprecated));
#if DMDV2
cl::opt<bool> enforcePropertySyntax("property",
cl::desc("Enforce property syntax"),
cl::ZeroOrMore);
#endif
static cl::opt<ubyte, true> useDv1(
cl::desc("Force language version:"),
cl::ZeroOrMore,

View File

@@ -19,6 +19,9 @@ namespace opts {
extern cl::list<std::string> fileList;
extern cl::list<std::string> runargs;
extern cl::opt<bool> compileOnly;
#if DMDV2
extern cl::opt<bool> enforcePropertySyntax;
#endif
extern cl::opt<bool> createStaticLib;
extern cl::opt<bool> createSharedLib;
extern cl::opt<bool> noAsm;

View File

@@ -219,6 +219,11 @@ int main(int argc, char** argv)
printf("config %s\n", path.c_str());
}
// enforcePropertySyntax handled separately because it is a char
#if DMDV2
global.params.enforcePropertySyntax = enforcePropertySyntax ? 1 : 0;
#endif
// Negated options
global.params.link = !compileOnly;
global.params.obj = !dontWriteObj;