numberLiteral method

Parser<ConstantNode> numberLiteral()
inherited

Implementation

Parser<ConstantNode> numberLiteral() => token(
  [
    ref0(complexLiteral),
    ref0(floatLiteral),
    ref0(hexLiteral),
    ref0(octalLiteral),
    ref0(binaryLiteral),
    ref0(decimalLiteral),
  ].toChoiceParser(),
).map((t) => t.value);