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

LibJS: Add BigInt

This commit is contained in:
Linus Groh 2020-06-06 01:14:10 +01:00 committed by Andreas Kling
parent 40829b849a
commit 0ff9d7e189
32 changed files with 1910 additions and 636 deletions

View file

@ -266,7 +266,7 @@ void print_value(JS::Value value, HashTable<JS::Object*>& seen_objects)
if (value.is_string())
printf("\033[32;1m");
else if (value.is_number())
else if (value.is_number() || value.is_bigint())
printf("\033[35;1m");
else if (value.is_boolean())
printf("\033[33;1m");
@ -620,6 +620,7 @@ int main(int argc, char** argv)
stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Red), Line::Style::Underline });
break;
case JS::TokenType::NumericLiteral:
case JS::TokenType::BigIntLiteral:
stylize({ start, end }, { Line::Style::Foreground(Line::Style::XtermColor::Magenta) });
break;
case JS::TokenType::StringLiteral: