stif/Parser/src/StifParser.cpp
branchRCL_3
changeset 19 da2cedce4920
parent 0 a03f92240627
child 30 86a2e675b80a
--- a/stif/Parser/src/StifParser.cpp	Tue May 11 17:39:09 2010 +0300
+++ b/stif/Parser/src/StifParser.cpp	Tue May 25 14:22:58 2010 +0300
@@ -845,7 +845,7 @@
 //
 //    Method: HandleSpecialMarks
 //
-//    Description: Handles special marks.( '\/\/', '\/\*' and '*/\/' ). This
+//    Description: Handles special marks.( '\/' and '\*' ). This
 //         		   is used when ECStyleComments comment type is used.
 //
 //    Parameters: TPtr& aBuf: inout: section to parsed
@@ -862,68 +862,28 @@
     {
     TLex lex( aBuf );
     TInt firstPos( 0 );
-    TInt secondPos( 0 );
-
-    //        // => \/\/ => //
-    //        /* => \/\* => /*
-    //        */ => \*\/ => */
-  
+    
+    //        Replace \/ with /
+    //        Replace \* with *
+    
     do
         {
+        //RDebug::Print( _L("Print : %S"), &aBuf );
         firstPos = lex.Offset();
         TChar get = lex.Get();
         // Check is '\'
         if( get == '\\' ) 
             {
-            // Peek next character( '/' )
-            if( lex.Peek() == '/' )
+            firstPos = (lex.Offset()-1);
+            // Peek next character( '/' or '*' )
+            if( lex.Peek() == '/' || lex.Peek() == '*')
                 {
-                lex.Inc();
-                secondPos = lex.Offset();
-                // Peek next character( '\' )
-                if( lex.Peek() == '\\' )
-                    {
-                    lex.Inc();
-                    // Peek next character( '/' )
-                    if( lex.Peek() == '/' )
-                        {
-                        // Delete mark '\/\/' and replace this with '//'
-                        aBuf.Delete( secondPos, 1 );
-                        aBuf.Delete( firstPos, 1 );
-                        lex = aBuf;
-                        }
-                    // Peek next character( '/' )
-                    else if( lex.Peek() == '*' )
-                        {
-						// Delete mark '\/\*' and replace this with '/*'                        
-                        aBuf.Delete( secondPos, 1 );
-                        aBuf.Delete( firstPos, 1 );
-                        lex = aBuf;
-                        }
-                    }
-                }
-            // Peek next character( '/' )
-            else if( lex.Peek() == '*' )
-                {
-                lex.Inc();
-                secondPos = lex.Offset();
-                // Peek next character( '\' )
-                if( lex.Peek() == '\\' )
-                    {
-                    lex.Inc();
-                    // Peek next character( '/' )
-                    if( lex.Peek() == '/' )
-                        {
-                        // Delete mark '\*\/' and replace this with '*\'
-                        aBuf.Delete( secondPos, 1 );
-                        aBuf.Delete( firstPos, 1 );
-                        lex = aBuf;
-                        }
-                    }
+                aBuf.Delete (firstPos,1);
+                lex = aBuf;
                 }
             }
+           
         firstPos = 0;
-        secondPos = 0;
         } while ( !lex.Eos() );
 
     }