work save
This commit is contained in:
parent
4d6f78b0fc
commit
3d8084c489
|
@ -3369,27 +3369,50 @@ PStatement CppParser::doParseSubExpression3(const QString &fileName,
|
||||||
if (pos>=phraseExpression.length())
|
if (pos>=phraseExpression.length())
|
||||||
return PStatement();
|
return PStatement();
|
||||||
if (phraseExpression[pos]=="*") {
|
if (phraseExpression[pos]=="*") {
|
||||||
pos++;
|
pos++; //skip "*"
|
||||||
return doParseSubExpression3(fileName,
|
PStatement statement = doParseSubExpression3(fileName,
|
||||||
phraseExpression,
|
phraseExpression,
|
||||||
pos,
|
pos,
|
||||||
currentScope,
|
currentScope,
|
||||||
freeScoped);
|
freeScoped);
|
||||||
|
//todo:
|
||||||
|
return statement;
|
||||||
} else if (phraseExpression[pos]=="&") {
|
} else if (phraseExpression[pos]=="&") {
|
||||||
pos++;
|
pos++; //skip "&"
|
||||||
return doParseSubExpression3(fileName,
|
PStatement statement = doParseSubExpression3(fileName,
|
||||||
phraseExpression,
|
phraseExpression,
|
||||||
pos,
|
pos,
|
||||||
currentScope,
|
currentScope,
|
||||||
freeScoped);
|
freeScoped);
|
||||||
|
//todo:
|
||||||
|
return statement;
|
||||||
} else if (phraseExpression[pos]=="++"
|
} else if (phraseExpression[pos]=="++"
|
||||||
|| phraseExpression[pos]=="--") {
|
|| phraseExpression[pos]=="--") {
|
||||||
pos++;
|
pos++; //skip "++" or "--"
|
||||||
return doParseSubExpression3(fileName,
|
return doParseSubExpression3(fileName,
|
||||||
phraseExpression,
|
phraseExpression,
|
||||||
pos,
|
pos,
|
||||||
currentScope,
|
currentScope,
|
||||||
freeScoped);
|
freeScoped);
|
||||||
|
} else if (phraseExpression[pos]=="(") {
|
||||||
|
//parse
|
||||||
|
pos++;
|
||||||
|
PStatement typeStatement = doFindStatement(fileName,phraseExpression,pos,currentScope,freeScoped);
|
||||||
|
if (pos >= phraseExpression.length() || phraseExpression[pos]!=")") {
|
||||||
|
return PStatement();
|
||||||
|
} else if (typeStatement &&
|
||||||
|
(typeStatement->kind == StatementKind::skClass
|
||||||
|
|| typeStatement->kind == StatementKind::skEnumType
|
||||||
|
|| typeStatement->kind == StatementKind::skEnumClassType
|
||||||
|
|| typeStatement->kind == StatementKind::skTypedef)) {
|
||||||
|
PStatement statement = doParseSubExpression3(fileName,
|
||||||
|
phraseExpression,
|
||||||
|
pos,
|
||||||
|
currentScope,
|
||||||
|
freeScoped);
|
||||||
|
return typeStatement;
|
||||||
|
} else
|
||||||
|
return PStatement();
|
||||||
}
|
}
|
||||||
return doParseSubExpression2(fileName,
|
return doParseSubExpression2(fileName,
|
||||||
phraseExpression,
|
phraseExpression,
|
||||||
|
|
Loading…
Reference in New Issue