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:
parent
6d063588c2
commit
bcedb9a5c1
3 changed files with 2415 additions and 2408 deletions
|
@ -1930,4 +1930,11 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
return calculateEndOffset(declarator);
|
return calculateEndOffset(declarator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param token
|
||||||
|
*/
|
||||||
|
protected void throwBacktrack(IToken token) throws BacktrackException {
|
||||||
|
throwBacktrack( token.getOffset(), token.getLength() );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -3095,6 +3095,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
||||||
case IToken.t_class:
|
case IToken.t_class:
|
||||||
case IToken.t_struct:
|
case IToken.t_struct:
|
||||||
case IToken.t_union:
|
case IToken.t_union:
|
||||||
|
if (flags.haveEncounteredTypename())
|
||||||
|
throwBacktrack(LA(1));
|
||||||
try {
|
try {
|
||||||
classSpec = classSpecifier();
|
classSpec = classSpecifier();
|
||||||
flags.setEncounteredTypename(true);
|
flags.setEncounteredTypename(true);
|
||||||
|
@ -3105,6 +3107,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IToken.t_enum:
|
case IToken.t_enum:
|
||||||
|
if (flags.haveEncounteredTypename())
|
||||||
|
throwBacktrack(LA(1));
|
||||||
try {
|
try {
|
||||||
enumSpec = enumSpecifier();
|
enumSpec = enumSpecifier();
|
||||||
flags.setEncounteredTypename(true);
|
flags.setEncounteredTypename(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue