mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement the @@match well-known Symbol (#157)
Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
This commit is contained in:
parent
87ca01b658
commit
44e90a6b91
8 changed files with 90 additions and 29 deletions
|
|
@ -1558,4 +1558,13 @@ String* Object::optionString(ExecutionState& state)
|
|||
|
||||
return new ASCIIString(flags);
|
||||
}
|
||||
|
||||
bool Object::isRegExp(ExecutionState& state)
|
||||
{
|
||||
Value symbol = get(state, ObjectPropertyName(state, state.context()->vmInstance()->globalSymbols().match)).value(state, this);
|
||||
if (!symbol.isUndefined()) {
|
||||
return symbol.toBoolean(state);
|
||||
}
|
||||
return isRegExpObject();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue