mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
AK+LibC: Add TODO() as an alternative to ASSERT_NOT_REACHED()
I've been using this in the new HTML parser and it makes it much easier to understand the state of unfinished code branches. TODO() is for places where it's okay to end up but we need to implement something there. ASSERT_NOT_REACHED() is for places where it's not okay to end up, and something has gone wrong.
This commit is contained in:
@@ -37,12 +37,6 @@
|
||||
#define CONSUME_NEXT_INPUT_CHARACTER \
|
||||
current_input_character = next_codepoint();
|
||||
|
||||
#define TODO() \
|
||||
do { \
|
||||
dbg() << "[TODO: " << state_name(m_state) << "] '" << (char)current_input_character.value() << "'"; \
|
||||
ASSERT_NOT_REACHED(); \
|
||||
} while (0)
|
||||
|
||||
#define SWITCH_TO(new_state) \
|
||||
do { \
|
||||
will_switch_to(State::new_state); \
|
||||
|
||||
Reference in New Issue
Block a user