summaryrefslogtreecommitdiff
path: root/cpp/src/slice2py/Main.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-24 09:51:55 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-24 09:51:55 -0700
commit487dd39e3483217cccb80f46e7a65674c7f6c05a (patch)
tree75fd3df459df63c2646a4e20c7a32f1ff05a09dd /cpp/src/slice2py/Main.cpp
parentbug 4623 - missing doc comments (diff)
downloadice-487dd39e3483217cccb80f46e7a65674c7f6c05a.tar.bz2
ice-487dd39e3483217cccb80f46e7a65674c7f6c05a.tar.xz
ice-487dd39e3483217cccb80f46e7a65674c7f6c05a.zip
bug 4752 - allow underscores in Slice identifiers
Diffstat (limited to 'cpp/src/slice2py/Main.cpp')
-rw-r--r--cpp/src/slice2py/Main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 58fc3a9f47c..0eed26549c7 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -373,7 +373,8 @@ usage(const char* n)
"--output-dir DIR Create files in the directory DIR.\n"
"--depend Generate Makefile dependencies.\n"
"-d, --debug Print debug messages.\n"
- "--ice Permit `Ice' prefix (for building Ice source code only)\n"
+ "--ice Permit `Ice' prefix (for building Ice source code only).\n"
+ "--underscore Permit underscores in Slice identifiers.\n"
"--all Generate code for Slice definitions in included files.\n"
"--checksum Generate checksums for Slice definitions.\n"
"--prefix PREFIX Prepend filenames of Python modules with PREFIX.\n"
@@ -394,6 +395,7 @@ compile(int argc, char* argv[])
opts.addOpt("", "depend");
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
+ opts.addOpt("", "underscore");
opts.addOpt("", "all");
opts.addOpt("", "no-package");
opts.addOpt("", "checksum");
@@ -453,6 +455,8 @@ compile(int argc, char* argv[])
bool ice = opts.isSet("ice");
+ bool underscore = opts.isSet("underscore");
+
bool all = opts.isSet("all");
bool noPackage = opts.isSet("no-package");
@@ -496,7 +500,7 @@ compile(int argc, char* argv[])
return EXIT_FAILURE;
}
- UnitPtr u = Unit::createUnit(false, false, ice);
+ UnitPtr u = Unit::createUnit(false, false, ice, underscore);
int parseStatus = u->parse(*i, cppHandle, debug);
u->destroy();
@@ -542,7 +546,7 @@ compile(int argc, char* argv[])
}
else
{
- UnitPtr u = Unit::createUnit(false, all, ice);
+ UnitPtr u = Unit::createUnit(false, all, ice, underscore);
int parseStatus = u->parse(*i, cppHandle, debug);
if(!icecpp->close())