mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +02:00
Applied patch for Devin Steffler.
Fixed 78217 - [Parser][IProblems] template operator has invalid IProblem with blank description Fixed 79103 - [Parser][IProblems] 3 new lineNumber=-1 found in cpp_headers
This commit is contained in:
parent
78555dc686
commit
0ad6f1bcb0
3 changed files with 39 additions and 38 deletions
|
@ -374,7 +374,7 @@ public class Parser implements IParserData, IParser
|
||||||
|
|
||||||
expression = astFactory.createExpression(scope,
|
expression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.POSTFIX_TYPEID_TYPEID, null, null,
|
IASTExpression.Kind.POSTFIX_TYPEID_TYPEID, null, null,
|
||||||
null, typeId, null, EMPTY_STRING, null, null);
|
null, typeId, null, EMPTY_STRING, null, (ITokenDuple)start);
|
||||||
list.add(expression);
|
list.add(expression);
|
||||||
completedArg = true;
|
completedArg = true;
|
||||||
} catch (BacktrackException e) {
|
} catch (BacktrackException e) {
|
||||||
|
@ -407,7 +407,7 @@ public class Parser implements IParserData, IParser
|
||||||
KeywordSetKey.EMPTY);
|
KeywordSetKey.EMPTY);
|
||||||
expression = astFactory.createExpression(scope,
|
expression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.ID_EXPRESSION, null, null,
|
IASTExpression.Kind.ID_EXPRESSION, null, null,
|
||||||
null, null, nameDuple, EMPTY_STRING, null, null);
|
null, null, nameDuple, EMPTY_STRING, null, (ITokenDuple)start);
|
||||||
list.add(expression);
|
list.add(expression);
|
||||||
continue;
|
continue;
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
|
@ -830,7 +830,7 @@ public class Parser implements IParserData, IParser
|
||||||
assignmentExpression = astFactory.createExpression(scope,
|
assignmentExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.EXPRESSIONLIST,
|
IASTExpression.Kind.EXPRESSIONLIST,
|
||||||
assignmentExpression, secondExpression, null, null,
|
assignmentExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -871,7 +871,7 @@ public class Parser implements IParserData, IParser
|
||||||
consume( IToken.tRPAREN );
|
consume( IToken.tRPAREN );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resultExpression = astFactory.createExpression( scope, extension.getExpressionKindForStatement(), null, null, null, null, null,EMPTY_STRING, null, null );
|
resultExpression = astFactory.createExpression( scope, extension.getExpressionKindForStatement(), null, null, null, null, null,EMPTY_STRING, null, (ITokenDuple)la );
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e) {
|
catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
|
@ -973,7 +973,7 @@ public class Parser implements IParserData, IParser
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope,
|
return astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.THROWEXPRESSION, throwExpression, null,
|
IASTExpression.Kind.THROWEXPRESSION, throwExpression, null,
|
||||||
null, null, null, EMPTY_STRING, null, null);
|
null, null, null, EMPTY_STRING, null, (ITokenDuple)throwToken);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1009,7 +1009,7 @@ public class Parser implements IParserData, IParser
|
||||||
return astFactory.createExpression(scope,
|
return astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.CONDITIONALEXPRESSION,
|
IASTExpression.Kind.CONDITIONALEXPRESSION,
|
||||||
firstExpression, secondExpression, thirdExpression,
|
firstExpression, secondExpression, thirdExpression,
|
||||||
null, null, EMPTY_STRING, null, null);
|
null, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1041,7 +1041,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.LOGICALOREXPRESSION,
|
IASTExpression.Kind.LOGICALOREXPRESSION,
|
||||||
firstExpression, secondExpression, null, null, null,
|
firstExpression, secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1073,7 +1073,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.LOGICALANDEXPRESSION,
|
IASTExpression.Kind.LOGICALANDEXPRESSION,
|
||||||
firstExpression, secondExpression, null, null, null,
|
firstExpression, secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1106,7 +1106,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.INCLUSIVEOREXPRESSION,
|
IASTExpression.Kind.INCLUSIVEOREXPRESSION,
|
||||||
firstExpression, secondExpression, null, null, null,
|
firstExpression, secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1139,7 +1139,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.EXCLUSIVEOREXPRESSION,
|
IASTExpression.Kind.EXCLUSIVEOREXPRESSION,
|
||||||
firstExpression, secondExpression, null, null, null,
|
firstExpression, secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1171,7 +1171,7 @@ public class Parser implements IParserData, IParser
|
||||||
try {
|
try {
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.ANDEXPRESSION, firstExpression,
|
IASTExpression.Kind.ANDEXPRESSION, firstExpression,
|
||||||
secondExpression, null, null, null, EMPTY_STRING, null, null);
|
secondExpression, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1229,7 +1229,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.EQUALITY_EQUALS
|
? IASTExpression.Kind.EQUALITY_EQUALS
|
||||||
: IASTExpression.Kind.EQUALITY_NOTEQUALS,
|
: IASTExpression.Kind.EQUALITY_NOTEQUALS,
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1296,7 +1296,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
expressionKind, firstExpression,
|
expressionKind, firstExpression,
|
||||||
secondExpression, null, null, null,
|
secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1344,7 +1344,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.SHIFT_LEFT
|
? IASTExpression.Kind.SHIFT_LEFT
|
||||||
: IASTExpression.Kind.SHIFT_RIGHT),
|
: IASTExpression.Kind.SHIFT_RIGHT),
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1385,7 +1385,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.ADDITIVE_PLUS
|
? IASTExpression.Kind.ADDITIVE_PLUS
|
||||||
: IASTExpression.Kind.ADDITIVE_MINUS),
|
: IASTExpression.Kind.ADDITIVE_MINUS),
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1437,7 +1437,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
expressionKind, firstExpression,
|
expressionKind, firstExpression,
|
||||||
secondExpression, null, null, null,
|
secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
firstExpression.freeReferences();
|
firstExpression.freeReferences();
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
|
@ -1479,7 +1479,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.PM_DOTSTAR
|
? IASTExpression.Kind.PM_DOTSTAR
|
||||||
: IASTExpression.Kind.PM_ARROWSTAR),
|
: IASTExpression.Kind.PM_ARROWSTAR),
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1543,7 +1543,7 @@ public class Parser implements IParserData, IParser
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope,
|
return astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.CASTEXPRESSION, castExpression,
|
IASTExpression.Kind.CASTEXPRESSION, castExpression,
|
||||||
null, null, typeId, null, EMPTY_STRING, null, null);
|
null, null, typeId, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1812,7 +1812,7 @@ public class Parser implements IParserData, IParser
|
||||||
return astFactory.createExpression(scope, (vectored
|
return astFactory.createExpression(scope, (vectored
|
||||||
? IASTExpression.Kind.DELETE_VECTORCASTEXPRESSION
|
? IASTExpression.Kind.DELETE_VECTORCASTEXPRESSION
|
||||||
: IASTExpression.Kind.DELETE_CASTEXPRESSION),
|
: IASTExpression.Kind.DELETE_CASTEXPRESSION),
|
||||||
castExpression, null, null, null, null, EMPTY_STRING, null, null);
|
castExpression, null, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -1956,7 +1956,7 @@ public class Parser implements IParserData, IParser
|
||||||
astFactory.createNewDescriptor(
|
astFactory.createNewDescriptor(
|
||||||
newPlacementExpressions,
|
newPlacementExpressions,
|
||||||
newTypeIdExpressions,
|
newTypeIdExpressions,
|
||||||
newInitializerExpressions), null);
|
newInitializerExpressions), (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2026,7 +2026,7 @@ public class Parser implements IParserData, IParser
|
||||||
IASTExpression.Kind.NEW_TYPEID, null, null, null, typeId,
|
IASTExpression.Kind.NEW_TYPEID, null, null, null, typeId,
|
||||||
null, EMPTY_STRING, astFactory.createNewDescriptor(
|
null, EMPTY_STRING, astFactory.createNewDescriptor(
|
||||||
newPlacementExpressions, newTypeIdExpressions,
|
newPlacementExpressions, newTypeIdExpressions,
|
||||||
newInitializerExpressions), null);
|
newInitializerExpressions), (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
return null;
|
return null;
|
||||||
|
@ -2108,7 +2108,7 @@ public class Parser implements IParserData, IParser
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope,
|
return astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.UNARY_SIZEOF_TYPEID, null,
|
IASTExpression.Kind.UNARY_SIZEOF_TYPEID, null,
|
||||||
null, null, d, null, EMPTY_STRING, null, null);
|
null, null, d, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2119,7 +2119,7 @@ public class Parser implements IParserData, IParser
|
||||||
return astFactory.createExpression(scope,
|
return astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.UNARY_SIZEOF_UNARYEXPRESSION,
|
IASTExpression.Kind.UNARY_SIZEOF_UNARYEXPRESSION,
|
||||||
unaryExpression, null, null, null, null,
|
unaryExpression, null, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e1) {
|
} catch (ASTSemanticException e1) {
|
||||||
throwBacktrack(e1.getProblem());
|
throwBacktrack(e1.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2198,7 +2198,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.POSTFIX_TYPENAME_TEMPLATEID
|
? IASTExpression.Kind.POSTFIX_TYPENAME_TEMPLATEID
|
||||||
: IASTExpression.Kind.POSTFIX_TYPENAME_IDENTIFIER),
|
: IASTExpression.Kind.POSTFIX_TYPENAME_IDENTIFIER),
|
||||||
expressionList, null, null, null,
|
expressionList, null, null, null,
|
||||||
nestedName, EMPTY_STRING, null, null);
|
nestedName, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException ase) {
|
} catch (ASTSemanticException ase) {
|
||||||
throwBacktrack(ase.getProblem());
|
throwBacktrack(ase.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2290,7 +2290,7 @@ public class Parser implements IParserData, IParser
|
||||||
? IASTExpression.Kind.POSTFIX_TYPEID_TYPEID
|
? IASTExpression.Kind.POSTFIX_TYPEID_TYPEID
|
||||||
: IASTExpression.Kind.POSTFIX_TYPEID_EXPRESSION),
|
: IASTExpression.Kind.POSTFIX_TYPEID_EXPRESSION),
|
||||||
lhs, null, null, typeId, null,
|
lhs, null, null, typeId, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e6) {
|
} catch (ASTSemanticException e6) {
|
||||||
throwBacktrack(e6.getProblem());
|
throwBacktrack(e6.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2320,7 +2320,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.POSTFIX_SUBSCRIPT,
|
IASTExpression.Kind.POSTFIX_SUBSCRIPT,
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e2) {
|
} catch (ASTSemanticException e2) {
|
||||||
throwBacktrack(e2.getProblem());
|
throwBacktrack(e2.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2364,7 +2364,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.POSTFIX_FUNCTIONCALL,
|
IASTExpression.Kind.POSTFIX_FUNCTIONCALL,
|
||||||
firstExpression, secondExpression, null, null,
|
firstExpression, secondExpression, null, null,
|
||||||
null, EMPTY_STRING, null, null);
|
null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e3) {
|
} catch (ASTSemanticException e3) {
|
||||||
throwBacktrack(e3.getProblem());
|
throwBacktrack(e3.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2379,7 +2379,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.POSTFIX_INCREMENT,
|
IASTExpression.Kind.POSTFIX_INCREMENT,
|
||||||
firstExpression, null, null, null, null,
|
firstExpression, null, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e1) {
|
} catch (ASTSemanticException e1) {
|
||||||
throwBacktrack(e1.getProblem());
|
throwBacktrack(e1.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2394,7 +2394,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
IASTExpression.Kind.POSTFIX_DECREMENT,
|
IASTExpression.Kind.POSTFIX_DECREMENT,
|
||||||
firstExpression, null, null, null, null,
|
firstExpression, null, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e4) {
|
} catch (ASTSemanticException e4) {
|
||||||
throwBacktrack(e4.getProblem());
|
throwBacktrack(e4.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2432,7 +2432,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
memberCompletionKind, firstExpression,
|
memberCompletionKind, firstExpression,
|
||||||
secondExpression, null, null, null,
|
secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e5) {
|
} catch (ASTSemanticException e5) {
|
||||||
throwBacktrack(e5.getProblem());
|
throwBacktrack(e5.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2469,7 +2469,7 @@ public class Parser implements IParserData, IParser
|
||||||
firstExpression = astFactory.createExpression(scope,
|
firstExpression = astFactory.createExpression(scope,
|
||||||
arrowCompletionKind, firstExpression,
|
arrowCompletionKind, firstExpression,
|
||||||
secondExpression, null, null, null,
|
secondExpression, null, null, null,
|
||||||
EMPTY_STRING, null, null);
|
EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2516,7 +2516,6 @@ public class Parser implements IParserData, IParser
|
||||||
int startingOffset = la.getOffset();
|
int startingOffset = la.getOffset();
|
||||||
int line = la.getLineNumber();
|
int line = la.getLineNumber();
|
||||||
char [] fn = la.getFilename();
|
char [] fn = la.getFilename();
|
||||||
la = null;
|
|
||||||
char[] typeName = consume().getCharImage();
|
char[] typeName = consume().getCharImage();
|
||||||
consume(IToken.tLPAREN);
|
consume(IToken.tLPAREN);
|
||||||
setCurrentFunctionName(typeName);
|
setCurrentFunctionName(typeName);
|
||||||
|
@ -2526,7 +2525,7 @@ public class Parser implements IParserData, IParser
|
||||||
int endOffset = consume(IToken.tRPAREN).getEndOffset();
|
int endOffset = consume(IToken.tRPAREN).getEndOffset();
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope, type, inside, null, null,
|
return astFactory.createExpression(scope, type, inside, null, null,
|
||||||
null, null, EMPTY_STRING, null, null);
|
null, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2759,7 +2758,7 @@ public class Parser implements IParserData, IParser
|
||||||
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
|
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope, kind, lhs,
|
return astFactory.createExpression(scope, kind, lhs,
|
||||||
assignmentExpression, null, null, null, EMPTY_STRING, null, null);
|
assignmentExpression, null, null, null, EMPTY_STRING, null, (ITokenDuple)t);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2777,13 +2776,12 @@ public class Parser implements IParserData, IParser
|
||||||
int startingOffset = la.getOffset();
|
int startingOffset = la.getOffset();
|
||||||
int line = la.getLineNumber();
|
int line = la.getLineNumber();
|
||||||
char [] fn = la.getFilename();
|
char [] fn = la.getFilename();
|
||||||
la = null;
|
|
||||||
IASTExpression castExpression = castExpression(scope, completionKind,
|
IASTExpression castExpression = castExpression(scope, completionKind,
|
||||||
key);
|
key);
|
||||||
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
|
int endOffset = ( lastToken != null ) ? lastToken.getEndOffset() : 0;
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope, kind, castExpression,
|
return astFactory.createExpression(scope, kind, castExpression,
|
||||||
null, null, null, null, EMPTY_STRING, null, null);
|
null, null, null, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -2800,7 +2798,6 @@ public class Parser implements IParserData, IParser
|
||||||
int startingOffset = la.getOffset();
|
int startingOffset = la.getOffset();
|
||||||
int line = la.getLineNumber();
|
int line = la.getLineNumber();
|
||||||
char [] fn = la.getFilename();
|
char [] fn = la.getFilename();
|
||||||
la = null;
|
|
||||||
|
|
||||||
consume();
|
consume();
|
||||||
consume(IToken.tLT);
|
consume(IToken.tLT);
|
||||||
|
@ -2812,7 +2809,7 @@ public class Parser implements IParserData, IParser
|
||||||
int endOffset = consume(IToken.tRPAREN).getEndOffset();
|
int endOffset = consume(IToken.tRPAREN).getEndOffset();
|
||||||
try {
|
try {
|
||||||
return astFactory.createExpression(scope, kind, lhs, null, null,
|
return astFactory.createExpression(scope, kind, lhs, null, null,
|
||||||
duple, null, EMPTY_STRING, null, null);
|
duple, null, EMPTY_STRING, null, (ITokenDuple)la);
|
||||||
} catch (ASTSemanticException e) {
|
} catch (ASTSemanticException e) {
|
||||||
throwBacktrack(e.getProblem());
|
throwBacktrack(e.getProblem());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -57,6 +57,7 @@ ASTProblemFactory.error.semantic.uniqueNamePredefined=Attempt to introduce uniqu
|
||||||
ASTProblemFactory.error.semantic.nameNotFound=Attempt to use symbol failed : {0}
|
ASTProblemFactory.error.semantic.nameNotFound=Attempt to use symbol failed : {0}
|
||||||
ASTProblemFactory.error.semantic.nameNotProvided=Name not provided.
|
ASTProblemFactory.error.semantic.nameNotProvided=Name not provided.
|
||||||
ASTProblemFactory.error.semantic.invalidConversionType=Invalid arithmetic conversion
|
ASTProblemFactory.error.semantic.invalidConversionType=Invalid arithmetic conversion
|
||||||
|
ASTProblemFactory.error.semantic.malformedExpression=Malformed expression
|
||||||
|
|
||||||
LineOffsetReconciler.error.couldNotResetReader=Could not reset Reader
|
LineOffsetReconciler.error.couldNotResetReader=Could not reset Reader
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,9 @@ public class Problem implements IProblem {
|
||||||
errorMessages.put(
|
errorMessages.put(
|
||||||
new Integer( IProblem.SEMANTIC_INVALID_CONVERSION_TYPE ),
|
new Integer( IProblem.SEMANTIC_INVALID_CONVERSION_TYPE ),
|
||||||
ParserMessages.getString("ASTProblemFactory.error.semantic.invalidConversionType")); //$NON-NLS-1$
|
ParserMessages.getString("ASTProblemFactory.error.semantic.invalidConversionType")); //$NON-NLS-1$
|
||||||
|
errorMessages.put(
|
||||||
|
new Integer( IProblem.SEMANTIC_MALFORMED_EXPRESSION ),
|
||||||
|
ParserMessages.getString("ASTProblemFactory.error.semantic.malformedExpression")); //$NON-NLS-1$
|
||||||
errorMessages.put(
|
errorMessages.put(
|
||||||
new Integer( IProblem.SEMANTIC_AMBIGUOUS_LOOKUP ),
|
new Integer( IProblem.SEMANTIC_AMBIGUOUS_LOOKUP ),
|
||||||
ParserMessages.getString("ASTProblemFactory.error.semantic.pst.ambiguousLookup")); //$NON-NLS-1$
|
ParserMessages.getString("ASTProblemFactory.error.semantic.pst.ambiguousLookup")); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue