Compatibility

This commit is contained in:
Alexey Milovidov 2024-07-24 10:24:13 +02:00
parent 6f9fea6341
commit 5fe78d47bc
3 changed files with 3 additions and 18 deletions

View File

@ -2399,6 +2399,7 @@ bool ParserExpressionWithOptionalArguments::parseImpl(Pos & pos, ASTPtr & node,
if (ParserIdentifier().parse(pos, node, expected))
{
node = makeASTFunction(node->as<ASTIdentifier>()->name());
node->as<ASTFunction>().no_empty_args = true;
return true;
}

View File

@ -69,15 +69,7 @@ bool ParserCreateIndexDeclaration::parseImpl(Pos & pos, ASTPtr & node, Expected
if (s_type.ignore(pos, expected))
{
if (!type_p.parse(pos, type, expected))
{
if (ParserIdentifier().parse(pos, type, expected))
{
type = makeASTFunction(type->as<ASTIdentifier &>().name());
type->as<ASTFunction &>().no_empty_args = true;
}
else
return false;
}
return false;
}
if (s_granularity.ignore(pos, expected))

View File

@ -199,15 +199,7 @@ bool ParserIndexDeclaration::parseImpl(Pos & pos, ASTPtr & node, Expected & expe
return false;
if (!type_p.parse(pos, type, expected))
{
if (name_p.parse(pos, type, expected))
{
type = makeASTFunction(type->as<ASTIdentifier &>().name());
type->as<ASTFunction &>().no_empty_args = true;
}
else
return false;
}
return false;
if (s_granularity.ignore(pos, expected))
{