1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added expression bodies for properties

This commit is contained in:
Brian Fiete 2019-09-30 12:24:02 -07:00
parent 69e3bf94f7
commit 85648cda63
8 changed files with 102 additions and 54 deletions

View file

@ -847,8 +847,10 @@ void BfDefBuilder::Visit(BfPropertyDeclaration* propertyDeclaration)
}
}
String methodName;
if ((methodDeclaration != NULL) && (methodDeclaration->mNameNode != NULL))
String methodName;
if (auto propExprBody = BfNodeDynCast<BfPropertyBodyExpression>(propertyDeclaration->mDefinitionBlock))
methodName = "get";
else if ((methodDeclaration != NULL) && (methodDeclaration->mNameNode != NULL))
methodName = methodDeclaration->mNameNode->ToString();
if (methodName == "get")