From 61d3cefa01dcbef2d6ec16e660d9d02767d2c5a8 Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 19 Jul 2002 06:50:48 +0000 Subject: Picked up a few style crimes and fixed them. Added code generation for Java constants to slice2java. Added missing keyword (strictfp) to lists of keywords that need escaping for Java. Fixed bug in Java code generator: if a type name had a prefix in common with the name of its enclosing scope, the scope mangling code stripped off too much of the scope. For example: enum color { red }; const color c = red; This resulted in the generated type name being "olor" instead of "color" because the constant starts with the same letter as the name of the type. Fixed bug in the keyword escape mechanism -- keywords embedded in scoped names were not escaped. Keywords escaping for both Java and C++ still has bugs. I wrote two Slice torture files full of keywords. Neither the generated C++ code nor the generated Java code work for those files yet. Need to look at this... --- cpp/src/Ice/ReferenceFactory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpp/src/Ice/ReferenceFactory.cpp') diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 211561d5669..47de304261f 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -298,12 +298,12 @@ IceInternal::ReferenceFactory::create(const string& str) { end = beg; - while (end < s.length() && s[end] == ':') + while(end < s.length() && s[end] == ':') { beg = end + 1; end = s.find(':', beg); - if (end == string::npos) + if(end == string::npos) { end = s.length(); } @@ -316,13 +316,13 @@ IceInternal::ReferenceFactory::create(const string& str) else if(s[beg] == '@') { beg = str.find_first_not_of(delim, beg + 1); - if (beg == string::npos) + if(beg == string::npos) { beg = end + 1; } end = str.find_first_of(delim, beg); - if (end == string::npos) + if(end == string::npos) { end = str.length(); } -- cgit v1.2.3