1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fixed 84133 - "typdef" seems the same as "typedef" to AST DOM

This commit is contained in:
John Camelon 2005-02-01 15:55:07 +00:00
parent 6d063588c2
commit bcedb9a5c1
3 changed files with 2415 additions and 2408 deletions

View file

@ -1930,4 +1930,11 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
return calculateEndOffset(declarator);
}
/**
* @param token
*/
protected void throwBacktrack(IToken token) throws BacktrackException {
throwBacktrack( token.getOffset(), token.getLength() );
}
}

View file

@ -3095,6 +3095,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
case IToken.t_class:
case IToken.t_struct:
case IToken.t_union:
if (flags.haveEncounteredTypename())
throwBacktrack(LA(1));
try {
classSpec = classSpecifier();
flags.setEncounteredTypename(true);
@ -3105,6 +3107,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
break;
}
case IToken.t_enum:
if (flags.haveEncounteredTypename())
throwBacktrack(LA(1));
try {
enumSpec = enumSpecifier();
flags.setEncounteredTypename(true);