Constant sval::tags::NUMBER

source ·
pub const NUMBER: Tag;
Expand description

A tag for arbitrary-precision decimal numbers.

§Valid datatypes

  • text

§Grammar

^(?<sign>[+-])?(?<integral>[0-9]+)(?:\.(?<fractional>[0-9]+))?(?:[eE](?<expsign>[+-])?(?<exp>[0-9]+))?$

Examples of valid numbers include:

  • 1
  • +1
  • -1
  • 001
  • 123.456
  • 1e2
  • 123.456e789
  • 123.456e+789
  • 123.456e-789