mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:15:09 +00:00
LibJS: Implement basic lexing + parsing of StringLiteral
This still includes the double-quote characters (") but at least the AST comes out right.
This commit is contained in:
parent
879bf3e97b
commit
ed100bc6f4
2 changed files with 9 additions and 0 deletions
|
@ -89,6 +89,8 @@ NonnullOwnPtr<Expression> Parser::parse_primary_expression()
|
|||
return make<NumericLiteral>(consume().double_value());
|
||||
case TokenType::BoolLiteral:
|
||||
return make<BooleanLiteral>(consume().bool_value());
|
||||
case TokenType::StringLiteral:
|
||||
return make<StringLiteral>(consume().string_value());
|
||||
case TokenType::CurlyOpen:
|
||||
return parse_object_expression();
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue