mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibJS: Make RegExp.prototype.flags spec-compliant
This should be using the individual flag boolean properties rather than the [[OriginalFlags]] internal slot. Use an enumerator macro here for brevity, this will be useful for other things as well. :^)
This commit is contained in:
parent
5cb45e4feb
commit
ee66eaa1b0
3 changed files with 38 additions and 15 deletions
|
@ -92,6 +92,14 @@
|
|||
__JS_ENUMERATE(toPrimitive, to_primitive) \
|
||||
__JS_ENUMERATE(toStringTag, to_string_tag)
|
||||
|
||||
#define JS_ENUMERATE_REGEXP_FLAGS \
|
||||
__JS_ENUMERATE(global, global, g, Global) \
|
||||
__JS_ENUMERATE(ignoreCase, ignore_case, i, Insensitive) \
|
||||
__JS_ENUMERATE(multiline, multiline, m, Multiline) \
|
||||
__JS_ENUMERATE(dotAll, dot_all, s, SingleLine) \
|
||||
__JS_ENUMERATE(unicode, unicode, u, Unicode) \
|
||||
__JS_ENUMERATE(sticky, sticky, y, Sticky)
|
||||
|
||||
namespace JS {
|
||||
|
||||
class ASTNode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue