mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Allow method attributes on properties with expression bodies
This commit is contained in:
parent
4369e07a55
commit
535045c48a
6 changed files with 39 additions and 19 deletions
|
@ -949,7 +949,10 @@ void BfDefBuilder::Visit(BfPropertyDeclaration* propertyDeclaration)
|
|||
|
||||
String methodName;
|
||||
if (auto propExprBody = BfNodeDynCast<BfPropertyBodyExpression>(propertyDeclaration->mDefinitionBlock))
|
||||
{
|
||||
methodName = "get";
|
||||
ParseAttributes(propertyDeclaration->mAttributes, methodDef);
|
||||
}
|
||||
else if ((methodDeclaration != NULL) && (methodDeclaration->mNameNode != NULL))
|
||||
methodName = methodDeclaration->mNameNode->ToString();
|
||||
|
||||
|
@ -985,7 +988,7 @@ void BfDefBuilder::Visit(BfPropertyDeclaration* propertyDeclaration)
|
|||
}
|
||||
else
|
||||
{
|
||||
// Parse had an error, leave this block as an unnamed method
|
||||
// Parse had an error, leave this block as an unnamed method
|
||||
}
|
||||
|
||||
methodDef->mBody = methodDeclaration->mBody;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue