Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const digit

digit: Parser<string>

Parse a single digit

digit.matches('1') // true

Const exponent

exponent: Parser<string>

Parse an exponent

exponent.matches('e123') // true

Const floatingPoint

floatingPoint: Parser<number>

Parse a floating point number

floatingPoint.parseToEnd('1.2e3') // 1200

Const fraction

fraction: Parser<string>

Parse a fraction

fraction.matches('.123') // true

Const integer

integer: Parser<number>

Parse an integer

integer.parseToEnd('123') // 123

Const separatedFloatingPoint

separatedFloatingPoint: Parser<number>

Parse a floating point number with optional separators

separatedFloatingPoint.parseToEnd('1_000.2e3') // 1000200

Const separatedInteger

separatedInteger: Parser<number>

Parse an integer which may be separated with underscores

separatedInteger.parseToEnd('1_000') // 1000

Const sign

sign: Parser<string>

Parse a numerical sign

sign.parseToEnd('+') // '+'

Const signedFloatingPoint

signedFloatingPoint: Parser<number>

Parse a floating point number with an optional sign

signedFloatingPoint.parseToEnd('-1.2e3') // -1200

Const signedInteger

signedInteger: Parser<number>

Parse an integer, optionally preceded with a sign

signedInteger.parseToEnd('-123') // -123

Const signedSeparatedFloatingPoint

signedSeparatedFloatingPoint: Parser<number>

Parse a floating point number with optional sign and separators

signedSeparatedFloatingPoint.parseToEnd('-1_000.2e3') // -1000200

Const signedSeparatedInteger

signedSeparatedInteger: Parser<number>

Parse an integer with an optional sign and separators

signedSeparatedInteger.parseToEnd('-1_000') // -1000

Generated using TypeDoc