mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:47:35 +00:00
LibJS: Add BigInt
This commit is contained in:
parent
40829b849a
commit
0ff9d7e189
32 changed files with 1910 additions and 636 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue