mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Alloc allign attributes, lambda captures
This commit is contained in:
parent
79ccb33586
commit
12e5b525ad
23 changed files with 540 additions and 219 deletions
|
@ -938,7 +938,7 @@ StringView BfAstNode::ToStringView()
|
|||
return StringView();
|
||||
}
|
||||
|
||||
auto source = GetSourceData();
|
||||
auto source = GetSourceData();
|
||||
return StringView(source->mSrc + GetSrcStart(), srcLen);
|
||||
}
|
||||
|
||||
|
@ -956,6 +956,15 @@ void BfAstNode::ToString(StringImpl& str)
|
|||
str.Append(source->mSrc + GetSrcStart(), srcLen);
|
||||
}
|
||||
|
||||
bool BfAstNode::Equals(const StringImpl& str)
|
||||
{
|
||||
int len = mSrcEnd - mSrcStart;
|
||||
if (len != str.mLength)
|
||||
return false;
|
||||
auto source = GetSourceData();
|
||||
return strncmp(str.GetPtr(), source->mSrc + mSrcStart, len) == 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void BfBlock::Init(const SizedArrayImpl<BfAstNode*>& vec, BfAstAllocator* alloc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue