if Nkind (Spec_Node) = N_Function_Specification then
Scan; -- past "("
- Set_Expression (Def_Node, P_Expression);
+ Set_Expression (Def_Node, P_Expression_If_OK);
if Token /= Tok_Right_Paren then
Error_Msg_SC ("missing "")"" at end of expression default");
end P_Expression;
-- This function is identical to the normal P_Expression, except that it
- -- also permits the appearance of a case, conditional, or quantified
+ -- also permits the appearance of a conditional, quantified, or declare
-- expression if the call immediately follows a left paren, and followed
-- by a right parenthesis. These forms are allowed if these conditions
-- are not met, but an error message will be issued.
function P_Expression_If_OK return Node_Id is
begin
- -- Case of conditional, case or quantified expression
+ -- Case of conditional, quantified, or declare expression
if Token in Tok_Case | Tok_If | Tok_For | Tok_Declare then
return P_Unparen_Cond_Expr_Etc;
- -- Normal case, not case/conditional/quantified expression
+ -- Normal case: not a conditional, quantified, or declare expression
else
return P_Expression;
function P_Expression_If_OK return Node_Id;
-- Scans out an expression allowing an unparenthesized case expression,
- -- if expression, or quantified expression to appear without enclosing
- -- parentheses. However, if such an expression is not preceded by a left
- -- paren, and followed by a right paren, an error message will be output
- -- noting that parenthesization is required.
+ -- if expression, quantified expression, or declare expression to appear
+ -- without enclosing parentheses. However, if such an expression is not
+ -- preceded by a left paren, and followed by a right paren, an error
+ -- message will be output noting that parenthesization is required.
function P_Expression_No_Right_Paren return Node_Id;
-- Scans out an expression in contexts where the expression cannot be