mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[98339] Fixed assist in case labels.
This commit is contained in:
parent
a90cfa1442
commit
3193800bd7
1 changed files with 9 additions and 1 deletions
|
@ -2034,7 +2034,15 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
BacktrackException {
|
BacktrackException {
|
||||||
int startOffset = consume(IToken.t_case).getOffset();
|
int startOffset = consume(IToken.t_case).getOffset();
|
||||||
IASTExpression case_exp = constantExpression();
|
IASTExpression case_exp = constantExpression();
|
||||||
int lastOffset = consume(IToken.tCOLON).getEndOffset();
|
int lastOffset = 0;
|
||||||
|
switch (LT(1)) {
|
||||||
|
case IToken.tCOLON:
|
||||||
|
case IToken.tEOC:
|
||||||
|
lastOffset = consume().getEndOffset();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throwBacktrack(LA(1));
|
||||||
|
}
|
||||||
|
|
||||||
IASTCaseStatement cs = createCaseStatement();
|
IASTCaseStatement cs = createCaseStatement();
|
||||||
((ASTNode) cs)
|
((ASTNode) cs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue