mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 90889 - Added content assist support for the condition in an if statement.
This commit is contained in:
parent
4a8943986a
commit
6a40f67a52
1 changed files with 8 additions and 0 deletions
|
@ -1869,6 +1869,14 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
IASTExpression condition = null;
|
IASTExpression condition = null;
|
||||||
try {
|
try {
|
||||||
condition = condition();
|
condition = condition();
|
||||||
|
if (LT(1) == IToken.tEOC) {
|
||||||
|
// Completing in the condition
|
||||||
|
result = createIfStatement();
|
||||||
|
result.setCondition(condition);
|
||||||
|
condition.setParent(result);
|
||||||
|
condition.setPropertyInParent(IASTIfStatement.CONDITION);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
consume(IToken.tRPAREN);
|
consume(IToken.tRPAREN);
|
||||||
} catch (BacktrackException b) {
|
} catch (BacktrackException b) {
|
||||||
IASTProblem p = failParse(b);
|
IASTProblem p = failParse(b);
|
||||||
|
|
Loading…
Add table
Reference in a new issue