mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Add comments
This commit is contained in:
parent
98e1eb667b
commit
301e1057eb
2 changed files with 8 additions and 0 deletions
|
@ -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 &&
|
if( ds.getDeclaration() instanceof IASTSimpleDeclaration &&
|
||||||
((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() instanceof IASTSimpleDeclSpecifier &&
|
((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() instanceof IASTSimpleDeclSpecifier &&
|
||||||
((IASTSimpleDeclSpecifier)((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() ).getType() == IASTSimpleDeclSpecifier.t_unspecified)
|
((IASTSimpleDeclSpecifier)((IASTSimpleDeclaration)ds.getDeclaration()).getDeclSpecifier() ).getType() == IASTSimpleDeclSpecifier.t_unspecified)
|
||||||
|
|
|
@ -3425,6 +3425,10 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
name();
|
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;
|
failed = false;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
int endOffset = (lastToken != null) ? lastToken
|
int endOffset = (lastToken != null) ? lastToken
|
||||||
|
|
Loading…
Add table
Reference in a new issue