I like to think about AST as a structured, semantic view of the source string.
From that perspective, what if we stored a number as a slice [start;end] and parsed it in the resolver instead?
My concern here is that storing numbers and parsing them differs between different programming languages Fluent may work in. Number is a low level primitive, but it still can differ in how it stores fractions, unsigned vs signed etc. By keeping AST free of that logic, we ensure that the AST is portable between the implementations irrelevant of how JS, Python or Rust treat numerical values.
Not a blocker, just a suggestion.
Originally posted by @zbraniecki in projectfluent/fluent.js#342
Originally posted by @zbraniecki in projectfluent/fluent.js#342