stif/Parser/src/StifParser.cpp
changeset 22 a009639409f5
parent 0 a03f92240627
child 30 86a2e675b80a
--- a/stif/Parser/src/StifParser.cpp	Fri May 14 17:25:03 2010 +0300
+++ b/stif/Parser/src/StifParser.cpp	Thu May 27 14:26:55 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() );
 
     }