mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed false signature change with multiple extensions
This commit is contained in:
parent
f81a1cf896
commit
fa65029dfa
7 changed files with 155 additions and 8 deletions
|
@ -1006,6 +1006,15 @@ bool BfAstNode::Equals(const StringImpl& str)
|
|||
return strncmp(str.GetPtr(), source->mSrc + mSrcStart, len) == 0;
|
||||
}
|
||||
|
||||
bool BfAstNode::Equals(const StringView& str)
|
||||
{
|
||||
int len = mSrcEnd - mSrcStart;
|
||||
if (len != str.mLength)
|
||||
return false;
|
||||
auto source = GetSourceData();
|
||||
return strncmp(str.mPtr, source->mSrc + mSrcStart, len) == 0;
|
||||
}
|
||||
|
||||
bool BfAstNode::Equals(const char* str)
|
||||
{
|
||||
auto source = GetSourceData();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue