mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:55:09 +00:00
JSSpecCompiler: Parse enumerators in xspec mode
This commit is contained in:
parent
3d365326af
commit
990e30f458
13 changed files with 69 additions and 0 deletions
|
@ -316,6 +316,8 @@ TextParseErrorOr<Tree> TextParser::parse_expression()
|
|||
}
|
||||
}
|
||||
VERIFY(expression);
|
||||
} else if (token.type == TokenType::Enumerator) {
|
||||
expression = m_ctx.translation_unit()->get_node_for_enumerator_value(token.data);
|
||||
} else if (token.type == TokenType::Number) {
|
||||
expression = make_ref_counted<MathematicalConstant>(MUST(Crypto::BigFraction::from_string(token.data)));
|
||||
} else if (token.type == TokenType::String) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue