mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-10 13:12:56 +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: 45450c7edc
1 changed files with 9 additions and 2 deletions
|
@ -66,11 +66,16 @@
|
||||||
|
|
||||||
#define BEGIN_STATE(state) \
|
#define BEGIN_STATE(state) \
|
||||||
state: \
|
state: \
|
||||||
case State::state:
|
case State::state: { \
|
||||||
|
{ \
|
||||||
|
{
|
||||||
|
|
||||||
#define END_STATE \
|
#define END_STATE \
|
||||||
ASSERT_NOT_REACHED(); \
|
ASSERT_NOT_REACHED(); \
|
||||||
break;
|
break; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
|
||||||
|
@ -494,6 +499,7 @@ void HTMLTokenizer::run()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
END_STATE
|
||||||
|
|
||||||
BEGIN_STATE(CommentEnd)
|
BEGIN_STATE(CommentEnd)
|
||||||
{
|
{
|
||||||
|
@ -562,6 +568,7 @@ void HTMLTokenizer::run()
|
||||||
RECONSUME_IN(Comment);
|
RECONSUME_IN(Comment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
END_STATE
|
||||||
|
|
||||||
BEGIN_STATE(CommentLessThanSign)
|
BEGIN_STATE(CommentLessThanSign)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue