1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

JSSpecCompiler: Parse true, false, this, undefined, and null

This commit is contained in:
Dan Klishch 2024-01-20 21:41:38 -05:00 committed by Andrew Kaster
parent 86d54a8684
commit b800276347
7 changed files with 70 additions and 3 deletions

View file

@ -38,6 +38,11 @@ void ErrorNode::dump_tree(StringBuilder& builder)
void WellKnownNode::dump_tree(StringBuilder& builder)
{
static constexpr StringView type_to_name[] = {
"False"sv,
"Null"sv,
"This"sv,
"True"sv,
"Undefined"sv,
"ZeroArgumentFunctionCall"sv,
};
dump_node(builder, "WellKnownNode {}", type_to_name[m_type]);