Note FIXME for suffixes

This commit is contained in:
Victor Song 2024-01-30 01:20:27 -06:00
parent 6cd458f3d0
commit 027f263ef5
2 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,7 @@ fn literal_from_str(
let kind = literal_to_external(literal.kind()).ok_or(Err(()))?; let kind = literal_to_external(literal.kind()).ok_or(Err(()))?;
// FIXME: handle more than just int and float suffixes
let suffix = match literal.kind() { let suffix = match literal.kind() {
ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(), ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(),
_ => None, _ => None,

View File

@ -67,6 +67,7 @@ fn literal_from_str(
let kind = literal_to_external(literal.kind()).ok_or(Err(()))?; let kind = literal_to_external(literal.kind()).ok_or(Err(()))?;
// FIXME: handle more than just int and float suffixes
let suffix = match literal.kind() { let suffix = match literal.kind() {
ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(), ast::LiteralKind::FloatNumber(num) | ast::LiteralKind::IntNumber(num) => num.suffix(),
_ => None, _ => None,