mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Support for expression-bodied indexers
This commit is contained in:
parent
29beeb4e77
commit
ddad5bd492
1 changed files with 8 additions and 6 deletions
|
@ -6724,9 +6724,6 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth, BfAstNode* defe
|
||||||
mVisitorPos.MoveNext();
|
mVisitorPos.MoveNext();
|
||||||
|
|
||||||
blockAfterIdx = mVisitorPos.mReadPos + 1;
|
blockAfterIdx = mVisitorPos.mReadPos + 1;
|
||||||
auto block = ExpectBlockAfter(blockAfterPos);
|
|
||||||
if (block == NULL)
|
|
||||||
return indexerDeclaration;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6742,9 +6739,7 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth, BfAstNode* defe
|
||||||
// If we don't have a token afterwards then still treat it as a property for autocomplete purposes
|
// If we don't have a token afterwards then still treat it as a property for autocomplete purposes
|
||||||
if ((typeRef != NULL) &&
|
if ((typeRef != NULL) &&
|
||||||
((block != NULL) || (tokenNode == NULL) || (isExprBodyProp)))
|
((block != NULL) || (tokenNode == NULL) || (isExprBodyProp)))
|
||||||
{
|
{
|
||||||
//mVisitorPos.mReadPos = blockAfterIdx;
|
|
||||||
|
|
||||||
if (propertyDeclaration == NULL)
|
if (propertyDeclaration == NULL)
|
||||||
{
|
{
|
||||||
if ((block == NULL) && (!isExprBodyProp))
|
if ((block == NULL) && (!isExprBodyProp))
|
||||||
|
@ -6820,6 +6815,13 @@ BfAstNode* BfReducer::ReadTypeMember(BfAstNode* node, int depth, BfAstNode* defe
|
||||||
|
|
||||||
return propertyDeclaration;
|
return propertyDeclaration;
|
||||||
}
|
}
|
||||||
|
else if (propertyDeclaration != NULL)
|
||||||
|
{
|
||||||
|
// Failure case
|
||||||
|
block = ExpectBlockAfter(blockAfterPos);
|
||||||
|
BF_ASSERT(block == NULL);
|
||||||
|
return propertyDeclaration;
|
||||||
|
}
|
||||||
|
|
||||||
//nextNode = mVisitorPos.Get(mVisitorPos.mReadPos + 2);
|
//nextNode = mVisitorPos.Get(mVisitorPos.mReadPos + 2);
|
||||||
/*if (tokenNode == NULL)
|
/*if (tokenNode == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue