From 301e1057eb7e431472c5876590a3f9ab171737ef Mon Sep 17 00:00:00 2001 From: John Camelon Date: Tue, 7 Dec 2004 18:50:06 +0000 Subject: [PATCH] Add comments --- .../internal/core/parser2/AbstractGNUSourceCodeParser.java | 4 ++++ .../cdt/internal/core/parser2/cpp/GNUCPPSourceParser.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/AbstractGNUSourceCodeParser.java index bd667d7a0e4..9ba9b2e9621 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/AbstractGNUSourceCodeParser.java @@ -1407,6 +1407,10 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { } } } + + // x = y; // default to int + // valid @ Translation Unit scope + // but not valid as a statement in a function body if( ds.getDeclaration() instanceof IASTSimpleDeclaration && ((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() instanceof IASTSimpleDeclSpecifier && ((IASTSimpleDeclSpecifier)((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() ).getType() == IASTSimpleDeclSpecifier.t_unspecified) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/cpp/GNUCPPSourceParser.java index 9c984752971..b18992f0157 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/cpp/GNUCPPSourceParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser2/cpp/GNUCPPSourceParser.java @@ -3425,6 +3425,10 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser { try { try { name(); + //TODO - we need to lookup/resolve this name + //see if its a type ... + //if it is a type, failed = false + //else failed = true failed = false; } catch (Exception e) { int endOffset = (lastToken != null) ? lastToken