[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser

Jean Vittor jean.vittor at free.fr
Wed Apr 2 15:52:32 UTC 2008


SVN commit 792936 by jvittor:

Use a rule to skip ignored lines

 M  +1 -12     lexer.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp #792935:792936
@@ -422,12 +422,7 @@
     handleDirective( directive );
   } else if( m_source.get_startLine() && m_preprocessor.inSkip()) {
     // skip line and continue
-    m_source.set_startLine( false);
-    bool ppe = m_preprocessorEnabled;
-    m_preprocessorEnabled = false;
     m_source.parse( gr_skipTillEol);
-    m_source.set_startLine( true);
-    m_preprocessorEnabled = ppe;
     return;
   } else if( m_source.parse
 	     (
@@ -679,7 +674,6 @@
 
 	Token tk;
 	nextToken( tk );
-
 	if( tk == '(' ){
 	    ++count;
 	} else if( tk == ')' ){
@@ -733,12 +727,7 @@
   }
 
   // skip line
-  while( !m_source.currentChar().isNull()
-	 && m_source.currentChar() != '\n'
-	 && m_source.currentChar() != '\r') {
-    Token tk;
-    nextToken( tk);
-  }
+  m_source.parse( gr_skipTillEol);
 
   m_skipWordsEnabled = skip;
   m_preprocessorEnabled = preproc;




More information about the umbrello-devel mailing list