Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Patch for Pragma Bug in BaseScanner

Hi all,
as Emanuel mention befor we two are working on the AST. We currently analyze the cdt code (specially the ast and parser). We've found allready a lot of "interesting" code.

Now I'm proud to send my first patch. There was an error in the BaseScanner which make it not possible to display the pragma preprocessor directive correctly in the AST. Only a small "break" was missing.

By the way theres actually a null-pointer in the class DOMAST 'cause using of not initiated displayProblemsAction. I don't create a patch for this because I think somebody is working on this class.

Greetings
Leo Büttiker
### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.core
Index: parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java,v
retrieving revision 1.55
diff -u -r1.55 BaseScanner.java
--- parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java	29 Mar 2006 16:30:49 -0000	1.55
+++ parser/org/eclipse/cdt/internal/core/parser/scanner2/BaseScanner.java	15 Apr 2006 12:09:57 -0000
@@ -2663,6 +2663,7 @@
                 case ppPragma:
                     skipToNewLine();
                     processPragma(pos, bufferPos[bufferStackPos]);
+                    break;
                 default:
                     problem = true;
                     break;

Back to the top