mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
5cb45e4feb
commit
ee66eaa1b0
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user