mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Make BEGIN_STATE and END_STATE include some {{{ and }}}
This makes it a compile error to omit the END_STATE. Also add some more missing END_STATE's exposed by this (nice!) Thanks to @predmond for suggesting the multi-pair trick! :^)
This commit is contained in:
parent
d63b6287f5
commit
45450c7edc
Notes:
sideshowbarker
2024-07-19 06:13:06 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/45450c7edc9
1 changed files with 9 additions and 2 deletions
|
@ -66,11 +66,16 @@
|
|||
|
||||
#define BEGIN_STATE(state) \
|
||||
state: \
|
||||
case State::state:
|
||||
case State::state: { \
|
||||
{ \
|
||||
{
|
||||
|
||||
#define END_STATE \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
break;
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
namespace Web {
|
||||
|
||||
|
@ -494,6 +499,7 @@ void HTMLTokenizer::run()
|
|||
continue;
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
BEGIN_STATE(CommentEnd)
|
||||
{
|
||||
|
@ -562,6 +568,7 @@ void HTMLTokenizer::run()
|
|||
RECONSUME_IN(Comment);
|
||||
}
|
||||
}
|
||||
END_STATE
|
||||
|
||||
BEGIN_STATE(CommentLessThanSign)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue