summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-30 10:37:36 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-30 11:31:49 +0200
commit1ef5d609d93619a22aad4baebf3c23e2a96affea (patch)
tree9f8748305d123787d7959e3b38c9c89e6e007fcd /Libraries/LibWeb
parentcfbd95f42a01d7fea2a5c83ebcaa107f34f6e4ef (diff)
downloadserenity-1ef5d609d93619a22aad4baebf3c23e2a96affea.zip
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.
Diffstat (limited to 'Libraries/LibWeb')
-rw-r--r--Libraries/LibWeb/Parser/HTMLDocumentParser.cpp5
-rw-r--r--Libraries/LibWeb/Parser/HTMLTokenizer.cpp6
2 files changed, 0 insertions, 11 deletions
diff --git a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp
index 599d62bb8a..6e917766d7 100644
--- a/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp
+++ b/Libraries/LibWeb/Parser/HTMLDocumentParser.cpp
@@ -39,11 +39,6 @@
#include <LibWeb/Parser/HTMLDocumentParser.h>
#include <LibWeb/Parser/HTMLToken.h>
-#define TODO() \
- do { \
- ASSERT_NOT_REACHED(); \
- } while (0)
-
#define PARSE_ERROR() \
do { \
dbg() << "Parse error! " << __PRETTY_FUNCTION__ << " @ " << __LINE__; \
diff --git a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
index 59db11dcfe..02dc144273 100644
--- a/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
+++ b/Libraries/LibWeb/Parser/HTMLTokenizer.cpp
@@ -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); \